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

OpenCV Error when subsegmenting #370

Open
quicklizard99 opened this issue Oct 25, 2016 · 1 comment
Open

OpenCV Error when subsegmenting #370

quicklizard99 opened this issue Oct 25, 2016 · 1 comment
Assignees

Comments

@quicklizard99
Copy link
Member

Open image from NRM homogenous background-boxes randomly oriented.tif - click on two objects in box 5 and subselect:

OpenCV Error: Assertion failed (!bgdSamples.empty() && !fgdSamples.empty()) in initGMMs, file /Users/user/miniconda3/conda-bld/work/opencv-2.4.12/modules/imgproc/src/grabcut.cpp, line 379
Error in WorkerThread.run
Traceback (most recent call last):
  File "/Users/lawh/projects/inselect/inselect/gui/worker_thread.py", line 64, in run
    self._operation(self.progress)
  File "/Users/lawh/projects/inselect/inselect/gui/plugins/subsegment.py", line 52, in __call__
    self.document, self.row, seeds, callback=progress
  File "/Users/lawh/projects/inselect/inselect/lib/segment_document.py", line 85, in subsegment
    rects, display = segment_grabcut(img.array, window, seeds)
  File "/Users/lawh/projects/inselect/inselect/lib/segment.py", line 376, in segment_grabcut
    cv2.grabCut(image, mask, rect, bgmodel, fgmodel, 1, cv2.GC_INIT_WITH_MASK)
error: /Users/user/miniconda3/conda-bld/work/opencv-2.4.12/modules/imgproc/src/grabcut.cpp:379: error: (-215) !bgdSamples.empty() && !fgdSamples.empty() in function initGMMs

MainWindow.worker_finished False An error occurred:
/Users/user/miniconda3/conda-bld/work/opencv-2.4.12/modules/imgproc/src/grabcut.cpp:379: error: (-215) !bgdSamples.empty() && !fgdSamples.empty() in function initGMMs
@quicklizard99 quicklizard99 self-assigned this Oct 25, 2016
@quicklizard99
Copy link
Member Author

Not fixed by transition to OpenCV 3 (#391).

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

No branches or pull requests

1 participant