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

Large images #2

Open
Otto8793 opened this issue Sep 10, 2022 · 0 comments
Open

Large images #2

Otto8793 opened this issue Sep 10, 2022 · 0 comments

Comments

@Otto8793
Copy link

Hello. I'm having trouble segmenting images that are approximately 640x480 in size. In this case, the following problem occurs:

Traceback (most recent call last):
  File "./analysis_multi_nC.py", line 155, in <module>
    main()
  File "./analysis_multi_nC.py", line 119, in main
    sp_label = bosupix.label(nC)
  File "boruvka_superpixel_wrap.pyx", line 442, in hers_superpixel.BoruvkaSuperpixel.label
    raise RuntimeError('illegal n_supix')
RuntimeError: illegal n_supix

When looking at the code, the error occurs as output of the label function in file boruvka_superpixel_wrap.pyx due to the output of function self._bosupix.label(n_supix). The function self._bosupix.label(n_supix), in file boruvka_superpixel.cpp returns NULL when n_supix is less than min_n_supix(). When changing this condition to n_supix equal to min_n_supix(), the image generates some superpixels of size 1.

This problem occurs regardless of the number of superpixels and disappears when resizing the original image. However, I need to process the image to its original size. Any idea how I can modify the code for this purpose?

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

1 participant