Reconstructing 3D from two stereo images
    15 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Jenko Nguyen
 el 22 de Mzo. de 2022
  
    
    
    
    
    Respondida: Birju Patel
    
 el 27 de Abr. de 2022
            I am trying to reconstruct 3D from two stereo grayscale images. The reason im using grayscale because it show vein's depth. But the disparity map and pointcloud doesn't show much information from images. Here the code
clc
clear all
close all
load('handshakeStereoParams.mat');
I1 = im2double(imread('back_left_10_n1.png'));
I2 = im2double(imread('back_right_10_n1.png'));
[G1, G2] = rectifyStereoImages((I1),(I2),stereoParams);
A = stereoAnaglyph(G1,G2);
figure
imshow(A)
title('Red-Cyan composite view of the rectified stereo pair image')
imshow(cat(3,A),'InitialMagnification',50);
disparityMap = disparity(im2gray(G1),im2gray(G2)) ;
figure 
imshow(disparityMap,[0 64],'InitialMagnification',50);
title('Disparity Map');
colormap jet
colorbar
points3D = reconstructScene(disparityMap, stereoParams);
% Convert to meters and create a pointCloud object
points3D = points3D ./ 500;
ptCloud = pointCloud(points3D,"Intensity",G2);
% Create a streaming point cloud viewer
player3D = pcplayer([-1, 2], [-1, 2], [0, 4], 'VerticalAxis', 'y', ...
    'VerticalAxisDir', 'down');
% Visualize the point cloud
view(player3D, ptCloud);
0 comentarios
Respuesta aceptada
  Birju Patel
    
 el 27 de Abr. de 2022
        Hi, 
You will need to calibrate the stereo camera used to capture your images. In the code you posted, you're using calibration parameters from a specific stereo camera setup:
load('handshakeStereoParams.mat');
This won't match your setup and will return in meaningless disparity values. 
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Point Cloud Processing en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

