Monday, June 22, 2009

Activity 3:Image types and basic image enhancement


Objective: Differentiate image formats and apply basic image processing and conversion.

Tools: Image processing software and Scilab

Procedure: We use several different images:



1. RGBImage of NGC 2392, Eskimo Nebula
Taken from www.hubblesite.org200 x 200 pixels.
72x72 dpi
4kB in RGB











2. GrayscaleImage of M17 Nebula taken by HST
Taken from: http://www1.cs.columbia.edu
/~johnc/ta_page/
6998s07/schedule/proj1/proj1.html
200 x200 pixels
149.987 x149.987 dpi







3. Indexed
Colorized image of the entire sky at
gamma-ray energies
477x297 pixels
96 x 96 dpi
46.2 kB



Then in order to apply basic image processing techniques, we use a colored image and convert it to binary using a histogram routine to find the appropriate threshold value. Then we use the routine from the previous Activity to find the are of the ROI. Specifically, we use the figure shown below (taken from E. Marolda, The U.S. Navy in the Vietnam War)


This is then converted to binary using the im2bw routine which uses a threshold value to specify the gray level which is converted to either white or black. The following code is used to generate the historgram of the image:

clc
clf

img=imread('C:\Documents and Settings\2005-09860\Desktop\page3_2_en_sub.png');
//imshow(img);
a = 1;

g= [];
p= [];
for j = 1:256
[x, y] = find(img== j);
g(a) = j;
p(a) = length(x);
a = a + 1;
end
subplot(211)
//p=p/max(max(p));

plot(g,p)

-----------------------------------------------------------------------------------------------------
After conversion, the area of the image is taken using the routine in the previous activity. The routine indicates that this image has an are of 84500.5 units. Compared to the previous images processed, this appears to be a fairly accurate result.


Evaluation:For the effort expended and the acceptable result I can rate this as a 10.

Acknowledgements:I would like to thank Mr. Gubatan for insights on the histogram process as well as the usual folks for their assistance.

References: AP 186 Activity 3 Manual


No comments:

Post a Comment

Followers