Hi all.
I have block from an image obtained using:
How best can I cluster similar blocks from my BlockImage matrix using: kmeans?
I also wish to display the distance between; any two intra-cluster blocks, any two blocks from different clusters; any two centroids if possible.
Honestly, am not so sure how to tackle this. Looking at the kmeans examples from the document, is not so intuitive for this particular scenario.
Thanks alot.

 채택된 답변

Image Analyst
Image Analyst 2022년 2월 21일

0 개 추천

댓글 수: 6

MatlabEnthusiast
MatlabEnthusiast 2022년 2월 21일
@Image Analyst thanks. Let me look into them. The reason is I want to cluster blocks.
Image Analyst
Image Analyst 2022년 2월 21일
How is this different than just getting a class for every pixel in the image?
MatlabEnthusiast
MatlabEnthusiast 2022년 2월 21일
편집: MatlabEnthusiast 2022년 2월 21일
because, I already generated the distinct blocks with pre determined dimensions. So clustering over blocks, I can easily tell how many blocks are in a cluster(hopefully) - thats the aim. Maybe even play with the individual blocks see their effect on the image.
Maybe this is why I never use im2col(). Explain to me what's going on here:
grayImage = imread('moon.tif');
[rows, columns, numberOfColorChannels] = size(grayImage)
rows = 537
columns = 358
numberOfColorChannels = 1
subplot(1, 2, 1);
imshow(grayImage);
axis on
m = rows;
n = 8;
BlockImage = im2col(grayImage,[m n],'distinct');
subplot(1, 2, 2);
imshow(BlockImage);
axis on
MatlabEnthusiast
MatlabEnthusiast 2022년 2월 21일
you converted the distinct image blocks to a column matrix?
MatlabEnthusiast
MatlabEnthusiast 2022년 2월 22일
but seriously whats happening?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by