Why do I receive "Input to SVD must not contain NaN or Inf?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Raúl David Domínguez Sánchez
el 28 de Sept. de 2021
Respondida: Cris LaPierre
el 29 de Sept. de 2021
Hello!
I have been trying to use the Lidar Toolbox to estimate the transformation between a lidar sensor and a camera using the checkerboard. So far, I've created a copy of the the MATLAB example EstimateLCTransformExample. Everything is executed correctly, the checkerboard is detected in both the images and the PCD files. However, whenever the transformation function (estimateLidarCameraTransform) is executed I get the following error:
Error using svd
Input to SVD must not contain NaN or Inf.
[U,~,V] = svd(Ml'*Mc);
initialRotation = computeInitialRotation(lidarEdgeDirection, imageEdgeDirection, ...
lidar.internal.calibration.computeInitialTransform(lidar3DCorners, imageCorners3d, verbose);
tform = computeTransformUsingCorners(lidarCheckerboardPlanes, ...
Additionally, I attach the script I have been using:
imageDataPath = 'D:\TEC\10mo Semestre\VTTC\Fotos';
imds = imageDatastore(imageDataPath);
imageFileNames = imds.Files;
ptCloudFilePath = 'D:\TEC\10mo Semestre\VTTC\Lidar';
pcds = fileDatastore(ptCloudFilePath,'ReadFcn',@pcread);
pcFileNames = pcds.Files;
focalLength = [628.8, 387.33];
principalPoint = [701.57, 701.57];
imageSize = [720, 1280];
intrinsics = cameraIntrinsics(focalLength,principalPoint,imageSize)
cameraIntrinsicFile = fullfile(imageDataPath,'calibration.mat');
squareSize = 45;
[imageCorners3d,planeDimension,imagesUsed] = estimateCheckerboardCorners3d( ...
imageFileNames,intrinsics,squareSize);
pcFileNames = pcFileNames(imagesUsed);
[lidarCheckerboardPlanes,framesUsed] = detectRectangularPlanePoints( ...
pcFileNames,planeDimension,'RemoveGround',true);
framesUsed
imagFileNames = imageFileNames(imagesUsed);
imageFileNames = imageFileNames(framesUsed);
pcFileNames = pcFileNames(framesUsed);
imageCorners3d = imageCorners3d(:,:,framesUsed);
tform= estimateLidarCameraTransform(lidarCheckerboardPlanes, imageCorners3d);
0 comentarios
Respuestas (1)
Cris LaPierre
el 29 de Sept. de 2021
Your input to svd is Ml'*Mc. Based on the error message, it would appear at least one value in the resulting calculation is NaN or Inf.
0 comentarios
Ver también
Categorías
Más información sobre Labeling, Segmentation, and Detection 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!