Hi:
I'm trying to open 14 bit Nikon NEF images with little success .... using Import/Raw the file opens but is very small (160 x 120 px) .... if I use bio-formats the image opens but is not the correct size or color .... dcraw reader also opens it but the image is still not right .... can someone help me please ? what am I doing wrong? Thank you and have a great evening .... Lee William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good day Lee,
there are several aspects of your question 1. Be aware of the fact that 14bit images will usually be opened and handled as 16bit images. 2. If you deal with color images, be aware of the fact that ImageJ doesn't handle 16bit RGB images but represents them as stacks with three slices that are R, G, and B respectively. 3. Be aware of the fact that quite often you need to use the B&C dialog to make 16bit images or stacks look as desired. 4. I was able to open a .NEF image using "BIO-Formats Importer" with setting View stack with: "Standard ImageJ" Stack order: Default 5. If you have successfully opened the image as RGB-stack go to "Color > Channels Tool..." HTH Herbie :::::::::::::::::::::::::::::::::::::::: Am 11.08.20 um 00:50 schrieb Lee Berndt: > Hi: > I'm trying to open 14 bit Nikon NEF images with little success .... using Import/Raw the file opens but is very small (160 x 120 px) .... if I use bio-formats the image opens but is not the correct size or color .... dcraw reader also opens it but the image is still not right .... can someone help me please ? what am I doing wrong? Thank you and have a great evening .... Lee > > William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Herbie and Lee
I am able to open NEF files in dcraw, as Lee writes. Only difference I see is a slight difference in size of 6016x4016 versus 6000x4000 when opened in Nikon software. Is this what you mean by "image is still not right"? I am not able to open NEF files correctly using "BIO-Formats Importer" as suggested. I get just a black image. Direct opening in Fiji results in a thumbnail of 160x120 showing the correct image Best wishes Kees ________________________________ From: Herbie <[hidden email]> Sent: 11 August 2020 09:13 Subject: Re: 14 bit NEF raw Images Good day Lee, there are several aspects of your question 1. Be aware of the fact that 14bit images will usually be opened and handled as 16bit images. 2. If you deal with color images, be aware of the fact that ImageJ doesn't handle 16bit RGB images but represents them as stacks with three slices that are R, G, and B respectively. 3. Be aware of the fact that quite often you need to use the B&C dialog to make 16bit images or stacks look as desired. 4. I was able to open a .NEF image using "BIO-Formats Importer" with setting View stack with: "Standard ImageJ" Stack order: Default 5. If you have successfully opened the image as RGB-stack go to "Color > Channels Tool..." HTH Herbie :::::::::::::::::::::::::::::::::::::::: Am 11.08.20 um 00:50 schrieb Lee Berndt: > Hi: > I'm trying to open 14 bit Nikon NEF images with little success .... using Import/Raw the file opens but is very small (160 x 120 px) .... if I use bio-formats the image opens but is not the correct size or color .... dcraw reader also opens it but the image is still not right .... can someone help me please ? what am I doing wrong? Thank you and have a great evening .... Lee > > William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 > > -- > ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C2e24b5a49b59496281d008d83dce7f53%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637327304409176471&sdata=2VZwFWop9lBosXrY6%2Fv4z1%2Bj5Cj8Rnc1imfvSwf2V5A%3D&reserved=0 > -- ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C2e24b5a49b59496281d008d83dce7f53%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637327304409176471&sdata=2VZwFWop9lBosXrY6%2Fv4z1%2Bj5Cj8Rnc1imfvSwf2V5A%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good morning Straatman and Herbie:
When I open a 14-bit NEF in dcraw (with ImageJ) at any setting (8-bit, 16-bit) in any space (raw, sRGB) i get an image that is not even close to the what the color should be (i.e. which should be green turfgrass shoots) and the image pixel size is 5600 x 3728 instead of 5568 x 3712 which is what original NEF images are .... if i open in bio-formats (with Fiji) I get a nearly black stack image that is 5600 x 3782 .... if I just use "open" in either imagej or fiji I get an image that appears as it should except that it is a thumbnail that is only 160 x 120 px .... which I can not do anything with ..... What I can do is use the nikon software to convert the NEF to an 8-bit tiff and then proceed with what I want to do which is to convert to LAB stack or HSB stack and measure ..... if I convert the NEF to 16-bit-tiff and I open it it comes back as a stack that I can not convert unless I change it to a RGB color which I assume is 24 bit ..... what I'm trying to do is measure the "color" of individual grass shoots so as to eventually compare with a spectrophotometer Any thoughts? Would I be better off capturing the image as 12 bit NEF? (which I really have not tried yet) as I want as much color information in each pixel as I can achieve ... William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 -----Original Message----- From: Straatman, Kees (Dr.) <[hidden email]> To: [hidden email] Sent: Tue, Aug 11, 2020 5:04 am Subject: Re: 14 bit NEF raw Images Hi Herbie and Lee I am able to open NEF files in dcraw, as Lee writes. Only difference I see is a slight difference in size of 6016x4016 versus 6000x4000 when opened in Nikon software. Is this what you mean by "image is still not right"? I am not able to open NEF files correctly using "BIO-Formats Importer" as suggested. I get just a black image. Direct opening in Fiji results in a thumbnail of 160x120 showing the correct image Best wishes Kees ________________________________ From: Herbie <[hidden email]> Sent: 11 August 2020 09:13 Subject: Re: 14 bit NEF raw Images Good day Lee, there are several aspects of your question 1. Be aware of the fact that 14bit images will usually be opened and handled as 16bit images. 2. If you deal with color images, be aware of the fact that ImageJ doesn't handle 16bit RGB images but represents them as stacks with three slices that are R, G, and B respectively. 3. Be aware of the fact that quite often you need to use the B&C dialog to make 16bit images or stacks look as desired. 4. I was able to open a .NEF image using "BIO-Formats Importer" with setting View stack with: "Standard ImageJ" Stack order: Default 5. If you have successfully opened the image as RGB-stack go to "Color > Channels Tool..." HTH Herbie :::::::::::::::::::::::::::::::::::::::: Am 11.08.20 um 00:50 schrieb Lee Berndt: > Hi: > I'm trying to open 14 bit Nikon NEF images with little success .... using Import/Raw the file opens but is very small (160 x 120 px) .... if I use bio-formats the image opens but is not the correct size or color .... dcraw reader also opens it but the image is still not right .... can someone help me please ? what am I doing wrong? Thank you and have a great evening .... Lee > > William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 > > -- > ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C2e24b5a49b59496281d008d83dce7f53%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637327304409176471&sdata=2VZwFWop9lBosXrY6%2Fv4z1%2Bj5Cj8Rnc1imfvSwf2V5A%3D&reserved=0 > -- ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C2e24b5a49b59496281d008d83dce7f53%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637327304409176471&sdata=2VZwFWop9lBosXrY6%2Fv4z1%2Bj5Cj8Rnc1imfvSwf2V5A%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Lee,
you are right that the format (image size) changes slightly and I have no idea what "Bio Formats" is doing but I don't get all black stack slices. Did you adjust B&C? How many images do you have because I can import .NF in perfect quality to my old Photoshop app and save it as 16bit TIFF that in turn opens--without format changes--as three-slice image stack directly in ImageJ. You may also have a look at: <https://forum.image.sc/t/automatic-length-measurement-of-metal-parts/19770/30> "Would I be better off capturing the image as 12 bit NEF?" I don't think that this will change the situation. Good luck Herbie :::::::::::::::::::::::::::::::::::::::: Am 11.08.20 um 12:31 schrieb Lee Berndt: > Good morning Straatman and Herbie: > When I open a 14-bit NEF in dcraw (with ImageJ) at any setting (8-bit, 16-bit) in any space (raw, sRGB) i get an image that is not even close to the what the color should be (i.e. which should be green turfgrass shoots) and the image pixel size is 5600 x 3728 instead of 5568 x 3712 which is what original NEF images are .... if i open in bio-formats (with Fiji) I get a nearly black stack image that is 5600 x 3782 .... if I just use "open" in either imagej or fiji I get an image that appears as it should except that it is a thumbnail that is only 160 x 120 px .... which I can not do anything with ..... > What I can do is use the nikon software to convert the NEF to an 8-bit tiff and then proceed with what I want to do which is to convert to LAB stack or HSB stack and measure ..... if I convert the NEF to 16-bit-tiff and I open it it comes back as a stack that I can not convert unless I change it to a RGB color which I assume is 24 bit ..... > what I'm trying to do is measure the "color" of individual grass shoots so as to eventually compare with a spectrophotometer > Any thoughts? Would I be better off capturing the image as 12 bit NEF? (which I really have not tried yet) as I want as much color information in each pixel as I can achieve ... > > William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 > > -----Original Message----- > From: Straatman, Kees (Dr.) <[hidden email]> > To: [hidden email] > Sent: Tue, Aug 11, 2020 5:04 am > Subject: Re: 14 bit NEF raw Images > > Hi Herbie and Lee > > I am able to open NEF files in dcraw, as Lee writes. Only difference I see is a slight difference in size of 6016x4016 versus 6000x4000 when opened in Nikon software. Is this what you mean by "image is still not right"? > > I am not able to open NEF files correctly using "BIO-Formats Importer" as suggested. I get just a black image. Direct opening in Fiji results in a thumbnail of 160x120 showing the correct image > > Best wishes > > Kees > > ________________________________ > From: Herbie <[hidden email]> > Sent: 11 August 2020 09:13 > Subject: Re: 14 bit NEF raw Images > > Good day Lee, > > there are several aspects of your question > > 1. > Be aware of the fact that 14bit images will usually be opened and > handled as 16bit images. > > 2. > If you deal with color images, be aware of the fact that ImageJ doesn't > handle 16bit RGB images but represents them as stacks with three slices > that are R, G, and B respectively. > > 3. > Be aware of the fact that quite often you need to use the B&C dialog to > make 16bit images or stacks look as desired. > > 4. > I was able to open a .NEF image using "BIO-Formats Importer" with setting > View stack with: "Standard ImageJ" > Stack order: Default > > 5. > If you have successfully opened the image as RGB-stack go to "Color > > Channels Tool..." > > HTH > > Herbie > > :::::::::::::::::::::::::::::::::::::::: > Am 11.08.20 um 00:50 schrieb Lee Berndt: >> Hi: >> I'm trying to open 14 bit Nikon NEF images with little success .... using Import/Raw the file opens but is very small (160 x 120 px) .... if I use bio-formats the image opens but is not the correct size or color .... dcraw reader also opens it but the image is still not right .... can someone help me please ? what am I doing wrong? Thank you and have a great evening .... Lee >> >> William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 >> >> -- >> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C2e24b5a49b59496281d008d83dce7f53%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637327304409176471&sdata=2VZwFWop9lBosXrY6%2Fv4z1%2Bj5Cj8Rnc1imfvSwf2V5A%3D&reserved=0 >> > > -- > ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C2e24b5a49b59496281d008d83dce7f53%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637327304409176471&sdata=2VZwFWop9lBosXrY6%2Fv4z1%2Bj5Cj8Rnc1imfvSwf2V5A%3D&reserved=0 > > -- > 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 Lee Berndt
On Tuesday, 11 August 2020 11:31:11 BST Lee Berndt wrote:
> bit ..... what I'm trying to do is measure the "color" of individual grass > shoots so as to eventually compare with a spectrophotometer Any thoughts? Hi Lee, Just a comment, you won't get a sensible result from RGB images when comparing to a spectrophotometer, e.g.: in an RGB photo, a lemon is not yellow! Cheers Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Lee Berndt
Hi Lee,
if you open a raw image you should expect that you get (1) no correction for color balance (white balance) and (2) a linear response, in contrast to RGB/sRGB formats like jpg etc., where the response is nonlinear. (3) There can be some offset, i.e., black won't correspond to pixel values of zero. Thus, your raw image will not look like the corresponding jpg or thumbnail. For quantitative analysis, subtract a dark frame (raw photo with the lens cover closed, but the same ISO value and exposure time). This is best done in 32-bit mode. Also take a photo of a white or neutral gray object under the same light conditions, than you can calculate correction factors for the colors. For quantitative analysis, don't apply a nonlinear function. For viewing, after the above corrections, you may try Process>Math>Gamma with a gamma value of about 0.5 to approximate the visual impression of a jpg etc. image. Michael _______________________________________________________________________ On 11/08/2020 12:50 am, Lee Berndt wrote: > Hi: > I'm trying to open 14 bit Nikon NEF images with little success .... using Import/Raw the file opens but is very small (160 x 120 px) .... if I use bio-formats the image opens but is not the correct size or color .... dcraw reader also opens it but the image is still not right .... can someone help me please ? what am I doing wrong? Thank you and have a great evening .... Lee > > William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL 33907@Dr_Lee_Berndt239.246.0396 > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Michael,
although I agree in many points, I disagree regarding two: 1. Lee will encounter difficulties getting the Lab-Colour space from the colour stack because ImageJ doesn't provide this conversion feature. (Doing it with 24bit RGB is not what Lee is heading towards.) Either he must write a plugin that does the colour space transformation or he must use another software. (My old Photoshop does 48bit RGB-to-Lab conversion but there may be other apps that do so for less money.) 2. I second Gabriel Landini by "doubting" that a correction factor will be able to correct RGB-information with respect to photometric data. The reason is that for colours that do not exist there is simply no correction. Photometric colour information is in principle given by a continuous (wavelength) dimension, RGB means three points on this dimension only. Best Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 11.08.20 um 19:20 schrieb Michael Schmid: > Hi Lee, > > if you open a raw image you should expect that you get > (1) no correction for color balance (white balance) and > (2) a linear response, in contrast to RGB/sRGB formats like jpg etc., > where the response is nonlinear. > (3) There can be some offset, i.e., black won't correspond to pixel > values of zero. > > Thus, your raw image will not look like the corresponding jpg or thumbnail. > > For quantitative analysis, subtract a dark frame (raw photo with the > lens cover closed, but the same ISO value and exposure time). This is > best done in 32-bit mode. Also take a photo of a white or neutral gray > object under the same light conditions, than you can calculate > correction factors for the colors. > > For quantitative analysis, don't apply a nonlinear function. For > viewing, after the above corrections, you may try Process>Math>Gamma > with a gamma value of about 0.5 to approximate the visual impression of > a jpg etc. image. > > Michael > _______________________________________________________________________ > > On 11/08/2020 12:50 am, Lee Berndt wrote: >> Hi: >> I'm trying to open 14 bit Nikon NEF images with little success .... >> using Import/Raw the file opens but is very small (160 x 120 px) .... >> if I use bio-formats the image opens but is not the correct size or >> color .... dcraw reader also opens it but the image is still not right >> .... can someone help me please ? what am I doing wrong? Thank you >> and have a great evening .... Lee >> >> William L. Berndt, Ph.D. 7133 Penner Lane. Apt. #40Fort Myers, FL >> 33907@Dr_Lee_Berndt239.246.0396 >> >> -- >> 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 |
Free forum by Nabble | Edit this page |