I have just pushed an experimental branch (ex/spot-content-aware) on GitHub for testing/review purpose.
As the branch name implies this is a content-aware based spot removal.
The problem with the current clone tool is that in many cases the area
(circle) is quite visible as we do a full pixel clone of the zone.
The algorithm is:
1. Compute the mean of pixel distance from (CMJN : 0,0,0,0)
That is : p = {c,m,j,n}
d = sqrt(c^2 + m^2 + j^2 + n^2)
2. For all pixels distance above a threshold set mask to 1.0
(full clone).
3. Growth a bit the mask to avoid border issues
4. Smooth the mask border to have a seamless blending
On the UI there is no much changed.
1. Add a spot removal circle on a zone, by default it is behaving as
the current tool.
2. When over the circle use shift-<mouse wheel> to select a strength to
the content aware algorithm.
3. A red dot on the inner circle is a feedback about the current value.
4. The strength goes from 0 to 1. 0 is middle-top (Pi/2 angle if you
prefer).
See attached 4 pictures of one of a somewhat difficult area to heal as
the colors are quite closer.
spot-area : the area to heal
spot-current-clone : the result with current clone
clone-content-aware-tool : the tool UI with the red dot (strength)
clone-content-aware-result : the clone area with a strength of
approximatively 0.9.
I have tested this on different images and it is possible to really
avoid to see the circle of the spot and still have the zone cleaned
properly.
Please review, comment.
Pascal.
--
Pascal Obry / Magny Les Hameaux (78)
The best way to travel is by means of imagination
http://v2p.fr.eu.org
http://www.obry.net
gpg --keyserver keys.gnupg.net --recv-key F949BD3B
<<attachment: spot-area.jpg>>
<<attachment: spot-current-clone.jpg>>
<<attachment: clone-content-aware-tool.jpg>>
<<attachment: clone-content-aware-result.jpg>>
------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________ darktable-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/darktable-devel
