Any suggestions to calculate the threshold of pixel intensity between two regions(the dip represents low intensity)

2 次查看(过去 30 天)
%this code calculates the center of mass/gavity bewteen the pharyngeal wall and tongue root
imshow(matrix(:,:,1))
[x ,y]= ginput(2);
I = matrix(:,:,1);
for i=1:size(matrix,3)
I=matrix(:,:,i);
test = improfile(I(:,:,1), [x(1) x(2)] , [y(1) y(2)]);
end
plot(test);

回答(1 个)

William Rose
William Rose 2022-9-29
I need more information to understand and help. I see that your code gets two points (x1,y1 and x2,y2) on image 1 in a set of images. The points are specified by the user. The the script generates an intensity profile along a line from x1,y1 to x2,y2, in all the images in the set. The comment says that the code computes the center of gravity between pharygeal wall and tongue root. However, this is not true - it does not compute a center of mass.
You asked "any suggestion to calculate the threshold of pixel intensity between two regions(the dip represents low intensity)". You can use the min(test) to find the minimum intensuity between the two points. But this is not a threshold. Please epxlain what you are trying to do in more detail and supply a set of test images.

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by