Geoscience Reference
In-Depth Information
I2 729x713 519777 uint8
ans 6x6 36 uint8
in which the dif erence between the 24-bit RGB and the 8-bit grayscale arrays
can be observed. h e variable ans for Most recent answer was created above
using I1(50:55,50:55,1) , without assigning the output to another variable.
h e commands
imshow(I2)
display the result. It is easy to see the dif erence between the two images in
separate Figure Windows. Let us now process the grayscale image. First, we
compute a histogram of the distribution of intensity values.
imhist(I2)
A simple technique to enhance the contrast in such an image is to transform
this histogram to obtain an equal distribution of grayscales.
I3 = histeq(I2);
We can view the dif erence again using
imshow(I3)
and save the results in a new i le.
imwrite(I3,'unconform_gray.jpg')
We can read the header of the new i le by typing
imfinfo('unconform_gray.jpg')
which yields
ans =
Filename: [1x40 char]
FileModDate: '18-Dec-2013 11:26:53'
FileSize: 138419
Format: 'jpg'
FormatVersion: ''
Width: 713
Height: 729
BitDepth: 8
ColorType: 'grayscale'
FormatSignature: ''
NumberOfSamples: 1
CodingMethod: 'Huffman'
CodingProcess: 'Sequential'
Comment: {}
Search WWH ::




Custom Search