Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify code to process video from camera #6

Open
lanyusea opened this issue Aug 6, 2014 · 3 comments
Open

Modify code to process video from camera #6

lanyusea opened this issue Aug 6, 2014 · 3 comments

Comments

@lanyusea
Copy link

lanyusea commented Aug 6, 2014

Hi, I'm trying to modify the code in order to process with my camera.

But I got a segmentation fault (core damped) after compile.

I use the cv::VideoCapture cap(1) to read my camera, then put cv::Mat img and cv::Mat im_gray out of the for loop then cap>>img; inside the loop. Also comment the num2str and sprintf.

But it doesn't work,
Can anyone tell me what else should I modify?

Thanks.

@bwang22
Copy link

bwang22 commented Jan 29, 2015

I got same problem. The after building this, it should run to demonstrate it works. Instead I got code that have a nonsensical input that can't run.

@delmottea
Copy link
Owner

The example use the cokecan sequence (from the dataset available in the CMT project page http://www.gnebehay.com/cmt/ ).

for the video capture, you use something like :
cv::VideoCapture cap(cameraId);
cv::Mat img;
cap >> img;
to obtain your images
the first call to CMT must be the initialise with the first image and the top-left and bottom-right coordinates of the bounding box of the target.
then you call processFrame on the next images

@bwang22
Copy link

bwang22 commented Jan 30, 2015

wow thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants