IPB

Welcome Guest ( Log In | Register )

Processing VIMS cubes, An attempt at "true" color
ugordan
post Sep 10 2006, 07:51 PM
Post #1


Senior Member
****

Group: Members
Posts: 3652
Joined: 1-October 05
From: Croatia
Member No.: 523



Right, a suggestion I made here in another topic made me wonder why not try that myself. A bunch of data was sitting on the PDS, after all. After a hassle figuring out just how the image cubes are organized and trying to read them, finally I was able to produce some results. This is all very rough work, can be considered first-iteration only and not particularly accurate.
Basically, I used the cubes to extract the visible spectrum in the 380-780 nanometer range which was then input to color matching code I found here by Andrew T. Young.
The code integrates over 40 10-nm steps to produce CIE XYZ color components. I then converted these to RGB values.

I'm aware of at least three inaccuracies in my code as of yet: one is the above sampled code apparently uses Illuminant C as the light source, not true solar spectra so the color turns out bluish (has a temp. of 9300 K instead of 6500 K, AFAIK). I tried to compensate at the moment by changing the final RGB white balance, but this is probably an inaccurate way to go. Another inaccuracy is I don't do bias removal from the cubes. This likely affects the outcome. Also, I don't use the precise wavelengths the code requires, but use the closest one in the cube. I intend to fix this by interpolating between nearest wavelengths.

All images are enlarged 4x.

Attached Image
Attached Image
Attached Image

The leftmost image is a 4-cube mosaic. The colors in all four frames turned out identical which gives me at least some confidence. The image in the middle shows Dione's disc creeping in front of Saturn. Dione's disc appears elongated probably because as the lines were readout, it moved considerably in its orbit. The rightmost image shows a very overexposed Saturn image, the part below the ring shadows got overexposed. From what I've seen browsing through the PDS, a lot of the cubes are badly overexposed at some wavelengths.

Here's a couple of Jupiter images. I'm not very satisfied with them as they seem to look somewhat greenish, but overall the color looks believeable:
Attached Image

Attached Image


Lastly, two Titan composites. They turned out way more reddish than I thought they would.
Attached Image
Attached Image


It'll be interesting to see how much the results will change once I do a more proper processing pipeline working.


--------------------
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
Guest_DonPMitchell_*
post Sep 14 2006, 04:07 AM
Post #2





Guests






Very good. Gamma 2.2 is technically what should be done, to get the image we see on the monitor to be proportional to actual scene radiance. What is the camera's radometric response function like? Are the pixel values in the VIMS file logarithmic?

As for dark current, making the background be 0 black should be right. But check the camera response. Subtracting background before or after linearization of the pixel values gives a totally different result if the camera response is nonlinear (and it probably is).

I'm not sure about the Illuminant C business. I'm not sure I understand what you did. The sRGB matrix assumes a white point of D65, which all new monitors are supposed to do. Don't think about correcting the color on the camera end, just concentrate on linearizing its response. Just plug those spectral radiance values into the XYZ integrals, convert to RGB by matrix multiple, and do gamma of 2.2. And you should see what the camera saw then!
Go to the top of the page
 
+Quote Post
Malmer
post Sep 14 2006, 09:30 AM
Post #3


Member
***

Group: Members
Posts: 241
Joined: 22-August 05
From: Stockholm Sweden
Member No.: 468



QUOTE (DonPMitchell @ Sep 14 2006, 06:07 AM) *
Very good. Gamma 2.2 is technically what should be done, to get the image we see on the monitor to be proportional to actual scene radiance. What is the camera's radometric response function like? Are the pixel values in the VIMS file logarithmic?



correct me if im wrong but: sRGB does not use a 2.2 gamma. it uses its own custom crve that is reasonably close to gamma 2.2...

Attached Image


the red curve is gamma 2.2
the green is sRGB:s "gamma" curve
the blue is just linear.

The difference is mostly visible in the dark regions.

/M
Go to the top of the page
 
+Quote Post
Malmer
post Sep 14 2006, 09:43 AM
Post #4


Member
***

Group: Members
Posts: 241
Joined: 22-August 05
From: Stockholm Sweden
Member No.: 468



The pixels in the ISS images are not linearly saved. (the sensor is resonably linear but they dont save the data that way) You have to use a custom lookuptable to linearize those images. Maybe thats why you get strange results with the VIMS too. It looks to me as you are treating the raw data as linear an i dont think its saved that way. i think they save it almost logaritmically to increase dynamic range) thats why you get an image that looks as though it has alredy had an gamma correction applied to it. (i might be wrong here...)

