Login  Register

I need help with calibrating an image using ImageJ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

I need help with calibrating an image using ImageJ

HaibaraAi
6 posts
Someone recommended that I use ImageJ to standardize the color in the image which I took with a Color Checker Chart in it. Does anyone know how to calibrate the image without having to buy plug-ins like the inCamera plug-in for adobe photoshop? Could you teach me how to use ImageJ to calibrate an image?

 I'm having a hard time trying to make the 3 standard colors (white, grey and black) in the photo to read constantly and near their true values. My file is in TIFF format.

Thank you! :D
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

Randy Polson
7 posts
After you open your image, go to the menu item Analyze>Histogram.
This will show the number of pixels with the specified intensity
value.  You can then adjust the displayed intensity by adjusting the
brightness and contrast from menu item
Image>Adjust>Brightness/Contrast.  When moving the cursor over the
image, there is a display in the tool bar that shows the current
positions of the cursor and the pixel value.

Good luck,
Randy


On Sat, Sep 1, 2012 at 3:19 AM, HaibaraAi <[hidden email]> wrote:

> Someone recommended that I use ImageJ to standardize the color in the image
> which I took with a Color Checker Chart in it. Does anyone know how to
> calibrate the image without having to buy plug-ins like the inCamera plug-in
> for adobe photoshop? Could you teach me how to use ImageJ to calibrate an
> image?
>
>  I'm having a hard time trying to make the 3 standard colors (white, grey
> and black) in the photo to read constantly and near their true values. My
> file is in TIFF format.
>
> Thank you! :D
>
>
>
> --
> View this message in context: http://imagej.1557.n6.nabble.com/I-need-help-with-calibrating-an-image-using-ImageJ-tp4999914.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> 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
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

HaibaraAi
6 posts
Oh i see. But do you know how to adjust the RGB value of the picture? For example, the RGB value of the white patch in the ColorChecker chart in the photo is currently, 255, 255, 240 but you want to adjust it so that it would match its real RGB value of 243, 243, 242. THank you! :D
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

HaibaraAi
6 posts
Oh i see. But do you know how to adjust the RGB value of the picture? For example, the RGB value of the white patch in the ColorChecker chart in the photo is currently, 255, 255, 240 but you want to adjust it so that it would match its real RGB value of 243, 243, 242. THank you! :D


On Tue, Sep 18, 2012 at 5:55 PM, HaibaraAi [via ImageJ] <[hidden email]> wrote:
Oh i see. But do you know how to adjust the RGB value of the picture? For example, the RGB value of the white patch in the ColorChecker chart in the photo is currently, 255, 255, 240 but you want to adjust it so that it would match its real RGB value of 243, 243, 242. THank you! :D


If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.n6.nabble.com/I-need-help-with-calibrating-an-image-using-ImageJ-tp4999914p5000103.html
To unsubscribe from I need help with calibrating an image using ImageJ, click here.
NAML

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

Rasband, Wayne (NIH/NIMH) [E]
1064 posts
In reply to this post by HaibaraAi
On Sep 18, 2012, at 5:55 AM, HaibaraAi wrote:

> Oh i see. But do you know how to adjust the RGB value of the picture? For
> example, the RGB value of the white patch in the ColorChecker chart in the
> photo is currently, 255, 255, 240 but you want to adjust it so that it would
> match its real RGB value of 243, 243, 242. THank you! :D

You can do this using the changeValues() macro function, which is described at

   http://imagej.nih.gov/ij/developer/macro/functions.html#changeValues

To change 255,255,240 to 243,243,242, use

   changeValues(0xfffff0, 0xfffff0, 0xf3f3f2);

Use an RGB to hex converter, such as the one at

    http://www.javascripter.net/faq/rgbtohex.htm

to get the hex values needed by the changeValues() function.

The ImageJ macro language is described at

    http://imagej.nih.gov/ij/developer/macro/macros.html

-wayne

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

Re: I need help with calibrating an image using ImageJ

Yu, Alex (NIH/NICHD) [F]
2 posts
I have single cell labeling with membrane GFP. Is there any way I can process the images to get semi-transparent visualization. In other words, I need to clearly demonstrate both PM and intracellular vesicles at the same image.
Thanks,
J. Alex Yu, PhD
PGD, NICHD, NIH
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

HaibaraAi
6 posts
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Hi, Wayne!

Thank you for the info, it's exactly what I wanted to know :D But I can't seem to access the sites that you gave me, same with all the sites with ".nih.gov", are there any alternative links? Thank you! :D

On Thu, Sep 20, 2012 at 1:10 AM, Rasband, Wayne (NIH/NIMH) [E] [via ImageJ] <[hidden email]> wrote:
On Sep 18, 2012, at 5:55 AM, HaibaraAi wrote:

> Oh i see. But do you know how to adjust the RGB value of the picture? For
> example, the RGB value of the white patch in the ColorChecker chart in the
> photo is currently, 255, 255, 240 but you want to adjust it so that it would
> match its real RGB value of 243, 243, 242. THank you! :D

You can do this using the changeValues() macro function, which is described at

   http://imagej.nih.gov/ij/developer/macro/functions.html#changeValues

To change 255,255,240 to 243,243,242, use

   changeValues(0xfffff0, 0xfffff0, 0xf3f3f2);

Use an RGB to hex converter, such as the one at

    http://www.javascripter.net/faq/rgbtohex.htm

to get the hex values needed by the changeValues() function.

The ImageJ macro language is described at

    http://imagej.nih.gov/ij/developer/macro/macros.html

