Ever decreasing circles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Ever decreasing circles

John Brear
Hi,

 

We are metallurgists, studying the microstructural changes that occur in
stainless steels.  Our application is the structural integrity of critical
components in power generation and petrochemical plant.

With time at high temperature, various species of precipitate particles
form, grow and dissolve.  The different, co-existing species have different
size ranges, morphologies and spatial distributions - but considerable
overlap occurs.

Quantifying the kinetics of precipitation, growth and dissolution requires
measurement of the numbers and sizes of each species after ageing at various
combinations of time and temperature.

The precipitates are revealed by polishing and etching the steel samples.
Some separation of species can be obtained by using different etches (though
one cannot view the same area after re-polishing and re-etching).

However, full separation requires discrimination by size range and
morphology - and it is with the latter that we have a problem.

 

ImageJ allows selection by size range and circularity.

Circularity is defined in the User Guide as:  "Circularity = 4 x Pi x Area /
Perimeter squared, with a value of 1.0 indicating a perfect circle. As the
value approaches 0.0, it indicates an increasingly elongated shape. Values
may not be valid for very small particles."

The definition is conventional, but the caveat on validity misunderstands
measure on pixelated images.  In the real plane, where area and perimeter
measures occupy the continuum, the circularity of a circle is indeed 1.  But
in the integer plane both areal and linear measures are quantised.  Area is
limited to integer values (pixel count) and perimeter is a Banach-like
measure which may have only orthogonal components or which may allow
diagonal elements.  Using artificial images (Bresenham approximations to the
circle and totally random shapes) it appears that perimeters in ImageJ are
of the form a + b x sqrt(2), where a, b are integers.  This gives a limiting
circularity (for a single pixel) of Pi / 2.

Calculating the circularities of our observed precipitates shows that we
would obtain much better discrimination by selecting on circularity values
greater than 1.  At present ImageJ does not allow this.

 

Is there a simple way of overriding this limit?

 

As background, we typically average over 20 random images of a sample -
after each of two etches (one of which reveals some species and one of which
reveals all of them).  Images size is 1280 x 960 pixels, representing a
field of view of 320 x 240 microns.  Our steels have a grain size of around
132 pixels (33 micron mean linear intercept) and some precipitates
concentrate on the grain boundaries.

A typical set of results is:


AC792

Species 1

 

Species 2

 

Species 3

 


 

Count

Average size

Count

Average size

Count

Average size


Mean

941.3

11.67

262.4

84.33

6573.4

4.62


St Dev

193.2

3.07

40.0

23.49

2521.9

0.56

                                                               

Species 1 is revealed by the first etch, all three species by the second.
Average sizes are Total area / Count, so the tabulated means and standard
deviations are of averages, not of values.  Thus actual size ranges are
wider and species 1 overlaps considerably with species 2 and 3.  Species 1
and 3 are potentially differentiable by circularity.  (Sometimes we have
more than 3 coexistent species.)

 

Any help with this specific issue would be appreciated.

In addition, we would be very pleased to exchange ideas and experience with
other materials scientists in the ImageJ community.

 

Best wishes

John

 

John M Brear

Director

John Brear - Plant Integrity Cyfyngedig

Abergefryn, Capel Seion, Drefach, Llanelli, SA14 7BP, UK

 

Direct:   +44 (0) 1269 832970
<mailto:[hidden email]>
[hidden email]

Mobile: +44 (0) 7401 797293

 

John Brear - Plant Integrity

Office:   <mailto:[hidden email]>
[hidden email]

Web:      <http://johnbrear-plantintegrity.com/>
http://johnbrear-plantintegrity.com

 

John Brear - Plant Integrity Cyfyngedig is registered in England and Wales
with Company Number 09383057

 

This email, including any files transmitted with it, is intended for the
recipient(s) only.  It may contain confidential or legally privileged
information.

If you are not an intended recipient, the email and any attachments have
been transmitted to you in error and any copying, distribution or other use
of the information contained herein is strictly prohibited.

If you have received this electronic message in error, please accept our
apologies and notify us by telephone or email immediately.

Neither John Brear - Plant Integrity nor the sender accepts any
responsibility for viruses or other destructive elements, or for the
consequences of any misuse of the information herein.

 

 


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

Gabriel Landini
Hi,

