Analyzing and Enhancing Images

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Data Percobaan 11

Analyzing and Enhancing Images

A. Pixel Values and Statistics


1. Pixel selection

2. Intensity Profile
I = fitsread('solarspectra.fts');
imshow(I,[]);
improfile
3400

3200

3000

2800

2600

2400

2200

2000

1800
0 10 20 30 40 50 60 70 80 90 100
Distance along profile
3. Plot Produced by improfile
300

250

200

150

100

50

0
0 50 100 150 200 250
Distance along profile

4. Image Contours
5. Image Histogram

B. Image Analysis
1. Edge Detection
2. Boundary Tracing
3. Line Detection Using the Hough Transform

4. Quadtree Decomposition
C. Texture Analysis
1. Texture Filter Functions

2. Gray-Level Co-occurrence Matrix (GLCM)


>> circuitBoard = rot90(rgb2gray(imread('board.tif')));
imshow(circuitBoard)
>> offsets0 = [zeros(40,1) (1:40)'];
>> glcms = graycomatrix(circuitBoard,'Offset',offsets0)
>> stats = graycoprops(glcms,'Contrast Correlation');
>> figure, plot([stats.Correlation]);
title('Texture Correlation as a function of offset');
xlabel('Horizontal Offset')
ylabel('Correlation')
D. Intensity Adjustment
1. Adjusting Intensity Values to a Specified Range

2. Specifying the Adjustment Limits


3. Plots Showing Three Different Gamma Correction Settings
[X,map] = imread('forest.tif')
I = ind2gray(X,map);
J = imadjust(I,[],[],0.5);
imshow(I)
figure, imshow(J)

4. Histogram Equalization
I = imread('pout.tif');
J = histeq(I);
imshow(J)
figure, imhist(J,64)
5. Image After Histogram Equalization with Its Histogram
I = imread('pout.tif');
[J,T] = histeq(I);
figure,plot((0:255)/255,T);

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

6. Contrast-Limited Adaptive Histogram Equalization


7. Decorrelation Stretching
>> A = multibandread('littlecoriver.lan', [512, 512, 7], ...
'uint8=>uint8', 128, 'bil', 'ieee-le', ...
{'Band','Direct',[3 2 1]});
>> B = decorrstretch(A);
>> imshow(A); figure; imshow(B)

You might also like