linear features?

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

linear features?

Kenneth Sloan-2
I'm looking for way to way to identify thin, elongated, more-or-less linear features.
Before I roll my own, I thought I'd check to see if there is something "off-the-shelf"
in ImageJ/FIJI.

Assume reasonable contrast (I'll be doing CLAHE first).

Features of interest are black on a light background.

Features are between 2 and 10 pixels wide, and can be oriented at any angle.  Lengths are between
20 to 50 pixels (before curving enough to no longer be "linear").  (all those numbers are WAGs at the moment)

I have had reasonable success simply doing:

  a) CLAHE
  b) thresholding
  c) erode/dilate to remove small features

In the past, I've used Phansalkar adaptive local thresholding to replace a) and b) - and I may
return to that.

My current results are acceptable for my current project, but I'd like to improve them by creating a "linear feature mask" that I can combine with the mask created above (call it "large dark mask").

The application is identifying vasculature in qAF retina images.  I do NOT need the tree as a branching data structure.  I do NOT even need the vasculature to be connected, although it is, and this precludes some kinds of "particle analysis".

Most previous work on this has been done with slightly different imaging (mostly color fundus photography - CFP).  I have read those papers, and chosen this level of ambition for the current project.  The difference in imaging means that full-fledged solutions aimed at CFP would have to be modified.

What I'm trying to do is to allow the thresholding to create a "large dark mask" that errs on the side of identifying too many pixels as vasculature, and then filter these by adding the requirement of being part of a linear feature.

Left to my own devices, I will probably construct a collection of "dark bar on light background" kernels (at perhaps 8 orientations) and combine their results.  I'm hoping someone has already done this, and I simply haven't found it in ImageJ, yet.

The mixture of sizes might require a multi-scale approach.  That's OK.

I *may* want to apply this to the original image (after CLAHE), or I may want to apply it to the mask generated by a)+b) above - and probably before c).

Given a choice - I am primarily interested in REJECTING regions that are too "blob-like".  Note that "particle analysis" may not help, because the right answer is a fully connected region that extends to all 4 borders of the image.  I need to look at local properties of the mask.  Something as simple as identifying a small image patch (say, 50x50) as "directional" rather than "blobby" might work.

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.

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

Re: linear features?

Robert Smith
Hello Kenneth Sloan,

 This seems as though it may be easy enough. But could you send an example image (either png or tiff)  so we may better understand what you are looking for, please.

 Maybe someone on the forum is already doing this sort of analysis.


Thanks, and Good Luck


Bob



________________________________
From: Kenneth Sloan <[hidden email]>
Sent: Thursday, March 8, 2018 10:05 AM
To: [hidden email]
Subject: linear features?

I'm looking for way to way to identify thin, elongated, more-or-less linear features.
Before I roll my own, I thought I'd check to see if there is something "off-the-shelf"
in ImageJ/FIJI.

Assume reasonable contrast (I'll be doing CLAHE first).

Features of interest are black on a light background.

Features are between 2 and 10 pixels wide, and can be oriented at any angle.  Lengths are between
20 to 50 pixels (before curving enough to no longer be "linear").  (all those numbers are WAGs at the moment)

I have had reasonable success simply doing:

  a) CLAHE
  b) thresholding
  c) erode/dilate to remove small features

In the past, I've used Phansalkar adaptive local thresholding to replace a) and b) - and I may
return to that.

My current results are acceptable for my current project, but I'd like to improve them by creating a "linear feature mask" that I can combine with the mask created above (call it "large dark mask").

The application is identifying vasculature in qAF retina images.  I do NOT need the tree as a branching data structure.  I do NOT even need the vasculature to be connected, although it is, and this precludes some kinds of "particle analysis".

Most previous work on this has been done with slightly different imaging (mostly color fundus photography - CFP).  I have read those papers, and chosen this level of ambition for the current project.  The difference in imaging means that full-fledged solutions aimed at CFP would have to be modified.

What I'm trying to do is to allow the thresholding to create a "large dark mask" that errs on the side of identifying too many pixels as vasculature, and then filter these by adding the requirement of being part of a linear feature.

Left to my own devices, I will probably construct a collection of "dark bar on light background" kernels (at perhaps 8 orientations) and combine their results.  I'm hoping someone has already done this, and I simply haven't found it in ImageJ, yet.

The mixture of sizes might require a multi-scale approach.  That's OK.

I *may* want to apply this to the original image (after CLAHE), or I may want to apply it to the mask generated by a)+b) above - and probably before c).

Given a choice - I am primarily interested in REJECTING regions that are too "blob-like".  Note that "particle analysis" may not help, because the right answer is a fully connected region that extends to all 4 borders of the image.  I need to look at local properties of the mask.  Something as simple as identifying a small image patch (say, 50x50) as "directional" rather than "blobby" might work.

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.

--
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: linear features?