On Sunday, 11 December 2016 13:38:23 GMT John M Brear wrote:
> Calculating the circularities of our observed precipitates shows that we
> would obtain much better discrimination by selecting on circularity values
> greater than 1.  At present ImageJ does not allow this.

Not sure I understand your question, but that seems impossible from the
definition of circularity. A circle has the maximum theoretical circularity of
1.

Regions with a circularity >1, would mean that a region has a shorter
perimeter than a circle enclosing the same area.

To avoid large errors generated on small regions, you could take images with
higher magnification, so the pixellation error are relatively less prominent.
However, the discretisation problem, will not go away. You cannot get
circularity of 1. While you get closer and closer to the true area of your
region by increasing magnification, the perimeter is always overestimated due
to the polygonation of the discrete representation of your objects.

> it appears that perimeters in ImageJ are of the form a + b x sqrt(2), where
> a, b are integers.  This gives a limiting circularity (for a single pixel)
> of Pi / 2.

A single pixel has no circularity because it is a sample (with neither area
nor perimeter), so I would not make assumptions as what is the limiting
circularity in that case.
IJ uses the number of pixels as area and the length of the polygon as the
perimeter. There are alternatives to this. For example my plugin (Particles8,
downloadable from my page) uses the area inside the perimeter polygon as the
estimate of "area".  The circularity values are slightly different from those
in IJ
The problem of the length of the perimeter, however, remains, but this is well
understood and there have been many papers on this and the representation of
"digital lines".
Freeman's papers in the 1960s are the classic reference to this. This was
discussed a bit in the ImageJ Forum some time ago and I posted some more
references
http://forum.imagej.net/t/polygon-mesh-boundary/3153

Strange things happen in discrete space! :-)

Cheers
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

John Brear
Hi Gabriel,
I appreciate your reply.  We certainly agree that discrete space needs
careful handling!
The essence of the problem is that circles do not exist in discrete space,
so limits on theoretical circularity are irrelevant to discrete shapes.

A pixel has an area and a perimeter.
If it did not, then two pixels would have neither area nor perimeter, and
three pixels would have neither area nor perimeter...
...and 122,880 pixels would have neither area nor perimeter.  So my image
would have neither area nor perimeter!

But induction apart, IJ demonstrably reports an area of 1 and a perimeter of
2.828.. for a feature occupying one pixel.  It also reports a circularity of
1, but the value calculated from the reported area and perimeter is 1.5713..
I have thousands of imaged particles with IJ reported areas and perimeters
giving calculated circularities >1 against the reported values of 1.  All I
need to do is to discriminate in this area.

I don't think we differ at all in our understanding of the issues of
polygonization; the problem is that IJ prevents those of us who understand
the issues from accessing and using the real values.

On the practical question of magnification, we always need to compromise
between the resolution and characterisation of small features and the
analysis of a truly representative area - at proportionate effort!   Our
characterising features span over 2 orders of magnitude in linear dimension.

I shall look at your plug-in and refer to the earlier discussions - thanks
for the link!

Best wishes

John

PS  ...and apologies that my results table appeared as a paperchain!

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Gabriel Landini
Sent: 11 December 2016 15:15
To: [hidden email]
Subject: Re: Ever decreasing circles

Hi,

On Sunday, 11 December 2016 13:38:23 GMT John M Brear wrote:
> Calculating the circularities of our observed precipitates shows that
> we would obtain much better discrimination by selecting on circularity
> values greater than 1.  At present ImageJ does not allow this.

Not sure I understand your question, but that seems impossible from the
definition of circularity. A circle has the maximum theoretical circularity
of 1.

Regions with a circularity >1, would mean that a region has a shorter
perimeter than a circle enclosing the same area.

To avoid large errors generated on small regions, you could take images with
higher magnification, so the pixellation error are relatively less
prominent.
However, the discretisation problem, will not go away. You cannot get
circularity of 1. While you get closer and closer to the true area of your
region by increasing magnification, the perimeter is always overestimated
due to the polygonation of the discrete representation of your objects.

> it appears that perimeters in ImageJ are of the form a + b x sqrt(2),
> where a, b are integers.  This gives a limiting circularity (for a
> single pixel) of Pi / 2.

