1

I am using OpenCV and Python.

Let say I have this sequence video of the car. And I have tracked some 'interesting points' of the car with the cv2.goodFeaturesToTrack and cv2.calcOpticalFlowPyrLK. Now, given the traced points, I want to estimate a very rough shape (maybe a 3D box) of the car and its distance from the camera. It doesn't need to be that accurate.

On top of that, I want it to be keep updating in real time. The closest youtube video I can find that can give a view of what I am trying to achieve is this. I have found a new Structure from Motion module in OpenCV, but it is more on building a 3D model from a collection of points.

The question is, what is the best way of achieving this and what kind of library I can use (especially in order to construct the 3D space)?

And it is also OK if somehow I need to use C++ for this (although I am still not good in it yet).

Thanks.

Riadh Belkebir
  • 797
  • 1
  • 12
  • 34
  • 1
    did you have a look at those 2 samples? 1. camera motion estimation: http://docs.opencv.org/3.1.0/d5/dab/tutorial_sfm_trajectory_estimation.html#gsc.tab=0 2. scene reconstruction from given points http://docs.opencv.org/3.1.0/d4/d18/tutorial_sfm_scene_reconstruction.html#gsc.tab=0 – Micka Jun 21 '16 at 14:22
  • You can try [Bundler](http://www.cs.cornell.edu/~snavely/bundler/) – Finfa811 Jun 22 '16 at 07:13
  • @Micka Thanks for pointing that out. I have completely missed out the camera motion estimation. Between, I have also check out the [PCL](http://pointclouds.org). Can this being used for my purpose (although I have a better feeling with the OpenCV one)? – Hafiz Hilman Mohammad Sofian Jun 23 '16 at 06:15
  • @Finfa811 But it seems like that is more on building a 3D model from collection of pictures. I might be wrong though. – Hafiz Hilman Mohammad Sofian Jun 23 '16 at 06:16
  • @hilman I dont have wxperience with PCL but afaik 3D reconstructiob is one main theme there. – Micka Jun 23 '16 at 06:20
  • @Hilman A video is a collection of pictures. As soon as you have enough baseline between frames, 3D reconstruction will converge. Camera pose estimation is automatic in any SfM framework. – Finfa811 Jun 23 '16 at 06:52

0 Answers0