multiple tresholds

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

multiple tresholds

Braekevelt Martin
Dear all,

I have posted a question a couple of weeks ago concerning thresholding/phase analysis.
What I want is to determine a set of tresholds in a histogram distribution of grey value pixels. In ImageJ I only find current/over and under option for the histogram distribution, and the false colors related to that are not visible together in the image.
The goal is to have multiple threshold selections in different colors and superimpose them on the image as a false color overlay.
Thanks in advance for the help.

Kindest regards,
Martin.

Braekevelt Martin
Global Metallographic Lab Process Owner(GLaM)
Oude Heerweg 5
8540 DEERLIJK
BELGIUM
Tel. +32 56 767114
Mobile :+32475805738

::DISCLAIMER:: This e-mail is confidential and intended for use by the addressee only. If you are not the intended recipient, please notify us immediately and delete this e-mail, as well as any attachment.

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

Re: multiple tresholds

Herbie
Good day Martin,

as far as I understand, you should have a close look at the LUT-feature
of ImageJ:
<https://imagej.nih.gov/ij/docs/guide/146-28.html#sub:Lookup-Tables>

A suitably chosen LUT won't need any thresholds. You can construct your
own LUTs.
<https://imagej.nih.gov/ij/docs/guide/146-28.html#sub:Edit-LUT>

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::
Am 18.08.17 um 08:43 schrieb Braekevelt Martin:

> Dear all,
>
> I have posted a question a couple of weeks ago concerning
> thresholding/phase analysis. What I want is to determine a set of
> tresholds in a histogram distribution of grey value pixels. In ImageJ
> I only find current/over and under option for the histogram
> distribution, and the false colors related to that are not visible
> together in the image. The goal is to have multiple threshold
> selections in different colors and superimpose them on the image as a
> false color overlay. Thanks in advance for the help.
>
> Kindest regards, Martin.
>
> Braekevelt Martin Global Metallographic Lab Process Owner(GLaM) Oude
> Heerweg 5 8540 DEERLIJK BELGIUM Tel. +32 56 767114 Mobile
> :+32475805738
>
> ::DISCLAIMER:: This e-mail is confidential and intended for use by
> the addressee only. If you are not the intended recipient, please
> notify us immediately and delete this e-mail, as well as any
> attachment.
>
> -- 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: multiple tresholds

Herbie
Martin,

in case of three levels the solution is easy:

Make a suitable three-color RGB-LUT and after application to your image
change the image type to RGB and split the channels. Now you have three
binary images that let you determine the percentages.

In case you need more than three levels a solution is less
straightforward...

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::
Am 18.08.17 um 10:57 schrieb Braekevelt Martin:

> Good day to you to Herbie,
>
> I also already did some trials with LUT feature, but beside a false color overlay on my image I also need the percentage of the 3 predefined colors, representing a certain volume of phase present.
> I don't know if this data can be generated by LUT.
>
> Thanks for the help.
>
> Kindest regards,
> Martin.
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Herbie
> Sent: Friday, August 18, 2017 10:18 AM
> To: [hidden email]
> Subject: Re: multiple tresholds
>
> Good day Martin,
>
> as far as I understand, you should have a close look at the LUT-feature of ImageJ:
> <https://imagej.nih.gov/ij/docs/guide/146-28.html#sub:Lookup-Tables>
>
> A suitably chosen LUT won't need any thresholds. You can construct your own LUTs.
> <https://imagej.nih.gov/ij/docs/guide/146-28.html#sub:Edit-LUT>
>
> HTH
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::::::
> Am 18.08.17 um 08:43 schrieb Braekevelt Martin:
>> Dear all,
>>
>> I have posted a question a couple of weeks ago concerning
>> thresholding/phase analysis. What I want is to determine a set of
>> tresholds in a histogram distribution of grey value pixels. In ImageJ
>> I only find current/over and under option for the histogram
>> distribution, and the false colors related to that are not visible
>> together in the image. The goal is to have multiple threshold
>> selections in different colors and superimpose them on the image as a
>> false color overlay. Thanks in advance for the help.
>>
>> Kindest regards, Martin.
>>
>> Braekevelt Martin Global Metallographic Lab Process Owner(GLaM) Oude
>> Heerweg 5 8540 DEERLIJK BELGIUM Tel. +32 56 767114 Mobile
>> :+32475805738
>>
>> ::DISCLAIMER:: This e-mail is confidential and intended for use by the
>> addressee only. If you are not the intended recipient, please notify
>> us immediately and delete this e-mail, as well as any attachment.
>>
>> -- 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: multiple tresholds

Herbie
Ok Martin,

here is an ImageJ-macro that my help:

