- As per my understanding to calculate D1 and D2 Geometry PSNR in MATLAB, you need to calculate the Euclidean distance between corresponding points in the two point clouds for D1.
- For D2, fit planes to the point clouds and measure the perpendicular distance from each point to its corresponding plane. Then, calculate the mean squared error (MSE) between the original and reconstructed distances and use it to calculate the PSNR.
Calculating D1(point to point) and D2(point to plane) Geometry PSNR for point clouds in MATLAB
25 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am working on the 3D point cloud. could you please guide me on how I can calculate D1(point to point) and D2(point to plane) Geometry PSNR in MATLAB
0 Commenti
Risposte (1)
Maneet Kaur Bagga
il 29 Set 2023
Hi Faranak,
Please refer to the code below to calculate D1:
% Number of points in clouds A and B
nA = 10;
nB = 15;
% Generating random coordinates for clouds
ptsA = randn(nA, 3) * 10;
ptsB = randn(nB, 3) * 5;
% Point Clouds A and B
ptCldA = pointCloud(ptsA);
ptCldB = pointCloud(ptsB);
% pcshow(ptCld1)
% Implementing D1 PSNR for point cloud A
D1_AB = 0;
for i = 1:nA
ptA = ptCldA.Location(i, :);
% Nearest point to the ith point A in point cloud B
[nearestPtB, ~] = findNearestNeighbors(ptCldB, ptA, 1);
% Square of l2 norm
d = norm(ptA - ptCldB.Location(nearestPtB, :)) ^ 2;
D1_AB = D1_AB + d;
end
D1_AB = D1_AB / nA;
disp(D1_AB);
Please refer to the following documentation for more information:
Point Cloud Processing
pointCloud function
findNearestNeighbors
Hope this helps!
Regards,
Maneet Bagga
0 Commenti
Vedere anche
Categorie
Scopri di più su Point Cloud Processing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!