here is the ISS data converion table.
http://pds-rings.seti.org/cassini/iss/COIS...ppf/12-8-12.pdf
Im not sure if they use something similar on the VIMS data but my guess is that they do.

ISS calibration report:
http://pds-rings.seti.org/cassini/iss/COIS...OCUMENT/REPORT/


info and software for calibrating VIMS:
http://pds-rings.seti.org/cassini/vims/

/M
Go to the top of the page
 
+Quote Post
ugordan
post Sep 14 2006, 10:47 AM
Post #5


Senior Member
****

Group: Members
Posts: 3652
Joined: 1-October 05
From: Croatia
Member No.: 523



I am very well aware of the ISS data specifics. While it is mostly the case a LUT was used to convert linear (more or less, barring uneven bit weighting) 12 bit DNs to 8 bit, approximately square root encoded numbers, it is not always the case as you suggest. Sometimes full 12 bits were returned. The third case being the 12->8 bit conversion by returning only the lower 8 bits. This is also linear. In any case, my ISS code takes care of that.

However, I found absolutely no mention anywhere of lookup tables used in the VIMS instrument, in fact only mentions of lossless 12 bit encoders. The calibration code I checked doesn't use such conversions anywhere. It would be logical to save it via a square root LUT if they were downsampling the data, but all points to that not being the case.
The raw data is linear which can be seen from the calibration steps used in the provided code:

1. subtract dark background
2. divide by flatfield
3. divide by solar spectrum
4. multiply by detector performance as function of wavelength
5. convert into radiometrically correct units (optional)

Steps 1-4 should already yield accurate colors since I'm not interested in exact units.


--------------------
Go to the top of the page
 
+Quote Post
Malmer
post Sep 15 2006, 12:50 PM
Post #6


Member
***

Group: Members
Posts: 241
Joined: 22-August 05
From: Stockholm Sweden
Member No.: 468



QUOTE (ugordan @ Sep 14 2006, 12:47 PM) *
I am very well aware of the ISS data specifics. While it is mostly the case a LUT was used to convert linear (more or less, barring uneven bit weighting) 12 bit DNs to 8 bit, approximately square root encoded numbers, it is not always the case as you suggest. Sometimes full 12 bits were returned. The third case being the 12->8 bit conversion by returning only the lower 8 bits. This is also linear. In any case, my ISS code takes care of that.

However, I found absolutely no mention anywhere of lookup tables used in the VIMS instrument, in fact only mentions of lossless 12 bit encoders. The calibration code I checked doesn't use such conversions anywhere. It would be logical to save it via a square root LUT if they were downsampling the data, but all points to that not being the case.
The raw data is linear which can be seen from the calibration steps used in the provided code:

1. subtract dark background
2. divide by flatfield
3. divide by solar spectrum
4. multiply by detector performance as function of wavelength
5. convert into radiometrically correct units (optional)

Steps 1-4 should already yield accurate colors since I'm not interested in exact units.



I stand corrected.

I guess i should have been a bit more clear with the fact that I was speculating...

While im at it, here is another speculation that might or might not have scientific grounds;

One reason that could make the images look washed out in gamma 2.2 is that the solar intensity at saturn is only 1% of the intensity here on earth. So maybe the images on your screen are actually brighter than the real thing. And since the eye has a logatitmic response the colors wash out.

So maybe you should either calibrate the images to the actual intensity of your screen or just use an arbitrary gamma that looks good. I would go for the "looks good option"



Speculativly yours
/Mattias
Go to the top of the page
 
+Quote Post
ugordan
post Sep 15 2006, 06:26 PM
Post #7


Senior Member
****

Group: Members
Posts: 3652
Joined: 1-October 05
From: Croatia
Member No.: 523



QUOTE (Malmer @ Sep 15 2006, 01:50 PM) *
One reason that could make the images look washed out in gamma 2.2 is that the solar intensity at saturn is only 1% of the intensity here on earth. So maybe the images on your screen are actually brighter than the real thing. And since the eye has a logatitmic response the colors wash out.

This could very well be true. But, since using absolute brightness here on Earth, it wouldn't be very useful as everything would turn out pretty dim on a computer screen. It would be interesting, though, to know how the apparent brightness would change once the eye got accustomed to low light levels at Saturn (if you were there, for example).
I guess we can settle the point on this whole matter being too subjective to quantify in a scientifically meaningful way. My primary goal was to get the "correct" hue of objects, principally Saturn's disc (more importantly the rings as I was wondering whether they're as colorful as ISS would lead to believe) and Titan, Iapetus and Hyperion. Pretty much anything there is gray anyway. Brightness was of lesser importance as that sort of thing is a hard beast to accurately "tame".


