Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 2 0 points ) The US Postal Service handles over 1 5 0 , 0 0 0 , 0 0 0 , 0 0
points The US Postal Service handles over pieces of mail every year. With this sort of volume, it is impractical if not impossible for every destination address to be read and analyzed by a person. The natural solution? Computerized handwriting recognition software. In this problem, you will be writing a program which will automatically identify a series of five numbers, such as would be found in a zip code. It is necessary for our system to know what different numbers look like. This is done by normalizing and analyzing a set of "test" images. Each number is made approximately the same size and stored in a matrix, with each element corresponding to a grayscale value between and black, white Then all the matrices associated with one number are analyzed to determine what an average handwritten number looks like. Fortunately, this has already been done so you can start with a set of reference numbers to compare with, which are shown here: Note that these are a little fuzzy around the edges, as all handwritten numbers look a bit different. The goal is that one of these reference numbers is more similar to the number we are trying to identify than the others, and we will then assign the handwritten number the value of the most similar reference number. Start by downloading the file input mat from Canvas. Contained in this file you will find an array of cells called digitavg, which stores the reference numbers, and the series of numbers you are to decipher, sample. Accessing a reference numbers is as easy as calling the number you want with curly brackets. For example digitavg returns the reference matrix for the number one, digitavg returns the matrix for the number two, and so on The exception is zero, which is stored as digitavg You can plot a single reference digit with the following command, here for : imshowdigitavg If you want this to be bigger, use imshowdigitavg 'InitialMagnification', The numbers to be identified, in samplo are: Recall that each number is a matrix, so the first columns are the first number, the next columns are the second number and so on First, write in function called digitcomparo.m which takes as input two matrices, and returns the sum of the squares of the differences between the corresponding elements. For example, for the matrices and it should calculate This function can be used to give a sealar measurement of how similar two images of numbers are to each other, with a smaller result meaning that they are more similar. For example, compare digit comparosamplo; : digit avg to digit comparosamplo; : digitavg Next, write a program called handyritingid w which successively considers pach of the five numbers in sampto from left to right, comparing earh to the possible reference numbers in digit avg to determine which is most similar here you'll want to make calls the commanand window,
points The US Postal Service handles over pieces of mail every year. With this sort of volume, it is impractical if not impossible for every destination address to be read and analyzed by a person. The natural solution? Computerized handwriting recognition software. In this problem, you will be writing a program which will automatically identify a series of five numbers, such as would be found in a zip code.
It is necessary for our system to know what different numbers look like. This is done by normalizing and analyzing a set of "test" images. Each number is made approximately the same size and stored in a matrix, with each element corresponding to a grayscale value between and black, white Then all the matrices associated with one number are analyzed to determine what an average handwritten number looks like. Fortunately, this has already been done so you can start with a set of reference numbers to compare with, which are shown here:
Note that these are a little fuzzy around the edges, as all handwritten numbers look a bit different. The goal is that one of these reference numbers is more similar to the number we are trying to identify than the others, and we will then assign the handwritten number the value of the most similar reference number.
Start by downloading the file input mat from Canvas. Contained in this file you will find an array of cells called digitavg, which stores the reference numbers, and the series of numbers you are to decipher, sample. Accessing a reference numbers is as easy as calling the number you want with curly brackets. For example digitavg returns the reference matrix for the number one, digitavg returns the matrix for the number
two, and so on The exception is zero, which is stored as digitavg You can plot a single reference digit with the following command, here for :
imshowdigitavg
If you want this to be bigger, use
imshowdigitavg 'InitialMagnification',
The numbers to be identified, in samplo are:
Recall that each number is a matrix, so the first columns are the first number, the next columns are the second number and so on
First, write in function called digitcomparo.m which takes as input two matrices, and returns the sum of the squares of the differences between the corresponding elements. For example, for the matrices and it should calculate
This function can be used to give a sealar measurement of how similar two images of numbers are to each other, with a smaller result meaning that they are more similar. For example, compare
digit comparosamplo; : digit avg
to
digit comparosamplo; : digitavg
Next, write a program called handyritingid w which successively considers pach of the five numbers in sampto from left to right, comparing earh to the possible reference numbers in digit avg to determine which is most similar here you'll want to make calls the commanand window,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started