sylikc / jpegview

Fork of JPEGView by David Kleiner - fast and highly configurable viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimal GUI. Basic on-the-fly image processing is provided - allowing adjusting typical parameters as sharpness, color balance, rotation, perspective, contrast and local under-/overexposure.
Other
2.01k stars 118 forks source link

[FEAT] Straighten tool automatically suggest level angle – willing to pay 💵 #252

Open Bobbsterman opened 11 months ago

Bobbsterman commented 11 months ago

When you activate the straighten tool, it would be great if JPEGview would automatically rotate the image what it thinks is level. The user can then adjust from there.

To do so would involve:

  1. run the image through edge detection (the parameters on the edge detection will likely need to be defined relative to the resolution of the image).
  2. find long straight edges (more details: what counts as "straight" should be pretty strict, and the length should be pretty long).
  3. throw out any straight edges whose angle relative to the horizontal falls outside some reasonable bounds (e.g. ±30°).
  4. grab the average angle (relative to the horizontal) of the center of the distribution of straight edges (or something). Maybe weight that average by the length and straightness of each edge (straighter and longer = heavier weight).
Bobbsterman commented 11 months ago

Would gladly pay to have this implemented! I like JPEGview that much :)

sylikc commented 10 months ago

This is a pretty advanced feature request. JPEGView wasn't intended to be an advanced image editor, so this will certainly fall into the backog. Do you know any software that does this effectively?

Bobbsterman commented 10 months ago

Totally fair! I just think it would be really nice quality of life for those who use JPEGview as there quick and really not so dirty editing program for most of their photos. (JPEGview has basically obsoleted Rawtherapee for me for ~90% of my photos – it's just that much faster for my workflow).

I know darktable has implemented this. And ART (fork of Rawtherapee) ported that module from darktable. This module goes further than just straightening and does perspective correction as well though: would be nice if these could be implemented separately (a similar auto-suggested correction happens when you activate the perspective tool).