A2 - Digital Scanning
We were tasked to recreate digitally scanned hand-drawn graphs. I used Image J to locate the pixel locations on the graph and Microsoft Excel to tabulate their coordinates.
The original scanned image , generously donated by my classmate Justine Carpio is shown below
Fig 1. Original image of hand-drawn graph digitally scanned and provided by Ms. Justine Carpio
The hand-drawn graph describes the relationship between the spectral radiance L vs the wavelength of blackbody sources at various temperatures. I chose to recreate the plot corresponding to the blackbody source at 1895 K. I cropped the graph from the above photo creating a new image file with dimensions 1036 x 1324. This is shown below
Fig 2. Cropped image of hand-drawn graph with dimensions 1036 x 1324 pixels
I then used Image J to find the pixel locations of the tick marks in the x and y axes. The y-axis is in the logarithmic scale so tabulating the results for the pixel locations of the tick marks in y-axis and its corresponding magnitude ( in log) I got the table below. The magnitudes are the physical variables which in this case are wavelength and spectral radiance.
y ticks pixels
|
Magnitude
|
1169
|
7
|
1008
|
8
|
849
|
9
|
691
|
10
|
531
|
11
|
371
|
12
|
211
|
13
|
54
|
14
|
Table 1. Pixel location and magnitude of the physical variable ( Spectral Radiance) of the tick marks in the y-axis
Graphing it and setting the linear trend line, I got the equation relating the pixel location a tick mark on the y-axis with its corresponding magnitude. This equation can then be used to find the magnitude on the y-axis of any point on the graph with a known y pixel location
Figure 3. Graph of Table 1 with the corresponding equation for the linear trend line giving the relationship between pixel location and radiance
I repeated this with the tick marks on the x-axis and its magnitudes giving me the table
x ticks pixels
|
Magnitude
|
175
|
0
|
334
|
1
|
491
|
2
|
650
|
3
|
812
|
4
|
974
|
5
|
Table 2. Pixel location and magnitude of the physical variable ( Wavelength) of the tick marks in the x-axis
Figure 4. Graph of Table 2. with the corresponding equation for the linear trend line giving the relationship between pixel location wavelength
with the equation for the linear trend line, y=.0063x -1.0867 , which I used to find the x-magnitudes of points with known x pixel locations.
I tabulated the a and y pixel locations of 17 points on the curve corresponding to the 1895 K blackbody source shown in the cropped image with dimensions 1036 x 1324 and applied the equations y=-.0063x + 14.332 to find the x-magnitudes and y=.0063x -1.0867 to find the y magnitudes which I tabulated. The process of using ratio and proportion is exercised by Microsoft Excel in the derivation of the trend line equation. I came up with the table shown below
test x
|
test y
|
test x mag
|
test y mag
|
|
229
|
1170
|
0.356
|
6.961
|
|
235
|
1090
|
0.3938
|
7.465
|
|
243
|
1010
|
0.4442
|
7.969
|
|
251
|
927
|
0.4946
|
8.4919
|
|
259
|
850
|
0.545
|
8.977
|
|
270
|
768
|
0.6143
|
9.4936
|
|
287
|
690
|
0.7214
|
9.985
|
|
312
|
618
|
0.8789
|
10.4386
|
|
341
|
564
|
1.0616
|
10.7788
|
|
424
|
530
|
1.5845
|
10.993
|
|
494
|
546
|
2.0255
|
10.8922
|
|
576
|
566
|
2.5421
|
10.7662
|
|
657
|
596
|
3.0524
|
10.5772
|
|
735
|
624
|
3.5438
|
10.4008
|
|
818
|
650
|
4.0667
|
10.237
|
|
890
|
670
|
4.5203
|
10.111
|
|
980
|
688
|
5.0873
|
9.9976
|
Table 3. x and y pixel locations of 17 points chosen on the curve corresponding to the blackbody source as 1895 K and its computed magnitudes using the equations shown in Table 1 and 2.
where the columns text x and text y correspond to the pixel locations of the 17 chosen points and the columns test x mag and text y mag correspond to the magnitudes of these points in the x and y -axes. I graphed these magnitudes and made the background image of the plot a cropped image showing the curve of the blackbody source at 1895 K. The plot of the graph using the values from the table above almost matches the actual one as shown in the figure below.
Figure 5. Final Output. Graph of the computed x and y magnitudes shown in Table 3 which is an attempted recreation of the plot shown in Figure 2 ( specifically the curve corresponding to the blackbody source at 1895 K). the recreated curve matched the actual curve.
No comments:
Post a Comment