Color Correction for Underwater Photos

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

Color Correction for Underwater Photos

klesneski
Hi everyone,
I am doing some analyses of tissue color of corals that I took with an underwater camera. I am trying to see if there are differences in tissue color among colonies. My idea is to use the color histograms of the selected colonies. In each image, I have a color standard card, placed next to the coral colony. One of the reasons why we include this card is because red light is attenuated with depth, so objects and images appear more blue the deeper you are, and the coral colonies are all at different depths. We know the RBG values of the color on the card. I am wondering if anyone has experience or advice on how I could use this color standard card in ImageJ to perform a sort of correction before using color histograms?
Many thanks,
KL
Reply | Threaded
Open this post in threaded view
|

"Swap Quadrants" missing

Herbie
Dear Wayne, dear FFT-users,

evidently ImageJ's functionality "Swap Quadrants" has gone. It is still
present with 1.49v and perhaps earlier versions of 1.50.

Is there some reason for this and will it be absent in the future?

Some of my macros are now broken and I should like to know whether I
must code this functionality myself -- which isn't difficult but...

Thanks for any hints

Herbie

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

Re: Color Correction for Underwater Photos

Kurt Thorn
In reply to this post by klesneski
On 2/17/2016 8:19 AM, klesneski wrote:

> Hi everyone,
> I am doing some analyses of tissue color of corals that I took with an
> underwater camera. I am trying to see if there are differences in tissue
> color among colonies. My idea is to use the color histograms of the selected
> colonies. In each image, I have a color standard card, placed next to the
> coral colony. One of the reasons why we include this card is because red
> light is attenuated with depth, so objects and images appear more blue the
> deeper you are, and the coral colonies are all at different depths. We know
> the RBG values of the color on the card. I am wondering if anyone has
> experience or advice on how I could use this color standard card in ImageJ
> to perform a sort of correction before using color histograms?
> Many thanks,
> KL

You may want to look into a color management system.  I experimented a
little with this a while ago: http://nic.ucsf.edu/blog/?p=1151

Kurt

>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Color-Correction-for-Underwater-Photos-tp5015660.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
Kurt Thorn
Associate Professor
Director, Nikon Imaging Center
http://thornlab.ucsf.edu/
http://nic.ucsf.edu/blog/

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

Re: Color Correction for Underwater Photos

TimFeinstein
In reply to this post by klesneski
Hi KL,

Is there a reason why you cannot use artificial light?  Strobes should be
vastly easier to standardize than incident light.

Best,


T

Timothy Feinstein, Ph.D.
Research Scientist
University of Pittsburgh Department of Developmental Biology





On 2/17/16, 11:19 AM, "ImageJ Interest Group on behalf of klesneski"
<[hidden email] on behalf of [hidden email]> wrote:

>Hi everyone,
>I am doing some analyses of tissue color of corals that I took with an
>underwater camera. I am trying to see if there are differences in tissue
>color among colonies. My idea is to use the color histograms of the
>selected
>colonies. In each image, I have a color standard card, placed next to the
>coral colony. One of the reasons why we include this card is because red
>light is attenuated with depth, so objects and images appear more blue the
>deeper you are, and the coral colonies are all at different depths. We
>know
>the RBG values of the color on the card. I am wondering if anyone has
>experience or advice on how I could use this color standard card in ImageJ
>to perform a sort of correction before using color histograms?
>Many thanks,
>KL
>
>
>
>
>--
>View this message in context:
>http://imagej.1557.x6.nabble.com/Color-Correction-for-Underwater-Photos-tp
>5015660.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
|

Re: Color Correction for Underwater Photos

klesneski
Hi Tim,
Thanks for your reply. Unfortunately we did not have strobes to bring with us to the field. This may be something that we consider in the future.
Reply | Threaded
Open this post in threaded view
|

Re: Color Correction for Underwater Photos

klesneski
In reply to this post by Kurt Thorn
Thanks Kurt, I will look into this.
Reply | Threaded
Open this post in threaded view
|

Re: Color Correction for Underwater Photos

Kenneth Sloan-2
In reply to this post by klesneski
No direct experience, but here is what I would do:

a) devise a way to specify regions of the image of known color.  That depends on what the images look like.  If the color cards are in a standard location, you might find them automatically.  If not, you’ll have to sketch little ROI’s.

b) develop a MODEL of what distortions of color space are produced by shooting underwater.  The more you know about how the water changes things, the more accurate your correction will be.  Suppose that your model has k parameters.

c) now, you have a k-dimensional space of parameter settings, and several patches in the image with known before/after colors.  You need to search the parameter space for the set of parameters for the model which best transforms the captured colors into the “known” colors.  Assume that this transformation brings the rest of the colors along for the ride.

The details all depend on how many “known” colors you have, and what you know about how the underwater shooting affected the imaging.

You can probably do better than this, but suppose your model is:

I = [Ri Gi Bi] - imaged color
K = [Rk Gk Gk] - known color
T = [a b c]    - 3x3 transform
    [d e f]
    [g h i]

I = T K   (traspose to make rows/columns work, as necessary)

Then, you have 9 parameters to tweak.  If you have 9 known colors and 9 patches of imaged colors, then you have 9 equations in 9 unknowns.  Solve for a,b,c...

Perhaps you are lucky, and
T = [dR  0  0]
    [ 0 dG  0]
    [ 0  0 dB]

Then you only need 3 known colors and associated image patches.

Perhaps, instead, the transform ADD or SUBTRACTS color (instead of, or in addition to, filtering it).  Or, worse, somehow produces cross-talk between the R,G,B channels.  Then, I would try (warning - this is probably overkill):

I = [Ri Gi Bi 1]
K = [Rk Gk Bk 1]
T = [a b c d]
    [e f g h]
    [i j k l]
    [m n o p]

Then, you might need 16 known colors (oops - you probably don’t have that many)

But, it might turn out to be as simple as:

T = [dR  0   0 0]
    [ 0 dG   0 0]
    [ 0  0  dB 0]
    [aR  aG aB 0]

Which would require 6 known colors.  (again, I haven’t been careful about orienting the color vectors - fix as needed).

Note that careful selection of the known colors might allow you to use fewer - but you’ve already taken the pictures, so that’s probably out.

Sorry I can’t be more specific.  I hope this helps.



--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.




> On Feb 17, 2016, at 10:19 , klesneski <[hidden email]> wrote:
>
> Hi everyone,
> I am doing some analyses of tissue color of corals that I took with an
> underwater camera. I am trying to see if there are differences in tissue
> color among colonies. My idea is to use the color histograms of the selected
> colonies. In each image, I have a color standard card, placed next to the
> coral colony. One of the reasons why we include this card is because red
> light is attenuated with depth, so objects and images appear more blue the
> deeper you are, and the coral colonies are all at different depths. We know
> the RBG values of the color on the card. I am wondering if anyone has
> experience or advice on how I could use this color standard card in ImageJ
> to perform a sort of correction before using color histograms?
> Many thanks,
> KL
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Color-Correction-for-Underwater-Photos-tp5015660.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
|

Re: Color Correction for Underwater Photos

Joel Sheffield
In reply to this post by klesneski
Hi,

Here's a somewhat kludgy approach that you might use.  Several years ago, I
presented an introduction to ImageJ to the Microscopy Society of America.
In that presentation, http://imagej.nih.gov/ij/docs/examples/IJ-M&M08.ppt,
I included a method of color correction of images based on separation of
RGB images and manipulation of the separated images to modify the color
balance.  Check slides 20-21 in the powerpoint.  It's not a solution, but
more of a suggestion of a strategy.  There may be plug-ins that do that
more directly.

Joel



Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
URL:  *http://tinyurl.com/khbouft <http://tinyurl.com/khbouft>*

On Wed, Feb 17, 2016 at 11:19 AM, klesneski <[hidden email]> wrote:

> Hi everyone,
> I am doing some analyses of tissue color of corals that I took with an
> underwater camera. I am trying to see if there are differences in tissue
> color among colonies. My idea is to use the color histograms of the
> selected
> colonies. In each image, I have a color standard card, placed next to the
> coral colony. One of the reasons why we include this card is because red
> light is attenuated with depth, so objects and images appear more blue the
> deeper you are, and the coral colonies are all at different depths. We know
> the RBG values of the color on the card. I am wondering if anyone has
> experience or advice on how I could use this color standard card in ImageJ
> to perform a sort of correction before using color histograms?
> Many thanks,
> KL
>
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Color-Correction-for-Underwater-Photos-tp5015660.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
|

Re: Color Correction for Underwater Photos