A single pixel has no circularity because it is a sample (with neither area
nor perimeter), so I would not make assumptions as what is the limiting
circularity in that case.
IJ uses the number of pixels as area and the length of the polygon as the
perimeter. There are alternatives to this. For example my plugin
(Particles8, downloadable from my page) uses the area inside the perimeter
polygon as the estimate of "area".  The circularity values are slightly
different from those in IJ The problem of the length of the perimeter,
however, remains, but this is well understood and there have been many
papers on this and the representation of "digital lines".
Freeman's papers in the 1960s are the classic reference to this. This was
discussed a bit in the ImageJ Forum some time ago and I posted some more
references
http://forum.imagej.net/t/polygon-mesh-boundary/3153

Strange things happen in discrete space! :-)

Cheers
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

Gabriel Landini
On Sunday, 11 December 2016 16:41:45 GMT John M Brear wrote:
> A pixel has an area and a perimeter.

Some would disagree, see for example:
http://www.cs.princeton.edu/courses/archive/spr05/cos426/papers/smith95b.pdf

> If it did not, then two pixels would have neither area nor perimeter, and
> three pixels would have neither area nor perimeter...

Well that is exactly how Particles8 and 4 work when considering "area" and the
values they return. That being said, they also compute "pixels" but I think
that circularity and other morphometrical parameter are better constructed
using the concept of area as the space inside the polygon defined by the
perimeter. If the polygon defines no area, then some morphometrical descriptors
cannot not exist (you get division by 0 and so on). That is useful too, e.g.
in mereotopology there are operators for detecting regions with an without
'interior', so no, not everybody believes a single pixel has an area.

Of course one can count the number of pixels a region is made of,  and  assume
that 2 pixels side by side have an area of 2, but this then has other
consequences that need to be considered later (such as that no points or lines
exist in digital images).
According to Freeman's papers, two pixels side by side define a line of length
1, while two pixels joined by their corners define a line of length sqrt(2).

> ...and 122,880 pixels would have neither area nor perimeter.

Not necessarily. It depends on the connectivity considered between samples and
how we define a "region". If they are all disconnected pixels, that is also
correct, you got 122,880 point samples. If they are somehow connected forming
regions (defining "connected" as the property of being able to travel between
any two pixels in that region through a path that is all contained in that
region), then you can have a perimeter and area associated to that region.

The smallest "area" you can detect with Particles8 (which uses 8-connectivity,
hence its name) is defined by 3 pixels (area of 0.5) in an "L" configuration.
Its perimeter is 1+1+sqrt(2).
A 2x2 pixel square blob as an area of 1 and a perimeter of 4.

> But induction apart, IJ demonstrably reports an area of 1 and a perimeter of
> 2.828.. for a feature occupying one pixel.

Yes, in IJ the default Particle Analyzer does things differently and it is
important to be aware of those, that is what I have been trying to explain.

> It also reports a circularity
> of 1, but the value calculated from the reported area and perimeter is
> 1.5713..

Have a look at the documentation in the IJ site. It says in page 137 that
"values may not be valid for very small particles". That is because for very
small particles IJ just outputs "1".  I do not know exactly the reason for
this,  I think this was set long ago. Wayne might clarify it.
In practical terms it is not a good idea to use such small regions for the
analysis of captured images, but sometimes we might want to analyse synthetic
images, where you know that detecting a pixel is relevant.

If you need to know exactly the value of circularity, you can either compute
it separately (from the area (which in IJ is same a number of pixels) and
perimeter columns) or you can try the Particles 8 and compute it from either
pixels or area , and the perimeter (the default circ. is computed form the
"polygonal area").  You will note that since a pixel has no area, it cannot
have a circularity (and hence it returns -1).

> I have thousands of imaged particles with IJ reported areas and
> perimeters giving calculated circularities >1 against the reported values
> of 1.  All I need to do is to discriminate in this area.

Can you post just one of those regions? I would be interested in seeing how a
value >1 is generated. How do you compute that value?

> I don't think we differ at all in our understanding of the issues of
> polygonization; the problem is that IJ prevents those of us who understand
> the issues from accessing and using the real values.

I am sure that you understand all this, but sometimes users are not aware of
how every detail is implemented and the logic behind the choices made in the
programs.
Anyway, I hope I helped a bit in explaining how things some things work in IJ
and why I implemented it differently in my plugins. A few people found the
alternative implementation useful too.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

