A Photography forum. PhotoBanter.com

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PhotoBanter.com forum » Digital Photography » Digital Photography
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Questions about isolating green channel in RAW data



 
 
Thread Tools Display Modes
  #11  
Old June 4th 13, 07:42 PM posted to rec.photo.digital
nospam
external usenet poster
 
Posts: 24,165
Default Questions about isolating green channel in RAW data

In article , Paul Ciszek
wrote:

1) Get the channels. (Will interpolate green, leaving out the R & B
data)
In CS5:
Load the raw file into CS5 (via ACR). Leave the settings as is
(or adjust to as neutral as you like.

Open in Photoshop (what is on the screen is _not_ JPG - but it
is 'interpolated').


Sorry, what do CS5 and ACR mean in this context?


adobe creative suite 5 (namely, photoshop, not the rest of the suite)
adobe camera raw
  #12  
Old June 4th 13, 08:12 PM posted to rec.photo.digital
Martin Brown
external usenet poster
 
Posts: 821
Default Questions about isolating green channel in RAW data

On 04/06/2013 19:34, Paul Ciszek wrote:
In article ,
Martin Brown wrote:

First of all, my reason for doing this: I have two reasons for
believing that the green channel data is sharper than the red or blue.
The first is optical--I can tell that the image suffers from chromatic
aberration, and I am working on the assumption that the middle of the
spectrum (green) is better focussed that either of the extremes. The
second has to do with the Bayer filter and the layout of the sensor--
there are twice as many green pixels as red or blue.


I doubt if it will give you any more resolution than simply asking the
reconstruction filter to generate a monochrome image from the raw file.


If nothing else, it sure kills the chromatic aberration better than any
of the tools available in Silkypix. In the full color image, the
silouette of Venus is fringed with red and blue; converting to monochrome
would leave it fuzzy, while isolating the green channel leaves it sharp.


Depending on when you took the image of Venus it is quite possible that
most of the false colour you see is atmospheric dispersion of the
spectrum. Although it is possible and even likely that you have an image
where the red and blue images are slightly different sizes and displaced
relative to the green one I think it is unlikely that they are so out of
focus to the extent that it would affect things too much.

Split it to RGB and then adjust using one of the tools that allows
matching the centroid and magnification. You would probably get better
advice on sci.astro.amateur.

There are several sorts of chromatic aberration and to correct it you
have know which sort and use the right technique.

--
Regards,
Martin Brown
  #13  
Old June 4th 13, 09:56 PM posted to rec.photo.digital
Martin Brown
external usenet poster
 
Posts: 821
Default Questions about isolating green channel in RAW data

On 04/06/2013 19:38, nospam wrote:
In article , Paul Ciszek
wrote:

Then, when you read the RAW file into a photo editor, the software--
let's assume for now that it is going to be some flavor of Adobe-- goes
and interpolates like mad so you have a 4000x3000 grid with red, green
and blue data for every pixel, most of it "faked" to some extent.

it's not faked.


Well, in the sense that each pixel out of those 12 million started out
with data for only the red, the green, or the blue chanel, but the moment
you have imported your RAW image into Adobe, every pixel has all data for
all three channels, 2/3 of the color information in the picture has to be
created mathematically using data from other pixels.


the missing two components are precisely calculated from surrounding
pixels.


They are calculated according to a specific algorithm that makes certain
usually valid assumptions about correlations in natural images. If the
target is a pathological test case image then those assumptions are not
met and the results can go haywire.

The most fundamental assumption of Bayer demosaicing is that the green
channel is a good proxy for luminous intensity and can be used to
bootstrap the Y channel with relatively minor corrections from R & B.

nothing about it is faked.


Depends what you mean by faked. The target image could contrive to only
have an exact match Bayer mosaic pattern at a specific distance and
would then be indistinguishable from a white sheet of card.

In practice you would get Moire fringes because the alignment would be
critical. It isn't that uncommon to see such fringes in test images.

My next question is, do Adobe (or other) programs consult the red or blue
pixel data when filling in the missing green pixel data? I suppose it
is possible that the answer to this question may also depend on the
model of the camera, but I hope not.

it doesn't depend on the camera. typically a 9 pixel grid is used for
any given pixel. some converters use a 25 pixel grid for better
results. it could even be bigger but it quickly becomes a lot more work
for very little benefit.


My question is, when filling in the green data for a pixel that does not
have green data of its own, does the algorithm make use of any data from
red or blue pixels (to follow the overall brightness level or something),
or does it just use data from nearby green pixels?


it makes use of surrounding pixels, as i said.


It usually generates a pseudo image in Y,Cr,Cb space and there are quite
a few choices for how to do it and minor improvements are still an area
of active research. I don't entirely agree with everything in this paper
but it shows the quirks of some of the most common methods.

http://iplab.dmi.unict.it/download/E...%20spac e.pdf

The rules that you use to remove colour fringing affect the final image.

there are many ways to calculate it, from simple algorithms (and not
very good) to very sophisticated ones. that's why you get different
results from different raw converters.


The problem is that even the sophisticated ones can be wrong if you are
unlucky in your choice of target and the key assumptions are not met.

--
Regards,
Martin Brown
  #14  
Old June 4th 13, 10:27 PM posted to rec.photo.digital
Alan Browne
external usenet poster
 
Posts: 12,640
Default Questions about isolating green channel in RAW data

On 2013.06.04 14:37 , Paul Ciszek wrote:
In article ,
Alan Browne wrote:

1) Get the channels. (Will interpolate green, leaving out the R & B
data)
In CS5:
Load the raw file into CS5 (via ACR). Leave the settings as is
(or adjust to as neutral as you like.

Open in Photoshop (what is on the screen is _not_ JPG - but it
is 'interpolated').


Sorry, what do CS5 and ACR mean in this context?


Photoshop CS5 (CS3, 4 and 6 will work too).

Adobe raw converter (ACR) is the first stage of import into PS.

If you don't have them then use similar procedures in any high end photo
editor.

Or get the dcraw source code and modify it to do as you need.
(Programming skills needed).



--
"A Canadian is someone who knows how to have sex in a canoe."
-Pierre Berton
  #15  
Old June 4th 13, 10:29 PM posted to rec.photo.digital
Alan Browne
external usenet poster
 
Posts: 12,640
Default Questions about isolating green channel in RAW data

On 2013.06.04 14:38 , nospam wrote:
In article , Paul Ciszek
wrote:

Then, when you read the RAW file into a photo editor, the software--
let's assume for now that it is going to be some flavor of Adobe-- goes
and interpolates like mad so you have a 4000x3000 grid with red, green
and blue data for every pixel, most of it "faked" to some extent.

it's not faked.


Well, in the sense that each pixel out of those 12 million started out
with data for only the red, the green, or the blue chanel, but the moment
you have imported your RAW image into Adobe, every pixel has all data for
all three channels, 2/3 of the color information in the picture has to be
created mathematically using data from other pixels.


the missing two components are precisely calculated from surrounding
pixels.

nothing about it is faked.


Interpolated data is "faked" because it is an _estimate_ using adjacent
data and weightings. IOW it is not "precise" because the actual
information at that photosite is unknown.

--
"A Canadian is someone who knows how to have sex in a canoe."
-Pierre Berton
  #16  
Old June 4th 13, 11:18 PM posted to rec.photo.digital
nospam
external usenet poster
 
Posts: 24,165
Default Questions about isolating green channel in RAW data

In article , Martin Brown
wrote:

Well, in the sense that each pixel out of those 12 million started out
with data for only the red, the green, or the blue chanel, but the moment
you have imported your RAW image into Adobe, every pixel has all data for
all three channels, 2/3 of the color information in the picture has to be
created mathematically using data from other pixels.


the missing two components are precisely calculated from surrounding
pixels.


They are calculated according to a specific algorithm that makes certain
usually valid assumptions about correlations in natural images. If the
target is a pathological test case image then those assumptions are not
met and the results can go haywire.


true, and those test case images are the ones the foveon idiots fixate
upon. nobody cares about colour resolution charts.

The most fundamental assumption of Bayer demosaicing is that the green
channel is a good proxy for luminous intensity and can be used to
bootstrap the Y channel with relatively minor corrections from R & B.


originally. not so much now. all three pixel components contribute to
the luminance.

nothing about it is faked.


Depends what you mean by faked. The target image could contrive to only
have an exact match Bayer mosaic pattern at a specific distance and
would then be indistinguishable from a white sheet of card.


that's theoretical edge case that isn't possible even if you tried.

In practice you would get Moire fringes because the alignment would be
critical. It isn't that uncommon to see such fringes in test images.


exactly. you could never align such an image so that it would match the
pixel spacing.
  #17  
Old June 4th 13, 11:18 PM posted to rec.photo.digital
nospam
external usenet poster
 
Posts: 24,165
Default Questions about isolating green channel in RAW data

In article , Alan Browne
wrote:

Then, when you read the RAW file into a photo editor, the software--
let's assume for now that it is going to be some flavor of Adobe-- goes
and interpolates like mad so you have a 4000x3000 grid with red, green
and blue data for every pixel, most of it "faked" to some extent.

it's not faked.

Well, in the sense that each pixel out of those 12 million started out
with data for only the red, the green, or the blue chanel, but the moment
you have imported your RAW image into Adobe, every pixel has all data for
all three channels, 2/3 of the color information in the picture has to be
created mathematically using data from other pixels.


the missing two components are precisely calculated from surrounding
pixels.

nothing about it is faked.


Interpolated data is "faked" because it is an _estimate_ using adjacent
data and weightings.


it's not faked. it's calculated and it's very accurate. it's not
perfect, but nothing is.

IOW it is not "precise" because the actual
information at that photosite is unknown.


the calculations are very precise. the error can be measured and it's
*very* low.

it's in no way 'guessed' or 'faked'.
  #18  
Old June 5th 13, 12:32 AM posted to rec.photo.digital
Alan Browne
external usenet poster
 
Posts: 12,640
Default Questions about isolating green channel in RAW data

On 2013.06.04 18:18 , nospam wrote:
In article , Alan Browne
wrote:

Then, when you read the RAW file into a photo editor, the software--
let's assume for now that it is going to be some flavor of Adobe-- goes
and interpolates like mad so you have a 4000x3000 grid with red, green
and blue data for every pixel, most of it "faked" to some extent.

it's not faked.

Well, in the sense that each pixel out of those 12 million started out
with data for only the red, the green, or the blue chanel, but the moment
you have imported your RAW image into Adobe, every pixel has all data for
all three channels, 2/3 of the color information in the picture has to be
created mathematically using data from other pixels.

the missing two components are precisely calculated from surrounding
pixels.

nothing about it is faked.


Interpolated data is "faked" because it is an _estimate_ using adjacent
data and weightings.


it's not faked. it's calculated and it's very accurate. it's not
perfect, but nothing is.


The calculation is an estimate.

IOW it is not "precise" because the actual
information at that photosite is unknown.


the calculations are very precise. the error can be measured and it's
*very* low.

it's in no way 'guessed' or 'faked'.


Precise calculations are meaningless in the absence of data. The
estimate could be accurate to 1000 decimal places and that would not
make it any more 'true'.

Since it is an estimate of what would have been in that location had the
information not been filtered out it remains an estimate no matter how
low the error may be.

The error cannot be measured since the data was thrown away.

--
"A Canadian is someone who knows how to have sex in a canoe."
-Pierre Berton
  #19  
Old June 5th 13, 01:14 AM posted to rec.photo.digital
nospam
external usenet poster
 
Posts: 24,165
Default Questions about isolating green channel in RAW data

In article , Alan Browne
wrote:

The calculation is an estimate.


which means it's not faked.

IOW it is not "precise" because the actual
information at that photosite is unknown.


the calculations are very precise. the error can be measured and it's
*very* low.

it's in no way 'guessed' or 'faked'.


Precise calculations are meaningless in the absence of data. The
estimate could be accurate to 1000 decimal places and that would not
make it any more 'true'.


there's plenty of data. millions of sampling points.

Since it is an estimate of what would have been in that location had the
information not been filtered out it remains an estimate no matter how
low the error may be.


which means it's not faked.

The error cannot be measured since the data was thrown away.


you have the source image and the output of the demosaic, so the error
can be calculated.
  #20  
Old June 5th 13, 07:45 AM posted to rec.photo.digital
Martin Brown
external usenet poster
 
Posts: 821
Default Questions about isolating green channel in RAW data

On 05/06/2013 01:14, nospam wrote:
In article , Alan Browne
wrote:

The calculation is an estimate.


which means it's not faked.


It wasn't actually measured. It is interpolated from the data that you
do have. This is usually sufficient for most images but not always.

IOW it is not "precise" because the actual
information at that photosite is unknown.

the calculations are very precise. the error can be measured and it's
*very* low.

it's in no way 'guessed' or 'faked'.


Precise calculations are meaningless in the absence of data. The
estimate could be accurate to 1000 decimal places and that would not
make it any more 'true'.


there's plenty of data. millions of sampling points.


But still no green or blue data where red was measured and all
permutations of these colour exclusions.

Since it is an estimate of what would have been in that location had the
information not been filtered out it remains an estimate no matter how
low the error may be.


which means it's not faked.


It is always an inferred value based on the data that you do have. It
could still be wrong and would certainly *BE* wrong if the target was
one of the pathological test cards so beloved of Foveon supporters.

The error cannot be measured since the data was thrown away.


you have the source image and the output of the demosaic, so the error
can be calculated.


Only *iff* you actually have a source image that was fully sampled in
the first place. That is how the algorithms are tuned against the real
world images - but they can still struggle a bit with white picket
fences at shallow angles to the sensor array. The Moire fringing in
chroma is very hard to remove without losing some real image data too.

If you use a Bayer sampled CCD sensor then you are making assumptions
about the target image that are usually valid but there are situations
where the Bayer demosaic cannot get the right answer. These situations
are usually contrived but they do sometimes occur in real life.

An example is imaging the sun in the pure red light of H-alpha 656nm
which presents serious problems to a Bayer array demosaicer. Early Kodak
ones would go completely haywire on this source material.

--
Regards,
Martin Brown
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
why the blue channel(B) is noisier than other two channels(R, G)? Ray Fischer Digital Photography 0 March 13th 11 10:34 PM
Create Your Own Music Channel **World Photo Galleries** Digital Photography 0 January 28th 06 01:47 PM
Bits per channel Siddhartha Jain Digital Photography 34 January 7th 05 06:12 PM
Red channel to BW ned Digital Photography 3 July 19th 04 02:05 AM


All times are GMT +1. The time now is 05:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PhotoBanter.com.
The comments are property of their posters.