Monday, May 27, 2013

Change detection using log ratio operator

Unknown | 7:51 PM |

    change detection is nothing but process of detecting difference between two different images . this can be performed  by using Log Ratio operator
image

The logarithmic operator is characterized by enhancing the low-intensity pixels while weakening the pixels in the areas of high intensity;therefore,the information of changed regions that is obtained by the log-ratio image may not be able to reflect the real changed trends in the maximum extent because of the weakening in the
areas of high-intensity pixels.

procedure is giveb below

STEP1 : clear previous project variable, clear history , and close all the window
STEP2 : Read the two source images as A and B

STEP3: Resize the image B to the size of image A to avoid the matrix mismatch error
STEP4: convert to gray scale image to if it is color image (if dimension is 3 then it is color image )
STEP5: Fing the difference between image using Log Ratio operator
STEP6: Display the source and Rasult image

Coding is given below

%%step1
close all
clear all
clc
%%step2

[filename pathname]=uigetfile({'*.bmp';'*.jpg';'*.png';'*.tif'},'Select  SAR image 1');
a=imread([pathname filename]);
[filename pathname]=uigetfile({'*.bmp';'*.jpg';'*.png';'*.tif'},'Select  SAR image 2');
b=imread([pathname filename]);
%%step3
b=imresize(b,[size(a,1) size(a,2)]);
%%step4
dim=ndims(a);
if(dim==3)
    a=rgb2gray(a);
end
dim1=ndims(b);
if(dim1==3)
    b=rgb2gray(b);
end
%%step5
log1 = uint8(log(double(a)));
log2 = uint8(log(double(b)));
l=log1-log2;
l=im2bw(l,0);
%%step6
figure(1),imshow(a);
title('SAR image1');
figure(2),imshow(b);
title('SAR image2');
figure(3),imshow(l,[]);
title('Log Ratio image');

screen shot
source image A
image
source image B
image
result image
image

No comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Search

Infolinks In Text Ads

Total Pageviews

Subscribe here

Enter your email address:

Delivered by FeedBurner