How to draw an opaque rectangle for hiding information

I would like to censor personal information such as vehicle registration plates and name tags in photos. I would like to do this by drawing a solid opaque rectangle on the sensitive information. I should be able to select the color of the opaque rectangle to best match the surrounding colors. How can I do this in darktable? The “censorize” module blurs or pixelates the underlying information, without a way to change the color.

You can use the same mask, for example, with Color Balance RGB.

You could use a masked instance of the colorize module

In many cases the retouch module can be used.

2 Likes

The composite module would resolve your problem. If you have a totally black image you could use the composite module to add black. Then the scale options and drawn mask option could be used to limit its coverage. I didn’t have a black image but this image of the moon demonstrates the principle.

Maybe an easier solution is a second instance of exposure using a drawn mask and exposure set to something crazy like -10EV.

3 Likes

That is what I’ve used. Colorize + drawn mask with source mix set to 0%.

2 Likes

It’s nice because you can select any hue you want. The colorize module is very handy for a lot of reasons

Why not use the censorize module?

I can’t speak for the OP, but in my case it was to also disguise highly-contrasting colors. I’d tried censorize at first but that left me with the same eye-catching spot, just blurry.

There is risk that redacted information could be recovered from pixelated images.