kwalsh wrote:
I don't know why this is in this thread, but I think you've already made the point that for any practical implementation moving from sRGB to aRGB and visa versa is a lossy process. You say you "can" create a 1 to 1 transformation that is invertible but that is not in fact how any photographically useful rendering intent does it. Such a rendering works great for printing saturated pie charts for presentations but is a disaster with photos. Instead a more lossy process that will not shift unsaturated colors is what should be used and is used in practice. See any book by Fraser or Margulis.
It's in this thread because people were talking about it.
Perceptual rendering is technically lossless, relative rendering is not; seems simple to me and is a fact. We don't usually covert back again, but it's worth knowing only one method is lossless. The conversion from RGB to CMYK or LAB is lossy. For photography both intents are useful and it depends on the photo as to which intent is best. If you contain a lot of out of gamut colours perceptual is best. It is well accepted that moving from a large gamut space to a smaller one perceptual is the best choice. Relative is great when you have few out of gamut colours or moving between similar size gamuts.To say perceptual rendering is a disaster for photographs is ridiculous.
Nill Toulme wrote:
Very helpful, thanks. What I take from this (in part) is that I can convert a RAW to an Adobe RGB tif, then convert that file into an sRGB tif file without losing anything so long as rendering intent is preserved so that the mapping doesn't go astray. Yes?
But if I convert the RAW file initially into the sRGB space, and if it contained some colors that would have been within the Adobe RGB gamut but are outside of sRGB's, then those colors are lost, are they not? And converting that sRGB file to Adobe RGB will not restore them? Or do I still have that wrong?
Nil you can easily see what happens in you RAW converter by changing the colour space. If you have a sunset shot say with a lot of saturated reds, oranges etc and then observe the histogram you'll see that there is a lot of clipping in the sRGB space and none in the ProPhoto space with aRGB showing some clipping.
I think what you are saying is correct, unless you manipulate the image in RAW to fix the clipping in sRGB. Desaturate the reds and lower the WB temperature, contrast etc and you might get an unclipped histogram, but the image will look flat. In PS nothing you do will help much as any contrast enhancements etc will once again lead to clipping. sRGB is not a good option for printed work IMO. aRGB is a better match to printer colour spaces. I'm using WideGamut RGB and have seen no issues in prints yet. Epson printers can print some colours outside the aRGB gamut. Some colour spaces are better than others depending on the photo. If it's tropical beach shot say, you want a space that's strong in blues and green and doesn't matter about reds, for a sunset vice versa.
I should say that if you use a large gamut space, it is very sensible to use a 16 bit mode rather than 8 bit mode to minimise posterization. If now use using a very large gamut space and only using 8 bit mode as you'll have large distances between colours. You''ll see if you have subtle tonal gradations like in a sky or skin that you'll see banding, with 8 bit. Work in 16 bit mode and save you final tiff/jpg for print in 8 bit mode if you like. I save as a maximum quality jpg as again compression in jpg can cause posterization etc if you're not careful.
Pixel Perfect wrote:
It's in this thread because people were talking about it.
Perceptual rendering is technically lossless, relative rendering is not; seems simple to me and is a fact. We don't usually covert back again, but it's worth knowing only one method is lossless. The conversion from RGB to CMYK or LAB is lossy. For photography both intents are useful and it depends on the photo as to which intent is best. If you contain a lot of out of gamut colours perceptual is best. It is well accepted that moving from a large gamut space to a smaller one perceptual is the best choice. Relative is great when you have few out of gamut colours or moving between similar size gamuts.To say perceptual rendering is a disaster for photographs is ridiculous.
First off, apologies - your response seems a bit snippy which I can presume is only because on re-reading mine it seems a bit snippy as well. Didn't mean to get off on the wrong foot. And yes, I read those books.
I was not saying perceptual rendering was stupid, it is in fact a very good choice in some cases as you say. I was talking of the mythical 1 to 1 lossless invertible translation - which perceptual rendering very definitely is not. Only one such thing exists in a quantized space - it is called "Assign profile" - and we all know what that does. Any other transform will cause loss from quantization even if it maps the entirety of one gamut onto the other. Not only that you can never "reverse" or "invert" a conversion to a smaller gamut using the rendering engine. The rendering engine only moves out of gamut colors into gamut or slightly desaturates colors when moving from a large gamut to a small gamut. Moving the other way, from small to large the rendering engine does nothing - because there is nothing to do - all the colors fit and it just has to recalculate the values relative to the new chromaticities. As you said, this really isn't a big deal because it would be rare to want to convert back - but if you did you wouldn't get your aRGB colors back, you'd just get your sRGB gamut expressed in aRGB chromaticities.
I think your mis-understanding lies in believing that perceptual rendering is a *linear* transform. It is not. It preserves the spacing of the unsaturated colors much more accurately than those of the saturated out of gamut colors when moving from a larger gamut to a smaller gamut. In other words, it isn't linear but has something akin to a gamma curve applied as it moves colors from the large gamut to the small gamut. The exact form of this non-linearity is dependent on the rendering engine itself, but all of them essentially barely move colors that are well within the gamut and move the colors outside the gamut a lot. This non-linear process would be reversible with infinite precision but in a quantized space it is not reversible without incurring rounding errors and missing codes. For instance, if I tried to reverse it from a small gamut that had a fully populated histogram the large gamut result would have gaps (missing-codes) in its histogram.
That said, good luck trying to reverse it, the color engine won't do it for you. In perceptual (or most any other rendering intent) moving from a small gamut to a large gamut does little or nothing - in gamut colors never move or move very little. This is easy to demonstrate in photoshop, make three saturated red, blue and green squares saturated at 255 in aRGB and convert to sRGB via perceptual rendering, then convert back to aRGB via perceptual and you'll discover they are now less than 255...
Anywho, my point was that there isn't any reversible, lossless transformation in moving from one gamut to another in a finite precision space that is typically used. In fact, the only one that maintains a monotonic tonal relationship is assign profile, trival proof using the pigeon hole principle. With that in mind, I did over state the point since in some cases assigning the wrong profile can help things a lot, but that's a more esoteric topic.
And finally, I think I've strayed way the heck away from what Nill actually cares about - which is probably loss of detail - in which case the safest default would be perceptual rendering (as you suggest) unless the image already encompasses only a small gamut in which case relative colormetric deserves a look (which risks loss of detail in out of gamut regions as you also point out).
Oh - and the G9 looks pretty cool - wish it weren't 12MP...
kwalsh wrote:
First off, apologies - your response seems a bit snippy which I can presume is only because on re-reading mine it seems a bit snippy as well. Didn't mean to get off on the wrong foot. And yes, I read those books.
I was not saying perceptual rendering was stupid, it is in fact a very good choice in some cases as you say. I was talking of the mythical 1 to 1 lossless invertible translation - which perceptual rendering very definitely is not. Only one such thing exists in a quantized space - it is called "Assign profile" - and we all know what that does. Any other transform will cause loss from quantization even if it maps the entirety of one gamut onto the other. Not only that you can never "reverse" or "invert" a conversion to a smaller gamut using the rendering engine. The rendering engine only moves out of gamut colors into gamut or slightly desaturates colors when moving from a large gamut to a small gamut. Moving the other way, from small to large the rendering engine does nothing - because there is nothing to do - all the colors fit and it just has to recalculate the values relative to the new chromaticities. As you said, this really isn't a big deal because it would be rare to want to convert back - but if you did you wouldn't get your aRGB colors back, you'd just get your sRGB gamut expressed in aRGB chromaticities.
I think your mis-understanding lies in believing that perceptual rendering is a *linear* transform. It is not. It preserves the spacing of the unsaturated colors much more accurately than those of the saturated out of gamut colors when moving from a larger gamut to a smaller gamut. In other words, it isn't linear but has something akin to a gamma curve applied as it moves colors from the large gamut to the small gamut. The exact form of this non-linearity is dependent on the rendering engine itself, but all of them essentially barely move colors that are well within the gamut and move the colors outside the gamut a lot. This non-linear process would be reversible with infinite precision but in a quantized space it is not reversible without incurring rounding errors and missing codes. For instance, if I tried to reverse it from a small gamut that had a fully populated histogram the large gamut result would have gaps (missing-codes) in its histogram.
That said, good luck trying to reverse it, the color engine won't do it for you. In perceptual (or most any other rendering intent) moving from a small gamut to a large gamut does little or nothing - in gamut colors never move or move very little. This is easy to demonstrate in photoshop, make three saturated red, blue and green squares saturated at 255 in aRGB and convert to sRGB via perceptual rendering, then convert back to aRGB via perceptual and you'll discover they are now less than 255...
Anywho, my point was that there isn't any reversible, lossless transformation in moving from one gamut to another in a finite precision space that is typically used. In fact, the only one that maintains a monotonic tonal relationship is assign profile, trival proof using the pigeon hole principle. With that in mind, I did over state the point since in some cases assigning the wrong profile can help things a lot, but that's a more esoteric topic.
And finally, I think I've strayed way the heck away from what Nill actually cares about - which is probably loss of detail - in which case the safest default would be perceptual rendering (as you suggest) unless the image already encompasses only a small gamut in which case relative colormetric deserves a look (which risks loss of detail in out of gamut regions as you also point out).
Oh - and the G9 looks pretty cool - wish it weren't 12MP...
Ok, I agree the colour engine is the critical step as it does the conversion, but strictly speaking there should be no loss in using perceptual intent. Maybe the real transformation is non-linear, but if colours are being mapped to unique values, the result should be reversible and this is what I have read. It certainly should be a lot better than relative in this regard. The problem may lie in PS using an integer engine so roundoff errors accumulate. In a floating point world the transformation should be essentially lossless.
If you see the histogram from a large gamut space and convert perceptually to a smaller gamut space you'll probably see the reverse, spikes where well separated tones are mapped to such similar values the histogram, counts them as one. Using 16 bit mode will result in less of these spikes and gaps appearing as we well know.
If you use 32bit floating mode such as for a HDR image can you convert between colour spaces and if so does that mean there's a floating point colour engine?
Pixel Perfect wrote:
Ok, I agree the colour engine is the critical step as it does the conversion, but strictly speaking there should be no loss in using perceptual intent. Maybe the real transformation is non-linear, but if colours are being mapped to unique values, the result should be reversible and this is what I have read. It certainly should be a lot better than relative in this regard. The problem may lie in PS using an integer engine so roundoff errors accumulate. In a floating point world the transformation should be essentially lossless.
If you see the histogram from a large gamut space and convert perceptually to a smaller gamut space you'll probably see the reverse, spikes where well separated tones are mapped to such similar values the histogram, counts them as one. Using 16 bit mode will result in less of these spikes and gaps appearing as we well know.
If you use 32bit floating mode such as for a HDR image can you convert between colour spaces and if so does that mean there's a floating point colour engine?...Show more →
Right, it should be reversible if you've got enough precision. You really couldn't use the engine to do the reversal because the engine never expands gamuts, only contracts them, but you could certainly use some other software to reverse the process. Perceptual is one to one, it is just that quantization can screw you up in one sense (if you are a nitpicker) and more importantly the unidirectional nature of the color engine that makes it not practical to reverse.
I don't know about the HDR case, that's a good point, perhaps it is floating point?
Anyway, I think I've dragged this topic so far into points academic that it bears about as much relevance to making pretty pictures as what color lens cap you use. I've probably just made the larger point which you were making clear more opaque to Nill and anyone else who actually wants to know something practical. So enough about about all that.
Perceptual should save you from clipping detail, relative is a reasonable choice if the images gamut isn't big.
Pixel Perfect wrote:
Actually the number of colours in each space is the same. Think about it we use 8 or 16 bit data to represent an RGB value and thus we have have either 255^3 or 65534^3 possible values to fill the space. Adobe RGB is defined to have a wider gamut than is sRGB. That is to say, it uses the numbering scheme available to it to represent a wider range of colors. Not more colors of course since both are limited by the same physical characteristics dictated by three channels of 8 or 16 bits.
Colour space is thus quantized not continuous. If it were then yes aRGB would contain many more colours. ...Show more →
With "more colors" I meant the wider gamut and not the absolute number of colors within the gamut. My point was that there comes a loss with the conversion of (a wide gamut) AdobeRGB image to sRGB because of the "gamut compression". I.e. that it is not a lossless conversion. But I agree, this is really off-topic now...
knweiss wrote:
With "more colors" I meant the wider gamut and not the absolute number of colors within the gamut. My point was that there comes a loss with the conversion of (a wide gamut) AdobeRGB image to sRGB because of the "gamut compression". I.e. that it is not a lossless conversion. But I agree, this is really off-topic now...
Technically it is, it's only lossy on the numerical error front if you use perceptual intent, the gamut compression is not the source of loss; whereas relative intent is lossy even if you had no roundoff error (infinite numerical precision).
I have a Fuji E900 pocket digicam (9 megapixels on a 1/1.6' Fuji sensor), widish 4x zoom lens (32mm) and 14-bit raw. It is really good when my Xti is not around...
ISO800 is nice for an A4 sized print, but ISO1600 is not very good...
too bad G9 has a smaller sensor (1/1.7') with 33% more pixels on it...
I have a Fuji E900 pocket digicam (9 megapixels on a 1/1.6' Fuji sensor), widish 4x zoom lens (32mm) and 14-bit raw. It is really good when my Xti is not around...
ISO800 is nice for an A4 sized print, but ISO1600 is not very good...
too bad G9 has a smaller sensor (1/1.7') with 33% more pixels on it...
go4it wrote:
Why is this bad? Isn't this indicative of a higher pixel density per square centimeter or something - i.e. a sensor capable of capturing an image with finer detail? I ... think ... so.
Rgds,
No, higher pixel density normally means more noise, or more noise reduction, don't know what is worse
the best cameras (like 5D) have low pixel density and thus low noise and high dynamic range.
go4it wrote:
Why is this bad? Isn't this indicative of a higher pixel density per square centimeter or something - i.e. a sensor capable of capturing an image with finer detail? I ... think ... so.
Rgds,
It is actually bad because the higher the pixel density the higher the noise. You can reduce the effect of this noise by binning down (i.e. resampling) to a smaller resolution but because of the lower fill factor of the sensor due to the extra pixel electronics and the fact that these electronics also contribute more noise you will get worse performance than if you had started with a lower pixel density to begin with. This is why dSLR's use rather large pixels, a much better solution for image quality.
Secondly, you don't get finer detail because the lens on the camera is not sharp enough to resolve detail that fine - at "wide" aperatures because of lens imperfections at "small" aperatures due to diffraction. In fact for some of these insane densities the optics are almost diffraction limited at their widest aperature.
So, you put more pixels in which add no new image information but do add more noise so in the end you lose... Right up until your prospective customer enters Best Buy and the retard there tells them, "get this one, its got more megapixels". Marketing and customers like single number metrics even if they are actually a poor or misleading measure.
Ken ... you bring up a good point about diffraction. According to the diffraction calculator on Cambridge Colour ( http://www.cambridgeincolour.com/tutorials/diffraction-photography.htm ) the G9 is diffraction limited by f/5.6. So the max f/4.8 at max FL would be pretty close to the point where diffraction will start to be seen.
Gee whiz, it's *ONLY* a point-n-shoot camera! Does 12-bit or 14-bit REALLY matter?!?!?!
In fact, I'd love to klnow how many people have a fine dSLR - AND a pretty decent P-n-S - and then EVER bother to shoot the P-n-S in RAW mode. 1/4 of 1 percent - if that?
I have a Canon G3 (http://hornerbuck.com/g3.aspx) with which I've taken about 9000 pictures. The G3 seems to improve with age -- certainly the pictures it now delivers are much better than those from five years ago! The G3 processor works with 12 bits to produce a "16 bit" RAW file.
The G9 RAW files seem to be much larger than would be expected by simply proportioning the 12MP G9 file size from the 4MP G3 file size whereas the typical RAW file size from my Canon 20D is about as expected. One reason, I wondered, could it be that the G9 RAW file contains 14 bit information as opposed to 12 bit? Also, I'm hoping for 14 bits of useful information.
I virtually always shoot in RAW mode whether with my 20D or G3. In fact, I so rarely use jpg mode that I almost identify those times off the top of my head. Therefore, I am certain that I have used RAW mode some 95% of the time on my G3. Was this (RAW mode) necessary? Were the photos better? Am I a good photographer or a bad one? Do *I* need RAW whereas other, perhaps better, photographers do not? All these questions have been debated -- and the debate will continue -- with tens of thousands of words (= tens of pictures) for years now. The answer, if there is one, doesn't matter to me. I've experimented with my G3, 20D and a host of P/S non-RAW cameras and concluded that I'll shoot in RAW mode.
I'm just curious about the file size and true bits from the G9 sensor and processor.
(I attempted to reply but somehow it wasn't posted. Here's a second attempt.)
*********************************
go4it wrote:
Gee whiz, it's *ONLY* a point-n-shoot camera! Does 12-bit or 14-bit REALLY matter?!?!?!
In fact, I'd love to klnow how many people have a fine dSLR - AND a pretty decent P-n-S - and then EVER bother to shoot the P-n-S in RAW mode. 1/4 of 1 percent - if that?
**********************************
My reply was:
I have a Canon G3 http://hornerbuck.com/g3.aspx) with which I've taken about 9000 pictures. The G3 seems to improve with age -- certainly the pictures it now delivers are much better than those from five years ago! The G3 processor works with 12 bits to produce a "16 bit" RAW file.
The G9 RAW files seem to be much larger than would be expected by simply proportioning the 12MP G9 file size from the 4MP G3 file size whereas the typical RAW file size from my Canon 20D is about as expected. One reason, I wondered, could it be that the G9 RAW file contains 14 bit information as opposed to 12 bit? Also, I'm hoping for 14 bits of useful information.
I virtually always shoot in RAW mode whether with my 20D or G3. In fact, I so rarely use jpg mode that I almost identify those times off the top of my head. Therefore, I am certain that I have used RAW mode some 95% of the time on my G3. Was this (RAW mode) necessary? Were the photos better? Am I a good photographer or a bad one? Do *I* need RAW whereas other, perhaps better, photographers do not? All these questions have been debated -- and the debate will continue -- with tens of thousands of words (= tens of pictures) for years now. The answer, if there is one, doesn't matter to me. I've experimented with my G3, 20D and a host of P/S non-RAW cameras and concluded that I'll shoot in RAW mode.
I'm just curious about the file size and true bits from the G9 sensor and processor.