Hello,
I apologize if this is a stupid question, but I am at the end of my rope with it. I am in the process of standardizing photographs (of eggs) and I need all of the eggs to lie along the same axis, therefore, I have a macro written to take the feret angle and rotate the eggs by that much, which ought to orient them against the x-axis. To my eyes, this seems to work, they look like they are in the right position. However, I went back and calculated the feret angle of the selections and they are all off – albeit by just a little bit: .5 - 3 degrees, which is not huge, but certainly would throw off calculations. I cannot think of a reason for this (as the pixels retain their orientation in relation to each other, right?) and am puzzled and hesitant to run analyses on the images. I searched the forums and could not find anyone else with the same problem. Should I be going about this in an entirely different way? Thanks in advance, Eric |
On Monday 05 Dec 2011 23:00:01 you wrote:
> to take the feret angle and rotate the eggs by that much, which ought to > orient them against the x-axis. To my eyes, this seems to work, they look > like they are in the right position. However, I went back and calculated > the feret angle of the selections and they are all off – albeit by just a > little bit: .5 - 3 degrees, which is not huge, but certainly would throw > off calculations. > > I cannot think of a reason for this (as the pixels retain their orientation > in relation to each other, right?) and am puzzled and hesitant to run > analyses on the images. I searched the forums and could not find anyone > else with the same problem. Should I be going about this in an entirely > different way? That is expected. The discrete digitised boundaries do not have the longest axis where one expects they should be in their continuous version. In *digitised* ellipses the computed Feret diameter is on the diagonal of a inscribed rectangle (depending on the aspect ratio) rather than the medial axis of that inscribed rectangle. Draw a small ellipse in IJ and see for yourself. This is the prize one pays for digitising shapes. Cheers G. |
Hello Eric,
> to take the feret angle and rotate the eggs by that much, which ought to > orient them against the x-axis. To my eyes, this seems to work, they look > like they are in the right position. However, I went back and calculated > the feret angle of the selections and they are all off – albeit by just a > little bit: .5 - 3 degrees, which is not huge, but certainly would throw > off calculations. > > I cannot think of a reason for this (as the pixels retain their orientation > in relation to each other, right?) and am puzzled and hesitant to run > analyses on the images. I searched the forums and could not find anyone > else with the same problem. Should I be going about this in an entirely > different way? If the eggs are symmetrical about the long axis (what I periodically observe in the super market), you could use the angle that is calculated from the best-fitting ellipse. This value is based on all pixels of the object and not only to the perimeter, it suffers much less from pixelisation mentioned by Gabriel. Norbert Vischer |
Gracias, amigos.
It makes good sense now that I see how it is calculated. -Eric On Mon, Dec 5, 2011 at 9:12 PM, Norbert Vischer <[hidden email]>wrote: > Hello Eric, > > > to take the feret angle and rotate the eggs by that much, which ought to > > orient them against the x-axis. To my eyes, this seems to work, they look > > like they are in the right position. However, I went back and calculated > > the feret angle of the selections and they are all off – albeit by just a > > little bit: .5 - 3 degrees, which is not huge, but certainly would throw > > off calculations. > > > > I cannot think of a reason for this (as the pixels retain their > orientation > > in relation to each other, right?) and am puzzled and hesitant to run > > analyses on the images. I searched the forums and could not find anyone > > else with the same problem. Should I be going about this in an entirely > > different way? > > If the eggs are symmetrical about the long axis (what I periodically > observe in the super market), you could use the angle that is calculated > from the best-fitting ellipse. This value is based on all pixels of the > object and not only to the perimeter, it suffers much less from > pixelisation mentioned by Gabriel. > > Norbert Vischer > |
Free forum by Nabble | Edit this page |