Pages: 1 ... 12 13 [14] 15 16 ... 78   Go Down

Author Topic: DCamProf - a new camera profiling tool  (Read 793306 times)

GWGill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 612
  • Author of ArgyllCMS & ArgyllPRO ColorMeter
    • ArgyllCMS
Re: DCamProf - a new camera profiling tool
« Reply #260 on: May 26, 2015, 09:50:56 pm »

So a profile will correct the colors to make them look as if it was shot under D50, regardless of actual light used during shooting.
Re-lighting and chromatic adaptation are different things though. I would have thought that by default a photographer would want to capture the appearance of things as they see them, in which case a chromatic adaptation is exactly the right thing to do to adapt to a different white point while maintaining the appearance.
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #261 on: May 27, 2015, 01:32:03 am »

Re-lighting and chromatic adaptation are different things though. I would have thought that by default a photographer would want to capture the appearance of things as they see them, in which case a chromatic adaptation is exactly the right thing to do to adapt to a different white point while maintaining the appearance.

Hmm... maybe I should change how DCamProf does it then. Assuming we have patch spectra and we make a StdA profile it currently does like this: from spectra calculate StdA XYZ values, which is used for CM (as said this is only about tempereture identification, not color correction), and from spectra calculate D50 XYZ values which the actual correction is made with, that is a re-lighting rather than CAT.

I have assumed that the CAT is rather approximative and tries to do the same thing as re-lighting does (as I've thought that the model assumes total adaptation, ie no appearance change), but makes a worse job at it so it is better to relight when possible (if DCamProf doesn't have the spectra it applies CAT02). It's a simple change to make it always do CAT instead, but I need to figure out if it's the right thing or not.

That is the alternative would be that the D50 reference values are always generated by CAT02, first you do the XYZ calibration illuminant ref values by spectra, and then CAT02 on that to get the D50 profile connection space ref values that the color correction works at.

When surfing around I've found papers like this: http://hrcak.srce.hr/file/95370 where the "performance of CATs" is tested, and what they do is that they calculate reference data by "relighting", that is new XYZ values from spectra, and then see how well a CAT matches that, and better match means better performance there. I think that indicated that the current way DCamProf does it is the right way, that is if you can relight using spectra do that rather than using CAT. However what you say indicates that it would be better to do the alternative described above, I'm not really sure what.

My understanding of CAT is that the simpler models try to achieve the same result as a relighting but does not succeed as well as doing an actual relighting, and the more advanced like CAT02 will do the same thing, *unless* you provide some viewing condition parameters, eg dim/dark environment which seems to be adaptations for television and projector viewing (that is how colors appears on screen depending on surrounding environment), I'm not sure if that can be transformed into anything meaningful for camera calibration.

So far I have assumed that relighting is the current best choice for camera profiles.

What do you think?
« Last Edit: May 27, 2015, 03:01:52 am by torger »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #262 on: May 27, 2015, 03:29:39 am »

that's when I do not... but why it is not possible w/o camera's SSF ? we can imagine some average, idealized SSF at least ?

Yes, I guess we could. I'm not sure I understand what the purpose is though, could you clarify through a use case? Is it that you have shot a target with like 200 printed patches, and want to make a profile that matches some other spectral database as good as possible (say landscape spectra), and then pick out a subset of those 200 printed patches that would contribute the best to match that landscape spectra, and remove those that won't contribute?

If so, one method could be to just try to find as similar spectrum as possible, I have actually written a prototype of such a function, not for this task though but to compare different targets when I made my profiling target evaluation.

I'm not sure if that would improve the profile though, but one way could be to just expose that spectral matching function is DCamProf as a command so one can filter own .ti3 files and experiment and see what happens.

What can improve a matrix profile is removing colors that are too saturated for the targeted spectra, so the matrix optimizer gets a better chance to match the lower saturation colors.
Logged

GWGill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 612
  • Author of ArgyllCMS & ArgyllPRO ColorMeter
    • ArgyllCMS
Re: DCamProf - a new camera profiling tool
« Reply #263 on: May 27, 2015, 04:18:35 am »

Hmm... maybe I should change how DCamProf does it then. ....  (as said this is only about tempereture identification, not color correction) ...
OK, perhaps I'm taking you out of context then. Accurately re-lighting a photographed scene would be no small feat - you'd need a spectral camera for a start, and some way of distinguishing between surface colors and emissive colors - such as photographing it under two different illuminations !
Quote
When surfing around I've found papers like this: http://hrcak.srce.hr/file/95370 where the "performance of CATs" is tested, and what they do is that they calculate reference data by "relighting", that is new XYZ values from spectra, and then see how well a CAT matches that, and better match means better performance there.
Well if you want to do re-lighting and all you have is colorimetric data, then doing a chromatic adaptation is an approximation of the effect you really want. And that seems to be all the above paper was exploring. If it was testing the CATs as appearance transforms, then they would have to have done psychovisual testing.
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #264 on: May 27, 2015, 04:53:58 am »

OK, perhaps I'm taking you out of context then. Accurately re-lighting a photographed scene would be no small feat - you'd need a spectral camera for a start, and some way of distinguishing between surface colors and emissive colors - such as photographing it under two different illuminations !Well if you want to do re-lighting and all you have is colorimetric data, then doing a chromatic adaptation is an approximation of the effect you really want. And that seems to be all the above paper was exploring. If it was testing the CATs as appearance transforms, then they would have to have done psychovisual testing.

I'm just trying to clarify what a camera profiler should do. We need to get into D50 space as that is the PCS (for both ICC and DCP). What we shoot is test targets, and we have the reflectance spectra, and we have the illuminant spectra. So we can do spectral calculations to get the XYZ values for any illuminant we want. The question that has come up now is if we really should.

I do know that for extreme color temperatures, like dusk in a nordic winter landscape, the white snow will not look white but bluish pink, which is an obvious case of where just white balancing won't work, but AFAIK there's also a small difference between StdA and D65, that is even if fully adapted and only an StdA light source we will see that the light is a bit yellow compared to the same situation under D65. Again, AFAIK color science is designed to work in a range of "reasonable" color temperatures and produce equal colors over those, so a camera profile is expected to be designed such that if you shoot an artwork under Tungsten with a Tungsten profile it will give you the exact same result as if you shoot an artwork under D50 with a D50 profile. This is what DCamProf strives for currently, and therefore it recalculates the XYZ reference values from spectra with the targeted illuminant whenever it can, instead of using CAT.

If however there is a way to model the slight (or large) color appearance changes caused by an illuminant much different from D50, and then convert to XYZ D50 I should at least provide that as an option to DCamProf. I have assumed that CAT is not the answer though, and that there simply is no model for that, just like there seems to be no model for converting between different observers.
« Last Edit: May 27, 2015, 04:55:51 am by torger »
Logged

GWGill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 612
  • Author of ArgyllCMS & ArgyllPRO ColorMeter
    • ArgyllCMS
Re: DCamProf - a new camera profiling tool
« Reply #265 on: May 27, 2015, 07:46:12 am »

I'm just trying to clarify what a camera profiler should do. We need to get into D50 space as that is the PCS (for both ICC and DCP). What we shoot is test targets, and we have the reflectance spectra, and we have the illuminant spectra. So we can do spectral calculations to get the XYZ values for any illuminant we want. The question that has come up now is if we really should.
It seems to me that there are two clear parts to this. The first is converting the camera RGB's to XYZ's - i,e. to make the camera image as colorimetric as possible. Having done that, you would then use a CAT to convert your chosen white point to D50 for interchange, since this preserves the appearance.

What you do in the first part is a different matter. If you are striving for the best possible colorimetric profile, then one approach is to key the conversion to various hints as to the original spectral composition of the colors. Obvious hints are the color itself, which you can translate to an assumed spectra of statistically likely surface colors, but the spectral content of the illuminant will affect this, as well as the white point of the illuminant shifting your whole color-to-assumed spectral mapping.

So one practical approach is to create several discrete profiles for different illuminant conditions - which is where you certainly would use spectral re-lighting of your test target - to create these discrete profiles.
Quote
Again, AFAIK color science is designed to work in a range of "reasonable" color temperatures and produce equal colors over those, so a camera profile is expected to be designed such that if you shoot an artwork under Tungsten with a Tungsten profile it will give you the exact same result as if you shoot an artwork under D50 with a D50 profile.
It's certainly reasonable that under some circumstances a photographer may want to shoot under incandescent and want the resulting image to look like they shot it under D50. But a different photographer or the same one under different circumstances may want the D50 white point image to present the same appearance as the original under incandescent. The  difference is subtle, but its certainly there.
[ The difference may be extremely subtle indeed when forced through the eye of the RGB camera spectral sensitivities. ]
Quote
I have assumed that CAT is not the answer though, and that there simply is no model for that, just like there seems to be no model for converting between different observers.
No CAT is perfect, and if you arrive at a consistent set of errors in the current CATs, that can be formulated into a different more accurate and/or flexible CAT, then you certainly have material for a technical paper.
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #266 on: May 27, 2015, 09:02:14 am »

Thanks Graeme for the feedback, it's very valuable.

Let's see if I have understood you correctly;

If we would like the Tungsten profile to keep the subtle color appearance difference from a D50 light condition the best current way is to make XYZ reference values for tungsten using spectral data, and then convert to D50 XYZ using CAT02 (with average viewing condition as default) instead of ignoring the calibration illuminant and always generating our D50 XYZ values from spectra using D50 illuminant directly. Is this correct?

Prior to this my humble understanding was that a CAT, including CAT02 (with average viewing condition in/out), did not intend to model those subtle appearance differences but instead just tries to make a result as equal as possible to "relighting" (ie recalculate our D50 values from spectra in our case), and at the same time make some mathematical tradeoffs to make the transform reversible. That is a CAT result is just an approximation of the relighting result and any differences from actual relighting is not due to it tries to model slight appearance differences, but just simply limits in how precise the CAT can be. As far as I see you say that this understanding is incorrect, right?
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #267 on: May 27, 2015, 09:26:09 am »

Yes, I guess we could. I'm not sure I understand what the purpose is though, could you clarify through a use case?

ok, here is what I was thinking (may be not sanely enough though)

1) no SSF
2) desire to create a profile from some "target" (see below) that will give me the best color transform for some set of spectral reflectance of some things (like the databases of skin color, etc)
3) spectral data for patches that I can use to actually create a target either physically (cut, glue) or combining raw RGB & patch spectral data from shots & measurements of my existing targets (by removing unwanted data from those)
4) I want to limit myself to some reasonable amount of patches in the "target"

so can software be fed with

1) database of spectral reflectance of things - but I do not have patches for those
2) spectral data for patches that I actually have and so can shoot
3) size of the target in patches, for example 24 patches
4) illuminant spectral data

and output what patches exactly I shall select within the said limit (for example 24) to get the best profile for the said database ?

and then I either make the target to use physically or cut&paste the data from raw RGB & patch spectral data from shots of existing targets or combine both ways

« Last Edit: May 27, 2015, 09:28:10 am by AlterEgo »
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #268 on: May 27, 2015, 12:48:49 pm »

a question

I tried to make icc profiles from SSF and used 2 different illuminant spectrums all the way for 2 profiles - one is just regular D50 (-i D50) and one is my measurements of the light I have when I am shooting targets (-i <.sp>) - which is halogen 3200K (nominal) lamp + hoya hmc 80a filter on lens

the difference though is very small (put a lot of RGB C1 color readouts - most are either identical or differ by 1 out of 255 in one or max two channels) between what C1 delivers with both profiles between them (between 2 variants one rendered with D50 profile and one with my illuminant profile - the picture itself is outdoors, ~40.44N latitude, ~4 PM EST, ~April) , is this right ?

this is my light - BLACK one :



Type = File 'CM=SpotRead(A)=Direct+HoyaHMC80A=Average=2015-05-26.sp' spect 0 {Black}
XYZ = 0.945861 1.000000 0.808182, x,y = 0.343445 0.363102
D50 L*a*b* = 100.000000 -3.190716 1.360748
CMYV density = 1.898217 1.864757 1.943857 1.863647
CCT = 5096.603887, VCT = 4905.877034
CRI = 92.4
CIEDE2000 Delta E = 2.871270


Type = File 'CM=SpotRead(P)=StyroFoam+HoyaHMC80A=Average=2015-05-26.sp' spect 0 {Red}
XYZ = 0.949646 1.000000 0.805636, x,y = 0.344664 0.362939
D50 L*a*b* = 100.000000 -2.529025 1.569581
CMYV density = 1.897475 1.866200 1.946574 1.862948
CCT = 5052.127273, VCT = 4879.029968
CRI = 92.9
CIEDE2000 Delta E = 2.660874
« Last Edit: May 27, 2015, 12:54:21 pm by AlterEgo »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #269 on: May 27, 2015, 02:15:21 pm »

The CCT for your halogen+filter is about the same for D50, and while the 80A filter adds some bumps and dips it's still a good illuminant so I think it's reasonable to expect that the results should be highly similar.
« Last Edit: May 27, 2015, 02:16:55 pm by torger »
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #270 on: May 27, 2015, 02:44:13 pm »