Gabriel Landini
In reply to this post by John Brear
I said:
> If the polygon defines no area, then some morphometrical descriptors
> cannot not exist (you get division by 0 and so on).

Sorry, I meant "cannot exist".

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

John Brear
In reply to this post by Gabriel Landini
Thanks, Gabriel,  for the reference - very worthwhile reading, but it needs
a bit more explicit maths to convince me fully!

Happy to accept pixels as points mathematically - ie a number-value encoding
all information of interest at a location in 2(or more)-space (and time).
But what does such a 'point sample' sample and encode?
In my optical microscopes the detector is an array of sensor elements,
regular as in a CCD or CMOS, or quasi-regular as the crystals in a
photographic emulsion or the rods and cones in my retinas.  Whatever type,
each sensor element has a finite area which can be mapped via the laws of
classical optics to a finite area on the object being viewed.  So the
mathematical-point pixel is a sample over (not from) a real-world area -
albeit encoded as a 'point' value.

We must not let our concepts of the real world constrain our mathematical
representations.
Nor must we let our mathematical representations constrain our understanding
of how the world actually works.

I hadn't intended to open a can of philosophical worms, but I suspect most
IJ users (myself included) need to be more aware of these concepts and their
implications.

Attached is a typical image - converted to 8-bit.  You can see that several
types, sizes and spatial distributions of particles are present.
Thresholding at the default level of 109 and analyzing particles with
appropriate parameters set yields a table with area, perimeter and
circularity data for 2101 particles.    The list won't accept it as an excel
or pdf file, I'm afraid, so I attach an image of the first 40 results.
I added a column which calculates circularity from the reported area and
perimeter values, using the conventional formula, then sorted these into
ascending order and plotted against cumulative fraction, yielding the
attached graph.  1061 particles have calculated  circularities greater than
1.
To be explicit, particle 37 has an area of 1 and a perimeter of 2.828,
giving a calculated circularity of 1.5713 - whereas a value of 1 is
reported.
My interest in exploring the high circularity region becomes clear.  What is
going on at 1.08?

The calculated circularities have distinct values, which naturally arise
from integer areas and perimeters of the form a + b x sqrt(2).
Whatever pixels might be, IJ is measuring my particles as if they were
continuous assemblages of little squares...
...or maybe I'm readily confused.

Whether or not these calculated circularities are strongly meaningful is
beside the point.  Practically they are calculable and show a trend with
interesting features that may betoken something of real interest, or serve
to highlight a processing artifact.
All I wish to do is select my set for analysis in a manner that allows
choice of circularity values >1.

Again, I appreciate your time and responses
Best wishes
John

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Gabriel Landini
Sent: 11 December 2016 18:13
To: [hidden email]
Subject: Re: Ever decreasing circles

On Sunday, 11 December 2016 16:41:45 GMT John M Brear wrote:
> A pixel has an area and a perimeter.

Some would disagree, see for example:
http://www.cs.princeton.edu/courses/archive/spr05/cos426/papers/smith95b.pdf

> If it did not, then two pixels would have neither area nor perimeter,
> and three pixels would have neither area nor perimeter...

Well that is exactly how Particles8 and 4 work when considering "area" and
the values they return. That being said, they also compute "pixels" but I
think that circularity and other morphometrical parameter are better
constructed using the concept of area as the space inside the polygon
defined by the perimeter. If the polygon defines no area, then some
morphometrical descriptors cannot not exist (you get division by 0 and so
on). That is useful too, e.g.
in mereotopology there are operators for detecting regions with an without
'interior', so no, not everybody believes a single pixel has an area.

Of course one can count the number of pixels a region is made of,  and
assume that 2 pixels side by side have an area of 2, but this then has other
consequences that need to be considered later (such as that no points or
lines exist in digital images).
According to Freeman's papers, two pixels side by side define a line of
length 1, while two pixels joined by their corners define a line of length
sqrt(2).

> ...and 122,880 pixels would have neither area nor perimeter.

Not necessarily. It depends on the connectivity considered between samples
and how we define a "region". If they are all disconnected pixels, that is
also correct, you got 122,880 point samples. If they are somehow connected
forming regions (defining "connected" as the property of being able to
travel between any two pixels in that region through a path that is all
contained in that region), then you can have a perimeter and area associated
to that region.

