Any suggestions to calculate the threshold of pixel intensity between two regions(the dip represents low intensity)
1 Ansicht (letzte 30 Tage)
%this code calculates the center of mass/gavity bewteen the pharyngeal wall and tongue root
[x ,y]= ginput(2);
I = matrix(:,:,1);
test = improfile(I(:,:,1), [x(1) x(2)] , [y(1) y(2)]);
William Rose am 29 Sep. 2022
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.