Effacer les filtres
Effacer les filtres

Depth estimation from live video stream

3 vues (au cours des 30 derniers jours)
john john
john john le 9 Fév 2016
Réponse apportée : Brattv le 9 Fév 2016
I have two calibrated cameras and webcam support package and image acquisition toolbox. in this post depth is estimated from two recorded videos but my application is real-time and I want to estimate depth from live video stream. how can I do this ?
  3 commentaires
john john
john john le 9 Fév 2016
@Vegard Brattland : thanks for your help. in this case it should estimate depth from live video stream .is snapshot() works for this case?
Brattv
Brattv le 9 Fév 2016
Modifié(e) : Brattv le 9 Fév 2016
The snapshot function should return images from both of your cameras. I have no idea if this will work but try
frameLeft = imageLeft;
frameRight = imageRight;
[frameLeftRect, frameRightRect] = ...
rectifyStereoImages(frameLeft, frameRight, stereoParams);
figure;
imshow(stereoAnaglyph(frameLeftRect, frameRightRect));
title('Rectified Video Frames');

Connectez-vous pour commenter.

Réponses (1)

Brattv
Brattv le 9 Fév 2016
Posting the discussion in the comment as answer. Feel free to chose it if it solved the problem
1. Call the function "gigecamlist" from the command window. This should return a model if your camera is GigE Vision compliant.
2. Create two camera objects with the "gigecam" function. Use the serial number that was found with the gigecamlist command to seperate them. The call should be something like
cameraLeft = gigecam('serialnumber')
cameraRight = gigecam('serialnumber')
3. Use the "snapshot" function to get the images.
[imageLeft tsLeft] = snapshot(cameraLeft)
[imageRight tsRight] = snapshot(cameraRight)
The snapshot function should return images from both of your cameras. I have no idea if this will work but try
frameLeft = imageLeft;
frameRight = imageRight;
[frameLeftRect, frameRightRect] = ...
rectifyStereoImages(frameLeft, frameRight, stereoParams);
figure;
imshow(stereoAnaglyph(frameLeftRect, frameRightRect));
title('Rectified Video Frames');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by