Rotate & Perspective preset

To piggyback on the thread below ( using exif data to straighten images - Processing - discuss.pixls.us) about straightening images: for those not blessed with having pitch and roll IBIS EXIF data, is there a way to make a preset in the ‘Rotate & Perspective’ module that applies ‘automatically detect structure’ and then does a correction of e.g. the verticals?

When I currently define a preset in this nodule, just the present values for rotation etc. are baked into the preset. I’d like to apply ‘automatically detect structure’ and correction of the verticals (covers 90% of what I do) via a preset instead.

I was hoping, the recently discussed ‘InitialWorkflow’ script ( Initial Workflow Module lua script for darktable 5.4 and AgX - Software / darktable - discuss.pixls.us) could handle that, but the ‘rotate and perspective’ button in the script just seems to open the module.

I think you could write a LUA script that performs the two steps and assign a shortcut to it. Then at least, it is only one keystroke.

2 Likes

I actually did this as part of a script. I’ll see if I can find it and make it into a standalone. IIRC when it works it works well, but sometimes the result is really skewed.

3 Likes

Thanks! That would be great. My scripting capabilities are very rudimentary and I have no experience whatsoever with LUA. Could this somehow be incorporated into a style, so it’s run when a style is applied?