Provided is a depth-based image processing method, used for processing scene data collected by an imaging device of an electronic device. The scene data comprise a cached main image. The image processing method comprises the following steps: processing scene data to acquire depth information of a cached main image; and acquiring a foreground part of the cached main image according to the depth information. In addition, also provided by the present invention are an image processing device and an electronic device. With the image processing method, the image processing device and the electronic device according to the embodiments of the present invention, depth information of an image may be obtained by means of processing scene data of an imaging device, and a foreground part of the image is further recognized according to the depth information. The foreground part is usually used as the main body of the image, thus, on one hand, making it easy for a user to carry out image processing and improving the user experience, and, on the other hand, making the main body of the processed image more prominent, thereby improving the visual effect.