Finding intensity along a moving line in an image and compiling to give an angle VS. Intensity plot

9 views (last 30 days)
I am currently beginning to work on a project to obtain the angle of collagen fiber orientation in tissue. This projects uses a technique called Small angle light scattering to give an image to be analyzed. From this image previous researchers such as Sacks Group in the USA. have used a technique where the following steps are completed:
  1. An image of the light scatter is obtained (Elliptical shape of white values on a black base)
  2. The major and minor axis are then placed on this area
  3. Then a circle is drawn around the center with the diameter of the major axis
  4. This circle is then traveled through with 1 degree increments with a line.
  5. At each of these increments an intensity value is found and recorded.
  6. These intensity values are stored and combined to give a final histogram of intensity values at each point
  7. This histogram allows for the angle be determined where the highest intensity is the dominant angle.
I was wondering is there anybody that may be able to help me determine how to obtain these intensities using mat lab. I would be very grateful for help on any of the above steps. Apologies for the poor description.
Thanks in Advance,
Thomas Sinnott
  1 Comment
Image Analyst
Image Analyst on 29 May 2013
Apologies won't solve your problem like a better description and an image will. Type alt-PrintScreen to copy your active window into the clipboard, then please post a few images to so we can see what you're talking about. Then, is this tracking in 3D over multiple 2D images taken at different depths, where each image is of just a fiber cross section? Or is it of a single 2D image?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 3 Jul 2013
Use improfile() to get the intensity profiles. Use the FAQ to get code to define the endpoints as they move along the circle.

More Answers (2)

Thomas Sinnott
Thomas Sinnott on 3 Jul 2013
This is a Single image as can be seen in the image print screen below( Credit to Sacks group for image) that i am looking to find the intensity information along a line. This line starts from the center pixel of the white region and it works in a vertical direction through the pixels. I can then plot the intensity along this line by obtaining the greyscale value through a loop for each pixel in the line.
I can obtain this for the vertical line values and horizontal line values, but dont know how to solve it for the a virtual line moving in segments of one degrees. I had thought about leaving the line where the vertical values are obtained fixed and rotate the image. I think that this would lead to image quality loss.
Therefore i am looking for a way to move this virtual line fixed at the center point of the the white intensity region in the image, in one degree segments to be able to get the values that lie along these 360 lines of the image. Then use this information to create an intensity plot for the overall system.
I hope this is a better description and that some one can recommend the next step.

Thomas Sinnott
Thomas Sinnott on 9 Jul 2013
Thanks for the previous help, I am still having some trouble. I have now got the values of the circle and now have them in two matrices. One matrix for the x values and one for the y values. I also have the center point seen in the code as Cen x and Cen y. I have then created a loop to draw lines from the center to each of the outer points of the circle, but now i am trying to get the improfile of these and am having trouble. I am getting the following errors:
Error using interp2/makegriddedinterp (line 224) Interpolation requires at least two sample points in each dimension. Consider using INTERP1 if X or Y have constant coordinates that can be eliminated to reduce the dimension.
Error in interp2 (line 125) F = makegriddedinterp({X, Y}, V, method);
Error in improfile (line 213) zr = interp2(xGridPoints,yGridPoints,img(:,:,1),xg,yg,method);
Error in ThomasG3 (line 63) zr = improfile(CenY,CenX,line,ValuesFinal1(n,1),ValuesFinal2(n,1));
the code that i am using for this section is as follows:
%Plot the intensities
for n=1:360
ValuesFinal1(n,1)= values1(n,1)+(CenY);
ValuesFinal2(n,1)= values2(n,1)+(CenX);
figure, image(uint8(line));
% CenY is the value 211, and CenX is the value 145, these are the centre points of my circle
% VaulesFinal1 and ValuesFinal2 are a list of values for the points on the
% outer radius of the circle.
zr = improfile(CenY,CenX,line,ValuesFinal1(n,1),ValuesFinal2(n,1));
%Also tried to use the following with no success.
zr = interp2(CenY,CenX,I,ValuesFinal1(n,1),ValuesFinal2(n,1));
I would appreciate your help again, Thanks Tom

Community Treasure Hunt

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

Start Hunting!