-
Notifications
You must be signed in to change notification settings - Fork 5.8k
xphoto inpaint crush #965
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
Comments
@saedrna this code produces an error very rarely, usually it works with no problem. |
Yes, really weird. Because previously, when I debug this code, I came into exceptions and the code stop in somewhere in annf.hpp, in Visual Studio 2015. But today, (when I want to show you where is the code) the program runs fine. Also on Mac, not all the images will produce the exception, when using a inpaint benchmark dataset. I will keep you informed when I manage to locate an error. Below is the location of error in XCode, because I do not know how to build opencv_contrib on Mac OS, only something about KDTree is shown here. |
I have successfully build the debug version of opencv_contrib and here is more debug information. The problem is located in the following function, and the value x itself is bad allocated. Although this is on Mac, I remember the problem is the same for Windows VS 2015.
This functor is used in the nth_element function, idx seems to a growing sequence and here is something not consistent. (left = 0, right = 153601). Because I do not quite understand the algorithm, I can not go any further. Hope this will help.
|
@saedrna I confirm the bug, it is reproduced, now investigating it |
Some issues were found in the inpaint code:
My fix:
|
xphoto inpaint shiftmap kdtree crush fix opencv#965 (comment)
System information (version)
Detailed description
Sometimes the xphoto::inpaint function will crash with exception
Exception: EXC_BAD_ACCESS (code=1, address=0x11ef10ffc)
. But not for all the images.Steps to reproduce
I have upload a project with images below. And here is the code.
inpaint.zip
The text was updated successfully, but these errors were encountered: