I have an image of a fiber output: 1

I want to verify 2 factors from this image:

  1. How uniform is the intensity across the image (Theoretically fiber output should be closer to a step index profile than a gradient profile - again it depends on how it is illuminated, lets assume it should be closer to flat top)
  2. Does the bright spot lie closer to the center

Code for now,

data = Total[ImageData[ColorConvert[P2C, "Grayscale"]]];
ListLinePlot[data, PlotTheme -> "Detailed", Filling -> Bottom, 
 AspectRatio -> 1/4, PlotRange -> All]


Further, I can also take 3 cropped sections from top to bottom and see the variations in flatness:

00 11 33

This would give me the overall understanding of the variation in intensity distribution and the small bump corresponds to the bright spot, by which I can determine if it is closer to the center.

Is there a better analysis method I can implement? I should be able to quantify what is good and bad criteria from this. That the flatness is faithful allover the image.

  • $\begingroup$ Are you looking for angluar or field homogeneity of the fiber? $\endgroup$
    – Eisbär
    Jun 8 '17 at 11:32
  • $\begingroup$ @Eisbär Field homogeneity $\endgroup$ Jun 8 '17 at 12:37

such a clean image we can easily edge detect the circle and its center..


enter image description here

{cent, rad} = 
 1 /. ComponentMeasurements[%, {"Centroid", "MeanCentroidDistance"}]

{{225.559, 223.983}, 214.327}

   Inset[ImageReflect@img, {0, 0}, {0, 0}, ImageDimensions[img]], 
   PlotRange -> {{0, ImageDimensions[img][[2]]}, {0, 
  Graphics[{Red, Circle[cent, rad]}]}]

enter image description here

not sure what you want to do, but here is for example a plot of intensity vs radius:

  MapIndexed[{ Norm[#2 - cent] , #} & , 
   ImageData[ColorConvert[img, "Grayscale"]] , {2}], 1]]

enter image description here

  • $\begingroup$ I am trying to measure if the intensity is unifrom (flat) accross the image surface, except for the center peak. Another question: What version of Mathematica are you using, my ComponentMeasurements[ EdgeDetect@Binarize@P2C, {"Centroid", "MeanCentroidDistance"}]gave 1 -> {{216.408, 368.551}, 147.419} as {cent, radius}, which is quite absurd for the same image. $\endgroup$ Jun 8 '17 at 14:42
  • $\begingroup$ v 10.1 . Really you could do well to manually eyeball the center and radius if the ComponentMeasurements doesn't work. Most of the images I work with aren't clean enough for that to work and that's what I have to do. $\endgroup$
    – george2079
    Jun 8 '17 at 16:06
  • $\begingroup$ Yeah, I can eyeball but was surprised to find out such a discrepancy with your result and mine. $\endgroup$ Jun 8 '17 at 16:56
  • $\begingroup$ maybe a difference between your original image and the copy off the web..? I put a couple of intermediate steps up to see. $\endgroup$
    – george2079
    Jun 8 '17 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.