Overview Schedule Announcements Resources Assignments Home

CSC 121: Computer Science I, Spring 2005

Project 4

Unistroke Character Recognition
Deadline: 5:00pm, Friday, April 29

Items to do and point distribution:

RonCo PDA, Inc. has issued a recall for 100,000 of their latest model "Palm Pilot" class PDAs. It seems that there is a bug in the unistroke character recognition module. No digits can be recognized! With your vast experience writing video games, calculator and bank simulations, you have been assigned the task of fixing this bug. Unfortunately, management has discovered the reason digits are not being recognized is because quality control missed the fact that most of the code to do this was not written! All of the missing code will be contained in the Recognizer class. You do not need to modify any other classes in the project.

You should make sure you understand the steps in the pattern recognition process (algorithm) that were discussed in class. Namely, translate the array of points captured by the mouse events, scale them, and normalize them. Then compare the resulting set of points with a "standard" set of patterns (the baseset) to find the baseset pattern that matches best. All of the methods you write will be from scratch. You will find that the normalize step has already been completed for you.

Copy the project I:\CSC121\public\graffiti to your own folder, and then open it in BlueJ. You will find various items labeled TO DO in the source files; these are the pieces that need to be written. Each TO DO item is described in more detail in the Recognizer class. For your efforts in completing this project, you will be awarded the following point values and your help will prevent RonCo PDA, Inc. from going bankrupt:

  1. (10 points) Write the method findMinX. It returns the smallest x value in the userStroke array of points.
  2. (5 points) Write the method findMinY. It returns the smallest y value in the userStroke array of points.
  3. (10 points) Write the method findMaxX. It returns the largest x value in the userStroke array of points.
  4. (5 points) Write the method findMaxY. It returns the largest y value in the userStroke array of points.
  5. (15 points) Write the translate method. It moves the points in the userStroke array by sliding them as far to the upper-left as possible.
  6. (15 points) Write the scale method. It scales the points in the userStroke array by stretching the user's stroke to fill the canvas as nearly as possible while maintaining the aspect ratio of the stroke.
  7. (15 points) Write the computeScore method. It computes and returns a "score" that is a measure of how closely the normalized userStroke array matches a given pattern array in the baseset array.
  8. (15 points) Write the findMatch method. It finds and returns the index (an int) of the base set pattern which most closely matches the user stroke.
  9. (10 points) Programming style, formatting (readability), and comments, especially describing methods.
Turning in your project:
When you are finished, copy your project to the appropriate folder under I:\CSC121\project-04 and send an email message to your instructor naming the members (1 or 2) of your team.
Overview Schedule Announcements Resources Assignments Home

Valid HTML 4.01!Valid CSS!DePauw University , Computer Science Department , Spring 2005
Maintained by Brian Howard ( bhoward@depauw.edu ). Last updated