Opencv Error on Ubuntu Webcam (Logitech C270) Capture -> HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP

后端 未结 5 1370
星月不相逢
星月不相逢 2021-02-08 03:32

this erorr message appears on running simple camera capture on Ubuntu with logitech C270 (OpenCV 2.4.2/C++):

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP

5条回答
  •  伪装坚强ぢ
    2021-02-08 04:35

    About issue:

    Corrupt JPEG data: 2 extraneous bytes before marker 0xd1 Corrupt JPEG data: 1 extraneous bytes before marker 0xd6 Corrupt JPEG data: 1 extraneous bytes before marker 0xd0 Corrupt JPEG data: 1 extraneous bytes before marker 0xd0

    Looks like, the issue is in libjpeg library. For some unknown reason it works incorrect under OpenCV library. I tried to compile without support of JPEG and it solved this issue.

    cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_SHARED_LIBS=OFF -D BUILD_EXAMPLES=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D WITH_JPEG=OFF -D WITH_IPP=OFF ..

    You can find all details in my blog:

    http://privateblog.by/linux/opencv-i-corrupt-jpeg-data-na-linux/

提交回复
热议问题