-wayne

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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.n6.nabble.com/I-need-help-with-calibrating-an-image-using-ImageJ-tp4999914p5000116.html
To unsubscribe from I need help with calibrating an image using ImageJ, click here.
NAML

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

HaibaraAi
6 posts
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Hi again Wayne!

I'm sorry. Nevermind my last message. I've managed to access them.  Thank you. :D

On Thu, Sep 20, 2012 at 1:10 AM, Rasband, Wayne (NIH/NIMH) [E] [via ImageJ] <[hidden email]> wrote:
On Sep 18, 2012, at 5:55 AM, HaibaraAi wrote:

> Oh i see. But do you know how to adjust the RGB value of the picture? For
> example, the RGB value of the white patch in the ColorChecker chart in the
> photo is currently, 255, 255, 240 but you want to adjust it so that it would
> match its real RGB value of 243, 243, 242. THank you! :D

You can do this using the changeValues() macro function, which is described at

   http://imagej.nih.gov/ij/developer/macro/functions.html#changeValues

To change 255,255,240 to 243,243,242, use

   changeValues(0xfffff0, 0xfffff0, 0xf3f3f2);

Use an RGB to hex converter, such as the one at

    http://www.javascripter.net/faq/rgbtohex.htm

to get the hex values needed by the changeValues() function.

The ImageJ macro language is described at

    http://imagej.nih.gov/ij/developer/macro/macros.html

-wayne

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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.n6.nabble.com/I-need-help-with-calibrating-an-image-using-ImageJ-tp4999914p5000116.html
To unsubscribe from I need help with calibrating an image using ImageJ, click here.
NAML

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: I need help with calibrating an image using ImageJ

Michael Schmid
2136 posts
In reply to this post by HaibaraAi
Hi,

first be warned that color calibration is a tricky business, close to
impossible with consumer cameras. Most consumer cameras use a nonlinear
transfer function such as sRGB. Furthermore, pixel value 0 does not
correspond to black. Most consumer cameras increase color saturation
(using 'neutral' color settings may improve this point).
So, you will get only a very rough calibration using the white area of the
color chart.

Assuming that black corresponds to pixel value 0 and that the transfer
curve is linear or a fixed gamma value, what you can do:
- Image>Type>RGB Stack
- For each channel
--- Measure the mean brightness of the white area
--- Process>Math>Multiply by a value calculated as (desired
value)/(measured value of white area). Do it for this channel only, not
for the whole stack.
- Image>Type>RGB Color

You can record these steps with Plugins>Macros>Record and create a macro.
See the ImageJ Macro documentation for details, e.g. the getStatistics
command for getting the mean value in the white area, and how to have a
variable in a command such as run("Multiply...", "value=&myFactor");

Michael
____________________________________________________________________

On Wed, September 19, 2012 12:49, HaibaraAi wrote:
> Oh i see. But do you know how to adjust the RGB value of the picture? For
> example, the RGB value of the white patch in the ColorChecker chart in the
> photo is currently, 255, 255, 240 but you want to adjust it so that it
> would match its real RGB value of 243, 243, 242. THank you! :D
>
>

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

Re: I need help with calibrating an image using ImageJ

HaibaraAi
6 posts
Hi!

Thank you for your response! I have a few questions though.

1. What does the desired value correspond to? In my case, like I said, I want to adjust the RGB values of the white patch to RGB value of 243, 243, 242. So what desired value should I put in?

2. Also, I'm not sure how to use the getStatistics command. Could you please link me to a documentation describing how to use this? I've tried searching but I only get descriptions of getStatistics.

3. Lastly, about the last thing that you mentioned, "how to have a
variable in a command such as run("Multiply...", "value=&myFactor");" ... where does that come in? when do I use that?

Thank you very much! It is my first time to use ImageJ and I am so unfamiliar about lots of things. But this is very important to me since I'll be using it to analyze my specimen in my thesis. Again, thank you! :D

On Sat, Sep 22, 2012 at 5:20 PM, Michael Schmid-3 [via ImageJ] <[hidden email]> wrote:
Hi,

first be warned that color calibration is a tricky business, close to
impossible with consumer cameras. Most consumer cameras use a nonlinear
transfer function such as sRGB. Furthermore, pixel value 0 does not
correspond to black. Most consumer cameras increase color saturation
(using 'neutral' color settings may improve this point).
So, you will get only a very rough calibration using the white area of the
color chart.

Assuming that black corresponds to pixel value 0 and that the transfer
curve is linear or a fixed gamma value, what you can do:
- Image>Type>RGB Stack
- For each channel
--- Measure the mean brightness of the white area
--- Process>Math>Multiply by a value calculated as (desired
value)/(measured value of white area). Do it for this channel only, not
for the whole stack.
- Image>Type>RGB Color

You can record these steps with Plugins>Macros>Record and create a macro.
See the ImageJ Macro documentation for details, e.g. the getStatistics
command for getting the mean value in the white area, and how to have a
variable in a command such as run("Multiply...", "value=&myFactor");

Michael
____________________________________________________________________

On Wed, September 19, 2012 12:49, HaibaraAi wrote:
> Oh i see. But do you know how to adjust the RGB value of the picture? For
> example, the RGB value of the white patch in the ColorChecker chart in the
> photo is currently, 255, 255, 240 but you want to adjust it so that it
> would match its real RGB value of 243, 243, 242. THank you! :D
>
>

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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.n6.nabble.com/I-need-help-with-calibrating-an-image-using-ImageJ-tp4999914p5000161.html
To unsubscribe from I need help with calibrating an image using ImageJ, click here.
NAML