Q:

error: (-2:Unspecified error) from OpenCV dnn modeule

I'm trying to run opencv text detection sample code, but I'm getting bellow run time error from dnn module. 

$ ./textdetect -i test.jpg -m frozen_east_text_detection.pb
terminate called after throwing an instance of 'cv::Exception' what():
  OpenCV(4.0.0) /home/infy/opencv/modules/dnn/src/dnn.cpp:3644: error:
  (-2:Unspecified error) Cannot determine an origin framework of files:
  true in function 'readNet'
Aborted (core dumped)

My system configuration:
OpenCV version 4.0
Ubuntu 18.04
Tesseract version 4.0.0-beta.1
Leptonica version 1.75.3
I have downloaded the .pb model file from here.  Does anyone faced this issue.? 

A:

I solved the problem.  Arguments should be passed as below. 

$ ./textdetect -i=test.jpg -m=frozen_east_text_detection.pb

