1
$\begingroup$

I want to estimate depth from live video stream with two calibrated webcams in matlab but has no results. In this post depth is estimated with two recorded video files. how can I estimate depth in live video stream?

$\endgroup$

2 Answers 2

1
$\begingroup$

Since you have two webcams you can reconstruct the video scene using the frame sequence. If your webcams happends to be stereo pair (with known extrinsic parameters aka rotation and translation) your task becomes pretty easy. On the other hand if webcam locations are unknown the problem gets a little trickier, but it can still be solved using matlab's computer vision toolbox. In both of the above cases the scene reconstruction is accurate up to a scale factor. In order to calculate the depth in real units you need length knowlegde about an item in the scene. i.e the edge of a tracked square is 15cm.

$\endgroup$
0
$\begingroup$

You can capture the video from webcams using the Webcam Support Package. Alternatively, you can use the Image Acquisition Toolobx.

$\endgroup$
4
  • $\begingroup$ I have this toolbox and package but I don't know how to use live video stream via stereo calibrated webcams against recorded video file. $\endgroup$
    – Rwy5
    Commented Feb 9, 2016 at 6:46
  • $\begingroup$ Do you know how to capture video frames from a camera? If so, then you would capture a frame from camera 1 and then capture a frame from camera 2, as opposed to reading the frames from video files. $\endgroup$
    – Dima
    Commented Feb 9, 2016 at 16:46
  • $\begingroup$ I think so.the input to function vision.VideoFileReader() is a video file. what is the alternative function to receive a live video stream as input? for example in this post mathworks.com/help/vision/examples/… how can I replace live video stream as input and estimate depth from live video stream? $\endgroup$
    – Rwy5
    Commented Feb 10, 2016 at 14:00
  • $\begingroup$ If you want to use the Webcam Support Package, then you would need to create to webcam objects and then call the snapshot method on each of them to capture frames. See this example: mathworks.com/help/vision/examples/… $\endgroup$
    – Dima
    Commented Feb 10, 2016 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.