How to convert binary image to graph?!

18 views (last 30 days)
Mariam Sheha
Mariam Sheha on 1 Jul 2013
Hi every body...
Hi everybody,
Can you please help me to convert binary image results from Laplacian of Gaussian (LOG) filter. to graph?!
I don't know what function can perform like such operation, would you please help me;
Thanks A lot.....

Answers (2)

Youssef  Khmou
Youssef Khmou on 1 Jul 2013
hi,
You can convert the image to graph by simply plot the result as vector or matrix :
I=imread('circuit.tif');
figure, plot(I);
figure, plot(I(:)), title(' Mapping operator');
BB=im2bw(I);
figure, plot(BB);
F=sparse(BB);
figure, spy(F);
Many other possibilities do exist, try those above and see .
  3 Comments
Mariam Sheha
Mariam Sheha on 3 Jul 2013
Thanks A lot for answering me...
I think that "Youssef Khmou" could be secound step after using function recommended by "Image Analyst" to get the boundary of each white region...
So , for the conversion step from binary to graph i suppose to treat each region as anode and connect it to the other near node, that's why i think "Image Analyst" answer is the accepted were (i may get the boundary of each region and it's centroid then connect between them consider the centriod being a node) that what i moving through now...
Thanks Image Analyst & Youssef Khmou, and please if you have any idea about what i am saying replay me..
Kind Regards;
Image Analyst
Image Analyst on 3 Jul 2013
It looks like the log filter is just one big region. Not sure why there are multiple regions. Then they somehow get random (or so it appears) points from the perimeter and then the next step is somehow they have multiple small regions outlined in green. I have no idea how they went from the log image to the graph to the cyclic subgraphs (multi-region) images. Maybe you do. Why are there multiple regions?

Sign in to comment.


Image Analyst
Image Analyst on 1 Jul 2013
Neither do I. You'd have to supply more information. Why do you want to do that anyway?
  2 Comments
Mariam Sheha
Mariam Sheha on 1 Jul 2013
Edited: Image Analyst on 1 Jul 2013
would please think with me about that,
let's assume that we got the connecting component of the binary image through (cc = bwconncomp(bw, 4);) then i wana to graph those connected points using that function ([S, C] = graphconncomp(S);)... how can i do that?!...
About what i want to do, Look i am trying to detect some cyclic structure and meshes present in am image through different structure operations , simple representation for work structure represented at that image (stopped at : the convertion from binary to graph step): http://imageshack.us/content_round.php?page=done&l=img208/1244/tdh1.png
Thanks in advance
Image Analyst
Image Analyst on 1 Jul 2013
It's not clear from the figure. You'd have to read the paper more carefully.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!