The CCT for your halogen+filter is about the same for D50, and while the 80A filter adds some bumps and dips it's still a good illuminant so I think it's reasonable to expect that the results should be highly similar.
somehow I was expecting that sufficiently different shape (from D50) shall manifest itself more visibly... even CCT is the same.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #271 on: May 27, 2015, 10:08:06 pm »

just an image, the difference between a pair of Adobe CMs from Adobe Standard and home-brewed dcp from IT8 printed target (which was actually done by generating SSF from a single raw, then SSF to dual illuminant DCP), the raw from I-R (Sony A7) :



guessed SSF in question also attached :

« Last Edit: May 27, 2015, 10:28:16 pm by AlterEgo »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #272 on: May 28, 2015, 01:55:24 am »

somehow I was expecting that sufficiently different shape (from D50) shall manifest itself more visibly... even CCT is the same.

I depends on how it lines up with the reflectance spectra and then the SSF, if the bumps here and there in the spectrum doesn't change the integrated value much, then colors won't change much.

I'm also trying to simulate D50 and D65 with halogen plus filters, not really happy with the shape of the spectrum (the 80B filter is way more bumpy than I expected) but your results are encouraging. I'm most worried about that the 80B filter lets through high reds which I guess can cause the accuracy of super-saturated reds on a glossy target go bad.
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #273 on: May 28, 2015, 01:57:59 am »

just an image, the difference between a pair of Adobe CMs from Adobe Standard and home-brewed dcp from IT8 printed target (which was actually done by generating SSF from a single raw, then SSF to dual illuminant DCP), the raw from I-R (Sony A7) :

guessed SSF in question also attached :

Really interesting results! Seems like I should consider trying to integrate some SSF guessing function to DCamProf afterall.
Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #274 on: May 28, 2015, 03:11:43 am »

I depends on how it lines up with the reflectance spectra and then the SSF, if the bumps here and there in the spectrum doesn't change the integrated value much, then colors won't change much.

I'm also trying to simulate D50 and D65 with halogen plus filters, not really happy with the shape of the spectrum (the 80B filter is way more bumpy than I expected) but your results are encouraging. I'm most worried about that the 80B filter lets through high reds which I guess can cause the accuracy of super-saturated reds on a glossy target go bad.

I just measured H3200K nominal halogen lamp ( Ushio JCV120V-1200WCH ) with Hoya HMC80A with i1pro2 (previously I did with ColorMunki)... so here they are (averaged over 10+ tries)



Type = File 'A=H3200K-Average.sp' spect 0 [ Black ]
XYZ = 1.069623 1.000000 0.408425, x,y = 0.431639 0.403543
D50 L*a*b* = 100.000000 17.595772 41.778263
CMYV density = 1.752698 1.938398 2.220658 1.834233
CCT = 3086.897709, VCT = 3070.559182
CRI = 99.4
CIEDE2000 Delta E = 0.774610

Type = File 'P=H3200K+HMC80A-Average.sp' spect 0 [ Red ]
XYZ = 0.946912 1.000000 0.787862, x,y = 0.346249 0.365661
D50 L*a*b* = 100.000000 -3.006881 3.039750
CMYV density = 1.894677 1.865917 1.954723 1.862778
CCT = 5003.925303, VCT = 4813.538610
CRI = 92.2
CIEDE2000 Delta E = 2.984494
« Last Edit: May 28, 2015, 03:15:58 am by AlterEgo »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #275 on: May 28, 2015, 04:09:01 am »

I've sent a question to Lee Filters and asked if they have some color balancing filters that can reshape tungsten to D50 and D65 without that localized 560nm bump, 650 dip and 700+ peak like the 80-series filters seem to have. They're good at support so I hope to get an answer, my questions tend to be a bit too technical though :)

I got a couple of Solux 4700K lamps and tried them yesterday but I don't get them to meet the specs, they should do a very good smooth 5000K on slight overdrive (really good D50 simulation), but mine gives only 3900K at 12 volts and reaches only 4600K on 16 volts, and then with a bad spectral shape. I'm currently contacting support at the seller to discuss that issue.

Ushio has the 6500K whitestar, but looking at the spec sheet it seems like it has a peaky spectrum, ie it doesn't mimic D65 well, so I don't think that is a good option. The thing with simulating high temps with tungsten is that you need to filter them, which is done in the reflectors of the Solux and Whitestar (the reflectors thus look blue). One can't get more blue (unless increasing voltage), only filter away red the total output of the filtered lamps becomes low, and I guess if one wants a smooth spectrum one needs to filter even more so the output becomes even weaker. I guess you can keep the color and get more power by letting through some green and making a dip in central red and that's why light balancing filters are the way they are. Not ideal though when we want to use them for camera calibration, although it seems to work quite well in practice anyway.
« Last Edit: May 28, 2015, 04:17:28 am by torger »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #276 on: May 29, 2015, 09:45:00 am »

Still investigating the CAT or not to CAT issue... difficult to get answers, I get contradicting messages when I read about it. There's correlated color sets, but also those performance tests when they use spectral relighting as reference, such as Bruce Lindbloom's example:

http://www.brucelindbloom.com/index.html?ChromAdaptEval.html

Logged

AlterEgo

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1995
Re: DCamProf - a new camera profiling tool
« Reply #277 on: May 29, 2015, 01:32:20 pm »

...seem's like we're past the compiling stuff in the DCamProf thread by the way... at least for now...

dcamprof v0.7.0 mingw build crashes when invoked with make-testchart command (you can see that "...... done!" is printed, but .t1 file is not generated)

>dcamprof make-testchart -p 24 test.ti1
Generating 24 patches...
................done!

Win8.1x64 event viewer says :

Quote
Faulting application name: dcamprof.EXE, version: 0.0.0.0, time stamp: 0x5560a8e9
Faulting module name: ntdll.dll, version: 6.3.9600.17736, time stamp: 0x550f4336
Exception code: 0xc0000374
Fault offset: 0x00000000000f0f20
Faulting process id: 0x22b0
Faulting application start time: 0x01d09a347828b0fd
Faulting application path: D:\argyll\bin\dcamprof.EXE
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: b60e4dbd-0627-11e5-84b5-80fa5b00a892
Faulting package full name:
Faulting package-relative application ID:

any idea that comes to mind right away ?
« Last Edit: May 29, 2015, 01:34:18 pm by AlterEgo »
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: DCamProf - a new camera profiling tool
« Reply #278 on: May 29, 2015, 01:52:08 pm »

any idea that comes to mind right away ?

Crashes for me as well, a bug. I'll fix to next patch release. If you specify the number of lines/rows you want (say -l 4) it won't crash.

Regarding the CAT or no CAT, read even more now and I will make CAT a user option to next release. A modern CAT like CAT02 does try to render those subtle appearance differences so it's indeed not the same as relighting. However, it's not really clear how good it is at it, and it's a bit of a matter of taste and situation if you'd want to do it or not, so the default will at least in the next release be same as before, but you can then play with CAT if you like.
« Last Edit: May 29, 2015, 01:58:41 pm by torger »
Logged

GWGill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 612
  • Author of ArgyllCMS & ArgyllPRO ColorMeter
    • ArgyllCMS
Re: DCamProf - a new camera profiling tool
« Reply #279 on: May 29, 2015, 10:48:55 pm »

Still investigating the CAT or not to CAT issue... difficult to get answers, I get contradicting messages when I read about it.
It's a topic with lots of inter-twined connections. Here are some of my thoughts on it:

Re-lighting generally has two effects :- it can change the colors of surfaces due to the details of spectral interaction between an illuminant and a colorant, but it also often shifts the white point.

The human eye and brain is always trying to extract the maximum amount of information from the light that hits the retina. One of the mechanisms to do this is chromatic adaptation. A lot of the adaptation seems to be due to the S, M & L w.l. cones independently adapting to a luminance level, explaining the success of the Von-Kries approach to modeling chromatic adaptation, but there are lots of other things going on in our visual path, including in the nerve cells in the retina, and at higher levels in our visual system.

Chromatic adaptation can be seen as a mechanism that helps achived color constancy - our visual system is striving to present an image to our minds that looks the same, independent of what the actual lighting situation is. In this sense, we are trying to "re-light" the scene in our minds. We don't have the spectral information about what's going on though, so we probably use various heuristics, on top of the adaptation that the retina does.

So a chromatic adaptation algorithm (or matrix) is an attempt to model our visual system and minds inexact algorithm for virtually re-lighting a scene.  So re-lighting a scene using exact spectral information will arrive at a result that is a lot like what we are trying to do in our eyes and minds when we look at the original scene, but it is not an exact model of it.
« Last Edit: May 29, 2015, 10:51:52 pm by GWGill »
Logged
Pages: 1 ... 12 13 [14] 15 16 ... 78   Go Up