/////////////////////////////////////////
//newImage( "Ramp", "8-bit ramp", 256, 256, 1 );
t = newArray( -1, 84, 169, 254 );
run( "Set Measurements...", "area area_fraction limit redirect=None
decimal=3" );
setOption( "BlackBackground", true );
for ( i=1; i<t.length; i++ ) {
        setThreshold( t[i-1]+1, t[i] );
        run( "Measure" );
        setForegroundColor( t[i], t[i], t[i] );
        run( "Make Binary", "thresholded" );
}
run( "Spectrum" );
/////////////////////////////////////////

Paste the code to an empty macro window (Plugins >> New >> Macro) and
run it.

If you un-comment the first line, you get a ramp test image.

The values in the array denote the thresholds, i.e.
1. Interval: 0   ... 84
2. Interval: 85  ... 169
3. Interval: 170 ... 254

The false color scheme is up to your liking. For test purposes I used
"Spectrum".

The results table gives you the corresponding area and percentage area
measures.

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::
Am 23.08.17 um 15:31 schrieb Braekevelt Martin:

> Dear Herbie,
>
> Sorry for disturbing again, but I think I cannot work with the LUT function, the different selections are made on the pixel histogram distribution and need be adjustable from image to image. I don't need more than 3 levels but they need to be adjustable.
>
> Kindest regards,
>
> Martin.
>
> -----Original Message-----
> From: Herbie [mailto:[hidden email]]
> Sent: Friday, August 18, 2017 11:55 AM
> To: Braekevelt Martin; [hidden email]
> Subject: Re: multiple tresholds
>
> Martin,
>
> in case of three levels the solution is easy:
>
> Make a suitable three-color RGB-LUT and after application to your image change the image type to RGB and split the channels. Now you have three binary images that let you determine the percentages.
>
> In case you need more than three levels a solution is less straightforward...
>
> Best
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::::::
> Am 18.08.17 um 10:57 schrieb Braekevelt Martin:
>> Good day to you to Herbie,
>>
>> I also already did some trials with LUT feature, but beside a false color overlay on my image I also need the percentage of the 3 predefined colors, representing a certain volume of phase present.
>> I don't know if this data can be generated by LUT.
>>
>> Thanks for the help.
>>
>> Kindest regards,
>> Martin.
>>
>> -----Original Message-----
>> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>> Herbie
>> Sent: Friday, August 18, 2017 10:18 AM
>> To: [hidden email]
>> Subject: Re: multiple tresholds
>>
>> Good day Martin,
>>
>> as far as I understand, you should have a close look at the LUT-feature of ImageJ:
>> <https://imagej.nih.gov/ij/docs/guide/146-28.html#sub:Lookup-Tables>
>>
>> A suitably chosen LUT won't need any thresholds. You can construct your own LUTs.
>> <https://imagej.nih.gov/ij/docs/guide/146-28.html#sub:Edit-LUT>
>>
>> HTH
>>
>> Herbie
>>
>> :::::::::::::::::::::::::::::::::::::::::::::::
>> Am 18.08.17 um 08:43 schrieb Braekevelt Martin:
>>> Dear all,
>>>
>>> I have posted a question a couple of weeks ago concerning
>>> thresholding/phase analysis. What I want is to determine a set of
>>> tresholds in a histogram distribution of grey value pixels. In ImageJ
>>> I only find current/over and under option for the histogram
>>> distribution, and the false colors related to that are not visible
>>> together in the image. The goal is to have multiple threshold
>>> selections in different colors and superimpose them on the image as a
>>> false color overlay. Thanks in advance for the help.
>>>
>>> Kindest regards, Martin.
>>>
>>> Braekevelt Martin Global Metallographic Lab Process Owner(GLaM) Oude
>>> Heerweg 5 8540 DEERLIJK BELGIUM Tel. +32 56 767114 Mobile
>>> :+32475805738
>>>
>>> ::DISCLAIMER:: This e-mail is confidential and intended for use by
>>> the addressee only. If you are not the intended recipient, please
>>> notify us immediately and delete this e-mail, as well as any attachment.
>>>
>>> -- 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: multiple tresholds

Stoyan Pavlov
Dear Martin,
A relatively simple way to do this is to save  the thresholded pixels as
RoI: once you set your threshold (without applying the mask), click
Edit>Selections>Create Selection and than add it to the RoI manager by
hitting T or Ctrl+T on your keyboard. Afterwards you can adjust outline and
fill color of each RoI selection via the Properties button on the RoI
manager and even add any or all of the thresholded areas to the image
overlay via Image>Overlay submenu.
Since this envolves only simple imagej commands you can also relatively
easy record a macro to automate this tasks.
Best regards
Stoyan

На 18.08.2017 г. 9:56 пр.об. "Braekevelt Martin" <
[hidden email]> написа:

Dear all,

I have posted a question a couple of weeks ago concerning
thresholding/phase analysis.
What I want is to determine a set of tresholds in a histogram distribution
of grey value pixels. In ImageJ I only find current/over and under option
for the histogram distribution, and the false colors related to that are
not visible together in the image.
The goal is to have multiple threshold selections in different colors and
superimpose them on the image as a false color overlay.
Thanks in advance for the help.

Kindest regards,
Martin.

Braekevelt Martin
Global Metallographic Lab Process Owner(GLaM)
Oude Heerweg 5
8540 DEERLIJK
BELGIUM
Tel. +32 56 767114
Mobile :+32475805738

::DISCLAIMER:: This e-mail is confidential and intended for use by the
addressee only. If you are not the intended recipient, please notify us
immediately and delete this e-mail, as well as any attachment.

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

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