Allows displaying on-screen highlights to indicate edges (contours) that are in-focus (only available if Camera2 API is used). This is particularly useful in conjunction with manual focus mode, to help show which regions of the image are in focus. Note that enabling focus peaking may use more battery.
так вроде получше работает
https://jsfiddle.net/7x6y3whm/2/