undistortFisheyePoints function How does it work?
Afficher commentaires plus anciens
How does this function work? According to the documentation, I understand the general process, but I don't know how to convert the distortion points to undistort points step by step, that is, what is the corresponding mapping step? I appreciate your answer.
% documentation EXAMPLE
images = imageDatastore(fullfile(toolboxdir('vision'),'visiondata',...
'calibration','gopro'));
imageFileNames = images.Files;
[imagePoints,boardSize] = detectCheckerboardPoints(imageFileNames);
squareSize = 29; % millimeters
worldPoints = generateCheckerboardPoints(boardSize,squareSize);
I = readimage(images,10);
imageSize = [size(I,1) size(I,2)];
params = estimateFisheyeParameters(imagePoints,worldPoints,imageSize);
points = detectCheckerboardPoints(I);
[undistortedPoints,intrinsics1] = undistortFisheyePoints(points,params.Intrinsics)
Then i use my undistort Fisheye points mapping step:
uv = params.Intrinsics.StretchMatrix\(points-params.Intrinsics.DistortionCenter)';% Fisheye Camera Model, camera model proposed by Scaramuzza
rho = vecnorm(uv,2,1);
D = params.Intrinsics.MappingCoefficients;
Zc = 1*(D(1)+D(2)*rho.^2+D(3)*rho.^3+D(4)*rho.^4);% lambda = 1 ?
Xc = 1*uv(1,:);Yc = 1*uv(2,:);
myUndistortPts = [Xc./Zc;Yc./Zc]+params.Intrinsics.DistortionCenter'
undistortedPoints is different from myUndistortPts?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Support Package for USB Webcams dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!