This application discloses an
image processing method and apparatus, and a device, and relates to the field of
image processing. After a to-be-processed image is obtained, a to-be-corrected
line segment is obtained, through filtering, based on at least one of IMU information and a
field of view that are included in
metadata, from line segments included in the to-be-processed image. The to-be-processed image includes at least one of a vertical
line segment and a
horizontal line segment in a first
scenario photographed by a photographing device. The to-be-corrected
line segment and a feature region of the to-be-processed image are corrected, to obtain a processed image, where the feature region includes a background region, a portrait region, and an
edge region. Because the IMU information and the
field of view describe property information of the photographing device that photographs the to-be-processed image, a line segment that needs to be corrected is accurately located based on the IMU information and the
field of view, and the to-be-corrected line segment and the feature region of the to-be-processed image are corrected, so that line segments in the processed image better conform to distribution features of the
horizontal line segment and the vertical line segment in the first
scenario photographed by the photographing device. This effectively improves accuracy of correcting a tilt-shift
distortion phenomenon of an image.