--------------------
Go to the top of the page
 
+Quote Post
Malmer
post Sep 15 2006, 11:40 PM
Post #8


Member
***

Group: Members
Posts: 241
Joined: 22-August 05
From: Stockholm Sweden
Member No.: 468



it would be fun to paint spheres in the colors you have derived and put them in a dark room with a dim light and just wait and see... smile.gif

/M
Go to the top of the page
 
+Quote Post

Posts in this topic
- ugordan   Processing VIMS cubes   Sep 10 2006, 07:51 PM
- - Malmer   its a really great "realitycheck" for th...   Sep 12 2006, 09:48 PM
|- - ugordan   QUOTE (Malmer @ Sep 12 2006, 10:48 PM) it...   Sep 13 2006, 08:56 AM
|- - Malmer   QUOTE (ugordan @ Sep 13 2006, 10:56 AM) I...   Sep 13 2006, 03:04 PM
- - dilo   Very nice work, gordan... now we see the colors...   Sep 12 2006, 10:21 PM
|- - ugordan   QUOTE (dilo @ Sep 12 2006, 11:21 PM) To m...   Sep 13 2006, 06:56 AM
|- - dilo   QUOTE (ugordan @ Sep 13 2006, 06:56 AM) T...   Sep 13 2006, 04:17 PM
- - CAP-Team   It looks as if the colors match Voyager's colo...   Sep 13 2006, 02:16 PM
- - Malmer   QUOTE (ugordan @ Sep 10 2006, 09:51 PM) I...   Sep 13 2006, 02:49 PM
- - DonPMitchell   How do you convert XYZ to RGB? Are you making sRG...   Sep 13 2006, 04:55 PM
|- - ugordan   Yes, I'm using that XYZ to RGB matrix. I had t...   Sep 13 2006, 08:33 PM
- - DonPMitchell   Very good. Gamma 2.2 is technically what should b...   Sep 14 2006, 04:07 AM
|- - ugordan   The pixels are linear as far as I know, a 12 bit A...   Sep 14 2006, 07:09 AM
|- - Malmer   QUOTE (DonPMitchell @ Sep 14 2006, 06:07 ...   Sep 14 2006, 09:30 AM
|- - Malmer   The pixels in the ISS images are not linearly save...   Sep 14 2006, 09:43 AM
||- - ugordan   I am very well aware of the ISS data specifics. Wh...   Sep 14 2006, 10:47 AM
||- - Malmer   QUOTE (ugordan @ Sep 14 2006, 12:47 PM) I...   Sep 15 2006, 12:50 PM
||- - ugordan   QUOTE (Malmer @ Sep 15 2006, 01:50 PM) On...   Sep 15 2006, 06:26 PM
||- - Malmer   it would be fun to paint spheres in the colors you...   Sep 15 2006, 11:40 PM
|- - DonPMitchell   QUOTE (Malmer @ Sep 14 2006, 02:30 AM) co...   Sep 14 2006, 03:39 PM
|- - Malmer   I think the strange piecewise funktion has its ben...   Sep 15 2006, 12:33 PM
|- - ugordan   QUOTE (Malmer @ Sep 15 2006, 01:33 PM) I ...   Sep 15 2006, 06:10 PM
- - DonPMitchell   One concept is to make an image that resembles wha...   Sep 16 2006, 01:56 AM
|- - Malmer   QUOTE (DonPMitchell @ Sep 16 2006, 03:56 ...   Sep 16 2006, 09:42 AM
|- - ugordan   A mosaic of Saturn's northern latitudes: App...   Sep 16 2006, 03:39 PM
||- - john_s   Just checked out your gallery, ugordan- your proce...   Sep 16 2006, 04:54 PM
||- - ugordan   QUOTE (john_s @ Sep 16 2006, 05:54 PM) Ju...   Sep 16 2006, 05:56 PM
|- - DonPMitchell   QUOTE (Malmer @ Sep 16 2006, 02:42 AM) so...   Sep 16 2006, 06:47 PM
|- - Malmer   QUOTE (DonPMitchell @ Sep 16 2006, 08:47 ...   Sep 16 2006, 09:02 PM
- - DonPMitchell   I also really like what you are doing. I hope you...   Sep 16 2006, 07:01 PM
|- - ugordan   QUOTE (DonPMitchell @ Sep 16 2006, 08:01 ...   Sep 16 2006, 09:37 PM
|- - DonPMitchell   QUOTE (ugordan @ Sep 16 2006, 02:37 PM) H...   Sep 17 2006, 04:17 AM
|- - ugordan   A couple of rough Saturn mosaics: The blob in the...   Sep 17 2006, 04:44 PM
|- - Malmer   I think it looks great. Very subtle beautiful colo...   Sep 17 2006, 07:17 PM
|- - ugordan   A few Jupiter images, fixed the greenish hue. It w...   Sep 19 2006, 05:21 PM
|- - Malmer   QUOTE (ugordan @ Sep 19 2006, 07:21 PM) A...   Sep 19 2006, 07:23 PM
|- - ugordan   The vertical stripes (most noticeable is a blue li...   Sep 19 2006, 07:37 PM
|- - Malmer   I guess you have to make an additional flatfield r...   Sep 19 2006, 08:16 PM
||- - ugordan   QUOTE (Malmer @ Sep 19 2006, 09:16 PM) I ...   Sep 20 2006, 07:24 AM
||- - Malmer   it was a typo. i actually ment darkcurrent. mixed ...   Sep 20 2006, 08:48 AM
||- - ugordan   Although the noise stays fixed, it changes intensi...   Sep 20 2006, 09:22 AM
||- - ugordan   Not particularly related to my processing, but her...   Sep 20 2006, 11:34 AM
||- - Malmer   QUOTE (ugordan @ Sep 20 2006, 11:22 AM) W...   Sep 20 2006, 03:23 PM
||- - ugordan   Here are a couple of... hm... questionable(?) resu...   Sep 20 2006, 07:38 PM
|- - tedstryk   Great work! As for the calibration data, it c...   Sep 19 2006, 08:18 PM
- - slinted   UGordon, first off, this is an amazing project you...   Sep 20 2006, 11:00 PM
|- - ugordan   Thanks, Slinted! I'll certainly have a loo...   Sep 21 2006, 07:46 AM
|- - JRehling   QUOTE (ugordan @ Sep 21 2006, 12:46 AM) I...   Sep 21 2006, 06:06 PM
|- - ugordan   JRehling, those are all valid, good points. I said...   Sep 21 2006, 07:16 PM
- - DonPMitchell   It is true that Judd and Vos made improvements to ...   Sep 21 2006, 12:55 PM
|- - ugordan   QUOTE (DonPMitchell @ Sep 21 2006, 01:55 ...   Sep 21 2006, 02:25 PM
- - DonPMitchell   Reflectance is independant of the illuminant. It ...   Sep 21 2006, 02:43 PM
- - DonPMitchell   There's a brown Moon for you, taken by Galil...   Sep 21 2006, 07:03 PM
- - slinted   Good points made by all, Part of my confusion on...   Sep 21 2006, 08:52 PM
|- - ugordan   VIMS cubes, their raw form, capture the brightness...   Sep 21 2006, 09:14 PM
|- - JRehling   QUOTE (slinted @ Sep 21 2006, 01:52 PM) I...   Sep 21 2006, 10:32 PM
|- - ugordan   QUOTE (JRehling @ Sep 21 2006, 11:32 PM) ...   Sep 22 2006, 08:07 AM
|- - ugordan   I can understand the reasoning of not touching the...   Sep 22 2006, 06:41 PM
|- - DonPMitchell   QUOTE (ugordan @ Sep 22 2006, 11:41 AM) Y...   Sep 22 2006, 07:06 PM
||- - ugordan   Be my guest. For starters, here's a dump of th...   Sep 22 2006, 07:45 PM
|- - tedstryk   For Jupiter and Saturn, I am biased toward the rig...   Sep 22 2006, 09:12 PM
|- - ugordan   I've been experimenting with cleaning up the V...   Sep 25 2006, 08:02 PM
|- - ugordan   Sure enough, I got a response from the VIMS team. ...   Sep 26 2006, 07:33 AM
- - edstrick   It probably boils down to too-much-to-do, not-enou...   Sep 26 2006, 09:49 AM
|- - ugordan   To reiterate what you said, on my asking if update...   Sep 26 2006, 02:27 PM
|- - ugordan   Here are a few quick results from the new PDS rele...   Oct 4 2006, 05:55 PM
- - Indian3000   First test to process VIMS cube ( gamma 2.2 ) v1...   Oct 11 2006, 11:53 AM
- - elakdawalla   Hey folks, the Rings Node has generated preview im...   Feb 18 2011, 10:20 PM
- - ngunn   A superb piece of work at TPS but we have to have ...   Apr 28 2011, 09:27 PM


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 31st October 2024 - 10:45 PM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and copyright.

OPINIONS AND MODERATION
Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators.
SUPPORT THE FORUM
Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member.