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

조회 수: 1 (최근 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에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by