Convertion pixel in colorbar into mm

2 次查看(过去 30 天)
agung pratama
agung pratama 2020-7-23
回答: Rahul 2024-11-29
Here is a figure of a 3D surface from 2D images, if I want to know the height of the object how I can get this information?

回答(1 个)

Rahul
Rahul 2024-11-29
In order to obtain the height of the object, consider using the 'max' and 'min' functions on the matrix of the image and obtain maximum and minimum intensities from the image. Below is a basic example for the same:
% Assuming 'img' variable to contain the image data
maxHeight = max(img(:));
minHeight = min(img(:));
reqHeight = maxHeight - minHeight;
If required to obtain the height of a particular point from the 3d reconstruction of the 2d image, function 'improfile' can be used to plot and visualize the intensity value at the provided point or selection on the image.
The following MATLAB Answer can be referred to to understand the use of 'improfile' to find intensity values to evaluate height profiles:
The following MathWorks documentations can be referred to know more:
Hope this would help! Thanks.

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by