Can I represent an image in a binary tree format?

Respuestas (2)

Image Analyst
Image Analyst el 19 de Mzo. de 2013

1 voto

See qtdecomp() in the Image Processing Toolbox.

6 comentarios

srikanth Appala
srikanth Appala el 19 de Mzo. de 2013
sorry sir,i am not satisfy with that answer .please provide clear solution(example). please because i have less time
Image Analyst
Image Analyst el 19 de Mzo. de 2013
I probably have even less time to solve your problem than you do.
Alessandro
Alessandro el 20 de Mzo. de 2013
Editada: Alessandro el 20 de Mzo. de 2013
Actually the biggest problem is to understand the sparse matrix structure of matlab..... from qtdecomp you get where there is something to do but to get a representation of the image you still need more algorithmic to get the values of the image.
Image Analyst
Image Analyst el 20 de Mzo. de 2013
No one knows what you even want. Please give us a small image, say 16 by 16, and show us what you want the "output" to be. Why can't you just use the array? Why do you need it in a "binary tree" format instead? How do you define a "binary tree"?
srikanth Appala
srikanth Appala el 21 de Mzo. de 2013
sir, my project is "Binary partitioning tree as an efficient representation for image segmentation, information retrieval and image processing".so binary partitioning with image regions is important ro to us.to devide image into regions "region merging algorithm" is used,bt i dont knw how construct tree.help me
Image Analyst
Image Analyst el 21 de Mzo. de 2013
I've used qtdecomp only briefly once and that was to just understand how it works. I never need to do that. It doesn't return some information that I needed and when I called the Mathworks they weren't too clear on how it worked either. Anyway, I don't use it. Not sure why you think you need to do this or why you chose that project subject. Can you explain why? Better yet, start your own discussion, rather than intertwine your discussion with Allesandro's.

Iniciar sesión para comentar.

Alessandro
Alessandro el 21 de Mzo. de 2013
Editada: Alessandro el 21 de Mzo. de 2013
from wikipedia I read the following about image segmentation:
In computer vision, image segmentation is the process of partitioning a digital image into multiple segments (sets of pixels, also known as superpixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze
You need a tree and the "superpixels" values of the tree. I just wannted to understand the sparse objects from matlab so I tryed the qtdecomp function:
%define some grayscale image
I = uint8([1 1 1 1 2 3 6 6;...
1 1 2 1 4 5 6 8;...
1 1 1 1 7 7 7 7;...
1 1 1 1 6 6 5 5;...
20 22 20 22 1 2 3 4;...
20 22 22 20 5 4 7 8;...
20 22 20 20 9 12 40 12;...
20 22 20 20 13 14 15 16]);
%Get where there is information
S = qtdecomp(I,.05);
%Get the information using the simply mean value
erg = sparse(0);
blocks = unique(nonzeros(S));
for blocksize = blocks'
[y x] = find(S==blocksize);
for i=1:length(x)
erg(x(i),y(i)) = mean2(I(y(i):y(i)+blocksize-1,x(i):x(i)+blocksize-1));
end
end
rebuildimage = zeros(size(S));
%Rebuild the image from the mean values in the block
for blocksize = blocks'
[y x] = find(S==blocksize);
for i=1:length(x)
rebuildimage(y(i):y(i)+blocksize-1,x(i):x(i)+blocksize-1) = nonzeros(erg(x(i),y(i)))
end
end
disp(rebuildimage)
So now you can see rebuildimage looks like I. In the matlab sparse arrays S and erg you have the "super pixels" information.

4 comentarios

Image Analyst
Image Analyst el 21 de Mzo. de 2013
I segment stuff all the time and I never build a tree. I'm not sure why it's necessary. In fact, I know it's not, unless you just want to do some particular operation for some reason.
Alessandro
Alessandro el 21 de Mzo. de 2013
I would say they could be interesting for wavelet decomposition. But they feels a bit to theoritical for me :)
Mohammed
Mohammed el 4 de Abr. de 2013
Editada: Mohammed el 4 de Abr. de 2013
It is useful for things like topology representation of the segmentation maps. It saves a lot of time for searching algorithms instead of doing linear searching, they use them as a probabilistic framework of searching that can reduce the time by a huge factor (from week to 10 mins of runtime)... I would suggest you to read about huffman coding and binay trees for more understanding about the tree representation!
Image Analyst
Image Analyst el 4 de Abr. de 2013
What would you be searching for?

Iniciar sesión para comentar.

Preguntada:

el 19 de Mzo. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by