| CPC H04N 23/632 (2023.01) [G06T 7/246 (2017.01); H04N 5/2628 (2013.01); H04N 23/61 (2023.01); H04N 23/635 (2023.01); G06T 2207/20132 (2013.01)] | 20 Claims | 

| 
               1. An electronic device, comprising: 
            a display; 
                a camera; and 
                at least one processor; and 
                memory storing instructions that, when executed by the at least one processor, cause the electronic device to: 
                receive, while displaying a preview image through the display based on at least a portion of image frames obtained through the camera, an input with respect to a preset button; 
                switch to an auto framing mode in response to the input; 
                identify a first area matched to a subject captured by the camera, and a second area that includes a preset portion of the subject and is a portion of the first area; 
                identify a first coordinate value which is a center of the first area and a second coordinate value which is a center of the second area; 
                identify, based on the first coordinate value and the second coordinate value, a vector extended from the center of the first area to the center of the second area in a same image frame; and 
                based on predicting a moving direction of the subject in the image frames by the vector, display the preview image by performing cropping with respect to at least one of the image frames. 
               |