Kenneth Sloan-2

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 8 Mar 2018, at 13:25 , Robert Smith <[hidden email]> wrote:
>
> Hello Kenneth Sloan,
>
> This seems as though it may be easy enough. But could you send an example image (either png or tiff)  so we may better understand what you are looking for, please.
>
> Maybe someone on the forum is already doing this sort of analysis.
>
>
> Thanks, and Good Luck
>
>
> Bob
>
>
>
> ________________________________
> From: Kenneth Sloan <[hidden email]>
> Sent: Thursday, March 8, 2018 10:05 AM
> To: [hidden email]
> Subject: linear features?
>
> I'm looking for way to way to identify thin, elongated, more-or-less linear features.
> Before I roll my own, I thought I'd check to see if there is something "off-the-shelf"
> in ImageJ/FIJI.
>
> Assume reasonable contrast (I'll be doing CLAHE first).
>
> Features of interest are black on a light background.
>
> Features are between 2 and 10 pixels wide, and can be oriented at any angle.  Lengths are between
> 20 to 50 pixels (before curving enough to no longer be "linear").  (all those numbers are WAGs at the moment)
>
> I have had reasonable success simply doing:
>
>  a) CLAHE
>  b) thresholding
>  c) erode/dilate to remove small features
>
> In the past, I've used Phansalkar adaptive local thresholding to replace a) and b) - and I may
> return to that.
>
> My current results are acceptable for my current project, but I'd like to improve them by creating a "linear feature mask" that I can combine with the mask created above (call it "large dark mask").
>
> The application is identifying vasculature in qAF retina images.  I do NOT need the tree as a branching data structure.  I do NOT even need the vasculature to be connected, although it is, and this precludes some kinds of "particle analysis".
>
> Most previous work on this has been done with slightly different imaging (mostly color fundus photography - CFP).  I have read those papers, and chosen this level of ambition for the current project.  The difference in imaging means that full-fledged solutions aimed at CFP would have to be modified.
>
> What I'm trying to do is to allow the thresholding to create a "large dark mask" that errs on the side of identifying too many pixels as vasculature, and then filter these by adding the requirement of being part of a linear feature.
>
> Left to my own devices, I will probably construct a collection of "dark bar on light background" kernels (at perhaps 8 orientations) and combine their results.  I'm hoping someone has already done this, and I simply haven't found it in ImageJ, yet.
>
> The mixture of sizes might require a multi-scale approach.  That's OK.
>
> I *may* want to apply this to the original image (after CLAHE), or I may want to apply it to the mask generated by a)+b) above - and probably before c).
>
> Given a choice - I am primarily interested in REJECTING regions that are too "blob-like".  Note that "particle analysis" may not help, because the right answer is a fully connected region that extends to all 4 borders of the image.  I need to look at local properties of the mask.  Something as simple as identifying a small image patch (say, 50x50) as "directional" rather than "blobby" might work.
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html


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

sample.tif (2M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: linear features?

Kenneth Sloan-2
In reply to this post by Robert Smith
Image posted.

I agree that it's fairly easy - I'm just trying to avoid my usual tendency to implement *everything* from
the ground up.

As reported, CLAHE + threshold + erode/dilate gets "acceptable" results (for my purposes).  What I'm looking for is a binary mask saying "this pixel is likely to belong to an elongated (dark) feature".

Second derivative probably works (given a direction).  Do it n times (for n directions) and OR them.

The next complication is the thickness - which might require doing all of the above at different scales.

I know I can write all that (again...), so what I'm looking for are appropriate existing implementations.

Of course, if someone has a full "vasculature mask" plugin that I can use - so much the better.

I'd like to avoid higher-level processing (for example, finding ridges and linking them in a branching structure, etc.)  That's very interesting - but beyond the scope of the current project.

Note that the BRIGHT pixels on either side of a vessel are just as important for classification as a long
line of DARK pixels, all in a line.

I guess I'm looking for a "bar" filter (light-dark-light), with parameters:

   *orientation
   *thickness of dark band
   *length of neighborhood (aligned with the selected direction)
   *width of the neighborhood (perpendicular to the selected direction)

A workable alternative might be:
   *estimate of 2nd derivative
   *at a given direction
   

Good "vessel" point is dark, and near a point with a high 2nd derivative in one direction and a low 2nd derivative in the perpendicular direction.  I think...

The above are my leading candidates for what I'll implement this weekend - unless I can find that someone has already done it, and packaged it up for ImageJ.

All help gratefully accepted!

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 8 Mar 2018, at 13:25 , Robert Smith <[hidden email]> wrote:
>
> Hello Kenneth Sloan,
>
> This seems as though it may be easy enough. But could you send an example image (either png or tiff)  so we may better understand what you are looking for, please.
>
> Maybe someone on the forum is already doing this sort of analysis.
>
>
> Thanks, and Good Luck
>
>
> Bob
>
>
>
> ________________________________
> From: Kenneth Sloan <[hidden email]>
> Sent: Thursday, March 8, 2018 10:05 AM
> To: [hidden email]
> Subject: linear features?
>
> I'm looking for way to way to identify thin, elongated, more-or-less linear features.
> Before I roll my own, I thought I'd check to see if there is something "off-the-shelf"
> in ImageJ/FIJI.
>
> Assume reasonable contrast (I'll be doing CLAHE first).
>
> Features of interest are black on a light background.
>
> Features are between 2 and 10 pixels wide, and can be oriented at any angle.  Lengths are between
> 20 to 50 pixels (before curving enough to no longer be "linear").  (all those numbers are WAGs at the moment)
>
> I have had reasonable success simply doing:
>
>  a) CLAHE
>  b) thresholding
>  c) erode/dilate to remove small features
>
> In the past, I've used Phansalkar adaptive local thresholding to replace a) and b) - and I may
> return to that.
>
> My current results are acceptable for my current project, but I'd like to improve them by creating a "linear feature mask" that I can combine with the mask created above (call it "large dark mask").
>
> The application is identifying vasculature in qAF retina images.  I do NOT need the tree as a branching data structure.  I do NOT even need the vasculature to be connected, although it is, and this precludes some kinds of "particle analysis".
>
> Most previous work on this has been done with slightly different imaging (mostly color fundus photography - CFP).  I have read those papers, and chosen this level of ambition for the current project.  The difference in imaging means that full-fledged solutions aimed at CFP would have to be modified.
>
> What I'm trying to do is to allow the thresholding to create a "large dark mask" that errs on the side of identifying too many pixels as vasculature, and then filter these by adding the requirement of being part of a linear feature.
>
> Left to my own devices, I will probably construct a collection of "dark bar on light background" kernels (at perhaps 8 orientations) and combine their results.  I'm hoping someone has already done this, and I simply haven't found it in ImageJ, yet.
>
> The mixture of sizes might require a multi-scale approach.  That's OK.
>
> I *may* want to apply this to the original image (after CLAHE), or I may want to apply it to the mask generated by a)+b) above - and probably before c).
>
> Given a choice - I am primarily interested in REJECTING regions that are too "blob-like".  Note that "particle analysis" may not help, because the right answer is a fully connected region that extends to all 4 borders of the image.  I need to look at local properties of the mask.  Something as simple as identifying a small image patch (say, 50x50) as "directional" rather than "blobby" might work.
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> 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: linear features?

