JuewenPeng / BokehMe

BokehMe: When Neural Rendering Meets Classical Rendering (CVPR 2022 Oral)
Apache License 2.0
181 stars 9 forks source link

calculate disp_focus if I want to focus on a point #8

Open mikebilly opened 7 months ago

mikebilly commented 7 months ago

given that I want to exactly focus on the point x, y of the image, how to calculate disp_focus to focus on that point?

JuewenPeng commented 7 months ago

You can extract the disparity of that point on the disparity map and serve that disparity as disp_focus.

mikebilly commented 7 months ago

thanks @JuewenPeng . Also, I'm planning to blur the background and add the person on top of the blurred image. My background has transparency, where the person part is transparent. How to modify your code to handle input images with alpha channel / transparency ?