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.

Little problem in text_detection_demo on Windows

ininder__gg
Beginner
507 Views

Hi is me again,

Now I'm study importing the openvino on windows,

No sure if it is really a bug or not. In text_detection_demo ,not like other demo, it need user to input the webcam's path 

I find some document there and related post here , the document call for the webcam node in "windows" tutorial.

But actually there is no such /dev/video0 in Windows, which make nothing to type for parameter -i

In order to solve this problem ,we have to go to the VideoGrabber::VideoGrabber and edit the path like:


VideoGrabber::VideoGrabber(const std::string &path, bool is_web_cam): cap(stoi(path))

Then we can use the demo on windows as

 .\textDetection.exe -m_td .\text-detection-0003.xml -m_tr .\text-recognition-0012.xml -dt webcam -i 0

 

In origin program ,

1. You cannot type 0 in -i to launch webcam

2. The program force you to type something in -i

3. The program would find the parameter in -i as path even you set the -dt as webcam

 

0 Kudos
2 Replies
saura
Beginner
507 Views

Hello Ininder

Just add this following code to the VideoGrabber function and  in the command prompt give -i cam and -dt webcam.This should work fine. Good luck.

if (path== "cam") {

  bool is_opened = cap.open(0);

} else {

  bool  is_opened = cap.open(path);

}

 

0 Kudos
Pronina__Kate
Beginner
507 Views

Thank you, Saura!!!

0 Kudos
Reply