Autocrop of raw-files?

I am still working on digitizing my slide-collection by taking pictures of the slides within the slide projector. I am using an Olympus OM-D with MFT sensor and aspect ration 4:3. My installation of camera and slide projector simplifies the positioning of the slides in left/right direction in contrast to up/down. But the positioning of up/down must not be perfect because there is a lot of “waste” of shooting the 2:3 slides by the 4:3 camera sensor.

Disadventage: a large black frame above and below the slide which must be cropped.

Actually I am using the “trim”-command of imagemagick to autocrop the jpg-photos by a batch script. The size of slides varies so I have to use a rather large shave border to reduce a manual rework. In the meanwhile I try some other (own) cropping algorithms using ImageJ-plugins in combination with batch scripts.

Now my questions:
Is there a possibility to autocrop raw-files? I am using digiKam, Rawtherapee and Darktable for the raw-processing. I haven’t found a kind of autoremoving black borders (besides of imagemagick-trim).
Is there an easy possibility to use own code in these programs? The usage of own plugins in ImageJ is really cool.

Best regard,

I’d imagine any of the command line tools of dt or RT would do it, if you can specify a constant crop window that’ll work for each image.

I’m getting ready to do a similar exercise, and what I’m thinking of doing is putting some sort of marker in the slide holder that I can use to register the slide when I insert it. It’d show up in the capture, but I could use it with one capture to manually determine the top-left, for instance, and build my crop window with that. Maybe a needle taped to the diffusion screen…