In this activity, we aim to reconstruct a digitally scanned hand-drawn plot by using ratio and proportion.
The plot I used was taken from the College of Science Library from the old journals section and was scanned by Ate Lina Galapon of the NIP.( It was my first time to go up to the second floor of the lib. :)) Good opportunity before I graduate! )
Figure 1. Scanned hand-drawn plot from a very old Applied Physics journal in the CS Lib |
The image is 834x625 in size. First, I took the coordinates of the graph tick marks. For convenience in identifying the coordinates, I zoomed in through the image (800%). Now that I have the coordinates, what I did was to take the difference between the adjacent ticks to determine the number of pixels corresponding to a unit. Along the x-axis, there is an average of 73 px in between the tick marks and 91 px along the y-axis.
Figure 2. Image dimension and other noted measurements used for removing the translation |
Next, we were asked to choose arbitrary points on the plot curve that would help us reconstruct the original one. Since, the origin of an image is at the upper left corner as noted by Patrick Elegado, I needed to adjust the y coordinate of the arbitrary points. To do that, we subtract the y-values from 625. Doing that I got this plot:
It does not end there. We also needed to remove the translation along both directions by subtracting the number of pixels corresponding to the margin of the plot. Given the origin of the plot to be at (94,572), the $(x,y)_{new} = ( x_coordinate - 94, y_coordinate - 53)$ .
Figure 3. Plot of the arbitrary points |
It does not end there. We also needed to remove the translation along both directions by subtracting the number of pixels corresponding to the margin of the plot. Given the origin of the plot to be at (94,572), the $(x,y)_{new} = ( x_coordinate - 94, y_coordinate - 53)$ .
Finally, to get $(x,y)_{actual}$ which is the actual pixel value along x and y after proper scaling we use dimensional analysis.
$X(px) * \frac{1 actual}{73 px} = X(actual)$
$Y(px) * \frac{0.25 actual}{91 px} = Y(actual)$
Overall, I had fun doing this activity. Haha I was also able to laugh at how sabaw I am when I consulted Maam Jing about the physical equation part (which in my case is y = mx + b) and then Maam Jing went over to see what I'm doing because I was talking about averaging the slopes between any two of my chosen arbitrary points but huhu Maam came over and showed me how powerful Excel is! Oo nga, may best fit line :) Ayun.
References:
[1] M. Soriano. "A2-Digital Scanning", AP186 Manual.(2016)
No comments:
Post a Comment