vulcano24
In reply to this post by Kenneth Sloan-2
What 4 borders my region?identification image?

чт, 8 мар. 2018 г., 16:14 Kenneth Sloan <[hidden email]>:

> I'm looking for way to way to identify thin, elongated, more-or-less
> linear features.
> Before I roll my own, I thought I'd check to see if there is something
> "off-the-shelf"
> in ImageJ/FIJI.
>
> Assume reasonable contrast (I'll be doing CLAHE first).
>
> Features of interest are black on a light background.
>
> Features are between 2 and 10 pixels wide, and can be oriented at any
> angle.  Lengths are between
> 20 to 50 pixels (before curving enough to no longer be "linear").  (all
> those numbers are WAGs at the moment)
>
> I have had reasonable success simply doing:
>
>   a) CLAHE
>   b) thresholding
>   c) erode/dilate to remove small features
>
> In the past, I've used Phansalkar adaptive local thresholding to replace
> a) and b) - and I may
> return to that.
>
> My current results are acceptable for my current project, but I'd like to
> improve them by creating a "linear feature mask" that I can combine with
> the mask created above (call it "large dark mask").
>
> The application is identifying vasculature in qAF retina images.  I do NOT
> need the tree as a branching data structure.  I do NOT even need the
> vasculature to be connected, although it is, and this precludes some kinds
> of "particle analysis".
>
> Most previous work on this has been done with slightly different imaging
> (mostly color fundus photography - CFP).  I have read those papers, and
> chosen this level of ambition for the current project.  The difference in
> imaging means that full-fledged solutions aimed at CFP would have to be
> modified.
>
> What I'm trying to do is to allow the thresholding to create a "large dark
> mask" that errs on the side of identifying too many pixels as vasculature,
> and then filter these by adding the requirement of being part of a linear
> feature.
>
> Left to my own devices, I will probably construct a collection of "dark
> bar on light background" kernels (at perhaps 8 orientations) and combine
> their results.  I'm hoping someone has already done this, and I simply
> haven't found it in ImageJ, yet.
>
> The mixture of sizes might require a multi-scale approach.  That's OK.
>
> I *may* want to apply this to the original image (after CLAHE), or I may
> want to apply it to the mask generated by a)+b) above - and probably before
> c).
>
> Given a choice - I am primarily interested in REJECTING regions that are
> too "blob-like".  Note that "particle analysis" may not help, because the
> right answer is a fully connected region that extends to all 4 borders of
> the image.  I need to look at local properties of the mask.  Something as
> simple as identifying a small image patch (say, 50x50) as "directional"
> rather than "blobby" might work.
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
> --
> 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: linear features? Liner Kuwahara Filter?

Kenneth Sloan-2
In reply to this post by Kenneth Sloan-2
I think I've found what I need.  Not *precisely* what I originally specified, but very close, and
seems to give good results.

Now, I'm looking for people with experience with it.

   Linear Kuwahara Filter

It works surprising well, even though (I think) it does not penalize solid blob-like features.  Perhaps
I should try the original Kuwahara filter, instead?

Again - anyone have any experience with these filters and have advice to offer?

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 8 Mar 2018, at 14:37 , Kenneth Sloan <[hidden email]> wrote:
>
> Image posted.
>
> I agree that it's fairly easy - I'm just trying to avoid my usual tendency to implement *everything* from
> the ground up.
>
> As reported, CLAHE + threshold + erode/dilate gets "acceptable" results (for my purposes).  What I'm looking for is a binary mask saying "this pixel is likely to belong to an elongated (dark) feature".
>
> Second derivative probably works (given a direction).  Do it n times (for n directions) and OR them.
>
> The next complication is the thickness - which might require doing all of the above at different scales.
>
> I know I can write all that (again...), so what I'm looking for are appropriate existing implementations.
>
> Of course, if someone has a full "vasculature mask" plugin that I can use - so much the better.
>
> I'd like to avoid higher-level processing (for example, finding ridges and linking them in a branching structure, etc.)  That's very interesting - but beyond the scope of the current project.
>
> Note that the BRIGHT pixels on either side of a vessel are just as important for classification as a long
> line of DARK pixels, all in a line.
>
> I guess I'm looking for a "bar" filter (light-dark-light), with parameters:
>
>   *orientation
>   *thickness of dark band
>   *length of neighborhood (aligned with the selected direction)
>   *width of the neighborhood (perpendicular to the selected direction)
>
> A workable alternative might be:
>   *estimate of 2nd derivative
>   *at a given direction
>
>
> Good "vessel" point is dark, and near a point with a high 2nd derivative in one direction and a low 2nd derivative in the perpendicular direction.  I think...
>
> The above are my leading candidates for what I'll implement this weekend - unless I can find that someone has already done it, and packaged it up for ImageJ.
>
> All help gratefully accepted!
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>
>> On 8 Mar 2018, at 13:25 , Robert Smith <[hidden email]> wrote:
>>
>> Hello Kenneth Sloan,
>>
>> This seems as though it may be easy enough. But could you send an example image (either png or tiff)  so we may better understand what you are looking for, please.
>>
>> Maybe someone on the forum is already doing this sort of analysis.
>>
>>
>> Thanks, and Good Luck
>>
>>
>> Bob
>>
>>
>>
>> ________________________________
>> From: Kenneth Sloan <[hidden email]>
>> Sent: Thursday, March 8, 2018 10:05 AM
>> To: [hidden email]
>> Subject: linear features?
>>
>> I'm looking for way to way to identify thin, elongated, more-or-less linear features.
>> Before I roll my own, I thought I'd check to see if there is something "off-the-shelf"
>> in ImageJ/FIJI.
>>
>> Assume reasonable contrast (I'll be doing CLAHE first).
>>
>> Features of interest are black on a light background.
>>
>> Features are between 2 and 10 pixels wide, and can be oriented at any angle.  Lengths are between
>> 20 to 50 pixels (before curving enough to no longer be "linear").  (all those numbers are WAGs at the moment)
>>
>> I have had reasonable success simply doing:
>>
>> a) CLAHE
>> b) thresholding
>> c) erode/dilate to remove small features
>>
>> In the past, I've used Phansalkar adaptive local thresholding to replace a) and b) - and I may
>> return to that.
>>
>> My current results are acceptable for my current project, but I'd like to improve them by creating a "linear feature mask" that I can combine with the mask created above (call it "large dark mask").
>>
>> The application is identifying vasculature in qAF retina images.  I do NOT need the tree as a branching data structure.  I do NOT even need the vasculature to be connected, although it is, and this precludes some kinds of "particle analysis".
>>
>> Most previous work on this has been done with slightly different imaging (mostly color fundus photography - CFP).  I have read those papers, and chosen this level of ambition for the current project.  The difference in imaging means that full-fledged solutions aimed at CFP would have to be modified.
>>
>> What I'm trying to do is to allow the thresholding to create a "large dark mask" that errs on the side of identifying too many pixels as vasculature, and then filter these by adding the requirement of being part of a linear feature.
>>
>> Left to my own devices, I will probably construct a collection of "dark bar on light background" kernels (at perhaps 8 orientations) and combine their results.  I'm hoping someone has already done this, and I simply haven't found it in ImageJ, yet.
>>
>> The mixture of sizes might require a multi-scale approach.  That's OK.
>>
>> I *may* want to apply this to the original image (after CLAHE), or I may want to apply it to the mask generated by a)+b) above - and probably before c).
>>
>> Given a choice - I am primarily interested in REJECTING regions that are too "blob-like".  Note that "particle analysis" may not help, because the right answer is a fully connected region that extends to all 4 borders of the image.  I need to look at local properties of the mask.  Something as simple as identifying a small image patch (say, 50x50) as "directional" rather than "blobby" might work.
>>
>> --
>> Kenneth Sloan
>> [hidden email]
>> Vision is the art of seeing what is invisible to others.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> --
>> 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: linear features? Liner Kuwahara Filter?

ctrueden
In reply to this post by Kenneth Sloan-2
Hi Kenneth,

If Kuwahara is working for you, great. Or if not, there are other tools you
could consider looking at:

- Ridge Detection -- https://imagej.net/Ridge_Detection
- Tubeness -- http://imagej.net/Tubeness
- Frangi Vesselness -- http://forum.imagej.net/t/frangi-vesselness-filter-
feedback/6747
- Directionality -- https://imagej.net/Directionality

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Fri, Mar 9, 2018 at 10:52 AM, Kenneth Sloan <[hidden email]>
wrote:

> I think I've found what I need.  Not *precisely* what I originally
> specified, but very close, and
> seems to give good results.
>
> Now, I'm looking for people with experience with it.
>
>    Linear Kuwahara Filter
>
> It works surprising well, even though (I think) it does not penalize solid
> blob-like features.  Perhaps
> I should try the original Kuwahara filter, instead?
>
> Again - anyone have any experience with these filters and have advice to
> offer?
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>
> > On 8 Mar 2018, at 14:37 , Kenneth Sloan <[hidden email]> wrote:
> >
> > Image posted.
> >
> > I agree that it's fairly easy - I'm just trying to avoid my usual
> tendency to implement *everything* from
> > the ground up.
> >
> > As reported, CLAHE + threshold + erode/dilate gets "acceptable" results
> (for my purposes).  What I'm looking for is a binary mask saying "this
> pixel is likely to belong to an elongated (dark) feature".
> >
> > Second derivative probably works (given a direction).  Do it n times
> (for n directions) and OR them.
> >
> > The next complication is the thickness - which might require doing all
> of the above at different scales.
> >
> > I know I can write all that (again...), so what I'm looking for are
> appropriate existing implementations.
> >
> > Of course, if someone has a full "vasculature mask" plugin that I can
> use - so much the better.
> >
> > I'd like to avoid higher-level processing (for example, finding ridges
> and linking them in a branching structure, etc.)  That's very interesting -
> but beyond the scope of the current project.
> >
> > Note that the BRIGHT pixels on either side of a vessel are just as
> important for classification as a long
> > line of DARK pixels, all in a line.
> >
> > I guess I'm looking for a "bar" filter (light-dark-light), with
> parameters:
> >
> >   *orientation
> >   *thickness of dark band
> >   *length of neighborhood (aligned with the selected direction)
> >   *width of the neighborhood (perpendicular to the selected direction)
> >
> > A workable alternative might be:
> >   *estimate of 2nd derivative
> >   *at a given direction
> >
> >
> > Good "vessel" point is dark, and near a point with a high 2nd derivative
> in one direction and a low 2nd derivative in the perpendicular direction.
> I think...
> >
> > The above are my leading candidates for what I'll implement this weekend
> - unless I can find that someone has already done it, and packaged it up
> for ImageJ.
> >
> > All help gratefully accepted!
> >
> > --
> > Kenneth Sloan
> > [hidden email]
> > Vision is the art of seeing what is invisible to others.
> >
> >
> >
> >
> >
> >> On 8 Mar 2018, at 13:25 , Robert Smith <[hidden email]> wrote:
> >>
> >> Hello Kenneth Sloan,
> >>
> >> This seems as though it may be easy enough. But could you send an
> example image (either png or tiff)  so we may better understand what you
> are looking for, please.
> >>
> >> Maybe someone on the forum is already doing this sort of analysis.
> >>
> >>
> >> Thanks, and Good Luck
> >>
> >>
> >> Bob
> >>
> >>
> >>
> >> ________________________________
> >> From: Kenneth Sloan <[hidden email]>
> >> Sent: Thursday, March 8, 2018 10:05 AM
> >> To: [hidden email]
> >> Subject: linear features?
> >>
> >> I'm looking for way to way to identify thin, elongated, more-or-less
> linear features.
> >> Before I roll my own, I thought I'd check to see if there is something
> "off-the-shelf"
> >> in ImageJ/FIJI.
> >>
> >> Assume reasonable contrast (I'll be doing CLAHE first).
> >>
> >> Features of interest are black on a light background.
> >>
> >> Features are between 2 and 10 pixels wide, and can be oriented at any
> angle.  Lengths are between
> >> 20 to 50 pixels (before curving enough to no longer be "linear").  (all
> those numbers are WAGs at the moment)
> >>
> >> I have had reasonable success simply doing:
> >>
> >> a) CLAHE
> >> b) thresholding
> >> c) erode/dilate to remove small features
> >>
> >> In the past, I've used Phansalkar adaptive local thresholding to
> replace a) and b) - and I may
> >> return to that.
> >>
> >> My current results are acceptable for my current project, but I'd like
> to improve them by creating a "linear feature mask" that I can combine with
> the mask created above (call it "large dark mask").
> >>
> >> The application is identifying vasculature in qAF retina images.  I do
> NOT need the tree as a branching data structure.  I do NOT even need the
> vasculature to be connected, although it is, and this precludes some kinds
> of "particle analysis".
> >>
> >> Most previous work on this has been done with slightly different
> imaging (mostly color fundus photography - CFP).  I have read those papers,
> and chosen this level of ambition for the current project.  The difference
> in imaging means that full-fledged solutions aimed at CFP would have to be
> modified.
> >>
> >> What I'm trying to do is to allow the thresholding to create a "large
> dark mask" that errs on the side of identifying too many pixels as
> vasculature, and then filter these by adding the requirement of being part
> of a linear feature.
> >>
> >> Left to my own devices, I will probably construct a collection of "dark
> bar on light background" kernels (at perhaps 8 orientations) and combine
> their results.  I'm hoping someone has already done this, and I simply
> haven't found it in ImageJ, yet.
> >>
> >> The mixture of sizes might require a multi-scale approach.  That's OK.
> >>
> >> I *may* want to apply this to the original image (after CLAHE), or I
> may want to apply it to the mask generated by a)+b) above - and probably
> before c).
> >>
> >> Given a choice - I am primarily interested in REJECTING regions that
> are too "blob-like".  Note that "particle analysis" may not help, because
> the right answer is a fully connected region that extends to all 4 borders
> of the image.  I need to look at local properties of the mask.  Something
> as simple as identifying a small image patch (say, 50x50) as "directional"
> rather than "blobby" might work.
> >>
> >> --
> >> Kenneth Sloan
> >> [hidden email]
> >> Vision is the art of seeing what is invisible to others.
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> 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: Request for feedback of a new plugin for image synthesis

