Monday, June 10, 2013

Applied Physics 186 Digital Scanning


The objective of this experiment was to digitally reconstruct a hand-drawn graph. This was done via Ratio and Proportion between the pixel and data values of the graph. Here is the graph/curve I used:


To convert the data in this image,  I had to find the pixel location/coordinates of each of the tick marks for the x-axis and the y-axis. Next I located the pixel coordinates of  80 randomly selected points on the curve. I chose as many points as possible so that interpolation would easily be done.  At first I tried to average the tick mark distances in pixels, (which would give me the average pixels per tick mark) and multiplied it to the 80 randomly selected points with certain shift to compensate for the non-zero values at the origin. (The origin is not 0,0 but starts at 1, 9.) Anyhow, this was a rather crude method as averaging lies in assuming that the all tick mark distances are of equal distances.
As such, my work was corrected thanks to Mum Jing. Instead I correlated the x-axis tick mark values with the pixel coordinates by linearly plotting their relationship. You could recall this method being used often in experiments such as finding the spring constant of a certain spring-mass system. I needed the equation of the line. I would then use these equations to convert the 80 randomly selected data points of the curve to digital data.



Here is the curve of the 80 random points on the plot. The values of the x-axis and the y-axis were reconstructed and I was able to successfully replicate the graph!


Just to check if the relation between the original curve and reconstructed curve was okay, I super-imposed them by changing the filter of the reconstructed plot to transparent. I then re-sized them properly via ratio/proportion so that their tick marks coincided. Here is the resulting overlay:

Some error that may have propagated was the thickness of the line when I hovered my mouse to locate its pixel location. Since the curve's line was pretty thick, there were more than one pixel coordinate at any point. Thus I got points that were a little off. The only to solve this is gather many points, and possibly interpolate them with interpolation programs. I will update this blog later on to show how that is done. Well that's it for now!

No comments:

Post a Comment