Based on a couple of libraries and currently available technologies, I created a simple one-page tool for editing focus on photographs and images.
As always - no server part. Nothing you uploads ends up outside of your device's browser. No analytics. One simple function.
- Upload an image.
- Wait a little while the simple neural network tried to recognize the depth map.
- That's all, you can start editing the focus.
Of the minuses, the network involved in depth recognition is really simple and cannot cope with complex details or weakly expressed plans. However, for real or generated photographs or images with pronounced indicators, it works great.
recognized depth map:
turning on the depth debug mode, for convenient determination of the current focus depth and its width parameters:
There are three main parameters available for control.
Focus point distance,
Blur strength beyond focus
control the position and width of the focus to achieve the desired effect:
A simple, fun tool that allows you to feel the “volume” in your work and gives some sense of 3D.