Finding values of digitally scanned plots

This activity is from one of my applied physics courses which deals with image processing methods.

Given digitally scanned plots such as hand-drawn historical or old plots or even the computer generated ones, you could get the values by simple ratio and proportion. This sounds so simple but takes a lot of time and focus.

To start with, I have scanned a plot (shown below) from one of the science book in our local library. My example here is a plot that is computer generated. It is best that you find the old hand-drawn plots to really see its importance.

image
Source: P.C. Reist, Aerosol Science and Technology, 2nd ed.

You would first want that the plot be cropped and rotated to align vertically as much as possible. This can simply be done by importing the image in any image editor available. I used GIMP since it is where I’m most comfortable plus it has what I needed for this activityAfter cropping and rotating the image, it should now look like the one below.

image-edit

Here comes the ratio and proportion part. We’ll make use of the presence of the tick marks which are the numbered labels in the x and y axes. Before going through, let me define two things. First is physical coordinate which takes on the values as shown on the plot. Second is pixel coordinate which takes on the values in terms of pixels. The pixel coordinate can take only values between zero and the dimensions of the image. In my case, the image size is 391 x 358. Thus, my pixel values should not exceed these numbers.

Next was to open the image in an editor and make sure that the pixel location is seen every time the mouse pointer hovers on the image. On every tick position, record or tabulate the x and y pixel values. For example, my physical coordinate origin (0,0) has pixel coordinate of (50,316).

We wish to find an equation that would transform the pixel coordinates to its physical coordinates. (From here on, let me use the word “values” instead of “coordinates”). Take the lengths from one tick to the next tick for both physical and pixel values. The scaling factor would be

scale factor = (pixel length )/ (tick length)

For my case, my scaling factor was 43.4 pix/tick in the x-axis and 43.4 pix/tick in the y-axis.

We now proceed in getting the pixel coordinates of the main graph and use the scaling factor to get the physical x and y values. Using these physical values, we can simply plot it using the excel plotter. Overlapping the reconstructed plot with the original image, it would somewhat look like the one below.

overlay1

By aligning the tick points of the excel plot to the original image, we have clearly shown that the method was successful.

I think the next step after this is to create a program that would automate the method of manually getting all pixel points. But for now, the concept proves to be fun and interesting. END

 

 

 

Advertisements

Author: klguial

undergraduate physics student

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s