[Demo] Wrong set of seedpoint for cv2.floodFill
See original GitHub issueHi there,
Thanks for this implementation!
I ran into a small problem running the demo: the cv2.floodFill
was throwing errors saying the seedpoint had wrong values. Investigating a bit, I wonder if this section below
https://github.com/jfzhang95/DeepGrabCut-PyTorch/blob/master/demo.py#L97-L100
should not be commented.
Since left, right, up, down are used to put the seedpoint, if you leave this section uncommented (and that your monitor has more than twice the amount of pixels than the displayed image), opencv throws the mentioned error:
cv2.error: OpenCV(3.4.5) /io/opencv/modules/imgproc/src/floodfill.cpp:509: error: (-211:One of arguments' values is out of range) Seed point is outside of image in function 'floodFill'
Commenting the section fixes the error as the seedpoint changes from coordinates of 1000+ pixels down back to image dimensions:
I’m unsure about how others managed to run the demo without commenting it though.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Can anyone explain why is my floodfill function not working in ...
I set the lodiff and updiff value to 20 and flags = 4 (for 4 connected pixel floodfill ) . For mask parameter...
Read more >Flood-filling in an image
Flood-filling in an image. An example using the Flood-Fill technique. In this sample you will learn how to use the following OpenCV functions:...
Read more >samples/cpp/ffilldemo.cpp - OpenCV
samples/cpp/ffilldemo.cpp. An example using the FloodFill technique ... bool useMask = false;. int newMaskVal = 255; ... Point seed = Point(x,y);.
Read more >samples/cpp/ffilldemo.cpp - OpenCV - ccoderun.ca
samples/cpp/ffilldemo.cpp. An example using the FloodFill technique. #include "opencv2/imgproc.hpp". #include "opencv2/imgcodecs.hpp".
Read more >Bitmap/Flood fill - Rosetta Code
Implement a flood fill. A flood fill is a way of filling an area using color banks to define the contained area or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I met the same problem as you, how do you solve it
Hi @pkjplayer I tried, and pressing space works perfectly! The suggestion I made earlier gives the same result without pressing the key. Good catch anyway, I’ll close the issue