Herbie
In reply to this post by Kenneth Sloan-2
How comes he posted his message before and I've replied already?

Clueless

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 09.03.18 um 18:44 schrieb Kai Barthel:

> I am reposting this contribution from my student Maximilian as he is not a member of the ImageJ mailing list.
>
> Please have a look at his plugin.
>
> Kai
>
>
> Dear Everyone,
>
> I am developing an ImageJ plugin as part of my thesis and it would be
> awesome to get some feedback from the ImageJ community.
>
> The “Image Synthesizer” offers the possibility to generate images from
> mathematical functions and primitive patterns in a predefined coordinate
> system.
>
> More infos at the bottom of this page:
> https://visual-computing.com/imagej/
>
> Feel free to download the plugin and drop it into your plugin folder:
> https://visual-computing.com/files/imagej/Image_Synthesizer.jar <https://visual-computing.com/files/imagej/Image_Synthesizer.jar>
> Do you have any good ideas:
> - for a better name for the plugin?
> - for more functionality?
> - for a better UI?
>
> Please let me know via the list or directly via
> [hidden email] <mailto:[hidden email]>.
>
> Thank you very much,
> Maximilian
>
> –
> Maximilian Maske
> [hidden email] <mailto:[hidden email]>
> University of Applied Sciences Berlin
> --
> 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: Request for feedback of a new plugin for image synthesis

ctrueden
Hi Maximilian,

I would encourage you to adopt some best practices.

On the source code side, use GitHub. Share the source. Use an open source
license, and be clear about what it is.
On the distribution side, use an ImageJ update site.

https://imagej.net/Distribution

On the code side, consider using ImgLib2 instead of plain ImageJ 1.x.
ImgLib2 would be perfect for your use case, because it is interface-driven
and you can create functionally-generated real-space images easily without
needing to bake in the samples at a particular discretization.

https://imagej.net/ImgLib2

Regards,
Curtis


--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Fri, Mar 9, 2018 at 11:00 AM, Maximilian Maske <
[hidden email]> wrote:

> Dear Everyone,
>
> I am developing an ImageJ plugin as part of my thesis and it would be
> awesome to get some feedback from the ImageJ community.
>
> The "Image Synthesizer" offers the possibility to generate images from
> mathematical functions and primitive patterns in a predefined coordinate
> system.
>
> More infos at the bottom of this page:
> https://visual-computing.com/imagej/
>
> Feel free to download the plugin and drop it into your plugin folder:
> https://visual-computing.com/files/imagej/Image_Synthesizer.jar
>
> Do you have any good ideas:
>         - for a better name for the plugin?
>         - for more functionality?
>         - for a better UI?
>
> Please let me know via the list or directly via
> [hidden email].
>
> Thank you very much,
> Maximilian
>
> --
> Maximilian Maske
> [hidden email]
> University of Applied Sciences Berlin
>
> --
> 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: linear features? Liner Kuwahara Filter?

Kenneth Sloan-2
In reply to this post by ctrueden
Thanks.  Earlier today, my first attempts to use Tubeness and Frangi both had problems.  But - I will try them all again.   [I think one failed with an error message I did not understand, and the other produced good images of the BORDERS of the vessels, when I really need a pixel-by-pixel mask - the problem is that almost anything easy that fills in the interiors of the wider vessels will also make the "speckle" worse].

Linear Kuwahara seems to do the trick though.

My current pipeline (starting from the image I posted) is:

CLAHE
Phansalkar
Linear Kuwahara
Erode/Dilate

all with default parameters (for now).  