John Clark-2
In reply to this post by klesneski
Only on rare occasions tune into ImageJ issues, as I’m not working in image processing any more…

But… there is in ordinary camera work, either stills or motion pictures, where one shoots some color chart with a certain lighting condition, in order to generate a LUT for ‘correcting’ due to color casts of light.

Photoshop is abysmal for this. For some reason ‘still’ photographers don’t seem to typically do this… they tend to select a ‘lighting’ option on their camera Sun, Tungsten, Florescent, Cloudy… etc. and leave it at that.
If there is any residual cast, they ‘correct’ on the fly using photshop or these days Lightroom widgetry.

In the motion picture world there is a better understanding of this, but even so, creating a custom LUT is sort of a pain. The only tool I’ve found where it is ‘dead simple’, is the Davinci Resolve package from Blackmagic Designs.

The ‘pro’ package is expensive… but fortunately they have a ‘free’ version which has this correction capability.

You could load ‘stills’ in as video clips, use the LUT tool to analyze your chart and it would then develop the custom values required… provided you used one of several industry standard charts.

I use a chart called “Spyder Color Checkr”, but there is support for another chart called X-rite, from X-rite Photo.

Here is a table of ‘chart colors’ to ‘R,G,B’ values:

http://xritephoto.com/ph_product_overview.aspx?ID=824&Action=Support&SupportID=5159

One would have to manually place a window over a color swatch, adjust gain, hue, saturation, to achieve that color… like wise for several others… Having never done this by hand, I don’t know how tedious or ‘circular’ this
would be, but at some point one should be able to ‘dial out’ the bluish cast of the scattered light at some depth.


John Clark.


On Feb 17, 2016, at 8:19 AM, klesneski <[hidden email]> wrote:

> Hi everyone,
> I am doing some analyses of tissue color of corals that I took with an
> underwater camera. I am trying to see if there are differences in tissue
> color among colonies. My idea is to use the color histograms of the selected
> colonies. In each image, I have a color standard card, placed next to the
> coral colony. One of the reasons why we include this card is because red
> light is attenuated with depth, so objects and images appear more blue the
> deeper you are, and the coral colonies are all at different depths. We know
> the RBG values of the color on the card. I am wondering if anyone has
> experience or advice on how I could use this color standard card in ImageJ
> to perform a sort of correction before using color histograms?
> Many thanks,
> KL
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Color-Correction-for-Underwater-Photos-tp5015660.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
|

Re: "Swap Quadrants" missing

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Herbie
> =On Feb 17, 2016, at 12:15 PM, Herbie <[hidden email]> wrote:
>
> Dear Wayne, dear FFT-users,
>
> evidently ImageJ's functionality "Swap Quadrants" has gone. It is still present with 1.49v and perhaps earlier versions of 1.50.
>
> Is there some reason for this and will it be absent in the future?
>
> Some of my macros are now broken and I should like to know whether I must code this functionality myself -- which isn't difficult but…

This v1.50f regression is fixed in the latest ImageJ daily build (1.50h2).

-wayne

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

Re: "Swap Quadrants" missing

Herbie
Dear Wayne,

thank you very much for--fast as always--fixing the glitch!

All the very best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Am 18.02.16 um 08:49 schrieb Rasband, Wayne (NIH/NIMH) [E]:

>> =On Feb 17, 2016, at 12:15 PM, Herbie <[hidden email]> wrote:
>>
>> Dear Wayne, dear FFT-users,
>>
>> evidently ImageJ's functionality "Swap Quadrants" has gone. It is
>> still present with 1.49v and perhaps earlier versions of 1.50.
>>
>> Is there some reason for this and will it be absent in the future?
>>
>> Some of my macros are now broken and I should like to know whether
>> I must code this functionality myself -- which isn't difficult
>> but…
>
> This v1.50f regression is fixed in the latest ImageJ daily build
> (1.50h2).
>
> -wayne
>
> -- 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: Color Correction for Underwater Photos

Gabriel Landini
In reply to this post by klesneski
On Wednesday 17 Feb 2016 08:19:48 klesneski wrote:
> I am wondering if anyone has
> experience or advice on how I could use this color standard card in ImageJ
> to perform a sort of correction before using color histograms?

Not sure it will help, but have you seen this?:
http://imagejdocu.tudor.lu/doku.php?id=plugin:color:chart_white_balance:start

