how can i subtract one image from another either row wise or column wise ?
A:
Use OpenCV Have two IPlImage variables point to your two images and subtract them..like this
IplImage im1=your image1;
IplImage im2=your image2;
IplImage im3;
cvSub(im1,im2,im3);
Obviously you need to open the images first. This works because iplimage is a derived structure from mat
Ram Bhat
2010-06-19 20:18:33
thanks for the answer but i neeed in matlab if you dont mind giving me in matlab
2010-06-19 20:22:22
+1
A:
I don't quite understand what you mean with 'row-wise' or 'column-wise'. In MATLAB, you can subtract two images from one another directly, as long as they're the same size, of course.
%# load the images
im1 = imread('firstImage.tif')
im2 = imread('secondImage.tif')
%# subtract
deltaImage = im1 - im2;
Note: If you have the image processing toolbox, you can use deltaImage = imsubtract(im1,im2)
to deal with underflow if your images are integer arrays.
Jonas
2010-06-19 20:25:12
i mean to say that i want to subtract from the pixel wise either from row wise or column wise and to get the difference
2010-06-19 20:31:12
Since you don't need to loop in order to subtract images, there is no need to worry about rows/cols.
Jonas
2010-06-20 01:10:32