Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Running Intel OpenVX helper kernels in a terminal ?

RSun9
New Contributor I
2,058 Views

Hi there,

I'd like to ask a question about running VAD-generated code in a command-line terminal. The OpenVX graph used to generate the code has Intel OpenVX helper kernels.

Before launching the VAD, I changed CodeGenConfiguration.xml, so that "HelperNodes == True" and "LoopExecution == True".

My simple OpenVX graph uses the Intel helper kernel cv_grab_image_from_camera to capture an input image, and another Intel kernel render_image to display the processed image.

When I ran the graph within VAD, it worked fine -- the output image was displayed in real-time. However, when I generated the graph into C code, and ran the code in a terminal, I didn't see the output displayed. The capture seemed to be working -- the camera lit up, and there was an error message "Corrupt JPEG data: 1" for every frame. But the output was not displayed.

I understand that the Intel helper OpenVX kernels are supposed to work only within the VAD, so I am not totally surprised. What's interesting is that the camera capture seemed to be working, but I can't be 100% confident.

Is what I am seeing the expected behavior?

Thanks,

Robby

0 Kudos
1 Solution
Stav_S_Intel
Employee
2,057 Views

Hi Roby, 

Happy to hear you are getting a long with development! 

just a quick note- Render function will not be generated into code. The reason is, if you run it from the terminal, the is no Gui to present the image. it is possible to write code to show the image but you would need to be dependant on OpenCV Qt or some kind of SW tool to display the image. 

please try to use fwrite_image, then, after you run the terminal code you can open the file created manually and see if you get an output image. 

 

As for the Error- could you provide us with the file se we can try to reproduce?? 

 

Regards,

Stav

View solution in original post

0 Kudos
5 Replies
Stav_S_Intel
Employee
2,058 Views

Hi Roby, 

Happy to hear you are getting a long with development! 

just a quick note- Render function will not be generated into code. The reason is, if you run it from the terminal, the is no Gui to present the image. it is possible to write code to show the image but you would need to be dependant on OpenCV Qt or some kind of SW tool to display the image. 

please try to use fwrite_image, then, after you run the terminal code you can open the file created manually and see if you get an output image. 

 

As for the Error- could you provide us with the file se we can try to reproduce?? 

 

Regards,

Stav

0 Kudos
RSun9
New Contributor I
2,058 Views

Hi Stav,

Thanks for the explanation. So the VAD generated code seems to run as expected.

As for the error message, it is possibly related to the Logitech webcam I am using. There are many similar complaints on the internet, e.g.

http://answers.opencv.org/question/38362/opencv-camera-interfacing/

Regards,

Robby

0 Kudos
Stav_S_Intel
Employee
2,058 Views

Hi Robby,

Yes, it seems as they offer a solution- let me know if you need us to try and replicate as well... 

 

Regards,

Stav

0 Kudos
RSun9
New Contributor I
2,058 Views

Hi Stav,

The offered solution -- do you mean rebuilding OpenCV with the option " -D WITH_JPEG=OFF " ?

I am not sure... Some say it solved their problem; others say it didn't. BTW, when I built the same source code against OpenCV 2.4.13, I didn't see the error message.

-Robby

0 Kudos
Stav_S_Intel
Employee
2,058 Views

Hi,

Yes, that is what i meant. 

Interesting regarding recompiling against OpenCV solving the issue, but happy to hear all is working. 

Regards,

Stav

0 Kudos
Reply