-
Notifications
You must be signed in to change notification settings - Fork 131
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] Failed to allocate XXXXXXX bytes in function 'OutOfMemoryError' #499
Comments
Hi @OscarHSK It seems it might be an issue with incorrectly interpreting the incoming frame, and allocating the size of cv::Mat to be too large. |
Hi @themarpe |
Thanks - can you post a log of the run with (Note: please prefer pasting the logs as text instead of pictures / screenshots, as in other case, we would have to manually type over any information / or do OCR on it... - https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question/285557#285557) |
Here it is, sorry about pasting as text before.
|
The following does not reproduce it on 2.15.5:
Contents of ImgFrame "metadata"
It works as expected. @OscarHSK Can you try some example first and try to see if all works as expected (eg. rgb_preview.cpp). It seems you are using a custom app in which this happens. Also make sure you aren't modifying the shared messages, as they aren't protected from concurrent write access. Also how did you integrate core into your own project? CMake or some other way? Make sure all defines are set properly or switch to 2.16.0 for less issues in this regard |
@themarpe I tried with rgb_preview.cpp and happens the same. I integrated the project as the documentation says, first building as a dynamic library and then installing it. |
@OscarHSK |
I have purchased the Oak-D cam a few weeks ago and with Python, everything goes well. The problem is when I try to run the camera in C++ using Code::Blocks the script builds correctly but when I use the function cv::imshow("name", InCam->getCvFrame()); I got the error "Failed to allocate XXXXXXX bytes in function 'OutOfMemoryError' "
The codes I tried to run are Mono Preview and RGB Preview and both failed. When I use OpenCV out of this it works well so the problem is not in OpenCV but I don't find any solution to this problem. Is this a common problem?
The text was updated successfully, but these errors were encountered: