Pages: 1 ... 11 12 [13] 14   Go Down

Author Topic: Does a raw file have a color space?  (Read 180086 times)

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #240 on: April 28, 2015, 12:17:16 pm »

No. The transform is linear, of the y = AX variety, where y, and x are vectors, and A is the matrix. The matrix A coefficients are however non-linearily derived from R, G, and B, so the basis functions are non-linear, which gives it more power than linear-only basis functions. But that doesn't change the nature of the transformation, which remains linear.

so the matrix A coefficients are in fact functions and not constants, no ... by that logic any LUT transform can be "claimed" also linear
Logged

joofa

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 544
Re: Does a raw file have a color space?
« Reply #241 on: April 28, 2015, 12:26:12 pm »

so the matrix A coefficients are in fact functions and not constants, no ... by that logic any LUT transform can be "claimed" also linear

Functions of R,G,B. They are 'constants' once you decide what powers of R, G, and B you are going to use with a given set of certain R, G, and B data. After that one does not change the matrix A. It is the same methodology used in a 3x3 matrix case, where for the matrix A, the 3 columns are R, G, and B themselves directly. BTW, if you plot those R, G, B, they are typically nonlinear, and not linear at all. Even in a 3x3 setting. In the higher dim-setting I mentioned, one uses nonlinear mappings of these R, G, B. However, that has nothing do to with the transformation being linear of the form y = Ax.

A nonlinear LUT would typically not be able to cast in a linear model of the form y = Ax.
« Last Edit: April 28, 2015, 09:24:15 pm by joofa »
Logged
Joofa
http://www.djjoofa.com
Download Photoshop and After Effects plugins

hjulenissen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2051
Re: Does a raw file have a color space?
« Reply #242 on: April 29, 2015, 01:38:14 am »

so the matrix A coefficients are in fact functions and not constants, no ... by that logic any LUT transform can be "claimed" also linear
According to my error-prone understanding:
Nonlinear functions are a super-set of linear functions. Thus, one would expect them to:
1) Provide a better (or at least as good) fit to any given problem
2) To be harder to find

If you can decide on the nonlinear functions before-hand (through e.g. superior manual brain work), and expect that some (unknown) linear combination will always produce good results, then the actual weights can be found using methods optimized for linear problems.

-h
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #243 on: April 29, 2015, 09:18:11 am »

it seems that old Gretag ProfileMaker can teach Argyll a lesson when it comes to creating "usable" LUT profiles from targets with limited amount of patches.
I would disagree here. In many comparisons I've made only if space cube steps are in the target PM makes a LUT profile I find useful. SG does not include those steps. DC target was dropped because photographers are not equipped to shoot it (flare, light uniformity).
Much of the failures of profiling is due to trying to make things cheap and keep it simple. No flat field, no targets suitable for multiple shots with bracketing, no software that can "stitch" multiple CGATS based on single reference file. No lighting setups for targets that are easy to reproduce. No simple ways to keep the target flat and not to cast shadows.
However, due to CFA improvements and better in-camera noise control matrix profiles become more and more adequate. With many current cameras a simple matrix profile allows for 6 dE97.
« Last Edit: April 29, 2015, 09:31:47 am by Iliah »
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #244 on: April 29, 2015, 10:10:23 am »

I would disagree here.

nope... I specifically wrote " "usable"  " (and use quotation marks around the word), you wrote "I find useful"... I think there is a BIG distance between these two  ;)

no software that can "stitch" multiple CGATS based on single reference file.

that at least you can do in any text editor, combine text from CGATS files and from reference files (if you want to use several different targets) - just takes your time, and even with ProfileMaker you can combine shots of targets in photoshop to make a synthetic tiff and combined reference files for it using a text editor.

no targets suitable for multiple shots with bracketing

can you please explain (for posterity at least) how the bracketing might be useful with a given target, what is to gain ? a simpleton premise 'd be that we want to expose to get both good S/N for all patches and to avoid getting too close to the area (too close to clipping) where a particular camera might start suffer some ill-effects (something non linear) - I might assume there might be some use to make many shots with the same exposure and average, but bracketing ?... so what is to gain by making a lesser exposure of the same target ? unless you are trying to craft a profile with some hue twists based on lightness - but then correct me if I am wrong, no publicly available software can do that (unless you achieve that manually)
« Last Edit: April 29, 2015, 10:17:27 am by AlterEgo »
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #245 on: April 29, 2015, 10:15:18 am »

The gain is that if one is to compose a LUT, current profiling engines prefer more data on luminosity for a more accurate cube. Bracketing also takes care of some non-linearities in colour response.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #246 on: April 29, 2015, 10:20:31 am »

current profiling engines prefer more data on luminosity
but what do we do with the reference data for patches ? for example we have several different (exposure wise) exposures of the same patch, but only one reference data for it... I am sorry, but how does the available (publicly) software deals with that technically ?
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #247 on: April 29, 2015, 10:22:04 am »

Spectral data is easy to scale.
I never mentioned publicly available software. On the contrary, I said it is trivial to do, but it is missing.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #248 on: April 29, 2015, 10:31:28 am »

Spectral data is easy to scale.

like what - just multiple (or divide) the numbers for each 10nm step (from a regular .cie type of file that you have or get by using your own spectrophotometer/target) by the same constant to reflect the increase or decrease in exposure under the same spectrum ? what pair (patch exposure data - unmodified spectral data) will be the base one then... the brightest exposure + unmodified spectral data and then going down ?
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #249 on: April 29, 2015, 10:37:13 am »

SG does not include those steps. DC target was dropped because photographers are not equipped to shoot it (flare, light uniformity).
ProfileMaker it seems is using white/grey/black patches around the both (SG and DC) targets for some corrections and then ProfileMaker allows you (if I remember correctly) to exclude several difficult patches in one column in DC if you think that they have improper reflections..
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #250 on: April 29, 2015, 10:51:54 am »

+1EV is 2x SPD, right?
Flat field can't be obtained by just border patches, especially if a photographer makes a mistake of filling the frame with the target.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #251 on: April 29, 2015, 11:05:53 am »

+1EV is 2x SPD, right?

it just seems so to me (but then may be the there is some catch, may be things are not linear there), but what is the base pair... you shall select some exposure as the one matching your measurements and go from there matching bracketed shots with modified spectral data or it is jut trial and error to find a match.

Flat field can't be obtained by just border patches, especially if a photographer makes a mistake of filling the frame with the target.

well, mistake of filling the frame and being punished with mechanical/optical vignetting and what was that called somewhere (???) - "4th power of the cosine rule" (when light hits a sensor at some angle further from the center) is easy to correct by instructions (stop down, fill 1/4-1/3 of a frame)... as for the borger patches vs flat field shot... isn't something (guess based on border patches) still better than nothing at all... again as ProfileMaker takes tiff files then some enterprising person can find a way to flatfield the shot (tiff) in photoshop...  also you can use LCC profile (like in C1 or Adobe converters) in addition (albeit it is not flatfielding of the taget in the shot)
« Last Edit: April 29, 2015, 11:07:34 am by AlterEgo »
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #252 on: April 29, 2015, 11:23:38 am »

Base pair is determined by the exposure that matches the G value of the brightest patch in a neutral RGB space with gamma = 1. If it is impossible to match within 1 G unit on 0..255 scale, the readings need to be scaled.

The sensors are not uniform, and the reading is not uniform too. One of the ways to avoid the problem is to take 2 shots rotating the camera by 180 and taking the second shot; and averaging data between 2 shots.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #253 on: April 29, 2015, 11:28:59 am »

again as ProfileMaker takes tiff files then some enterprising person can find a way to flatfield the shot (tiff) in photoshop

oops, why PS - you can do flatfielding with rawdigger and then feed flatfielded CGATS file for example to BabelColor patchtool and export it from there to tiff and feed that to ProfileMaker... shall work
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #254 on: April 29, 2015, 11:32:56 am »

The sensors are not uniform, and the reading is not uniform too. One of the ways to avoid the problem is to take 2 shots rotating the camera by 180 and taking the second shot; and averaging data between 2 shots.
isn't it easier to rotate the target ?
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #255 on: April 29, 2015, 11:41:36 am »

You want to keep lighting as it is, so, no, target rotation is not an option here.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #256 on: April 29, 2015, 11:43:12 am »

Base pair is determined by the exposure that matches the G value of the brightest patch in a neutral RGB space with gamma = 1. If it is impossible to match within 1 G unit on 0..255 scale, the readings need to be scaled.

ok, if I understand correctly - I am taking .cie with spectral data, getting that .cie file into babelcolor patchtool (for example, as it is what I have), looking then at RGB of the brightest patch there (from .cie data) and then I am matching my exposure ... so that "242" ("magic number") in rawdigger comes from that approach ?

PS: what is "neutral RGB space", I mean "neutral" part of the wording
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: Does a raw file have a color space?
« Reply #257 on: April 29, 2015, 11:48:31 am »

You want to keep lighting as it is, so, no, target rotation is not an option here.
but assume the target illumination is the best one can do and we use flat fielding to further address any unevenness - why not then... rotating the target will expose the different part of sensor to different set of patches just like rotating the sensor... or I am missing something very obvious here

Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #258 on: April 29, 2015, 11:52:09 am »

You can open a spectral cie in PatchTool (no RGB data allowed in it) and set the RGB space to something like AdobeRGB or any other, but with gamma = 1. Neutral colour space means that grey is always R=G=B. Normally, any work colour space is neutral. Next, you check the reading on the brightest patch. This is the number you want in RawDigger as max.
Logged

Iliah

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 770
Re: Does a raw file have a color space?
« Reply #259 on: April 29, 2015, 11:52:59 am »

Rotating the camera is simpler when the light is already adjusted.
Logged
Pages: 1 ... 11 12 [13] 14   Go Up