Intel® Compute Stick
Discussions Regarding Intel® Compute Sticks and Cards
Announcements
All support for Intel® NUC 7 - 13 systems is transitioning to ASUS. Read more.
548 Discussions

NCS with Intel Drone RTF. NCS works properly excepted with some NCAPPZOO apps using live camera with cv2, in these cases there is an error by OpenCV: VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV. Do you have suggestions?

CBell1
New Contributor II
3,977 Views

Hardware:

Intel Drone RTF (internal camera: Intel RealSense R200) +

Movidius Neural Compute Stick V1

 

Software:

Ubuntu 16.04 aero version

NCSDK V2.04

TensorFlow 1.5

OpenCV v. 3.3.0

NCAPPZOO v2

 

Error output running NCAPPZOO applications with live camera:

 

VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

libva info: VA-API version 0.39.0

libva info: va_getDriverName() returns 0

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so

libva info: Found init function __vaDriverInit_0_39

libva info: va_openDriver() returns 0

OpenCV Error: Unspecified error (GStreamer: unable to start pipeline...

 

 

0 Kudos
1 Solution
Eliza_D_Intel
Employee
455 Views
Hello CBell1, Some of the sample codes included with NCAPPZOO use OpenCV to interface with the input device (camera). In your case, the RealSense R200 Camera streams cannot simply be opened with OpenCV without modifying the kernel for RealSense and installing librealsense 1. This article might help you to use R200 with OpenCV: https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data. This code is provided as-is and is not supported by Intel and it is not guaranteed to work with R200. The R200 camera and librealsense 1 are both discontinued products. We recommend upgrading to a RealSense D400 series camera as they are fully supported and can work with librealsense 2 and OpenCV. Note that you must install the Linux drivers in librealsense 2 to get it to work with OpenCV. You may need to modify the sample code included in NCAPPZOO to interface with the RealSense Cameras. You can find some working examples here: https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv For info on librealsense 1 for the R200, https://github.com/IntelRealSense/librealsense/tree/legacy. The librealsense 1 code can be downloaded from: https://github.com/IntelRealSense/librealsense/releases/tag/v1.12.1. Librealsense 2.0 for the D400 series cameras can be found here: https://github.com/IntelRealSense/librealsense. Thank you and best regards, Eliza

View solution in original post

0 Kudos
8 Replies
Eliza_D_Intel
Employee
455 Views
Hello CBell1, Thank you for your interest in the Intel Products. Could you please let us know what are the instructions you have used to install the NCAPPZOO? How are you opening it? Have you used these instructions: https://github.com/intel-aero/meta-intel-aero/wiki/07-Movidius-Neural-Compute-Stick#ui-example ? Can you please confirm if the R200 is working properly in QGroundControl? Thank you and best regards, Eliza
0 Kudos
CBell1
New Contributor II
455 Views

Hello Eliza,

yes, I used the procedure you mentioned and, in a second step, I removed the NCSDK v1 and I replaced it with v2 with the following procedure:

git clone -b ncsdk2 http://github.com/Movidius/ncsdk

 

The examples worked fine, using v1 and work fine also with NCSDK v2.

 

Then, I have installed ncappzoo:

git clone -b ncsdk2 https://github.com/movidius/ncappzoo.git

 

The ncappzoo's apps work fine, for example, also the stream_infer you mentioned work opening the camera using the command:

"v4l2src device=/dev/video" + CAMERA_INDEX

 

The apps that use live images/camera with cv2.VideoCapture command do NOT open the camera with the error message: VIDEOIO ERROR: V4L2

 

For example, this error is generated when I run live-image-classifier or video_face_matcher.

 

As tentative, I installed the OpenCV from source executing the install- opencv-from_source.sh (from video_face_matcher app)

It do NOT solve the problem.

 

Any suggestions?

 

Thanks

 

0 Kudos
CBell1
New Contributor II
455 Views

Yes, the R200 works properly using QGroundControl.

 

Thanks

 

0 Kudos
Eliza_D_Intel
Employee
455 Views
Hello CBell1, Thank you very much for the information provided! Please check in CMakeList.txt from OpenCV directory that the following lines are set on ON, as follows: OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON .... OCV_OPTION(WITH_LIBV4L "Use libv4l for Video 4 Linux support" ON .... Find more about it here: https://github.com/opencv/opencv/issues/7974 Also, please install V4L with the command: sudo apt install v4l-utils (if not already installed) Thank you and best regards, Eliza
0 Kudos
CBell1
New Contributor II
455 Views

Hi Eliza,

I installed the OpenCV from source executing the install- opencv-from_source.sh (from video_face_matcher), removing the previous OpenCV, installing the OpenCV using Makefile with "-D WITH_V4L = ON".

This do NOT solve the problem.

Executing "sudo apt install v4l-utils", it's already exist.

 

Question:

Considering I'm using Ubuntu 16.04 OS on the Intel Drone, do you confirm that cv2.VideoCapture() commands should work with Intel Drone RTF's R200 camera?

If yes, I'll try to reinstall NCSDK and OpenCV.

OK?

 

Thank you!

 

0 Kudos
Eliza_D_Intel
Employee
456 Views
Hello CBell1, Some of the sample codes included with NCAPPZOO use OpenCV to interface with the input device (camera). In your case, the RealSense R200 Camera streams cannot simply be opened with OpenCV without modifying the kernel for RealSense and installing librealsense 1. This article might help you to use R200 with OpenCV: https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data. This code is provided as-is and is not supported by Intel and it is not guaranteed to work with R200. The R200 camera and librealsense 1 are both discontinued products. We recommend upgrading to a RealSense D400 series camera as they are fully supported and can work with librealsense 2 and OpenCV. Note that you must install the Linux drivers in librealsense 2 to get it to work with OpenCV. You may need to modify the sample code included in NCAPPZOO to interface with the RealSense Cameras. You can find some working examples here: https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv For info on librealsense 1 for the R200, https://github.com/IntelRealSense/librealsense/tree/legacy. The librealsense 1 code can be downloaded from: https://github.com/IntelRealSense/librealsense/releases/tag/v1.12.1. Librealsense 2.0 for the D400 series cameras can be found here: https://github.com/IntelRealSense/librealsense. Thank you and best regards, Eliza
0 Kudos
Eliza_D_Intel
Employee
455 Views
Hello CBell1, Could you please let us know if we can assist you with any other information on this matter? Thank you, Eliza
0 Kudos
CBell1
New Contributor II
455 Views
Hi Eliza, Sorry for the late answer. Thanks to your suggestions, I solved the problem. Now, the Intel Aero Drone RTF perfectly works with a Movidius NCS, using different examples with the internal (r200) and external camera. Thanks again for your great support Best Regards Cosma
0 Kudos
Reply