I have found about 10 questions on this theme but I couldn't get any answer from them, sorry.
I am basically trying to make an open cv application to run with the input from a dslr camera.
At the moment, I am using processing, getting the camera input from syphon, then using it on processing limited open cv. Since I need to play with pose estimative, I couldn't do it on processing. Plus, I have got only 10 fps using syphon, opencv, plus artoolkit libraries...not good for my prototype.
I am trying to do use open cv 3.0. I got the calibration sample file working using the webcam. I just wanted to replace the webcam input by the dslr camera using EDSDK. But all the pieces of code I have found as reference are completely disconnected (different versions/languages).
The EDSDK sample file that comes with the SDK is too complex, so I can't deduce the code. I don't need any complexity (UI, buttons, memory card access, etc). Just the live camera input working as a webcam.
This is the simplest code I could make to retrieve the 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 it
if(waitKey(30) >= 0) break;
}
return 0;
}
Any suggestion to help me replacing the webcam in this lines?
Thanks