A1: Digital Scanning

In this activity, the scanned copy of a hand-drawn plot was digitally reproduced. The plot (Figure 1) was acquired from a book by Ross Aiken Gortner entitled "Outlines Of Biochemistry" that was published in 1938. From Figure 1 we see that even with the grid lines, it is hard to accurately determine the values at each data point presented on the plot. By reproducing the graph, we will be able to more accurately determine these values.

Figure 1. Scanned 1983 plot that shows the trend in conductivity of dilute HCl with amount of egg albumin (protein).

We start off using the GNU Image Manipulation Program (GIMP) in the determination of pixel locations for x and y axis markers and data points. We note that the origin (0,0) in pixels is located on the upper left corner of the image; x values increase as you go right and y values increase as you go down. Based on x-axis pixel locations, plot orientation may be determined. From Table 1, we find that y pixel values varied by 593-588=5 hence, the plot has been rotated by sin-1(5/(690-92))=0.01o from the horizontal. This could not be corrected on GIMP since the software does not allow image rotations of angles less than 1o.
Table 1. X-axis x and y pixel locations and physical values.

From pixel locations of the axis points, we calculate the distance (in pixels) between each tick mark and get the average for each axis (assumption: grid lines drawn were spaced equally). The average distance of tick marks was 99.67px and 97.83px for the x and y axes, respectively. Hence, 1g is to 99.67px on the x-axis (x ratio) and 50MC is to 97.83px on the y-axis (y ratio). We then set the origin in pixels using x'=x-xo and y'=yo-y (since increase in y-axis px is downward) where x and y are pixel locations and xo and yo are 92px and 593px, respectively (from Table 1). To obtain the physical values, we multiply the zeroed x and y by the previously computed x and y ratios, respectively, so that X' = x' * x ratio and Y' = y' * y ratio. Note that the original plot starts at (0,50) so a shift of 50MC is needed on the y-axis. Finally, we have the following equations for conversion from pixel values to physical values:
X = (x-xo) * x ratio
Y = ((yo-y) * y ratio) + 50MC
Substituting the constants:
X = (x-92px) * (1g/99.67px)
Y = ((593px-y) * (50MC/97.83px)) + 50MC

Using these equations on the pixel locations approximated for each data point on the original plot, we are able to the calculate physical values that couldn't be accurately determined by merely looking at the plot. Figure 2 shows the regenerated plot based on the values in Table 2.

Table 2. x and y pixel locations and calculated physical values for data points.

Figure 2. Regenerated plot.

To check the accuracy of the regenerated plot, we need to superimpose it with the original image. This may be done in OpenOffice Calc by adding the scanned image (in Bitmap format) in the the Bitmaps gallery and then using that image as fill for the Chart Area of the regenerated plot. To add the image in the gallery, we first select the plot (click once) and then clicking on the "Area" button represented by a tilted bucket ( ) that appears on the toolbar. On the new window that appears, select the "Bitmaps" tab and then click "Import." On the file browser that opens, navigate to and then select the image of the original plot you wish to superimpose with the new plot. The image will then have been added to the Bitmaps gallery.

Now, to fill your plot's chart area with the new image, select your plot for editing (right-click on the plot and then select "Edit" on the popup menu that appears or simply double-click the plot). Then right-click on the Chart Area (the area that actually contains the data points and excludes all axis labels and legends) and select "Object Properties..." on the popup menu that appears. On the new window that appears, select the "Area" tab and in the "Fill" drop down menu, select Bitmap. You will then be presented with a selection of images from the Bitmaps gallery. Select your scanned image, make sure the "Tile" box is unticked (so the the whole image is autofitted into the whole chart area), and click "Ok" and you're done! In case the desired image does not appear in the selection (this happened to me), just restart OpenOffice Calc and the image should be there for your use. One important factor in the fitting the image and the plot is the cropping done on the scanned image; images need to be cropped up to the borders.

Figure 3 shows the regenerated plot superimposed with the original plot. Note that the data points from the original plot represented by unfilled holes have been filled by the red markers from the new plot and the lines in between data points do approximately coincide. Differences may be attributed to the smoothing method used by OpenOffice Calc and to the orientation of the scanned plot image (quite noticeable in Figure 3).

Figure 3. Regenerated plot (red) superimposed with scanned image of original plot.

I give myself a grade of 9 in this activity because the points on the reconstructed plot seem to accurately coincide with those on the original plot.

I would like to thank Dr. Maricor Soriano and Dr. Gay Jane Perez for their help on the superimposition of the scanned image and the regenerated plot. I would also like to acknowledge the suggestions made by Mr. Jay Samuel Combinido, Mr. Miguel Sison, Ms. Cherry May Palomero and most importantly Ms. Ma. Herminia Balgos on the hand-drawn plot to use in this activity.




Powered by ScribeFire.

1 comments:

Jing said...

Looks good! The handdrawn graph has gridlines that seemed to have skewed. It could have happened during scanning or photocopying. But I disagree, a grade of 10, not 9, is deserved.

Post a Comment