Several years ago, I was using just Phansalkar with very large radius (200), which was then followed by manual editing.  But, the current requirements are not as strict (and we can't afford the labor of manual editing!)  And, looking at the results, simply Phansalkar would now be acceptable - but the other steps provide a slight improvement.  If you "try them all" in the Auto Local Threshold dialog, it's simply amazing how good a match Phansalkar is for this problem - all by itself!

I'm going to simply tune the (many!) parameters in the above pipeline and call it a day, for now.area

The one remaining problem area is the very center of the image I posted.  It's arguable what should be done there, but I suspect I will settle on simply stamping out all the mask pixels within a fixed distance from the center.

Longer term, I may take a shot at hacking the source for Linear Kuwahara to penalize large blobs that are not really "linear".  This might be as simple as looking more carefully at the intermediate results (at the various angles).

Thanks for the reply...On to the next speedbump!

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 9 Mar 2018, at 11:45 , Curtis Rueden <[hidden email]> wrote:
>
> Hi Kenneth,
>
> If Kuwahara is working for you, great. Or if not, there are other tools you
> could consider looking at:
>
> - Ridge Detection -- https://imagej.net/Ridge_Detection
> - Tubeness -- http://imagej.net/Tubeness
> - Frangi Vesselness -- http://forum.imagej.net/t/frangi-vesselness-filter-
> feedback/6747
> - Directionality -- https://imagej.net/Directionality
>
> Regards,
> Curtis
>
> --
> Curtis Rueden
> LOCI software architect - https://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Fri, Mar 9, 2018 at 10:52 AM, Kenneth Sloan <[hidden email]>
> wrote:
>
>> I think I've found what I need.  Not *precisely* what I originally
>> specified, but very close, and
>> seems to give good results.
>>
>> Now, I'm looking for people with experience with it.
>>
>>   Linear Kuwahara Filter
>>
>> It works surprising well, even though (I think) it does not penalize solid
>> blob-like features.  Perhaps
>> I should try the original Kuwahara filter, instead?
>>
>> Again - anyone have any experience with these filters and have advice to
>> offer?
>>
>> --
>> Kenneth Sloan
>> [hidden email]
>> Vision is the art of seeing what is invisible to others.
>>
>>
>>
>>
>>
>>> On 8 Mar 2018, at 14:37 , Kenneth Sloan <[hidden email]> wrote:
>>>
>>> Image posted.
>>>
>>> I agree that it's fairly easy - I'm just trying to avoid my usual
>> tendency to implement *everything* from
>>> the ground up.
>>>
>>> As reported, CLAHE + threshold + erode/dilate gets "acceptable" results
>> (for my purposes).  What I'm looking for is a binary mask saying "this
>> pixel is likely to belong to an elongated (dark) feature".
>>>
>>> Second derivative probably works (given a direction).  Do it n times
>> (for n directions) and OR them.
>>>
>>> The next complication is the thickness - which might require doing all
>> of the above at different scales.
>>>
>>> I know I can write all that (again...), so what I'm looking for are
>> appropriate existing implementations.
>>>
>>> Of course, if someone has a full "vasculature mask" plugin that I can
>> use - so much the better.
>>>
>>> I'd like to avoid higher-level processing (for example, finding ridges
>> and linking them in a branching structure, etc.)  That's very interesting -
>> but beyond the scope of the current project.
>>>
>>> Note that the BRIGHT pixels on either side of a vessel are just as
>> important for classification as a long
>>> line of DARK pixels, all in a line.
>>>
>>> I guess I'm looking for a "bar" filter (light-dark-light), with
>> parameters:
>>>
>>>  *orientation
>>>  *thickness of dark band
>>>  *length of neighborhood (aligned with the selected direction)
>>>  *width of the neighborhood (perpendicular to the selected direction)
>>>
>>> A workable alternative might be:
>>>  *estimate of 2nd derivative
>>>  *at a given direction
>>>
>>>
>>> Good "vessel" point is dark, and near a point with a high 2nd derivative
>> in one direction and a low 2nd derivative in the perpendicular direction.
>> I think...
>>>
>>> The above are my leading candidates for what I'll implement this weekend
>> - unless I can find that someone has already done it, and packaged it up
>> for ImageJ.
>>>
>>> All help gratefully accepted!
>>>
>>> --
>>> Kenneth Sloan
>>> [hidden email]
>>> Vision is the art of seeing what is invisible to others.
>>>
>>>
>>>
>>>
>>>
>>>> On 8 Mar 2018, at 13:25 , Robert Smith <[hidden email]> wrote:
>>>>
>>>> Hello Kenneth Sloan,
>>>>
>>>> This seems as though it may be easy enough. But could you send an
>> example image (either png or tiff)  so we may better understand what you
>> are looking for, please.
>>>>
>>>> Maybe someone on the forum is already doing this sort of analysis.
>>>>
>>>>
>>>> Thanks, and Good Luck
>>>>
>>>>
>>>> Bob
>>>>
>>>>
>>>>
>>>> ________________________________
>>>> From: Kenneth Sloan <[hidden email]>
>>>> Sent: Thursday, March 8, 2018 10:05 AM
>>>> To: [hidden email]
>>>> Subject: linear features?
>>>>
>>>> I'm looking for way to way to identify thin, elongated, more-or-less
>> linear features.
>>>> Before I roll my own, I thought I'd check to see if there is something
>> "off-the-shelf"
>>>> in ImageJ/FIJI.
>>>>
>>>> Assume reasonable contrast (I'll be doing CLAHE first).
>>>>
>>>> Features of interest are black on a light background.
>>>>
>>>> Features are between 2 and 10 pixels wide, and can be oriented at any
>> angle.  Lengths are between
>>>> 20 to 50 pixels (before curving enough to no longer be "linear").  (all
>> those numbers are WAGs at the moment)
>>>>
>>>> I have had reasonable success simply doing:
>>>>
>>>> a) CLAHE
>>>> b) thresholding
>>>> c) erode/dilate to remove small features
>>>>
>>>> In the past, I've used Phansalkar adaptive local thresholding to
>> replace a) and b) - and I may
>>>> return to that.
>>>>
>>>> My current results are acceptable for my current project, but I'd like
>> to improve them by creating a "linear feature mask" that I can combine with
>> the mask created above (call it "large dark mask").
>>>>
>>>> The application is identifying vasculature in qAF retina images.  I do
>> NOT need the tree as a branching data structure.  I do NOT even need the
>> vasculature to be connected, although it is, and this precludes some kinds
>> of "particle analysis".
>>>>
>>>> Most previous work on this has been done with slightly different
>> imaging (mostly color fundus photography - CFP).  I have read those papers,
>> and chosen this level of ambition for the current project.  The difference
>> in imaging means that full-fledged solutions aimed at CFP would have to be
>> modified.
>>>>
>>>> What I'm trying to do is to allow the thresholding to create a "large
>> dark mask" that errs on the side of identifying too many pixels as
>> vasculature, and then filter these by adding the requirement of being part
>> of a linear feature.
>>>>
>>>> Left to my own devices, I will probably construct a collection of "dark
>> bar on light background" kernels (at perhaps 8 orientations) and combine
>> their results.  I'm hoping someone has already done this, and I simply
>> haven't found it in ImageJ, yet.
>>>>
>>>> The mixture of sizes might require a multi-scale approach.  That's OK.
>>>>
>>>> I *may* want to apply this to the original image (after CLAHE), or I
>> may want to apply it to the mask generated by a)+b) above - and probably
>> before c).
>>>>
>>>> Given a choice - I am primarily interested in REJECTING regions that
>> are too "blob-like".  Note that "particle analysis" may not help, because
>> the right answer is a fully connected region that extends to all 4 borders
>> of the image.  I need to look at local properties of the mask.  Something
>> as simple as identifying a small image patch (say, 50x50) as "directional"
>> rather than "blobby" might work.
>>>>
>>>> --
>>>> Kenneth Sloan
>>>> [hidden email]
>>>> Vision is the art of seeing what is invisible to others.
>>>>
>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> 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: Request for feedback of a new plugin for image synthesis