Regards

Gabriel

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

Re: Color Correction for Underwater Photos

Jerry (Gerald) Sedgewick
In reply to this post by John Clark-2
For getting accurate color I would follow methods used in the paint,
textile, photography, graphic arts, and a host of other industries. These
have been developed by color scientists with greater degrees of accuracy.
Rather than stay in RGB color space, colors are re-mapped in three
dimensional XYZ space.

This requires that you use a color standard such as the x-rite passport
chart and then calibrate colors to that standard. It's best if you work with
a RAW image, such as the those created by consumer cameras like those made
by Canon, Nikon, etc. In that instance you have options for software, but
the typical method is to use the Camera Raw program bundled with Photoshop.
You create a profile in the x-rite software, and then apply the profile in
the Camera Raw program. From there you can analyze image in Image J if you
wish. I suspect you're looking at changes in color. You may want to consider
measuring as they do in the color science world by looking at Delta E for
color variation.

This will get you 90 percent of the way there. Coral has specific reflection
properties that would require a color chart specifically made for Coral in
water. You can go one step further to develop your own profile by inviting
coral experts to weigh in on color just as was once done to develop the
means to assign numbers to color (LAB colors). I've done this for color of a
type of metal.

Not that I have a commercial affiliation with Adobe or X-rite, but your
application requires the right tool. Photoshop CC can be "rented" for about
10 dollars a month. In that program you open the accompanying program
Bridge, and then in Bridge you open images in Camera Raw to apply the
profile from the color chart. I've done several tests and have found this
method to be very consistent and repeatable.

Jerry Sedgewick



-----Original Message-----
From: John Clark
Sent: Wednesday, February 17, 2016 4:08 PM
To: [hidden email]
Subject: Re: Color Correction for Underwater Photos

Only on rare occasions tune into ImageJ issues, as I’m not working in image
processing any more…

But… there is in ordinary camera work, either stills or motion pictures,
where one shoots some color chart with a certain lighting condition, in
order to generate a LUT for ‘correcting’ due to color casts of light.

Photoshop is abysmal for this. For some reason ‘still’ photographers don’t
seem to typically do this… they tend to select a ‘lighting’ option on their
camera Sun, Tungsten, Florescent, Cloudy… etc. and leave it at that.
If there is any residual cast, they ‘correct’ on the fly using photshop or
these days Lightroom widgetry.

In the motion picture world there is a better understanding of this, but
even so, creating a custom LUT is sort of a pain. The only tool I’ve found
where it is ‘dead simple’, is the Davinci Resolve package from Blackmagic
Designs.

The ‘pro’ package is expensive… but fortunately they have a ‘free’ version
which has this correction capability.

You could load ‘stills’ in as video clips, use the LUT tool to analyze your
chart and it would then develop the custom values required… provided you
used one of several industry standard charts.

I use a chart called “Spyder Color Checkr”, but there is support for another
chart called X-rite, from X-rite Photo.

Here is a table of ‘chart colors’ to ‘R,G,B’ values:

http://xritephoto.com/ph_product_overview.aspx?ID=824&Action=Support&SupportID=5159

One would have to manually place a window over a color swatch, adjust gain,
hue, saturation, to achieve that color… like wise for several others… Having
never done this by hand, I don’t know how tedious or ‘circular’ this
would be, but at some point one should be able to ‘dial out’ the bluish cast
of the scattered light at some depth.


John Clark.


On Feb 17, 2016, at 8:19 AM, klesneski <[hidden email]> wrote:

> Hi everyone,
> I am doing some analyses of tissue color of corals that I took with an
> underwater camera. I am trying to see if there are differences in tissue
> color among colonies. My idea is to use the color histograms of the
> selected
> colonies. In each image, I have a color standard card, placed next to the
> coral colony. One of the reasons why we include this card is because red
> light is attenuated with depth, so objects and images appear more blue the
> deeper you are, and the coral colonies are all at different depths. We
> know
> the RBG values of the color on the card. I am wondering if anyone has
> experience or advice on how I could use this color standard card in ImageJ
> to perform a sort of correction before using color histograms?
> Many thanks,
> KL
>
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Color-Correction-for-Underwater-Photos-tp5015660.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 

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

Re: Color Correction for Underwater Photos

klesneski
In reply to this post by klesneski
Thanks for all the suggestions - I have a lot to look into!