Author Topic: Why in the world...  (Read 9383 times)

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Why in the world...
« on: 2010 November 08 11:17:25 »
Ok, I know I have asked this many times, but this is still happening.
Look at the screenshots below: one is taken in PI and the other in Safari. Why do my images look different? In PI they look ok, but they dont in Safari.




Offline Philip de Louraille

  • PixInsight Addict
  • ***
  • Posts: 289
Re: Why in the world...
« Reply #1 on: 2010 November 08 12:34:10 »
Well... looking at them with Chrome, the difference between them (beside the cropping... :-p)  is very small! Even looking through Safari. Maybe the top one is a tad bit lighter and "greyer"? It seems the bottom one has a shade of green/brown but being a gray-scale image I must be seeing things...
To sum, I am not sure I see what you see.

Just added this: In the Preferences... | Extensions, do you have any added such extensions? If so, can you disable them and check?
Philip de Louraille

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Why in the world...
« Reply #2 on: 2010 November 08 12:41:27 »
Pde-louraille,
thank you for looking at this.

The top one is darker and way noisier. The Screenshot is taken within Safari.
The bottom one is the way I want it to display, and it is taken through Pinxinsight.


Where is the Extension at? I can't find it in PI.

« Last Edit: 2010 November 08 12:48:11 by Emanuele »

Offline Philip de Louraille

  • PixInsight Addict
  • ***
  • Posts: 289
Re: Why in the world...
« Reply #3 on: 2010 November 08 12:46:55 »
The extension tab I mention is in Safari.
Philip de Louraille

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Why in the world...
« Reply #4 on: 2010 November 08 12:49:27 »
No extension added in Safari...
« Last Edit: 2010 November 08 13:04:21 by Emanuele »

Offline sigurd

  • Newcomer
  • Posts: 35
    • The Lambda Conspiracy
Re: Why in the world...
« Reply #5 on: 2010 November 08 14:41:10 »
They pretty much look the same to me as well. Since the crop isn't identical I can't really judge brightness too well (it's extremely close). I'm using OmniWeb (uses the same engine as Safari).

-esy
”My punctuality is well known. When The Revolution takes place, I'll be late, and I'll be shot as a traitor.”

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Why in the world...
« Reply #6 on: 2010 November 08 14:57:16 »
Here's a different crop from a different picture.
Hope you guys can see better now.

Can you see that the darker crop is blotchier?
While the other is very smooth (taken within PI)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Why in the world...
« Reply #7 on: 2010 November 08 15:33:53 »
Hi Emanuele,

The first screenshot is somewhat brighter. I don't think it's more blotched; it's just that a brighter background makes things more easily visible.

The first question is: have you embedded an ICC profile in your image? Remember that for web deployment, the only safe practice with all browsers is to never embed any profiles, not even the sRGB profile.

On the other hand, keep in mind that each web browser is different and uses different rendering engines, and there are no standardized implementations. This means that there is absolutely no guarantee that any given image is going to be seen equally on all browsers. This is particularly true for images that embed color profiles (on browsers that support them, as Firefox and Safari), due to substantial differences in the color management engines.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Why in the world...
« Reply #8 on: 2010 November 08 16:09:15 »
Thanks Juan for stepping in! :)
I followed carefully the instructions you gave on web deployment. I did not embed any profile in the images.
The just appear darker and noisier, when viewed outside of PI. Even if I open them in Photoshop, they appear darker and noisier.
I have no clue how to fix this.

Juan maybe I could send you an image and you can to open it in PI and Photoshop at the same time and see if it does the same to you?

Offline sigurd

  • Newcomer
  • Posts: 35
    • The Lambda Conspiracy
