c++ - OpenCV recognizes my camera but cant read -


i've been working on computer vision project while using webcam of laptop (it shows "hd webcam" 640x480 res) want use program camera of dji-inspire1 drone. camera recognized , opened fails read images it.

in more detail:

in player class load camera function:

 capture.open(-1);     // opens window combobox showing   //the cameras have. selecting dji camera fails   //the read while selecting webcam fails , crashes.  // capture.open(0); opens webcam succesfully  // capture.open(1);  

open(1) seems try open dji-camera gives different values open(-1) , crashes after reading frame (the frames entirely black 720x480 cv_8uc3) in debug mode crashes whie reading frame segmentation fault , points dissassembly of "driverproc" (i guess?) , line movdqa command.

 // capture.open(2); oddly seems try , open dji-camera   // 720x486 resolution resulting in black 720x486 cv_8uc3 image (no crashes).     // above open(2) fails , crashes   if(capture.isopened()){      // in here check values of different properties, are:      //                               open(-1)     open(1)      open(2)     hd webcam        //    cv_cap_prop_format =       0            -1           -1          -1      //    cv_cap_prop_frame_width =  720          720          720         640      //    cv_cap_prop_frame_height = 486          480          486         480      //    cv_cap_prop_fourcc =       1.49883e+09  -4.66163e+08 -4.66163e08 8.44715e+08      //    cv_cap_prop_fps =          30           0            0           0  } 

next in main loop of player class (its on own thread)

while(!stop){      // command tries read next frame      if(!capture.read(frame)){           // happens open(-1) version      } } 

so resolution either 720x486 or 720x480 strange, there seems 3 cameras connected yet list capture.open(-1) shows 2. open(2) succefully load black image :p. im camera working since can view in other applications such "livestream studio". video goes camera controller (which reduces resolution 720 think) wirelessly , there blackmagic design hdmi->usb3.0 converter , there pc. after intense googling found out fourcc code 1.49883e+09 open(-1) version indeed "2vuy" used blackmagic makes sense. find -4.66163e08 ones mean though.

i'm using opencv 3.0.0 , mingw4.92 32bit , qt 5.5.0

so have ideas problem might be? i'm out of ideas.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -