| CPC G06T 5/80 (2024.01) [G06T 5/20 (2013.01); G06V 10/25 (2022.01); G06V 10/761 (2022.01); H04N 1/40012 (2013.01); H04N 23/695 (2023.01); G06T 2207/10024 (2013.01); G06T 2207/20228 (2013.01); G06T 2207/30244 (2013.01)] | 20 Claims |

|
1. A method comprising:
receiving, by an electronic device, an image frame of a scene including at least one object from a preview field of a camera of the electronic device;
determining, by the electronic device, at least one region of the image frame affected by distortion;
generating, by the electronic device, a pixel disparity map comprising a refraction coefficient associated with each pixel of the image frame based on the at least one region affected by the distortion;
determining, by the electronic device, a plurality of regions on the pixel disparity map, each of the plurality of regions including pixels that have a similar pixel disparity;
estimating, by the electronic device, an optimal orientation of the electronic device to minimize the distortion in the image frame based on the plurality of regions on the pixel disparity map; and
displaying, by the electronic device, an indication indicating the optimal orientation of the electronic device.
|