Image capturing method, apparatus, and storage medium
AssigneeBeijing Xiaomi Mobile Software Co., Ltd.
InventorsXiaojun Wu, Daming Xing
Life of this patent
Estimating the term…
Abstract
A method and an apparatus for image capturing, and a storage medium can be applied to a terminal device. When it is determined that the terminal is in an augmented reality image capturing scene, augmented reality environment information of the augmented reality image capturing scene is determined. When an image capturing instruction is received, an image is captured and augmented reality environment information corresponding to the image is recorded to obtain a target image carrying the augmented reality environment information.
Claims14
A method for image capturing, applicable to a terminal, the method comprising:
- in response to determining that the terminal is in an augmented reality image capturing scene, determining augmented reality environment information of the augmented reality image capturing scene;
- and
- in response to receiving an image capturing instruction and the image capturing instruction being an instruction for capturing an image, capturing an image and recording the augmented reality environment information corresponding to the image, to obtain a target image carrying the augmented reality environment information, comprising:
- capturing a preview image;
- recording the augmented reality environment information for acquiring the preview image using an augmented reality algorithm;
- associating the preview image with the augmented reality environment information for acquiring the preview image, to obtain the target image carrying the augmented reality environment information;
- packaging the augmented reality environment information of the target image into a file of the target image in a manner depending on a file storage type of the target image, to obtain a target picture carrying the augmented reality environment information;
- and
- in response to receiving an instruction for performing augmented reality on the target picture, performing an augmented reality processing on the target picture according to the augmented reality environment information of the target picture;
- wherein packaging the augmented reality environment information comprises:
- writing a length of the augmented reality environment information into XMP metadata of the file and attaching the augmented reality environment information to an end of the file in response to the file storage type is JPEG format;
- wherein performing the augmented reality processing on the target picture comprises:
- in response to the instruction for performing augmented reality on the target picture, obtaining the length of the augmented reality environment information from the XMP metadata,
- obtaining the augmented reality environment information by determining a starting point for the augmented reality environment information based on the length and an end position of the file, and
- performing the augmented reality processing using the augmented reality environment information.
An apparatus for image capturing, comprising:
- a processor;
- a memory component configured to store instructions executable by the processor;
- wherein the processor is configured to:
- in response to determining that the terminal is in an augmented reality image capturing scene, determine augmented reality environment information of the augmented reality image capturing scene;
- and
- in response to receiving an image capturing instruction and the image capturing instruction being an instruction for capturing an image, capture an image and record the augmented reality environment information corresponding to the image, to obtain a target image carrying the augmented reality environment information by:
- capturing a preview image;
- recording the augmented reality environment information for acquiring the preview image using an augmented reality algorithm;
- associating the preview image with the augmented reality environment information for acquiring the preview image, to obtain the target image carrying the augmented reality environment information;
- packaging the augmented reality environment information of the target image into a file of the target image in a manner depending on a file storage type of the target image, to obtain a target picture carrying the augmented reality environment information, comprising:
- writing a length of the augmented reality environment information into XMP metadata of the file and attaching the augmented reality environment information to an end of the file in response to the file storage type is JPEG format;
- and
- in response to receiving an instruction for performing augmented reality on the target picture, performing an augmented reality processing on the target picture according to the augmented reality environment information of the target picture;
- wherein the processor is further configured to:
- in response to the instruction for performing augmented reality on the target picture, obtain the length of the augmented reality environment information from the XMP metadata,
- obtain the augmented reality environment information by determining a starting point for the augmented reality environment information based on the length and an end position of the file, and
- perform the augmented reality processing using the augmented reality environment information.
A non-transitory computer-readable storage medium having instructions stored therein, wherein when the instructions are executed by a processor, a method for image capturing is implemented, the method comprising:
- in response to determining that the terminal is in an augmented reality image capturing scene, determining augmented reality environment information of the augmented reality image capturing scene;
- and
- in response to receiving an image capturing instruction and the image capturing instruction being an instruction for capturing an image, capturing an image and recording the augmented reality environment information corresponding to the image, to obtain a target image carrying the augmented reality environment information, comprising:
- capturing a preview image;
- recording the augmented reality environment information for acquiring the preview image using an augmented reality algorithm;
- associating the preview image with the augmented reality environment information for acquiring the preview image, to obtain the target image carrying the augmented reality environment information;
- packaging the augmented reality environment information of the target image into a file of the target image in a manner depending on a file storage type of the target image, to obtain a target picture carrying the augmented reality environment information;
- and
- in response to receiving an instruction for performing augmented reality on the target picture, performing an augmented reality processing on the target picture according to the augmented reality environment information of the target picture;
- wherein packaging the augmented reality environment information comprises:
- writing a length of the augmented reality environment information into XMP metadata of the file and attaching the augmented reality environment information to an end of the file in response to the file storage type is JPEG format;
- wherein performing the augmented reality processing on the target picture comprises:
- in response to the instruction for performing augmented reality on the target picture, obtaining the length of the augmented reality environment information from the XMP metadata,
- obtaining the augmented reality environment information by determining a starting point for the augmented reality environment information based on the length and an end position of the file, and
- performing the augmented reality processing using the augmented reality environment information.
Dependencies are inferred from the claim text.