Hej Curtis,
Your macro does the job but I am confused by the reference to the glasbey LUT My version of FIJI (1.50h) has a glasbey inverted LUT, it this what you meant or is there a glasbey LUT somewhere else ? When I look at the glasbey inverted LUT with a 256 step greyscale ramp - it seems to have no obvious structure. What is its purpose ? If the intention is to highlight the small differences in pixel values between the original and jpegged image then Image Adjust/Brightness & Contrast would do the job especially when combined with the 16 colors LUT -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Curtis Rueden Sent: den 23 mars 2016 20:41 To: [hidden email] Subject: Re: jpeg artifacts Hi John, > can someone supply a definitive, reproducible example that I and my > team can use as a test case? Here is a macro which demonstrates the issue: ---------- // load Boats run("Boats (356K)"); run("Out [-]"); rename("Original"); // convert to JPEG run("Duplicate...", " "); run("Out [-]"); run("Save As JPEG... [j]", "jpeg=85"); run("Revert"); rename("JPEG"); // compute the difference imageCalculator("Subtract create 32-bit", "Original","JPEG"); run("Out [-]"); rename("Difference"); // display windows side by side run("Tile"); // highlight artifacts using Glasbey LUT selectWindow("Original"); run("glasbey"); selectWindow("JPEG"); run("glasbey"); selectWindow("Difference"); ---------- See also http://imagej.net/Principles#Why_.28lossy.29_JPEGs_should_not_be_used_in_imaging Regards, Curtis -- Curtis Rueden LOCI software architect - http://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you know ImageJ has a forum? http://forum.imagej.net/ On Wed, Mar 23, 2016 at 1:30 PM, John Brear < [hidden email]> wrote: > Hi, > I am relatively new to ImageJ - investigating its suitability for > quantitative metallography, particularly precipitate particle > characterisation. My apologies, therefore, if I am treading on > well-worn ground. > > In the user guide I see strong warnings against using jpeg images, see > 'Noteworthy II, X'. > However, I cannot reproduce the effects described, neither using the > exmple image of the mandril/baboon (which is supplied as a jpeg > anyway??), nor using my own images. I have tried comparing bmp, jpg, tif, gif, png. > > Is this advice still current? > If so, can someone supply a definitive, reproducible example that I > and my team can use as a test case? > > Thanks in anticipation, > Best wishes, > John > > -- > 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 |
On Thursday 24 Mar 2016 11:15:29 you wrote:
> Your macro does the job but I am confused by the reference to the glasbey > LUT > My version of FIJI (1.50h) has a glasbey inverted LUT, it this what you > meant or is there a glasbey LUT somewhere else ? Hi Jeremy, I once contacted Prof. Glasbey asking about an 8 bit version of his LUT. His paper did not contain all 256 entries: http://onlinelibrary.wiley.com/doi/10.1002/col.20327/pdf He kindly sent me the rgb values, so I have been distributing with the morphology plugins. I am attaching it here. I am not sure what the inverted version is. It does not look like being in reverse order (which is perhaps what one would expec?) or the negative of the original either. Curtis seems to have added this: https://github.com/fiji/fiji/blob/master/luts/glasbey_inverted.lut so he should be able to clarify what it does. Cheers Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html glasbey.lut (3K) Download Attachment |
In reply to this post by Jeremy Adler
Hi Jeremy,
The glasbey LUT is included with Fiji. See also http://imagej.net/Glasbey I also posted my macro to http://imagej.net/Principles in the JPEG section; if you want to eliminate the dependency on glasbey then by all means: edit away. Regards, Curtis On Mar 24, 2016 6:17 AM, "Jeremy Adler" <[hidden email]> wrote: > Hej Curtis, > > Your macro does the job but I am confused by the reference to the glasbey > LUT > > My version of FIJI (1.50h) has a glasbey inverted LUT, it this what you > meant or is there a glasbey LUT somewhere else ? > > When I look at the glasbey inverted LUT with a 256 step greyscale ramp - > it seems to have no obvious structure. What is its purpose ? > If the intention is to highlight the small differences in pixel values > between the original and jpegged image then Image Adjust/Brightness & > Contrast would do the job especially when combined with the 16 colors LUT > > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Curtis Rueden > Sent: den 23 mars 2016 20:41 > To: [hidden email] > Subject: Re: jpeg artifacts > > Hi John, > > > can someone supply a definitive, reproducible example that I and my > > team can use as a test case? > > Here is a macro which demonstrates the issue: > > ---------- > // load Boats > run("Boats (356K)"); > run("Out [-]"); > rename("Original"); > > // convert to JPEG > run("Duplicate...", " "); > run("Out [-]"); > run("Save As JPEG... [j]", "jpeg=85"); > run("Revert"); > rename("JPEG"); > > // compute the difference > imageCalculator("Subtract create 32-bit", "Original","JPEG"); run("Out > [-]"); rename("Difference"); > > // display windows side by side > run("Tile"); > > // highlight artifacts using Glasbey LUT selectWindow("Original"); > run("glasbey"); selectWindow("JPEG"); run("glasbey"); > selectWindow("Difference"); > ---------- > > See also > > http://imagej.net/Principles#Why_.28lossy.29_JPEGs_should_not_be_used_in_imaging > > Regards, > Curtis > > -- > Curtis Rueden > LOCI software architect - http://loci.wisc.edu/software > ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you > know ImageJ has a forum? http://forum.imagej.net/ > > > On Wed, Mar 23, 2016 at 1:30 PM, John Brear < > [hidden email]> wrote: > > > Hi, > > I am relatively new to ImageJ - investigating its suitability for > > quantitative metallography, particularly precipitate particle > > characterisation. My apologies, therefore, if I am treading on > > well-worn ground. > > > > In the user guide I see strong warnings against using jpeg images, see > > 'Noteworthy II, X'. > > However, I cannot reproduce the effects described, neither using the > > exmple image of the mandril/baboon (which is supplied as a jpeg > > anyway??), nor using my own images. I have tried comparing bmp, jpg, > tif, gif, png. > > > > Is this advice still current? > > If so, can someone supply a definitive, reproducible example that I > > and my team can use as a test case? > > > > Thanks in anticipation, > > Best wishes, > > John > > > > -- > > 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 |
In reply to this post by Gabriel Landini
Hi Gabriel,
> I am not sure what the inverted version is. It does not look like > being in reverse order (which is perhaps what one would expec?) or the > negative of the original either. Curtis seems to have added this: > https://github.com/fiji/fiji/blob/master/luts/glasbey_inverted.lut so > he should be able to clarify what it does. For discussion, see: https://github.com/fiji/fiji/pull/133 The main goal is to have black (instead of white) be the first color, while preserving the other attributes of Glasbey. However, I actually did not think hard about whether inverting the LUT actually serves that purpose (qualitatively, adjacent colors seem "less different" to my eye). Regards, Curtis -- Curtis Rueden LOCI software architect - http://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you know ImageJ has a forum? http://forum.imagej.net/ On Thu, Mar 24, 2016 at 7:11 AM, Gabriel Landini <[hidden email]> wrote: > On Thursday 24 Mar 2016 11:15:29 you wrote: > > Your macro does the job but I am confused by the reference to the glasbey > > LUT > > > My version of FIJI (1.50h) has a glasbey inverted LUT, it this what you > > meant or is there a glasbey LUT somewhere else ? > > Hi Jeremy, > I once contacted Prof. Glasbey asking about an 8 bit version of his LUT. > His > paper did not contain all 256 entries: > http://onlinelibrary.wiley.com/doi/10.1002/col.20327/pdf > He kindly sent me the rgb values, so I have been distributing with the > morphology plugins. I am attaching it here. > > I am not sure what the inverted version is. It does not look like being in > reverse order (which is perhaps what one would expec?) or the negative of > the > original either. Curtis seems to have added this: > https://github.com/fiji/fiji/blob/master/luts/glasbey_inverted.lut > so he should be able to clarify what it does. > > Cheers > > Gabriel > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Curtis and Gabriel,
I have attached a pair of what I have called 'random' LUTs - they are the same except that one has zero set to black. They are .txt files as my attempts to send .lut or .xls were rejected. They are not completely random and were intended to display incrementally different intensities in contrasting colours - what the glasbey does. No LUT can guarantee that adjacent pixels with different intensities in an image will have appreciably different display colours, since any two intensities could end up in adjacent pixels and the two most similar colours in an 8 bit LUT will not be that dissimilar on the screen. In theory, but not using LUTs, we can colour an image with only 4 different colours. But that is difficult computationally. However if we chose 10, I am guessing here, colours it could be done if each ROI had fewer than 9 neighbours: it would require starting with one ROI, colouring it, moving onto adjacent ROIs and for each of these checking their adjacent ROIs and picking a colour etc. I mentioned using 'random' LUTs in an rather old article Adler, Microscopy and Analysis Jan 1996, 5-7. -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Curtis Rueden Sent: den 24 mars 2016 15:57 To: [hidden email] Subject: Re: jpeg artifacts, the Glasbey LUT Hi Gabriel, > I am not sure what the inverted version is. It does not look like > being in reverse order (which is perhaps what one would expec?) or the > negative of the original either. Curtis seems to have added this: > https://github.com/fiji/fiji/blob/master/luts/glasbey_inverted.lut so > he should be able to clarify what it does. For discussion, see: https://github.com/fiji/fiji/pull/133 The main goal is to have black (instead of white) be the first color, while preserving the other attributes of Glasbey. However, I actually did not think hard about whether inverting the LUT actually serves that purpose (qualitatively, adjacent colors seem "less different" to my eye). Regards, Curtis -- Curtis Rueden LOCI software architect - http://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden Did you know ImageJ has a forum? http://forum.imagej.net/ On Thu, Mar 24, 2016 at 7:11 AM, Gabriel Landini <[hidden email]> wrote: > On Thursday 24 Mar 2016 11:15:29 you wrote: > > Your macro does the job but I am confused by the reference to the > > glasbey LUT > > > My version of FIJI (1.50h) has a glasbey inverted LUT, it this what > > you meant or is there a glasbey LUT somewhere else ? > > Hi Jeremy, > I once contacted Prof. Glasbey asking about an 8 bit version of his LUT. > His > paper did not contain all 256 entries: > http://onlinelibrary.wiley.com/doi/10.1002/col.20327/pdf > He kindly sent me the rgb values, so I have been distributing with the > morphology plugins. I am attaching it here. > > I am not sure what the inverted version is. It does not look like > being in reverse order (which is perhaps what one would expec?) or the > negative of the original either. Curtis seems to have added this: > https://github.com/fiji/fiji/blob/master/luts/glasbey_inverted.lut > so he should be able to clarify what it does. > > Cheers > > Gabriel > > -- > 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 |
On Thursday 24 Mar 2016 17:07:04 Jeremy Adler wrote:
> I have attached a pair of what I have called 'random' LUTs - they are the > same except that one has zero set to black. Hi Jeremy, That file you posted, random.txt *is* the glasbey LUT, and the other has pure black as the first entry. I guess that if a dark background is desired, one could swap entries 0 and 4 (although entry 4 it is not completely black). Note that Curtis' inverted LUT might not preserving the colour relations as it is inverted in RGB space and the glasbey LUT is computed in CIE-Lab. So I wonder if it would make more sense to convert to Lab and invert the L channel. run("glasbey"); run("RGB Color"); run("Lab Stack"); setSlice(1); run("Invert", "slice"); run("RGB Color"); BTW, when I downloaded the LUT from the link in my previous mail, it was a binary file, not a txt file. Not sure what is going on. > In theory, but not using LUTs, we can colour an image with only 4 different > colours. But that is difficult computationally. Yes, it would not be practical. > However if we chose 10, I am guessing here, colours it could be done if each > ROI had fewer than 9 neighbours: it would require starting with one ROI, > colouring it, moving onto adjacent ROIs and for each of these checking their > adjacent ROIs and picking a colour etc. The problem is that most often we do not know how many neighbouring regions a given region has, and even then, it is not possible to know if the same colour would be adjacent in neighbouring regions. Cheers Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |