block the images and then do bilateral subtraction between both images

2 views (last 30 days)
1) i need to divide both images into equal number of blocks like each block should be of 64*64 and each image is divided into 16 blocks
2) then bilateral subtaction between both images is taken (like first block of both images are subtracted and the average value of all pixel in each block is calculated
3)then need to compare this average value with the threshold value (if the value crosses the threshold limit then consider that a doubtful case and show those blocks
that's basically my project on MRI and comparison is done between MRI of normal image and patient image so i am sending reference images. i need to find out the change between both scenes so i can apply on my images
need to find the blocks having differences in reference image as the other image is kept as standard
  2 Comments
John D'Errico
John D'Errico on 15 Feb 2014
This is not a question. It is a statement of your project. Are you hoping someone will do your work for you? Surely you have an idea of how to do at least part of that. If you don't have any idea at all, then you are way out of your depth. Maybe you should be taking an easier course?
START WRITING. When you run into a problem, then ask a specific question to resolve your problem.
Filza Ashraf
Filza Ashraf on 24 Feb 2014
i blocked the both images through 'mat2cell' the code i used is
S= imread ('standard.jpg'); S = rgb2gray (S); div1= [400 400 400 400]); div2 = [640 640 640 640]); Bs = mat2cell (S, div1, div2);
now if i want to view my block i have to give command imshow (Bs{1,1})to {4,4} OR imshow (Bs{1}) to {16}
same code is applied for reference image as Br = mat2cell(R , div1, div2);
but now i need to apply subtraction of 1st block of Bs with 1st block of Br ... please help

Sign in to comment.

Accepted Answer

Filza Ashraf
Filza Ashraf on 15 Feb 2014
this is reference image

More Answers (2)

Filza Ashraf
Filza Ashraf on 15 Feb 2014
standard image

Image Analyst
Image Analyst on 15 Feb 2014
Hopefully this is just a homework problem or, at most, an undergraduate project because what you've stated is nowhere close to what would be required for a graduate level thesis or dissertation. Two lines of code won't cut it for a Ph.D. or even a masters.
differenceImage = double(image1) - double(image2);
binaryImage = abs(differenceImage) > thresholdValue;
I didn't divide it up into blocks because there is no benefit to doing that. You can do it on a pixel by pixel basis and then threshold at a different level than you'd do with the block method, and then look for blobs bigger than a certain size to identify regions with substantial differences.

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!