I am getting the error - Undefined function 'showPointCloud' for input arguments of type 'uint8' . How can this error be removed?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bhupendra Ninania
el 4 de Jul. de 2015
Respondida: Dima Lisin
el 7 de Jul. de 2015
vid = videoinput('pointgrey', 1, 'F7_RGB_1280x960_Mode3');
frame=getsnapshot(vid);
leftim=frame(:,:,3);
centerim=frame(:,:,2);
rightim=frame(:,:,1);
leftim=imresize(leftim,0.5);
rightim=imresize(rightim,0.5);
centerim=imresize(centerim,0.5);
[J1, J2] = rectifyStereoImages(leftim,centerim,nParamsSmall);
dispMap2 = disparity(J1,J2,'Method', 'BlockMatching', 'DisparityRange', [0 128]);
marker_idx = (dispMap2 == -realmax('single'));
dispMap2(marker_idx) = min(dispMap2(~marker_idx));
%figure; imshow(mat2gray(dispMap2));
imshow(dispMap2, [0, 64]);
colormap('jet');
point3D = reconstructScene(dispMap2, nParamsSmall);
% Convert from millimeters to meters.
point3D = point3D / 1000;
% Plot points between 3 and 7 meters away from the camera.
z = point3D(:, :, 3);
maxZ = 7;
minZ = 3;
zdisp = z;
zdisp(z < minZ | z > maxZ) = NaN;
point3Ddisp = point3D;
point3Ddisp(:,:,3) = zdisp;
showPointCloud(point3Ddisp, J1, 'VerticalAxis', 'Y',...
'VerticalAxisDir', 'Down' );
xlabel('X');
ylabel('Y');
zlabel('Z');
0 comentarios
Respuesta aceptada
Walter Roberson
el 4 de Jul. de 2015
That is puzzling. To have that happen, point3Ddisp would have to be uint8, which would mean that point3D would have to be uint8 which would mean that reconstructscene() would have had to return uint8 which disagrees with the documentation which indicates that reconstructscene must return single or double.
Are you certain the code is what you show here?
In any case, showpointcloud was added in R2014b; which version of the Computer Vision toolbox are you using?
3 comentarios
Walter Roberson
el 4 de Jul. de 2015
look at the bottom of the page:
"Introduced in R2014b"
so No, it will not work in R2014a.
Más respuestas (1)
Dima Lisin
el 7 de Jul. de 2015
You should be able to use scatter3 instead of showPointCloud.
0 comentarios
Ver también
Categorías
Más información sobre Image Processing and Computer Vision en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!