First of all, thanks for the replies!
Will try to comprehend Canny/Hogh detection, but it looks like the right thing to use.
About the processing, ATM it goes like this:
1) -negate/deskew/trim/repage.
2) Take a crop from the center of the image that doesn't contain any border parts (film/holder/neighbor). The crop size and offset in percents are 88x96+7+2.3 (works so far for most shots, but obviously not ideal).
3) Process both the crop and the full image using the following command line:
Code: Select all
CONVERT <fname_in> -set colorspace srgb -colorspace rgb -auto-level -gamma <EV_correct> -sigmoidal-contrast 5x50% -set colorspace rgb -colorspace srgb <fname_out>
The '-gamma <EV_correct>' is used to reduce exposure for all images, since the original shots are exposed very brightly. <EV_correct> is currently set to 0.75 (which works mostly fine, but could be made adaptive).
4) Superimpose the crop on the full-size image. This often results in a visible difference (the full-size has lower contrast due to auto-level being affected by bright/dark borders), on this example it's not as bad but still noticeable:

(vertical bar ~140 pixels from the left);
. As the default +channel setting is 'RGB,sync', the 'sync' ensures that the color channels will are modified together by the same gamma value, preserving colors, and ignoring transparency.
Then '-channel RGB' will modify each channel separately? Gotta try this ASAP

Thanks again!