find homogeneities of each block of quadtree decomposed image
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Imager
el 8 de En. de 2023
Respondida: Image Analyst
el 8 de En. de 2023

Hello,
The above image is the light house image and its quadtree decomposed image using Matlab.
What I'd like to do is to find the homogeneity of each block from the quadtree decomposed image.
I think I need to get the exact position of black region of each block and then find the homogeneity from RGB (or gray) image with these position of black region.
Any advice is warmly welcome. Thank you.
0 comentarios
Respuesta aceptada
Image Analyst
el 8 de En. de 2023
Try this:
grayImage = imread('liftingbody.png');
S = qtdecomp(grayImage,.27);
blocks = repmat(uint8(0),size(S));
[rows, columns] = size(S)
for row = 1 : rows
for col = 1 : columns
if S(row, col) ~=0
upperLeftRow = row;
upperLeftCol = col;
width = S(row, col);
height = S(row, col);
hold on;
boundingBox = [upperLeftCol, upperLeftRow, width, height];
rectangle('position', boundingBox, 'EdgeColor','r', 'LineWidth',2)
% Extract the subimage
thisBlock = imcrop(grayImage, boundingBox);
% Compute mean
thisMean = mean2(thisBlock);
stdDev = std2(thisBlock);
end
end
end
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!