Borrar filtros
Borrar filtros

find difference between two images block wise

1 visualización (últimos 30 días)
Filza Ashraf
Filza Ashraf el 22 de Feb. de 2014
Comentada: Image Analyst el 25 de Feb. de 2014
i have two images one is standard image and the other is reference image i need to find the difference between 1st block of standard image with the first block of reference image and so on the code i used for blocking is S = imread ('standard image'); R = imread ('reference image');
% then converted images to grayscale images S = rgb2gray(S); R = rgb2gray (R);
% blocking of both images( as both images have 1600x2560 size) so i'm dividing it into 16 blocks of 4*4 matrix with block size of 400x640
div1= [400 400 400 400]; div2 = [640 640 640 640];
Bs = mat2cell (S, div1, div2); Br = mat2cell (R, div1,div2);
for viewing the blocks i can use imshow (Bs{1,1}) to Bs {4,4} OR simply by imshow Br {1} to Br {16}
i need to find the difference by subtracting the blocks. i can do it manually but i need a loop to find it all on it own please need help

Respuesta aceptada

Filza Ashraf
Filza Ashraf el 22 de Feb. de 2014
these are reference and standard images and if there is any difference in image then consider it that these images are different

Más respuestas (1)

Dishant Arora
Dishant Arora el 22 de Feb. de 2014
SubtractedCell = cellfun(@minus,Bs,Br,'Un',0)
  3 comentarios
Dishant Arora
Dishant Arora el 25 de Feb. de 2014
Do you get any warning,any error?? Output's gonna be a cell, individual arrays representing difference of corresponding blocks in 2 images(cells).
Image Analyst
Image Analyst el 25 de Feb. de 2014
Please correct the grammar or rephrase so that we can understand this. I have not the slightest idea what you are asking now.

Iniciar sesión para comentar.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by