Cropping a RAW-image

Hi,

once again I have a question related to digitalisation of slides:

I take pictures of my slides within the slide projector: I am using an Olympus MFT with aspect ratio 4:3, the slides have 3:2. So every picture is framed by a black border. Actually I remove it after raw-processing with an ImageJ plugin I programmed in Java.

Now the question: If the black border is cropped before or during raw-processing, is there an improvement of the raw processing? (e.g. contrast enhancement?) I asume there will be an improvement.
I am using rawtherapee and digikam (very seldom darktable) - is there an easy possibility to use own code on raw pictures?

Best regards,

Markus

If your setup is consistent for digitizing your slides, you can modify RT camconst.json to crop the black borders at the beginning of the processing. That at least would save some processing time.

If you want to try that, just provide a raw file. I can provide the camconst entry then.

1 Like

I’m not able to answer the is there a difference question, but you can check this yourself using darktable. @heckflosse gave you a RawTherapee option.

There’s a hidden option that allows you to crop the RAW very early on in the pipeline:

plugins/darkroom/rawprepare/allow_editing_crop

If you set that to TRUE in your darktablerc file you can use the raw black/white point module to crop.

It is off for a reason, I’m sure, but you can use it to do some testing.

EDIT: Here’s the pixls link where I got this knowledge from, with some extra info: DNG recover edges?

2 Likes

I really don’t think the cropping in the rawprepare module is a good option for this at all! Doing this per image is a huge job and using a preset is also using the black/white corrections which might be ok or not.

As i understand the scenario it comes down to

  1. i have a bunch of images all in 4:3 aspect
  2. all these images require cropping to likely the same area
  3. Maybe all are from the same film so would use the same color correction
  4. maybe more

This is perfect for a style with cropping module enabled and what else needs to be done. And after applying the style you might have a second look and tweak the cropped area.

EDIT: forgot one thing, most lens calibration data (lensfun) provided for the oly camera lenses are calculated from images using default/standard cropping. If you change the rawprepare parameters in a non-perfect way you might add some slight quality penalty.

In general terms I agree with you, and I hope my warning and link to your reply in the other topic would be enough to point out that my idea was for testing purposes only and not to be used in an actual (batch) editing session…

The original question was if cropping at the start of the pipeline (before most of the basic RAW related stuff is done) would have a different outcome on the whole as opposed to later on in the pipeline (the cropping module). I wouldn’t know of any other way to test this then to use this hidden option.

Unfortunately there are at least seven different kinds of slide frames and neither the dimensions are equal nor the aspect ratios are exactly 3:2 (e.g. Y-offset varies ~ 105 px, ratio varies between 1,49 and 1,63). So one set of constant crop values will not be sufficient.

I tested the hidden option - and I am surprised. I don’t remark a significant difference between early cropping and late cropping.
So there is no need to crop the raw. I can use my ImageJ plugins.

Thanks.