opencv - Streaming from DSLR (EDSDK) to Open CV in real time -
i have found 10 questions on this theme couldn't answer them, sorry.
i trying make open cv application run input dslr camera.
at moment, using processing, getting camera input syphon, using on processing limited open cv. since need play pose estimative, couldn't on processing. plus, have got 10 fps using syphon, opencv, plus artoolkit libraries...not prototype.
i trying use open cv 3.0. got calibration sample file working using webcam. wanted replace webcam input dslr camera using edsdk. pieces of code have found reference disconnected (different versions/languages).
the edsdk sample file comes sdk complex, can't deduce code. don't need complexity (ui, buttons, memory card access, etc). live camera input working webcam.
this simplest code make retrieve webcam input on opencv.
#include "opencv2/opencv.hpp" #import "edsdk.h" //probably working fine using namespace cv; int main(int, char**) { videocapture cap(0); // replace here if(!cap.isopened()) // replace here return -1; namedwindow("edges",1); for(;;) { mat frame; cap >> frame; // replace here imshow("frame", frame); //shows if(waitkey(30) >= 0) break; } return 0; }
any suggestion me replacing webcam in lines?
thanks
presence of edsdk.h means should use camera api data, not videocapture cap(0)
. out of box opencv can use videocapture ximea cameras afaik (if turn on in makefile). have find in camera's api example how data pointer, convert 1 of common format , copy pointer mat.data using constructor:
mat(image.height, image.width, cv_8uc3, datapointer)
Comments
Post a Comment