Monday, May 27, 2013

Change detection using Mean ratio operator

Unknown | 8:45 PM |

    change detection is nothing but process of detecting difference between two different images . this can also be performed  by using Mean Ratio operator  give below 
image
µ1, µ2 is local mean values of images A and B.
the underlying idea of the optimal difference image is that unchanged pixels exhibit small values,whereas changed areas exhibit larger values. it show  changed region  but it doesn't enhance it.result is better then that of log ratio operator

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 Mean 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
c=mean2(im2double(a));
d=mean2(im2double(b));
m=(a/c)-(b/d);
m=im2bw(m,.5);
%%step6
figure(1),imshow(a);
title('SAR image1');
figure(2),imshow(b);
title('SAR image2');
figure(3),imshow(m);
title('Mean Ratio image');

screen shot
source image A
image_thumb[4]
source image B
image_thumb[6]
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