-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
Fix cv::imread with OutputArray dst
#25695
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
Conversation
|
this i not a bug. documentation says maybe this PR considered as an improvement but need rethinking and being well documented. |
|
Hi @sturkmen72, thanks for the reply. I think this should be a bug (or has inconsistent semantic meaning compared to other functions) and should be fixed for the following reasons:
|
OK it's done now. It will now forward the result boolean value from And as there's no other calls can potentially fail inside this function, I think it should be okay. But please don't hesitate to let me know if we should use int instead. :) |
|
core developers decide. My suggestion is good in that it is open to development in the future. |
|
i am just a contributor. take it in account. |
|
The root cause of this problem is wrong handling of void foo(OutputArray res)
{
Mat m = res.getMat(); // either Mat object wrapped by "res" or temporary Mat object
m.create(...); // does not affect "res" or original object
}To resolve this issue we should call |
This PR is related to #25694.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.