Monday, June 15, 2009

Activity 1: Digital Scanning

Introduction
In this activity, ratio and proportion was used to find the numerical values of a digitally scanned plot. (See figure 1.)

The numerical values were deduced from the pixel locations of the plot given as x- and y-coordinates. MS Paint was used to find the pixel locations which were then tabulated in OpenOffice Calc.

Since we are dealing images, the coordinate axes is a bit different in the traditional sense. The origin (i.e. pixel location (0,0)) is located at the upper left corner of the image and the positive y-axis is reversed. he origin of the plot is at some pixel location (h, k). For simplicity, h is subtracted from the pixel locations along x and k is subtracted from the pixel locations along y

xnew = xi - h
ynew = -
(yi - k)

Note that the negative sign for the y pixel location comes from the fact that the y-axis for images is reversed (refer to figure 2).

After translating the axes, the ratio for converting pixel values to actual values is computed. This was done by counting the number of pixels between tick marks on the plot and noting the corresponding increment size in the actual values. Along the horizontal, a pixel difference of 76 was found for each 5 deg C increment. Along the vertical, a pixel difference of 117 was found for each 0.001 increment. Thus the computed ratios are

ratiox=actual diff/pixel diff = 5/76 = 0.066
ratioy=actual diff/pixel diff = 0.001/117 = 0.000009


Therefore the actual values are

xactual = xnew*ratiox
yactual = ynew*rati
oy

For the plot that i've chosen, it is necessary to add 1.0 to the y values since the y-axis does not start at zero but rather at 1.0. The reconstructed plot is as follow


To compare the original plot with the reonstructed one, the former was set as a background for the latter. As with figure 3, the reconstruction is quite satisfactory.

OpenOffice Calc: Adding an image in the chart wall


To add an image in a
n OpenOffice Calc chart, the first thing to do is add the desired image to bitmap list of Calc
1. Select the chart then click Format -> Graphics -> Area
2. Click the Bitmap tab then click Import.
3. Select the image that you want.
4. Save the list.
5. You need to restart Calc before you can use the newly added image. Be sure to save your work first. (thanks to Janno)

Once your done, you may
6. Right-click on the chart and then select Chart Wall.
7. Click on the Area tab and in the pull-down menu select Bitmap. Your image should be there.
8. Set it to Stretch to fit.
9. Click Ok and your done. You may also want to check the scale of your axes.


For this activity I'll give myself a 9.0. ^_^

[1] Kimball, A. (1911). College Textbook of Physics. Henry Holt and Company.

1 comment:

  1. WaHOW! Looks good. Tick marks along x seem slightly off. Did you try to correct this? Like did you try getting the average number of pixels per tick marks?

    ReplyDelete