Version: (using Devel) Installed from: Compiled sources If there is a way for Digikam to identify straight lines in photos, then it would be great if the user could select a line and Digikam would straighten the image accordingly.
The now-defunct BrilliantPhoto had this feature, so technically it is possible. The user would hover over the image and the straight lines would be highlighted. Selecting one would instruct the application to straighten as per that line.
Do you have tried current version of FreeRotation tool ? It have this option. Gilles Caulier
http://farm3.static.flickr.com/2775/4311396834_ffc7db09f8_o.png http://farm3.static.flickr.com/2743/4310658607_84e838b5c8_o.png Gilles Caulier
I have Digikam 1.0.0 installed, and it looks just as your screenshots do (I love that picture, by the way). The user can set two points, which is great, but it does not automatically identify the straight edge.
Do you know a code somewhere to find automatically point 1/ and 2/ in the image ? Gilles Caulier
You could use the http://en.wikipedia.org/wiki/Hough_transform to find straight lines in an image.
http://www.inf.ufrgs.br/~laffernandes/kht.html seems to be a free implementation.
Yes, KHT is published as GPL. core algorithm is pure C++. No problem to use it. For the rest, we nned to take a look in test application code. Gilles Caulier
I don't think it will do all the work we need. I would expect that the code returns all detected lines and these lines need to be interpreted by us, e.g. by averaging over all lines with 10 angle difference from exactly horizontal or some other heuristic.
Just for notice: CImg image library does also hough transform and is already included in digikam. And just my wish: Please consider following behaviour: 1.) get lines out of hough transform with given treshold, 2.) display them semitransparent ontop of image 3.) as the user moves the mouse over the image area, hover the next line in distance and make it apply with a simple left click
I fully agree with Jens' comment. Some ages ago, I played around with the openCV code given here: http://opencv.willowgarage.com/documentation/feature_detection.html under "HoughLines2". The routine even has parameters to specify the angular resolution of found lines (depending on the algorithm). So this might already address Johannes' remark. If the algorithm works well enough, code-wise most of the work would be on the GUI side...
I agree with Jens in Comment #10.
Dotan, This file still valid using digiKam 2.x serie ? Gilles Caulier
Yes, Gilles. Currently the only way to straighten an image is to open it in the editor and to set two points to define the angle. The makes the operation a chore and means that I don't straighten any images! Having the main Digikam window automatically highlight potential lines for straightening would be terrific. I would suggest a toggle that enables / disables the line overlays while browsing images so that users could add image straightening to their workflows. Thanks.