1. An electronic device, comprising: imaging hardware; a storage medium including a set of instructions for generating image data; and a processor in communication with storage medium, wherein when executing the set of instructions, the processor is directed to drive the imaging hardware to: obtain a plurality of frames of images of a scene including at least one object, each of the plurality of frames of images is associated with a character distance of a plurality of character distances of the electronic device; for each of the plurality of frames of images, determine a target image area, wherein the target image area is an image area on which an object in the scene is sharply focused; set a focus area in the target image area; and generate an all-focused image by combining the plurality of frames of images, wherein each of the at least one object is sharply focused.