Is there a plugin to adjust brightness and contrast through 'rubber
banding'? I have 16 bit grayscale images whose pixel values can range from 0 to 10,000 and want to use different mappings for different ranges, that is, I need detail both in the high and low ends simultaneously. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Robert,
Have you tried the CLAHE option in FIJI? You can find it under "Process/Enhance Local Contrast (CLAHE)". It balances the histogram "variably" across the image to improve contrast in both "light" and "dark" regions of the image. It stretches the histogram at each pixel based on a moving window about the pixel. CLAHE limits the amplification in regions with little change to prevent over-amplification of noise. It's a fairly standard method. Perhaps it will do what you are looking for. - Jim On 10/23/18, 4:04 PM, "ImageJ Interest Group on behalf of Robert Lockwood" <[hidden email] on behalf of [hidden email]> wrote: Is there a plugin to adjust brightness and contrast through 'rubber banding'? I have 16 bit grayscale images whose pixel values can range from 0 to 10,000 and want to use different mappings for different ranges, that is, I need detail both in the high and low ends simultaneously. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html --- The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Robert Lockwood
Hello,
I haven't found one, but that doesn't mean there isn't one. But what I do is make copies and thresh hold them in sections Hi@170-255, med@85-170 and low@ 0-85. Not much help I know but it's fairly quick. You could also try the Weka trainable segmentation. Bob ________________________________ From: Robert Lockwood <[hidden email]> Sent: Tuesday, October 23, 2018 4:03 PM To: [hidden email] Subject: Brightness and contrast adustment Is there a plugin to adjust brightness and contrast through 'rubber banding'? I have 16 bit grayscale images whose pixel values can range from 0 to 10,000 and want to use different mappings for different ranges, that is, I need detail both in the high and low ends simultaneously. -- ImageJ mailing list: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7C%7Cb3461ebd7a0e4180f88e08d63922bc36%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759218673313168&sdata=P381EOdeivMKR%2FnG3dsQeP9cth5p%2Ff3SGuNoQbbjOeM%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Jim Peterson
Perhaps what you want/need is to adjust the image via gamma. Try
Process/Math/Gamma with a [default] value 0.5 to raise the low-end features to better match the intense ones. The result intensities are numerically altered, however, so the intensity information will no longer be the original (if that matters). Some display software allows gamma adjustment for screen display alone and doesn't alter the numerical values, but the process-math function is NOT this. On 10/23/2018 4:50 PM, Jim Peterson wrote: > Robert, > > > > Have you tried the CLAHE option in FIJI? You can find it under "Process/Enhance Local Contrast (CLAHE)". It balances the histogram "variably" across the image to improve contrast in both "light" and "dark" regions of the image. It stretches the histogram at each pixel based on a moving window about the pixel. CLAHE limits the amplification in regions with little change to prevent over-amplification of noise. It's a fairly standard method. Perhaps it will do what you are looking for. > > > > - Jim > > > > On 10/23/18, 4:04 PM, "ImageJ Interest Group on behalf of Robert Lockwood" <[hidden email] on behalf of [hidden email]> wrote: > > > > Is there a plugin to adjust brightness and contrast through 'rubber > > banding'? > > I have 16 bit grayscale images whose pixel values can range from 0 to > > 10,000 and want to use different mappings for different ranges, that is, I > > need detail both in the high and low ends simultaneously. > > > > -- > > ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIGaQ&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=pD-sSh_e9cMzytxHgN9Gfakl4sCheZunFOz7i3o-Ewk&m=Gh44ZwyjMn1q08mD4Zwz_DUqoG3dB_WFbcQVrk-LYRo&s=7_SqdlFAbZ9HnzeGNOHq1-k4so8Q814I9JkqAAMr2QM&e= > > > > > > --- > > The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible. > > > > > -- > > ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIGaQ&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=pD-sSh_e9cMzytxHgN9Gfakl4sCheZunFOz7i3o-Ewk&m=Gh44ZwyjMn1q08mD4Zwz_DUqoG3dB_WFbcQVrk-LYRo&s=7_SqdlFAbZ9HnzeGNOHq1-k4so8Q814I9JkqAAMr2QM&e= > -- __ Vytas Bindokas, M.S., Ph.D. Research Assoc. Prof., Director, BSD Light Microscopy Core Facility phone: 773-702-4875 [alt's: 773-834-9040 or 773-834-2639] [address for letters ONLY (see shipping addr below):] Dept Pharmacol Physiol Sci MC0926 947 E 58th Street The University of Chicago Chicago IL 60637 Room Abbott 129 shipping address (main KCBD site): V. Bindokas 900 E 57th Street KCBD room 1250, Microscopy Core The University of Chicago Chicago IL 60637 email [hidden email] web site for LMCF: http://digital.uchicago.edu -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
When it comes to contrast enhancement, the gamma adjustment "robs Peter to pay Paul". With values of gamma greater than 1, contrast is enhanced in the bright areas at the expense of contrast in the dark areas, and values less than 1 do the opposite.
Before going the route of adaptive contrast methods make sure that a simple linear stretch of the histogram is not adequate. For example, if your 16-bit image has a maximum pixel value of 8500 and a minimum value of 450, map 450-->0 and 8500-->65535. Of course, you can also clip spurious bright or dark values to enhance contrast in the rest. This is what ImageJ's "Image/Adjust/Brightness & Contrast..." allows you to do. So, start with a linear clip and stretch, then try gamma adjustment as the previous response suggests. If none of that works then go the "adaptive" route (such as CLAHE), methods that "adapt" the stretch factor to the local environment across the image. If you search for such algorithms the key words are "adaptive histogram equalization". CLAHE is just one example of this. On 10/24/18, 10:39 AM, "vbindokas" <[hidden email]> wrote: Perhaps what you want/need is to adjust the image via gamma. Try Process/Math/Gamma with a [default] value 0.5 to raise the low-end features to better match the intense ones. The result intensities are numerically altered, however, so the intensity information will no longer be the original (if that matters). Some display software allows gamma adjustment for screen display alone and doesn't alter the numerical values, but the process-math function is NOT this. On 10/23/2018 4:50 PM, Jim Peterson wrote: > Robert, > > > > Have you tried the CLAHE option in FIJI? You can find it under "Process/Enhance Local Contrast (CLAHE)". It balances the histogram "variably" across the image to improve contrast in both "light" and "dark" regions of the image. It stretches the histogram at each pixel based on a moving window about the pixel. CLAHE limits the amplification in regions with little change to prevent over-amplification of noise. It's a fairly standard method. Perhaps it will do what you are looking for. > > > > - Jim > > > > On 10/23/18, 4:04 PM, "ImageJ Interest Group on behalf of Robert Lockwood" <[hidden email] on behalf of [hidden email]> wrote: > > > > Is there a plugin to adjust brightness and contrast through 'rubber > > banding'? > > I have 16 bit grayscale images whose pixel values can range from 0 to > > 10,000 and want to use different mappings for different ranges, that is, I > > need detail both in the high and low ends simultaneously. > > > > -- > > ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIGaQ&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=pD-sSh_e9cMzytxHgN9Gfakl4sCheZunFOz7i3o-Ewk&m=Gh44ZwyjMn1q08mD4Zwz_DUqoG3dB_WFbcQVrk-LYRo&s=7_SqdlFAbZ9HnzeGNOHq1-k4so8Q814I9JkqAAMr2QM&e= > > > > > > --- > > The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible. > > > > > -- > > ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIGaQ&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=pD-sSh_e9cMzytxHgN9Gfakl4sCheZunFOz7i3o-Ewk&m=Gh44ZwyjMn1q08mD4Zwz_DUqoG3dB_WFbcQVrk-LYRo&s=7_SqdlFAbZ9HnzeGNOHq1-k4so8Q814I9JkqAAMr2QM&e= > -- __ Vytas Bindokas, M.S., Ph.D. Research Assoc. Prof., Director, BSD Light Microscopy Core Facility phone: 773-702-4875 [alt's: 773-834-9040 or 773-834-2639] [address for letters ONLY (see shipping addr below):] Dept Pharmacol Physiol Sci MC0926 947 E 58th Street The University of Chicago Chicago IL 60637 Room Abbott 129 shipping address (main KCBD site): V. Bindokas 900 E 57th Street KCBD room 1250, Microscopy Core The University of Chicago Chicago IL 60637 email [hidden email] web site for LMCF: http://digital.uchicago.edu -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html --- The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Adaptive Histogram Equalization will work IFF the brightness levels where you want the most
contrast correspond to brightness values that are have high counts in the histogram. In the case where you have two (or more) brightness ranges that require increased contrast, I know of no currently implemented tool that will do the job. Ideally, I would like a histogram display, and the ability to set multiple breakpoints, stretching the histogram to cover equal output ranges for each input range. If the ranges are known in advance, it would not be too difficult to write a plugin to transform the intensity levels to increase the contrast in those ranges. If you need a tool with interactive manipulation of the ranges, the task becomes a bit more complicated. One approach that could be implemented with current tools comes to mind: Given i+1 breakpoints: (0,1,...i) a) make i copies of the image b) set min/max and modify the intensities in image i to enhance brightness range i (from breakpoint i-1 to breakpoint i) set values outside brightness range i to 0 c) add the i images together The major speedbump I foresee here is setting the HIGH values in each of the i images to 0. I don't know how to do that, offhand, but I suspect it's not hard. So...how to do this: Given an intensity value range [a,b] and a target range [a', b'], set: *values v < a to 0 *values v > b to 0 *values a <= b <= b to [a',b'] Once you can do that, it's a matter of selecting the input ranges [a,b](i) and output ranges [a',b'](i) -- Kenneth Sloan [hidden email] Vision is the art of seeing what is invisible to others. > On 24 Oct 2018, at 10:39 , Jim Peterson <[hidden email]> wrote: > > When it comes to contrast enhancement, the gamma adjustment "robs Peter to pay Paul". With values of gamma greater than 1, contrast is enhanced in the bright areas at the expense of contrast in the dark areas, and values less than 1 do the opposite. > > Before going the route of adaptive contrast methods make sure that a simple linear stretch of the histogram is not adequate. For example, if your 16-bit image has a maximum pixel value of 8500 and a minimum value of 450, map 450-->0 and 8500-->65535. Of course, you can also clip spurious bright or dark values to enhance contrast in the rest. This is what ImageJ's "Image/Adjust/Brightness & Contrast..." allows you to do. So, start with a linear clip and stretch, then try gamma adjustment as the previous response suggests. If none of that works then go the "adaptive" route (such as CLAHE), methods that "adapt" the stretch factor to the local environment across the image. If you search for such algorithms the key words are "adaptive histogram equalization". CLAHE is just one example of this. > > > On 10/24/18, 10:39 AM, "vbindokas" <[hidden email]> wrote: > > Perhaps what you want/need is to adjust the image via gamma. Try > Process/Math/Gamma with a [default] value 0.5 to raise the low-end > features to better match the intense ones. The result intensities are > numerically altered, however, so the intensity information will no > longer be the original (if that matters). Some display software allows > gamma adjustment for screen display alone and doesn't alter the > numerical values, but the process-math function is NOT this. > > > On 10/23/2018 4:50 PM, Jim Peterson wrote: >> Robert, >> >> >> >> Have you tried the CLAHE option in FIJI? You can find it under "Process/Enhance Local Contrast (CLAHE)". It balances the histogram "variably" across the image to improve contrast in both "light" and "dark" regions of the image. It stretches the histogram at each pixel based on a moving window about the pixel. CLAHE limits the amplification in regions with little change to prevent over-amplification of noise. It's a fairly standard method. Perhaps it will do what you are looking for. >> >> >> >> - Jim >> >> >> >> On 10/23/18, 4:04 PM, "ImageJ Interest Group on behalf of Robert Lockwood" <[hidden email] on behalf of [hidden email]> wrote: >> >> >> >> Is there a plugin to adjust brightness and contrast through 'rubber >> >> banding'? >> >> I have 16 bit grayscale images whose pixel values can range from 0 to >> >> 10,000 and want to use different mappings for different ranges, that is, I >> >> need detail both in the high and low ends simultaneously. >> >> >> >> -- >> >> ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIGaQ&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=pD-sSh_e9cMzytxHgN9Gfakl4sCheZunFOz7i3o-Ewk&m=Gh44ZwyjMn1q08mD4Zwz_DUqoG3dB_WFbcQVrk-LYRo&s=7_SqdlFAbZ9HnzeGNOHq1-k4so8Q814I9JkqAAMr2QM&e= >> >> >> >> >> >> --- >> >> The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible. >> >> >> >> >> -- >> >> ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIGaQ&c=Nd1gv_ZWYNIRyZYZmXb18oVfc3lTqv2smA_esABG70U&r=pD-sSh_e9cMzytxHgN9Gfakl4sCheZunFOz7i3o-Ewk&m=Gh44ZwyjMn1q08mD4Zwz_DUqoG3dB_WFbcQVrk-LYRo&s=7_SqdlFAbZ9HnzeGNOHq1-k4so8Q814I9JkqAAMr2QM&e= >> > > -- > __ > > Vytas Bindokas, M.S., Ph.D. > Research Assoc. Prof., > Director, BSD Light Microscopy Core Facility > phone: 773-702-4875 [alt's: 773-834-9040 or 773-834-2639] > > [address for letters ONLY (see shipping addr below):] > Dept Pharmacol Physiol Sci MC0926 > 947 E 58th Street > The University of Chicago > Chicago IL 60637 > Room Abbott 129 > > > shipping address (main KCBD site): > V. Bindokas > 900 E 57th Street > KCBD room 1250, Microscopy Core > The University of Chicago > Chicago IL 60637 > > > email [hidden email] > web site for LMCF: > http://digital.uchicago.edu > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > --- > > The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible. > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Robert Lockwood
you could subtract a low-pass image of the original and add an offset.
e.g. use this macro: offset=3000; gain=3; S_image=getImageID(); run("Duplicate...", "title=dup"); run("Gaussian Blur...", "sigma=30"); run("Divide...", "value="+gain); imageCalculator("Subtract create", S_image,"dup"); run("Add...", "value="+offset); Regards, Bruno -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |