Method for processing image, related device and storage medium
AssigneeBeijing Xiaomi Mobile Software Co., Ltd.
InventorsXiaotao Wang, Yanan Li, Guangqi Shao, Lei Lei
Life of this patent
Estimating the term…
Abstract
A method for processing an image includes first obtaining a media image. The media image has a target scene object at least partially shielded. A target shielding object is determined from the media image. The target shielding object at least partially shields the target scene object. Image inpainting is performed on a first region of the media image corresponding to the target shielding object to generate a target media image.
Claims18
An image processing method, comprising:
- obtaining a media image, the media image having a target scene object at least partially shielded;
- determining a target shielding object from the media image, the target shielding object at least partially shielding the target scene object;
- performing image inpainting on a first region of the media image corresponding to the target shielding object to generate a target media image;
- obtaining parameters of capturing the media image, the parameters comprising at least two of time information of capturing the media image, location information of capturing the media image, orientation information of capturing the media image, season information of capturing the media image, illuminance information of capturing the media image, angle information of capturing the media image, and weather information of capturing the media image;
- determining, based on at least two of the time information, the location information, the orientation information, the season information, the illuminance information, the angle information or the weather information, a subset of scene images matching the parameters from a set of scene images comprised in a cloud database;
- and
- obtaining a scene image matching the target scene object from the subset of scene images,
- wherein the obtaining the scene image matching the target ct from the subset of scene images comprises:
- zeroing a feature matching weight for each scene object other than the target scene object in the media image, and determining from the subset of scene images a scene image having a highest matching degree with the target scene object as the scene image matching the target scene object.
A device for image processing, comprising:
- a processor;
- and
- a storage device configured to store an instruction executable by the processor;
- wherein when the instruction stored in the storage device is executed by the processor, the processor is configured to:
- obtain a media image, the media image having a target scene object at least partially shielded;
- determine a target shielding object from the media image, the target shielding object at least partially shielding the target scene object;
- perform image inpainting on a first region of the media image corresponding to the target shielding object to generate a target media image;
- obtain parameters of capturing the media image, the parameters comprising at least two of time information of capturing the media image, location information of capturing the media image, orientation information of capturing the media image, season information of capturing the media image, illuminance information of capturing the media image, angle information of capturing the media image, and weather information of capturing the media image;
- determine, based on at least two of the time information, the location information, the orientation information, the season information, the illuminance information, the angle information or the weather information, a subset of scene images matching the parameters from a set of scene images comprised in a cloud database;
- and
- obtain the scene image matching the target scene object from the subset of scene images:
- wherein the processor is configured to obtain the scene image matching the target scene object from the subset of scene images by,
- zeroing a feature matching weight for each scene object other than the target scene object in the media image, and determining from the subset of scene images a scene image having a highest matching degree with the target scene object as the scene image matching the target scene object.
A non-transitory computer-readable storage medium, having an instruction stored thereon, wherein when the instruction in the storage medium is executed by a processor of a mobile terminal, the mobile terminal is configured to implement an image processing method, the method comprising:
- obtaining a media image, the media image having a target scene object at least partially shielded;
- determining a target shielding object from the media image, the target shielding object at least partially shielding the target scene object;
- performing image inpainting on a first region of the media image corresponding to the target shielding object to generate a target media image;
- obtaining parameters of capturing the media image, the parameters comprising at least two of time information of capturing the media image, location information of capturing the media image, orientation information of capturing the media image, season information of capturing the media image, illuminance information of capturing the media image, angle information of capturing the media image, and weather information of capturing the media image;
- and
- determining, based on at least two of the time information, the location information, the orientation information, the season information, the illuminance information, the angle information or the weather information, a subset of scene images matching the parameters from a set of scene images comprised in a cloud database;
- and
- obtaining a scene image matching the target scene object from the subset of scene images;
- wherein the obtaining the scene image matching the target scene object from the subset of scene images comprises:
- zeroing a feature matching weight for each scene object other than the target scene object in the media image, and determining from the subset of scene images a scene image having a highest matching degree with the target scene object as the scene image matching the target scene object.
Dependencies are inferred from the claim text.