This program does the following:
+ Reads raw data from the vision machine for pad locations and fiducial
+ Reads file with theoretical pad locations
+ Generates a coordinate transformation using a least square fit so that the measured pad locations will come as close as possible to the theoretical locations.
+ Shows the fiducial locations in the corrected coordinate frame.
+ Shows the difference between these corrected fiducial coordinates and the theoretical locations
First the various routines for this calculation are setup.
To get directly to data entry and the output of results flip to page 4
Routine for extracting and formatting the raw pad coordinate data into a more convenient representation
(note output from Mathcad routines are always returned through the name of the routine, the form can be quite varied.)
Routine for extracting and formatting the fiducial coordinates.
Routine for rotating a set of coordinates to a new frame using the rotation angle and displacement contained in R
Point by point separation between two sets of points
Standard deviation in x between two sets of points, excluding points with a distance of separation greater than e
Routine to extract the new coordinate frame parameters using a least square fit.
Xd : the desired or theoretical pad coordinates
Xm : the measured set of pad coordinates
Outliers or points with a separation exceeding e are excluded in this determination
Read in data files. The ordering is as appears in the raw data but the text must be removed before reading in.
Read in raw pad data. Type in the file name like
inr_pad_10a.txt The result appears with "txt" looking like a subscript and the "." doesn't show. This is a Mathcad feature.
Read in the true or theoretical data.
Generate the transformation parameters
SPECIFY POINT EXCLUSION DISTANCE HERE
Transform fiducial data
to new coordinate frame
DATA SET inr_pad_9a.txt and inr_pad_9b.txt
FIDUCIAL CORRECTION PARAMETERS
The following are calculations to setup pad point distortion pictures. Skip to page 7 to see results
Rotate the measured pad data to the new coordinate frame
Add in the fiducial points to the pad points and display
Comparison of corrected pad measurements with theoretical points
THEORETICAL POINTS BOX
DATA SET A MEASUREMENTS DIAMOND
DATA SET B MEASUREMENTS +
error magnification factor in the plot
DATA SET inr_pad_8a.txt and inr_pad_8b.txt
Comparison of raw pad measurements with theoretical points
THEORETICAL POINTS BOX
DATA SET A MEASUREMENTS DIAMOND
DATA SET B MEASUREMENTS +
error magnification factor in the plot
DATA SET inr_pad_10a.txt and inr_pad_10b.txt
Some information on distances between measured and theoretical points
HISTOGRAM SHOWING DISTRIBUTION OF DIFFERENCES
BETWEEN MEASURED POINTS AND THEORETICAL
Distance between measured and theoretical points (mm)
DATA SET inr_pad_10a.txt and inr_pad_10b.txt
Added distortion to test program's ability to recover correct transformation.