Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superpixel components are disconnected #11

Open
ghost opened this issue Mar 10, 2016 · 6 comments
Open

Superpixel components are disconnected #11

ghost opened this issue Mar 10, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Mar 10, 2016

The goal (at least mine) of using superpixels is to divide image into segments, in which each segment should group connected similar pixels.

In your implementation, I noticed that many disconnected segments are considered the same superpixel even though they are separated by other superpixels. Unfortunately, coh_weight and do_enforce_connectivity did not fix that behavior. Therefore, I am reporting it as an issue!

To make things clearer, I am providing an example!
In the following input image, I selected to visualize the superpixel that the red marked pixels belongs to.
input

I am using the idx_img to point to the corresponding spixel(s) inside spixel_map, mark them, then visualize pixels that belongs to the marked spixel(s), again, through idx_img.

As you can see, the output of that returned a single superpixel, but many disconnected segments. The center of that superpixel is surrounded by four red pixels as shown.
output

I would appreciate it if I get a workaround as near as possible!

@buzzsuresh
Copy link

Hi Carl,

I'm interested and to explore more on how each segments has been clustered.

How would I get the visualize or get the data (or the image pointer) for individual segment and the centroid associated for that segment. Will I have to apply the mask for the entire image to rule out segments that are out of interest.

Appreciate if you can help me to clarify on this.

@Sahloul : Would also be interested to know how did you come to visualize or learn data of those disconnected segments. Kindly help with your suggestions.

Thanks.

@ghost
Copy link
Author

ghost commented Nov 21, 2016

@buzzsuresh Do not bother asking, it is been almost 9 months, and they do not want to even justify their failure! I coded the visualization and masking parts myself! It is not in their library..

Unfortunately, their work was not as they claim and I got deceived by its reported speed,
but as you can see, I found out it does not do real segmentation...
I just wasted a month of my research on it!

@meder411
Copy link

meder411 commented Sep 12, 2017

@Sahloul You're likely reading the PGM file incorrectly or processing the output segmentation wrong. I've not had any problems with this. Each superpixel has it's own label.

@abhiyad
Copy link

abhiyad commented Dec 3, 2017

@meder411 :: Please tell me how did you get the labels of each Pixel , I am Stuck ..
Thanks.

@meder411
Copy link

meder411 commented Dec 3, 2017

Assuming you've saved a PGM file, use OpenCV's imread() function to read the PGM and just loop over the rows and columns of the returned Mat.

@whyx007
Copy link

whyx007 commented Dec 19, 2019

I have the same problem, the PGM file just a label file,then I have rewrite all the label index into txt file, as same as ghost report: many disconnected segments are considered the same superpixel even though they are separated by other superpixels. https://github.com/fderue/SLIC_CUDA I decide use this to instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants