i have divided the image into blocks now, i want to access each block individually and i compute histogram how do i access each block
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
a=imread(img);
subplot(4,3,2)
imshow(img)
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0.05 1 0.95]);
[r, c, numOfBands] = size(a);
%dividing image into 8x8 subblocks
bs=8;%block size
nob=(r/bs)*(c/bs);%Total no of blocks
k=0;
for i=1:(r/bs)
for j=1:(c/bs)
Block(:,:,k+j)=a((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs));
end
k=k+(r/bs);
end
Respuestas (1)
Image Analyst
el 22 de En. de 2018
You have the block so just pass it into histogram()
h = histogram(Block(:,:,k+j));
5 comentarios
Image Analyst
el 23 de En. de 2018
Please define compare mathematically. Do you mean the delta E (color difference), the MSE in RGB space, or what?
Ver también
Categorías
Más información sobre Get Started with Image Processing Toolbox 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!