Skip to main content

Activity 1 - Digital Scanning


The first activity for our AP 186 class was very interesting and quite useful. I have had problems before concerning manufacturers who give calibration curves but do not give the values. It’s really troublesome when you need them and you can’t find any way to retrieve the data. Fortunately, this digital scanning experiment resolves this dilemma.

Way back when computers were not yet easily accessible, graphs were still hand-drawn. In this activity, we went to the CS Library to find old journals or thesis papers from which we can choose a hand-drawn graph. Our chosen graphs are to be scanned as an image where data are to be extracted.

The graph that I chose was taken from the PhD Dissertation of Cherrie B. Pascual in 1987, titled, Voltammetry of some biologically significant organometallic compounds. The scanned image was tilted so I had to rotate it using Gimp v.2 (see Figure 1).

Figure 1. Concentration dependence of DPASV stripping peaks
of triphenyltin acacetate using an Edep = -1.0V and tdep = 1min.

Now that we have our image ready, we can now start the extraction of data by simply using ratio and proportion. For each axis, we take the ratio of the axis length in pixels and the axis length in actual units as indicated by the tick labels.


For the x-axis, 1180 pixels  corresponds to 20 in physical units which gives us a scaling factor of 0.016949 physical units/pixel. Meanwhile, for the y-axis, 1188 pixels correspond to 1.5 in physical units, resulting to a scaling factor of -0.00126. The negative sign compensates for the fact that the origin of an image is at the top left corner which makes the y-axis pixel values increase as you go down.

 By multiplying the x and y scale factors to any x and y pixel values, respectively, we can compute for their corresponding physical values. To reconstruct the graph, I used 20 points distributed along the curve. One important things to remember while doing the computation is to subtract the starting point of the graph from the obtained pixel values since the origin is not located at (0pixel, 0pixel).

I was so happy when I plotted the values that I calculated because I obtained a fairly good fit with the curve from the image as show in Figure 2. The generated curve is shown in red broken lines and the data points  which were represented as circles in the original graph are shown in yellow. However, there are some discrepancies with the x-axes of the plots, which I think is because the intervals of the ticks in the x-axis of the drawn graph are not perfectly equal. But still, I can say that the data extraction was successful. yey! :D 

Figure 2. Plot of the extracted true values (red and yellow) superimposed 
on the scanned image of the oriignal graph (black).  

I actually tried different ways to compute for the scaling factor. One was by plotting the tick mark value with respect to the corresponding pixel value than taking the slope of the best fit line. Another was to individually take the pixel values corresponding to a certain interval (e.g. 120 pixels bet. 0-2) and then take the average pixel interval and divide it by the smallest interval value (i.e. 2.0 and 0.5 for x and y). However, using all these methods gave me similar values for the scaling factors so I just settled for the easiest way.
I had fun doing this activity! :D 
And because I think I did a good job in reconstructing the graph and even trying out different possible ways, I give myself a perfect score of 10/10 .  :)

I would like to thank Ms. Mabel Saludares for sending me the scanned copy of my chosen graph and
Mr. Gino Borja for teaching me the subtleties of blogging. :D 
  

Comments

Popular posts from this blog

Activity 10 Applications of Morphological Operation 3 of 3: Looping through images

When doing image-based measurements, we often want to separate the region of interest (ROI) from the background. One way to do this is by representing the ROIs as blobs. Binarizing the image using the optimum threshold obtained from the image histogram simplifies the task of segmenting the ROI. Usually, we want to examine or process several ROIs in one image. We solve this by looping through the subimages and processing each. The binarized images may be cleaned using morphological operations.  In this activity, we want to be able to distinguish simulated "normal cells" from simulated "cancer cells" by comparing their areas. We do this by taking the best estimate of the area of a "normal cell" and making it our reference.  Figure 1 shows a scanned image of scattered punched papers which we imagine to be cells examined under the microscope. These will be the "normal cells." Figure 1. Scattered punched paper digitized using flatbe...

Activity 12: Basic Video Processing

Hello!  In this activity we will try to process a video of a kinematic event in order to extract information such as constants, frequencies, etc. For our group, we took a video of a 3D spring pendulum which we observed in one plane. We would like to trace its path and then try to determine its phase-space plot. The mass was covered in masking tape with the bottom colored red to facilitate easier segmentation. The video was taken using a Canon D10 camera at frame rate of 30fps.  Media 1. Video of the spring pendulum (first 50 frames only) The frames of the video were then extracted using Avidemux 2.5. The mass was then segmented from each frame using parametric segmentation. The patch of the region of interest (ROI) used for color segmentation is shown in Figure 1. Figure 1. Patch used to segment ROI  Using morphological operations, particularly Open and Close operations, the segmented images were cleaned. The extracted frames for different observation...

Activity 7: Morphological Operations

When talking about morphology, what immediately comes to mind are the forms and structures or shapes of objects. Hence, performing morphological operations imply that the shape or form of an object is altered.       In this activity, we will perform morphological operations on binary images. In particular, we make use of erosion and dilation . Erosion and dilation were performed on the following: 1. A 5×5 square 2. A triangle, base = 4 boxes, height = 3 boxes 3. A hollow 10×10 square, 2 boxes thick 4. A plus sign, one box thick, 5 boxes along each line Using each of the structuring elements below: 1. 2×2 ones 2. 2×1 ones 3. 1×2 ones 4. cross, 3 pixels long, one pixel thick. 5. A diagonal line, two boxes long, i.e. [[0 1],[1 0] ].      When performing these operations, it is important to note the “anchor” or “origin” of the structuring element in order to give an accurate prediction of the result. For the 2x2 ones, 2...