The smallest "area" you can detect with Particles8 (which uses
8-connectivity, hence its name) is defined by 3 pixels (area of 0.5) in an
"L" configuration.
Its perimeter is 1+1+sqrt(2).
A 2x2 pixel square blob as an area of 1 and a perimeter of 4.

> But induction apart, IJ demonstrably reports an area of 1 and a
> perimeter of 2.828.. for a feature occupying one pixel.

Yes, in IJ the default Particle Analyzer does things differently and it is
important to be aware of those, that is what I have been trying to explain.

> It also reports a circularity
> of 1, but the value calculated from the reported area and perimeter is
> 1.5713..

Have a look at the documentation in the IJ site. It says in page 137 that
"values may not be valid for very small particles". That is because for very
small particles IJ just outputs "1".  I do not know exactly the reason for
this,  I think this was set long ago. Wayne might clarify it.
In practical terms it is not a good idea to use such small regions for the
analysis of captured images, but sometimes we might want to analyse
synthetic images, where you know that detecting a pixel is relevant.

If you need to know exactly the value of circularity, you can either compute
it separately (from the area (which in IJ is same a number of pixels) and
perimeter columns) or you can try the Particles 8 and compute it from either
pixels or area , and the perimeter (the default circ. is computed form the
"polygonal area").  You will note that since a pixel has no area, it cannot
have a circularity (and hence it returns -1).

> I have thousands of imaged particles with IJ reported areas and
> perimeters giving calculated circularities >1 against the reported
> values of 1.  All I need to do is to discriminate in this area.

Can you post just one of those regions? I would be interested in seeing how
a value >1 is generated. How do you compute that value?

> I don't think we differ at all in our understanding of the issues of
> polygonization; the problem is that IJ prevents those of us who
> understand the issues from accessing and using the real values.

I am sure that you understand all this, but sometimes users are not aware of
how every detail is implemented and the logic behind the choices made in the
programs.
Anyway, I hope I helped a bit in explaining how things some things work in
IJ and why I implemented it differently in my plugins. A few people found
the alternative implementation useful too.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

