Pages: [1]   Go Down

Author Topic: Hasselblad Phocus flatfield correction (LCC) performance  (Read 6688 times)

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Hasselblad Phocus flatfield correction (LCC) performance
« on: January 10, 2015, 10:35:01 am »

I've made some tests of the Hasselblad Phocus flatfield correction (LCC correction) algorithm. I have a H4D-50 to test with, and SK35 as the widest angle.

For tech camera users flatfield correction is a very important feature, as for all semi-wide to wide lenses will lead to a cast on the sensor, especially if shifted. Phocus has support for this, they call it "Scene calibration".

A basic implementation is easy to do, you just divide every pixel in the original image with the LCC image, but that will increase noise and thus require you to have a very well-exposed  LCC image. What converters then generally do is to smooth the LCC image which takes away noise, but then you get problems with cancelling out dust spots and any specific sensor artifacts like tiling or microlens ripple.

I'm quite sure that Phase One's Capture One and Lumariver HDR are leading concering advanced LCC corrections and handles all those challenges (I wrote the algorithm in the latter, and of course that's the best ;) ). But where does Phocus stand?

Phocus has a simpler algorithm with just smoothing the LCC image so they can't remove dust spots, but is robust concering noise in the LCC image, and as it's simple it's also fast. Although I have no Dalsa-based H4D-60 to test with I'm sure it can't remove specific sensor artifacts (tiling, ripple), so you'd want to use a sensor without those issues.

I've heard some say that Phocus LCC over-corrects vignetting (ie make corners too bright), but I have seen no such issue. However, all lenses vignette at least little so it's how we're used to look at images so cancelling out it fully may not be the best thing to do. I usually add back about 0.3 stop artistic vignetting after LCC correction. Unfortunately there's no artistic vignette tool available in Phocus, so you will have to use another tool for that.

An other advanced aspect of flatfield correction is how highlights are handled. When flatfield is applied samples are scaled. If the algorithm is basic this means that if you have something bright in a dark region (to the side in the image circle) it may become clipped after correction, and indeed this can happen with Phocus. You should therefore certainly use center filters for your wide angle to minimize vignetting and thus this problem. As the H4D-50 handles shifting very well I would only expect this to be an issue with the SK28 (where you get some pixel vignetting despite center filter), if you use center filters. It is a problem with the SK35 (tested) and probably SK47 too if you don't use a center filter. For the Dalsa-based H5D-60 or the Sony CMOS-based H5D-50c I would expect this to be more of an issue, even with center filters as they have more vignetting and more colorful casts.

There's also the opposite case when you have something clipped in a bright region (close to the center of the lens) it may then become unclipped and look dull. In a worst case they could be discoloured but Phocus at least makes sure that it's neutral. I've noted that there may be some slight discolourings and artifacts in the transition into the clipped area after correction. Again, this issue is battled by using center filters to make the need of correction as small as possible.

Finally, what happens if you shift all the way to hard vignetting, that is if you shift so far that a side or corner of the frame gets outside the image circle and cut to black? Capture One can handle this, but creates artifacts near the edge, Lumariver HDR does this well, but Phocus cannot handle it at all, it refuses to create a calibration frame if the LCC shot has hard vignetting. For most this won't be a problem as it's not a normal use case with such extreme shifts, but if you work with maximized shifted panoramas and crop in post it can possibly cause a bit of irritation now and then.

When the algorithm corrects color cast it needs to get a reference for white. An advanced algorithm may figure out where the center of the lens is (even if it's shifted, and even if it has center filter applied) and take the reference from there as the color cast is least there, while simple algorithms generally just use an average over the whole image or picks the reference from the center. The average works well for mild color casts, and with the H4D-50 you can't get anything than mild casts, but with say a H5D-50c which can have very colorful casts it's likely that you can get visible white balance shifts. With a white balance picker or manual adjustments you can bring it back to normal though. The only problem is that the Phocus color model that uses white balance to figure out which illuminant it's under can be a bit disturbed, but I would think it's not a big issue.

I haven't been able to test how Phocus derives its white balance reference, but as the algorithm is overall basic and not seemingly designed for shifted lenses I'm quite sure that either it just picks the reference from the center of the image (assuming no shifting has been applied), or it makes an average over the whole image. With the H4D-50 you will not notice any issues as the sensor has mild color casts, but you might with other sensors.

The user interface is designed for the case when you have a library of pre-made flatfield corrections, rather than shooting one per image when out in the field (which is the typical case for tech camera users). It works in the latter case too, but your list of "scene calibrations" will grow.

Vignetting correction and color cast correction can be applied separately.

Overall I think the flatfield correction algorithm is a bit disappointing for a technical camera user. With a sensor with such low color cast as the H4D-50 has you won't have any real technical issues as long as you use center filters, but I still find it disappointing that it cannot clean up dust spots, and I'd really like to be able to add in artistic vignetting after correction. The flatfield correction capability is certainly not a show stopper, but a thing to consider for users going the Hasselblad way. If you're used to Capture One's capabilities you may be a bit disappointed.

When it comes to CFV-50c/H5D-50c I have no files to test with. I expect results to be generally good, as there's no artifacts like tiling or ripple with it, but it has really colorful casts and some issues around highlight handling and white balance reference may occur. With the H4D-60 I'd expect that using SK35 and SK28 which some actually do with Capture One, is a show stopper due to no correction of tiling and ripple, but it should work with Rodenstock wides if not shifted too far and not too contrasty post-processing (as far as I know Sean Conboy is using a 60 with Rodenstock wides).
« Last Edit: January 10, 2015, 11:45:27 am by torger »
Logged

lelouarn

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 88
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #1 on: January 10, 2015, 10:48:12 am »

That's an interesting analysis, and allows to understand the LCC process a bit better.
I assume lightroom's LCC plugin is also of the "simple" type, since it doesn't correct sensor dust ?
Does it provide any other goodies, in your experience ?
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #2 on: January 10, 2015, 11:00:11 am »

That's an interesting analysis, and allows to understand the LCC process a bit better.
I assume lightroom's LCC plugin is also of the "simple" type, since it doesn't correct sensor dust ?

Correct.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #3 on: January 10, 2015, 11:19:12 am »

That's an interesting analysis, and allows to understand the LCC process a bit better.
I assume lightroom's LCC plugin is also of the "simple" type, since it doesn't correct sensor dust ?
Does it provide any other goodies, in your experience ?

I haven't tried Lightroom's flatfield correction algorithm for a very long time so I don't really know. But if it can't fix dust that's a very strong indication that it's just a simple averaging algorithm just as in Phocus, and that's fine for well-behaving sensors, but can lead to issues in tougher cases.

In the *really* basic case when you just invert sample per sample without any pre-processing of the LCC shot you fix dust spots whether you like it or not (any sensor artifacts are also reduced), but you also get an increase in noise so it's important to have a very well-exposed LCC shot. If I remember correctly Leaf's raw converter worked that way.

The advanced algorithms do averaging to avoid an increase in noise, but also have the possibility to add in features such as dust spots so those can be cancelled out. To fix the tiling and ripple problems of the Dalsas you need to add additional filtering after LCC correction, as crosstalk makes it color dependent and you can't just fix it fully with only the LCC shot.

With Hasselblad backs the two main alternatives you have, unless you use small third-party software like I do, is Phocus and Lightroom. Most "tech cam lens compatibility" tests are made with Capture One and Phase One / Leaf backs, and C1 has a more advanced algorithm. This means that for now I would be careful to assume that CFV-50c will work as well as IQ250 / Credo 50, and H5D-60 as well as IQ160, as both those sensors are tougher to correct. I'm less worried about the CFV-50c than the H5D-60, but I would still suggest to test the actual workflow rather than extrapolating results from Capture One.

What could possibly go wrong with the CFV-50c is as the algorithm doesn't compensate crosstalk you may get demosaicing failures in areas you have a little bit of crosstalk but not as much to visibly desaturate. Capture One doesn't compensate crosstalk either (compensate meaning evening out green split, not cancelling out which noone does so far), but how sensitive the demosaicer is to green split differs so Phocus could have earlier (or later) failures. That I would like to test if I would get a CFV-50c. They're already actively sold in bundles with tech cams though, so I guess it can't be that bad.
« Last Edit: January 10, 2015, 11:47:13 am by torger »
Logged

Paul2660

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4067
    • Photos of Arkansas
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #4 on: January 10, 2015, 11:43:03 am »

I often see Phase One's dust correction as a problematic issue as it tends to over correct on spots, creating a white inverted spot.  I have noticed this issue from day one when I started working with tech cameras back in late 2011 and had hoped that Phase would fix it. I have opened a few tech questions, but never really gotten a good answer. 

On an average LCC correction, I will tend to get about 10% of dust spots over corrected, the rest are fine. 

However the tiling and ripples most times are fixed (about 90% of the time), the Rodenstock lenses have less tiling but still show ripple at times. 

Paul
Logged
Paul Caldwell
Little Rock, Arkansas U.S.
www.photosofarkansas.com

tjv

  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #5 on: January 10, 2015, 04:12:04 pm »

Again, thank you for taking the time to write all of this, Anders. It goes a long way to helping me understand the potential pitfalls I might encounter should I choose to go the way you have with a Hasselblad to use with my Techno. From using Phocus a little bit with test files people have sent me, it seems very good. The LCC / Scene Calibration process appears easy and seemed to work very well on the files I have been supplied by both Hasselblad themselves – some pretty big name photographers shot them – and various users. I didn't know to watch out for the things you have mentioned, like clipping or dulling of highlights, so I'll have to go back and check.
How's your programming effort to integrate the 3F file into Raw Therapy?
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #6 on: January 10, 2015, 05:39:52 pm »

The highlight issue is pretty small. If you shoot a lot of high contrast scenes and have lots of vignetting to correct, then it can be a problem at times, but if it is you can always under-expose a bit to leave more margin. So it should be small, but it's something I would look into for safety.

As the Sony sensor don't show tiling or ripple I think it should work as good as Capture One in the general case, but as I don't have test files I need to make a reservation for that. For example at GetDPI there were some tests where the shifting limits was found for the Credo 50, and I cannot guarantee that Phocus will take the CFV-50c as far without testing. It's so likely that I would be surprised if it did not, but it's not a bad idea to redo the shift-to-the-limit-tests with CFV-50c + Phocus.

About the 3FR format, I eventually got in contact with Hasselblad's product manager, which seems like a nice guy by the way which has survived several CEOs, and I asked for the spec, but they don't want to share it. Not really because the format would be secret, but because they want to have the freedom to change the format with new camera models without having to inform third parties, as it costs resources. He did not say, but I've been in software development so long time that I know that they probably don't even have any good documentation, it's in the code, ie they would have to release Phocus source code to share the format which then makes it a more difficult decision. They only share the format with Adobe so far. Of course, a developer like me that otherwise reverse-engineers from scratch would be helped by any little doc I could get, but few product managers think that way, either you have a finished well-documented distributable document package with processes to update it with new products, or you don't and then you don't share. I'm not going to nag about it. On a philosphical level I of course think it's irresponsible by camera manufacturers to not make sure their format is public, these things get lost if companies go bankrupt, like Kodak did, but Hasselblad is not alone and I was not going to raise that point.

Anyway, the thing is that the format does change. The calibration data for a CFV-16 is not the same for a CFV-39 is not the same as for CFV-50c, and the Dalsa 60 probably has its own twist. The CMOS version should need minimal calibration data and I cannot see any artifacts when not applying it though so I will stay low with that for a while, as it's a pretty huge effort to reverse engineer. For the 31 - 50 megapixel CCDs I have most reverse-engineered and already integrated to RawTherapee.

Due to that 3FR is discarded in the typical Hassy workflow I mostly only have FFF test files so I don't have enough data for the moment to be able to reverse-engineer all models so far, so I need to make a call for more files at some point. I don't really like reverse-engineering though, it's just that I have some issues of not being able to stop doing something until it's complete that gives me an itch to really go to the bottom with it, and that would make a nicer patch to Dave's dcraw. Not today though. I have reverse-engineered enough so I can use my own H4D-50 with very good results in RawTherapee.

FFF files have the calibration data already applied, so they have worked well for a long time in RT. There's only basic matrix color though so one need to make custom profiles if one wants to have more advanced color.
« Last Edit: January 10, 2015, 05:41:28 pm by torger »
Logged

jeremydillon

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 60
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #7 on: January 11, 2015, 04:54:38 am »

Just a reminder that you have to turn the vignetting correction off in the lens corrections tab when you use the LCC's correction otherwise it will double correct. This is what causes the bright edges problem.
Logged

tjv

  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #8 on: January 18, 2015, 04:15:25 pm »

I'd love to see some examples of the CCD 50 shifted some time, when you have time. The more research I do, it seems this sensor is the best option for me. Looking closely at the 50c / IQ250 files shifted there are just too many artefacts when shifting within the limits I regularly employ. Are you still of the opinion the 50 CCD is a great performer for tech movements after your tests?
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #9 on: January 19, 2015, 01:27:46 am »

I can send you some extreme shifted SK35 shots with lcc after my workday. It is a great performer, and thanks to that the basic lcc algorithm in Phocus is no problem - it does not need more. The SK28 does introduce some pixel vignetting when shifted far (ie vignetting despite center filter), but no artifacts. I do not own the SK28 myself but have got a couple of test shots earlier.

Actually I think it handles shift better than my 33 megapixel Aptus which does show a little crosstalk related desaturation on extreme SK35 shifts in shortside direction.

Edit: uhmm... wait a minute, I think my SK28 test shots I got was made without center filter, and then I'd say there's no significant pixel vignetting either. edit back again, asked and it was with center filter, ie you get about 3 stop vignetting on the SK28 up to the image circle edge.
« Last Edit: January 19, 2015, 11:00:46 am by torger »
Logged

tjv

  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #10 on: January 19, 2015, 02:47:04 am »

Awesome, I'd really love to see those files, thanks! As I say, after being able to see and play with more 50c RAW files, I don't think that the CMOS is there yet for my purposes. The 50 CCD seems the best balance in terms of size and pixel count, with none of the tiling issues etc that the 60 seems to have. The H series is also priced very well at the moment and I can see myself using an SLR for some things in the future.
As an aside, I posted some examples of mosaic aliasing in the CFV-50c image thread at GetDPI. It'd be good to know if they are the kinds of artefacts you've mentioned coming from the Sony COMS sensor in the past.
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #11 on: January 19, 2015, 03:05:34 am »

It'd be good to know if they are the kinds of artefacts you've mentioned coming from the Sony COMS sensor in the past.

Yes, mazing is a side effect of crosstalk. It can be compenasted for quite easily though, but neither Phocus (or Capture One) does it currently. If you see mazing you have irreversible color channel mixing too though so colors will not be fully reliable, so even if fixing the mazing (which is done automatically with Lumariver HDR, and can be done manually in RawTherapee) one may not be pleased with the result.
Logged

tjv

  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #12 on: January 19, 2015, 03:25:34 am »

Hmmm... I saw those artefacts pretty early on in RAW files shot with a 47XL and 32HR, so perhaps the CMOS sensor is not as good at movements as thought? With the 47XL I was seeing it a little before 10mm of shift, does that sound about right?
Logged

torger

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3267
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #13 on: January 19, 2015, 03:47:38 am »

Hmmm... I saw those artefacts pretty early on in RAW files shot with a 47XL and 32HR, so perhaps the CMOS sensor is not as good at movements as thought? With the 47XL I was seeing it a little before 10mm of shift, does that sound about right?

Yes it sounds about right. The 47XL is symmetrical so I'd suspect it's as "bad" or maybe even worse than the 32HR.

As effects of crosstalk is a bit scene dependent it's natural that it will sway back and forth what we think about it. In some scenes it will be easier to see, ie flat colored surfaces like architecture, while grass and foilage will handle it better. In all examples when we've had good results with shift there has been a substantial amount of crosstalk (which can to some extent be measured in the LCC shot), but the scene colors and structure has been robust against it and the results have looked good. The Credo 50 tests made by Guy at GetDPI convinced me that the back does work for tech cams wides, with certain floating limits.

Personally I'm not that comfortable with "it depends" type of performance, that's a reason why I got a H4D-50 with the CCD instead.
Logged

tjv

  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
Re: Hasselblad Phocus flatfield correction (LCC) performance
« Reply #14 on: January 19, 2015, 04:20:28 am »

Yeah, I'm in your camp with that one and plan to follow in your footsteps sometime soon.
I'm interested to hear that Phocus is not "great" at LCC correction with regards to correcting tiling, etc. that is seen with the 60mpx Dalsa sensor. I guess it's not Hasselblad's strong point.
Logged
Pages: [1]   Go Up