abhineet123 / MTF

Modular Tracking Framework
http://webdocs.cs.ualberta.ca/~vis/mtf/
BSD 3-Clause "New" or "Revised" License
100 stars 23 forks source link

how to test with my camera? #17

Closed ismymajia closed 6 years ago

ismymajia commented 6 years ago

./build/runMTF config_dir ./Config/

Starting MTF... Reading configuration files from: ./Config/


Using parameters: n_trackers: 1 actor_id: 7 source_id: 6 source_name: sylvester actor: CMT pipeline: c img_source: j mtf_visualize: 1 read_obj_from_gt: 1 write_tracking_data: 0 mtf_sm: fc mtf_am: ncc mtf_ssm: 8


Exception of type InvalidArgument encountered while initializing the input pipeline: InputBase :: Image sequence folder ../../../Datasets/CMT/sylvester does not exist

abhineet123 commented 6 years ago

Set img_source to u for USB camera and f for firewire camera.

abhineet123 commented 6 years ago

If you want to test on a dataset sequence (like sylvester from CMT as in your cfg file), set db_root_path to the folder containing the dataset files.

ismymajia commented 6 years ago

./build/runMTF config_dir ./Config/

Starting MTF... Reading configuration files from: ./Config/


Using parameters: n_trackers: 1 actor_id: 7 source_id: 6 source_name: usb_cam actor: Live pipeline: c img_source: u mtf_visualize: 1 read_obj_from_gt: 0 write_tracking_data: 0 mtf_sm: fc mtf_am: ncc mtf_ssm: 8


Initializing OpenCV pipeline... HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP OpenCV pipeline initialized successfully to grab frames of size: 640 x 480 Corrupt JPEG data: 1 extraneous bytes before marker 0xd2 n_frames=0 selecting quadrilateral object... Corrupt JPEG data: 7 extraneous bytes before marker 0xd6 Corrupt JPEG data: 3 extraneous bytes before marker 0xd1 Corrupt JPEG data: 3 extraneous bytes before marker 0xd2 Corrupt JPEG data: 2 extraneous bytes before marker 0xd5 Corrupt JPEG data: 5 extraneous bytes before marker 0xd3 Corrupt JPEG data: 2 extraneous bytes before marker 0xd2 Corrupt JPEG data: 3 extraneous bytes before marker 0xd5 Corrupt JPEG data: 6 extraneous bytes before marker 0xd5 Corrupt JPEG data: 4 extraneous bytes before marker 0xd2 Corrupt JPEG data: 3 extraneous bytes before marker 0xd3 Corrupt JPEG data: 2 extraneous bytes before marker 0xd5 Corrupt JPEG data: 1 extraneous bytes before marker 0xd3 Corrupt JPEG data: 1 extraneous bytes before marker 0xd5 Corrupt JPEG data: 1 extraneous bytes before marker 0xd2 Corrupt JPEG data: 2 extraneous bytes before marker 0xd7 Corrupt JPEG data: 1 extraneous bytes before marker 0xd2 Corrupt JPEG data: 2 extraneous bytes before marker 0xd1 Corrupt JPEG data: 4 extraneous bytes before marker 0xd0 Corrupt JPEG data: 4 extraneous bytes before marker 0xd2 Corrupt JPEG data: 1 extraneous bytes before marker 0xd2 Object(s) to be tracked could not be obtained.

hope to any suggestions!

abhineet123 commented 6 years ago

There seems to be something wrong with either your OpenCV installation or the v4l2 driver used for accessing USB cameras. To check if the driver is OK, you can install visp and change pipeline to v to use the visp pipeline instead.

This page addresses the same error as yours so might help you fix v4l2 issues in OpenCV.

ismymajia commented 6 years ago

./build/runMTF config_dir ./Config/

Starting MTF... Reading configuration files from: ./Config/


Using parameters: n_trackers: 1 actor_id: 7 source_id: 6 source_name: usb_cam actor: Live pipeline: c img_source: u mtf_visualize: 1 read_obj_from_gt: 0 write_tracking_data: 0 mtf_sm: fc mtf_am: ncc mtf_ssm: 8


Initializing OpenCV pipeline... OpenCV pipeline initialized successfully to grab frames of size: 640 x 480 select timeout n_frames=0 init done opengl support available selecting quadrilateral object... resize_factor: 1.000000 input->size(): 480 x 640 hover_image.size(): 480 x 640 select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout select timeout

why? show a window with title: "Please select the object to track by clicking at its four corners" but when i click, no response and print select timeout

111

abhineet123 commented 6 years ago

Are you sure the camera is working correctly and actually capturing images because the window in the screenshot seems blank ? Also, I can see a lot of output in the terminal that should not be there. Did you add these for debugging ?

I have never seen the "select timeout" before nor is there any code within MTF that would print it, so this too seems something to do with compatibility issues between OpenCV and your camera.

abhineet123 commented 6 years ago

Refer these for possible causes of the select timeout: http://answers.opencv.org/question/120525/opencv-select-timeout-at-high-resolutions/ https://stackoverflow.com/questions/12715209/select-timeout-error-in-ubuntu-opencv?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

abhineet123 commented 6 years ago

closing as resolved