Ask Your Question
0

Build graph from an image

asked 2013-05-24 13:32:45 -0600

Jawaher Khemakhem gravatar image

I have a binary image and I am trying to build undirected graph from this image in order to apply minimum spanning tree . My idea is from this paper http://cs.brown.edu/~pff/papers/seg-ijcv.pdf

I have no idea how to build the graph .

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-24 16:19:07 -0600

Guanta gravatar image

updated 2013-05-25 07:21:52 -0600

Sorry to not directly answer your question. However, from the paper exist the code by the authors: http://cs.brown.edu/~pff/segment/. So maybe you can just have a look at that?

Alternatively you could use other existing segmentation methods, e.g. Power-watersheds: http://powerwatershed.sourceforge.net/ or use one segmentation method of OpenCV, it comes with GrabCut, Watersheds, and (partially) MeanShift (pyrMeanShift()).

edit flag offensive delete link more

Comments

Thank you very much for your reply , I looked at the code existent but I didn't understand how they built the graph from the image , precisely the algorithm I mean .

Jawaher Khemakhem gravatar imageJawaher Khemakhem ( 2013-05-25 02:43:00 -0600 )edit

Sry, I don't hvae the time to dig into the code, but I guess (haven't implemented any graph-based algoritm myself yet) that the graph is actually the image itself, thus, a component of the graph is one pixel. Let's say you have a pixel w. value 100 next to one with 30 then the cost of using the edge between those two components could be (depending of course on the cost function) the difference between them, i.e. 70.

Guanta gravatar imageGuanta ( 2013-05-25 07:28:58 -0600 )edit

Many thanks , I got the idea how we can build a graph from an image :)

Jawaher Khemakhem gravatar imageJawaher Khemakhem ( 2013-05-25 08:33:58 -0600 )edit

Question Tools

Stats

Asked: 2013-05-24 13:32:45 -0600

Seen: 1,684 times

Last updated: May 25 '13