this question has answer here:
- what operator “dot” (.) mean? 2 answers
from matlab example of computer vision stereo depth estimation...
what purpose of . in last line below?
centroids_2d = [round(bboxes(:, 1) + bboxes(:, 3) / 2), ... round(bboxes(:, 2) + bboxes(:, 4) / 2)]; centroidsidx = sub2ind(size(disparitymap), centroids_2d(:, 2), centroids_2d(:, 1)); x = point3d(:, :, 1); y = point3d(:, :, 2); z = point3d(:, :, 3); centroids3d = [x(centroidsidx), y(centroidsidx), z(centroidsidx)]; object_distance_meters = sqrt(sum(centroids3d .^ 2, 2)) / 1000;
the operators ^ , .^ 2 different way use power
a^2 means a*a
in other hand,
a.^2 means
a(1) = a(1)^2; a(2) = a(2)^2; a(3) = a(3)^2; ....
Comments
Post a Comment