Wednesday, August 11, 2021

Re: OpenCV no support for memory mapping / insufficient buffer memory

On Tue, Aug 10, 2021 at 12:32:36PM -0600, Jeff Ross wrote:
>
> Hello!
>
> This is a follow-up to a post I made to misc@ about OpenCV not being able to
> open a camera to capture images.?? Switching to ports@ as this seems more
> appropriate for this error.
>
> https://marc.info/?l=openbsd-misc&m=162853582527839&w=2
>
> Kevin Lo had also run into the problem and had submitted a patch:
>
> https://marc.info/?l=openbsd-ports-cvs&m=162857744213080&w=2
>
> I built the new version of OpenCV 4.5.2 today and yes, it can open the
> camera, but attempting to capture an image prints the following for each
> image: [ WARN:0] global
> /usr/ports/pobj/opencv-4.5.2/opencv-4.5.2/modules/videoio/src/cap_v4l.cpp
> (798) requestBuffers VIDEOIO(V4L2:/dev/video0): no support for memory
> mapping [ WARN:0] global
> /usr/ports/pobj/opencv-4.5.2/opencv-4.5.2/modules/videoio/src/cap_v4l.cpp
> (777) requestBuffers VIDEOIO(V4L2:/dev/video0): Insufficient buffer memory
> Trying to access the list of captured images yields this: OpenCV(4.5.2)
> /usr/ports/pobj/opencv-4.5.2/opencv-4.5.2/modules/core/src/matrix.cpp:456:
> error: (-215:Assertion failed) total() == 0 || data != NULL in function
> 'Mat' Exception caught! OpenCV(4.5.2)
> /usr/ports/pobj/opencv-4.5.2/opencv-4.5.2/modules/core/src/matrix.cpp:456:
> error: (-215:Assertion failed) total() == 0 || data != NULL in function
> 'Mat' At that point my python script exits due to the exception. OpenCV docs
> don't seem to get into buffer management other than via an internal function
> to be used only by OpenCV. Would this be a missing parameter in how OpenCV
> is built or is it something I can control from a sysctl of some kind? dmesg
> follows but this stick computer has 4G of ram and doesn't have much anything
> running on it. Thanks!

You tested your open_test.py? If so, I tested it on my X1E, works for me:
http://ix.io/3vD3

No comments:

Post a Comment