AH-095 T - 30 secs oxalic 1 8-bit.tif (1M) Download Attachment
AH - circularity cf.png (33K) Download Attachment
AH - circularity table.png (277K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

Dimiter Prodanov (imec)
In reply to this post by John Brear
Dear John,

A pixel is an integral measurement. You can think of them as space-time convolutions with a linear response transfer function.
The remark of Gabriel points out the crucial impact of the discrete metric in the low-resolution cut-off.  
Such measurements are severely biased so it is not possible to interpret them as continuous shapes.

Best regards,

Dimiter Prodanov

-----Original Message-----

Date:    Mon, 12 Dec 2016 14:37:32 -0000
From:    John M Brear <[hidden email]>
Subject: Re: Ever decreasing circles

Thanks, Gabriel,  for the reference - very worthwhile reading, but it needs a bit more explicit maths to convince me fully!

Happy to accept pixels as points mathematically - ie a number-value encoding all information of interest at a location in 2(or more)-space (and time).
But what does such a 'point sample' sample and encode?
In my optical microscopes the detector is an array of sensor elements, regular as in a CCD or CMOS, or quasi-regular as the crystals in a photographic emulsion or the rods and cones in my retinas.  Whatever type, each sensor element has a finite area which can be mapped via the laws of classical optics to a finite area on the object being viewed.  So the mathematical-point pixel is a sample over (not from) a real-world area - albeit encoded as a 'point' value.

We must not let our concepts of the real world constrain our mathematical representations.
Nor must we let our mathematical representations constrain our understanding of how the world actually works.

I hadn't intended to open a can of philosophical worms, but I suspect most IJ users (myself included) need to be more aware of these concepts and their implications.

Attached is a typical image - converted to 8-bit.  You can see that several types, sizes and spatial distributions of particles are present.
Thresholding at the default level of 109 and analyzing particles with appropriate parameters set yields a table with area, perimeter and
circularity data for 2101 particles.    The list won't accept it as an excel
or pdf file, I'm afraid, so I attach an image of the first 40 results.
I added a column which calculates circularity from the reported area and perimeter values, using the conventional formula, then sorted these into ascending order and plotted against cumulative fraction, yielding the attached graph.  1061 particles have calculated  circularities greater than 1.
To be explicit, particle 37 has an area of 1 and a perimeter of 2.828, giving a calculated circularity of 1.5713 - whereas a value of 1 is reported.
My interest in exploring the high circularity region becomes clear.  What is going on at 1.08?

The calculated circularities have distinct values, which naturally arise from integer areas and perimeters of the form a + b x sqrt(2).
Whatever pixels might be, IJ is measuring my particles as if they were continuous assemblages of little squares...
...or maybe I'm readily confused.

Whether or not these calculated circularities are strongly meaningful is beside the point.  Practically they are calculable and show a trend with interesting features that may betoken something of real interest, or serve to highlight a processing artifact.
All I wish to do is select my set for analysis in a manner that allows choice of circularity values >1.

Again, I appreciate your time and responses Best wishes John

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel Landini
Sent: 11 December 2016 18:13
To: [hidden email]
Subject: Re: Ever decreasing circles

On Sunday, 11 December 2016 16:41:45 GMT John M Brear wrote:
> A pixel has an area and a perimeter.

Some would disagree, see for example:
http://www.cs.princeton.edu/courses/archive/spr05/cos426/papers/smith95b.pdf

> If it did not, then two pixels would have neither area nor perimeter,
> and three pixels would have neither area nor perimeter...

Well that is exactly how Particles8 and 4 work when considering "area" and the values they return. That being said, they also compute "pixels" but I think that circularity and other morphometrical parameter are better constructed using the concept of area as the space inside the polygon defined by the perimeter. If the polygon defines no area, then some morphometrical descriptors cannot not exist (you get division by 0 and so on). That is useful too, e.g.
in mereotopology there are operators for detecting regions with an without 'interior', so no, not everybody believes a single pixel has an area.

Of course one can count the number of pixels a region is made of,  and assume that 2 pixels side by side have an area of 2, but this then has other consequences that need to be considered later (such as that no points or lines exist in digital images).
According to Freeman's papers, two pixels side by side define a line of length 1, while two pixels joined by their corners define a line of length sqrt(2).

> ...and 122,880 pixels would have neither area nor perimeter.

Not necessarily. It depends on the connectivity considered between samples and how we define a "region". If they are all disconnected pixels, that is also correct, you got 122,880 point samples. If they are somehow connected forming regions (defining "connected" as the property of being able to travel between any two pixels in that region through a path that is all contained in that region), then you can have a perimeter and area associated to that region.

The smallest "area" you can detect with Particles8 (which uses 8-connectivity, hence its name) is defined by 3 pixels (area of 0.5) in an "L" configuration.
Its perimeter is 1+1+sqrt(2).
A 2x2 pixel square blob as an area of 1 and a perimeter of 4.

> But induction apart, IJ demonstrably reports an area of 1 and a
> perimeter of 2.828.. for a feature occupying one pixel.

Yes, in IJ the default Particle Analyzer does things differently and it is important to be aware of those, that is what I have been trying to explain.

> It also reports a circularity
> of 1, but the value calculated from the reported area and perimeter is
> 1.5713..

Have a look at the documentation in the IJ site. It says in page 137 that "values may not be valid for very small particles". That is because for very small particles IJ just outputs "1".  I do not know exactly the reason for this,  I think this was set long ago. Wayne might clarify it.
In practical terms it is not a good idea to use such small regions for the analysis of captured images, but sometimes we might want to analyse synthetic images, where you know that detecting a pixel is relevant.

If you need to know exactly the value of circularity, you can either compute it separately (from the area (which in IJ is same a number of pixels) and perimeter columns) or you can try the Particles 8 and compute it from either pixels or area , and the perimeter (the default circ. is computed form the "polygonal area").  You will note that since a pixel has no area, it cannot have a circularity (and hence it returns -1).

> I have thousands of imaged particles with IJ reported areas and
> perimeters giving calculated circularities >1 against the reported
> values of 1.  All I need to do is to discriminate in this area.

Can you post just one of those regions? I would be interested in seeing how a value >1 is generated. How do you compute that value?

> I don't think we differ at all in our understanding of the issues of
> polygonization; the problem is that IJ prevents those of us who
> understand the issues from accessing and using the real values.

I am sure that you understand all this, but sometimes users are not aware of how every detail is implemented and the logic behind the choices made in the programs.
Anyway, I hope I helped a bit in explaining how things some things work in IJ and why I implemented it differently in my plugins. A few people found the alternative implementation useful too.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

------------------------------

End of IMAGEJ Digest - 11 Dec 2016 to 12 Dec 2016 - Special issue (#2016-321)
*****************************************************************************

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

Gabriel Landini
In reply to this post by John Brear
On Monday, 12 December 2016 14:37:32 GMT John M Brear wrote:
> Attached is a typical image - converted to 8-bit.  You can see that several
> types, sizes and spatial distributions of particles are present.
[...]
> To be explicit, particle 37 has an area of 1 and a perimeter of 2.828,
> giving a calculated circularity of 1.5713 - whereas a value of 1 is
> reported.

I had a look at your image. You get that result  because particle 37 is just 1
pixel. The error for perimeter estimation is the largest for that case.
That is why the Documentation warns that for small regions the values are not
reliable and outputs 1 instead.

> Whether or not these calculated circularities are strongly meaningful is
> beside the point.  Practically they are calculable and show a trend with
> interesting features that may betoken something of real interest, or serve
> to highlight a processing artifact.
> All I wish to do is select my set for analysis in a manner that allows
> choice of circularity values >1.

I do not think this is robust or a good idea, but... the way  to do what you
are after is to read all the areas and perimeters from the table, then
generate a new column in the Results table then do with that value the
analysis you are after.
The following code will generate a new circularity column with the values you
want if you run it just after Analyze Particles:

for (i=0; i<nResults; i++) {    
    setResult('MyCirc', i, (4.0* PI * getResult("Area", i)) /
(getResult("Perim.", i) * getResult("Perim.", i)));
}

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

John Brear
In reply to this post by Dimiter Prodanov (imec)
Dear Dimeter,

My original question, in my first email, was:
"Calculating the circularities of our observed precipitates shows that we would obtain much better discrimination by selecting on circularity values greater than 1.  At present ImageJ does not allow this.  Is there a simple way of overriding this limit?"
I essentially reiterated it in my last email:
"All I wish to do is select my set for analysis in a manner that allows choice of circularity values >1."

I provided some background into what I was doing and why, as my field of application is very different from that of most IJ users.  This was a mistake as it has distracted everyone into metaphysics.

Happy to be metaphysical, but more happy to find a practical solution to my issue.

Best wishes

John

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Dimiter Prodanov (imec)
Sent: 12 December 2016 16:19
To: [hidden email]
Subject: Re: Ever decreasing circles

Dear John,

A pixel is an integral measurement. You can think of them as space-time convolutions with a linear response transfer function.
The remark of Gabriel points out the crucial impact of the discrete metric in the low-resolution cut-off.  
Such measurements are severely biased so it is not possible to interpret them as continuous shapes.

Best regards,

Dimiter Prodanov

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by John Brear
On Dec 11, 2016, at 8:38 AM, John M Brear <[hidden email]> wrote:
>
> Calculating the circularities of our observed precipitates shows that we
> would obtain much better discrimination by selecting on circularity values
> greater than 1.  At present ImageJ does not allow this.

The particle analyzer in the latest ImageJ daily build (1.51i15) allows you to select on circularity values greater than 1. As an example, this macro

  run("Particles (75K)");
  run("Set Measurements...", "area shape");
  run("Analyze Particles...", "  circularity=1.0-1.9 display clear include”);

selects the 2412 (!!) objects in the Particles sample image that have circularity values greater than 1.

-wayne





--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Ever decreasing circles

John Brear
Thanks Wayne, I shall try this and let you know the results.
Best wishes
John

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Rasband, Wayne (NIH/NIMH) [E]
Sent: 12 December 2016 20:57
To: [hidden email]
Subject: Re: Ever decreasing circles

On Dec 11, 2016, at 8:38 AM, John M Brear <[hidden email]> wrote:
>
> Calculating the circularities of our observed precipitates shows that
> we would obtain much better discrimination by selecting on circularity
> values greater than 1.  At present ImageJ does not allow this.

The particle analyzer in the latest ImageJ daily build (1.51i15) allows you to select on circularity values greater than 1. As an example, this macro

  run("Particles (75K)");
  run("Set Measurements...", "area shape");
  run("Analyze Particles...", "  circularity=1.0-1.9 display clear include”);

selects the 2412 (!!) objects in the Particles sample image that have circularity values greater than 1.

-wayne





--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html