Re: Why in the world...
« Reply #9 on: 2010 November 08 23:37:47 »
In your later post the second one looks "blotchier". But I think that is just because the first cap looks a little tiny bit brighter. I think the blotchiness is actually just a difference in gamma, which ever so slightly increases the saturation of the second cap, making the noise more contasty, not in the picture itself (I presume them to both be caps of the same JPEG? Now why they should appear different on the same screen is odd. Is it different if you view it in Preview?

-esy
”My punctuality is well known. When The Revolution takes place, I'll be late, and I'll be shot as a traitor.”

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Why in the world...
« Reply #10 on: 2010 November 09 00:36:04 »
Hi Emanuele,

Quote
Juan maybe I could send you an image

Sure, upload it anywhere and I'll be glad to diagnose potential color management problems.

But I need to know something more about your color management workflow:

- What is your monitor profile, as reported by PixInsight on the ColorManagementSetup tool.

If your monitor profile is not sRGB, then remember that you must convert pixel data numerically to sRGB (with ICCProfileTransformation) before writing a JPEG or PNG image for web deployment, then save the file without embedding an ICC profile.

The goal is to have all pixel values meaningful in the sRGB space, which is the default color space on the WWW, but preventing additional ICC profile transformations made by browsers.

Quote
and you can to open it in PI and Photoshop at the same time

That's going to be impossible as I don't have such thing installed on any of my machines. Fortunately, there are better alternatives for counter-testing color management routines :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Why in the world...
« Reply #11 on: 2010 November 09 14:25:47 »
OK, I know what's happening. The problem is that you have converted your image to the sRGB V4 beta profile, which you're using also as your default profile in PixInsight. The sRGB V4 profile is not identical to the sRGB IEC61966-2.1 profile, which is the web standard. The difference is small, but causes visible changes when the images are reproduced on web browsers, with or without color management support.

I have made a small tutorial to describe the correct color management workflow that will guarantee consistent results for web deplyment.

First I have selected the sRGB V4 profile as my default profile for both RGB and grayscale images. I've done this to reproduce your working environment, so your FITS processed image can be correctly reproduced on my screen. In other words, I want to see exactly what you see on your computer.


On the screenshot above, you can see both your FITS image and the JPEG version you made for the web. After setting the sRGB V4 profile as my default, there's no difference between both images, as expected.

The next screenshot shows how I have converted the FITS image to the standard sRGB IEC61966-2.1 profile. This is the profile --and not the sRGB V4 profile-- that all web browsers use as the default standard profile for reproduction of graphical contents on the WWW.


If you look carefully at both images, you'll see now a small difference. The FITS image, after conversion to sRGB IEC61966-2.1, is slightly more contrasted (the background is a bit darker). This can be seen more accurately on the next screenshot.


Note that the image after conversion to sRGB IEC61966-2.1 (the image at the right hand side) is slightly darker (actually it is a bit more contrasted) than the original image before conversion, which was referred to the sRGB V4 profile.

The explanation of why this happens is a bit technical; skip it if you are not interested. To perform an ICC profile transformation of a grayscale image using a RGB profile, the image must be converted to the RGB color space first. This is as easy as just copying the original gray channel to the red, green and blue channels. After the ICC color space transformation, the image must be converted back to the grayscale space. The RGB->grayscale conversion consists of computing the L* (lightness) component of the CIE L*a*b* color space. This is carried out in the RGB working space (RGBWS) of the image. Since the default RGBWS is the sRGB IEC61966-2.1 space in PixInsight, there is a small difference because the original image was referred to sRGB V4, not to sRGB IEC61966-2.1.

If instead of sRGB V4 you were using sRGB IEC61966-2.1 as your default profile, this change would not exist when you convert grayscale images: the image would look exactly the same before and after ICCProfileTransformation. Actually, you wouldn't need any ICC profile transformation at all in this case, as your working color space would be the same as the target space.

The next step is writing the image to disk in JPEG format. As this JPEG image is intended for web deployment, I have not embedded an ICC profile. Now we have a problem: since the default ICC profile is sRGB V4 in PixInsight (see the first screenshot above), if we load the JPEG image we won't see it correctly represented on the screen. This happens because the JPEG image is in the sRGB IEC61966-2.1 space, but it does not embed a profile, so there's no way to interpret its pixel values correctly.

So before loading the JPEG image, we'll reset the default profiles to sRGB IEC61966-2.1, as shown on the following screenshot.


See that the JPEG image looks perfectly now. It has no profile embedded, but our default profile is correct to interpret its pixel values. At this point, PixInsight is acting just as a normal web browser, which expects sRGB IEC61966-2.1 by default.

Finally, let's load the JPEG image in Safari and Firefox (up-to-date versions). Both browsers are working with default settings:


Can you see any difference? Thanks to the correct use of the standard sRGB IEC61966-2.1 profile, we have now achieved consistent results.

So the bottom line is: don't use the sRGB V4 beta profile, or other variants of sRGB. Use the standard sRGB IEC61966-2.1 profile and you'll have no problems.

As a bonus, I have played a little with wavelet-based noise reduction, this time on my main Linux workstation. The noise reduction routines implemented in the ATrousWaveletTransform tool are very powerful and accurate, and have the important advantage that they can be used with both linear and nonlinear images.

This is your image before noise reduction:


And here you have it after noise reduction applied to the first three wavelet layers:


All significant structures have been preserved and the image looks much better without noise, in my opinion. Hope this will help you.
« Last Edit: 2010 November 09 14:30:49 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Why in the world...
« Reply #12 on: 2010 November 10 01:36:14 »
Juan,

I really don't know how to thank you for this wonderful explanation and most importantly for taking the time and helping me out with this. :) I know understand completely. I was working with the sRGB v4 because that is the new one that has been released.
I know have downloaded the sRGB 2.1 and I see there are two versions of it: one is Black scaled and the other one is NOT Black Scaled. I downloaded the BlackScaled one - hope that is the right one to use.

Also thank you for the bonus! I will carry out the NoiseReduction in ATWT. :)

I really, really appreciate your kindness and help!

Emanuele