Processing VIMS cubes, An attempt at "true" color |
Processing VIMS cubes, An attempt at "true" color |
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. 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: Lastly, two Titan composites. They turned out way more reddish than I thought they would. It'll be interesting to see how much the results will change once I do a more proper processing pipeline working. -------------------- |
|||||||
|
||||||||
Guest_DonPMitchell_* |
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! |
|
|
Sep 14 2006, 09:30 AM
Post
#3
|
||
Member Group: Members Posts: 241 Joined: 22-August 05 From: Stockholm Sweden Member No.: 468 |
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... 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 |
|
|
||
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 |
|
|
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. -------------------- |
|
|
Sep 15 2006, 12:50 PM
Post
#6
|
|
Member Group: Members Posts: 241 Joined: 22-August 05 From: Stockholm Sweden Member No.: 468 |
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 |
|
|
Sep 15 2006, 06:26 PM
Post
#7
|
|
Senior Member Group: Members Posts: 3652 Joined: 1-October 05 From: Croatia Member No.: 523 |
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". -------------------- |
|
|
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...
/M |
|
|
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 |
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. |