Gabriel Landini
In reply to this post by Herbie
On Friday, 9 March 2018 17:00:12 GMT you wrote:
> I am developing an ImageJ plugin as part of my thesis and it would be
> awesome to get some feedback from the ImageJ community.

Under linux 64 with Java 1.80_121 and IJ 1.51v28, I get:

"Class not found while attempting to run "Image_Synthesizer"
java.lang.NoClassDefFoundError: com/google/gson/Gson

Cheers

Gabriel

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

Re: Request for feedback of a new plugin for image synthesis

CARL Philippe (LBP)
In reply to this post by Herbie
Hallo Maximilian,
I would have only one critic: only some of your choices have DialogListener features, namely I found:
        - the Type choices of the settings part of your plugin
        - the presets choices of the primitive part of your plugin
I would add DialogListeneras well as MouseWheelListener to all of your choices menus.
Mit freunlichen Grüssen,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Maximilian Maske
Envoyé : lundi 12 mars 2018 12:53
À : [hidden email]
Objet : Re: Request for feedback of a new plugin for image synthesis

Hello Everyone,

I already got a little feedback and adapted the plugin according to some of the suggestions. Thank you for the suggestions.

This about a new plugin I am developing as part of my thesis and it would be awesome to get some more feedback from the ImageJ community.

More infos about the Image Synthesizer and downloads here:
https://visual-computing.com/imagej/
(you might have to "right-click" the links and use "save link as.." to download the plugin or standalone correctly)

source code:
https://github.com/IamMM/Image_Synthesizer

post on the ImageJ forum:
http://forum.imagej.net/t/request-for-feedback-of-a-new-plugin-for-image-synthesis/9795

Thank you all very much for supporting,
Best Regards,
Maximilian

P.S. The plugin is not distributed on an ImageJ update site yet, because it is part of my not published thesis. In near future I will distribute it and it could also use ImgLib2, to probably extent functionality and speed up the software. (Thanks to Curtis for this suggestions).

--
Maximilian Maske
University of Applied Sciences Berlin

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

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