Image processing method, electronic device and storage medium for a live-action shooting image
View Patent ↗Embodiments of the present disclosure provide an image processing method and apparatus, an electronic device, and a program product. The method includes: obtaining a live-action shooting image; determining a target object image in the live-action shooting image, where the target object image is an image containing a target object; acquiring a displaying object associated with the target object; determining, according to the target object image, a target displaying position of the displaying object in the live-action shooting image; and displaying the displaying object at the target displaying position in the live-action shooting image. According to the technical solution provided by the embodiments, an augmented reality display technology is used for directly displaying the displaying object associated with the target object; and reconstruction of a virtual model is no longer required, thereby saving computing resources, improving display efficiency, and enabling a user to obtain better interaction experience and visual experience.
1 . An image processing method, comprising:
obtaining a live-action shooting image;
determining a target object image in the live-action shooting image, wherein the target object image is an image containing a target object;
acquiring a displaying object associated with the target object;
determining, according to the target object image, a target displaying position of the displaying object in the live-action shooting image; and
displaying the displaying object at the target displaying position in the live-action shooting image, wherein
the determining a target object image in the live-action shooting image comprises:
acquiring a reference image, wherein the reference image is an image that is preset in an image database and includes a standard image of the target object; and
determining, by performing feature matching on a feature of the live-action shooting image and a feature of the reference image, the target object image in the live-action shooting image,
the reference image comprises a preset displaying position,
the determining, according to the target object image, a target displaying position of the displaying object in the live-action shooting image comprises:
performing model adaptation on the target object image and the reference image, to determine the target displaying position of the displaying object in the live-action shooting image based on the preset displaying position in the reference image, and
the preset displaying position is a displaying position of the displaying object associated with the target object in the reference image.
2 . The image processing method according to claim 1 ,
wherein the acquiring a reference image comprises:
extracting a global feature of the live-action shooting image;
matching the global feature of the live-action shooting image with a global feature of at least one to-be-referenced image stored in the image database; and
determining a to-be-referenced image matched with the global feature of the live-action shooting image as the reference image.
3 . The image processing method according to claim 1 , wherein the performing model adaptation on the target object image and the reference image, to determine the target displaying position of the displaying object in the live-action shooting image based on the preset displaying position in the reference image comprises:
determining, according to the reference image and the target object image, an image affine transformation matrix; and
performing, according to the image affine transformation matrix, affine transformation on the preset displaying position in the reference image, to obtain the target displaying position of the displaying object in the live-action shooting image.
4 . The image processing method according to claim 3 , wherein the determining, according to the reference image and the target object image, an image affine transformation matrix comprises:
extracting a local feature of the target object image;
matching the local feature of the target object image with a local feature of the reference image, to obtain a mapping relationship between the local features; and
determining, according to the mapping relationship between the local features, the image affine transformation matrix.
5 . The image processing method according to claim 3 , wherein
the reference image comprises a reference coordinate point of the preset displaying position, and
the performing, according to the image affine transformation matrix, affine transformation on the preset displaying position in the reference image, to obtain the target displaying position of the displaying object in the live-action shooting image comprises:
performing, according to the image affine transformation matrix, affine transformation on the reference coordinate point, to obtain a transformed target reference coordinate point; and
determining, according to the target reference coordinate point, the target displaying position of the displaying object in the live-action shooting image.
6 . The image processing method according to claim 1 , wherein after determining a target object image in the live-action shooting image, the method further comprises:
uploading the target object image to a server; and
receiving the displaying object returned by the server, so as to display the displaying object.
7 . The image processing method according to claim 1 , wherein the displaying the displaying object at the target displaying position in the live-action shooting image comprises:
based on an augmented reality display technology, displaying the displaying object, in a superimposition manner, at the target displaying position in the live-action shooting image.
8 . The image processing method according to claim 1 , further comprising:
responding to a triggering operation by a user on the displaying object displayed in the live-action shooting image; and
displaying a triggering result of the displaying object in the live-action shooting image.
9 . The image processing method according to claim 1 , wherein the target object is a landmark building.
10 . The image processing method according to claim 9 , further comprising:
displaying a landmark name of the landmark building in the live-action shooting image.
11 . An electronic device, comprising:
at least one processor; and
a memory for storing a computer program; wherein when the computer program is executed by the at least one processor, the at least one processor is configured to:
obtain a live-action shooting image;
determine a target object image in the live-action shooting image, wherein the target object image is an image containing a target object;
acquire a displaying object associated with the target object;
determine, according to the target object image, a target displaying position of the displaying object in the live-action shooting image; and
display the displaying object at the target displaying position in the live-action shooting image, wherein
when determining the target object image in the live-action shooting image, the at least one processor is further configured to:
acquire a reference image, wherein the reference image is an image that is preset in an image database and includes a standard image of the target object; and
determine, by performing feature matching on a feature of the live- action shooting image and a feature of the reference image, the target object image in the live-action shooting image,
the reference image comprises a preset displaying position,
when determining, according to the target object image, a target displaying position of the displaying object in the live-action shooting image, the at least one processor is further configured to:
perform model adaptation on the target object image and the reference image, to determine the target displaying position of the displaying object in the live-action shooting image based on the preset displaying position in the reference image, and
the preset displaying position is a displaying position of the displaying object associated with the target object in the reference image.
12 . The electronic device according to claim 11 , wherein the at least one processor is configured to:
upload the target object image to a server; and
receive the displaying object returned by the server, so as to display the displaying object.
13 . The electronic device according to claim 11 , wherein the at least one processor is configured to:
respond to a triggering operation by a user on the displaying object displayed in the live-action shooting image; and
display a triggering result of the displaying object in the live-action shooting image.
14 . A non-transitory computer readable storage medium, wherein the computer readable storage medium stores therein computer execution instructions, and when the computer execution instructions are executed by a processor, the processor is configured to:
obtain a live-action shooting image;
determine a target object image in the live-action shooting image, wherein the target object image is an image containing a target object;
acquire a displaying object associated with the target object;
determine, according to the target object image, a target displaying position of the displaying object in the live-action shooting image; and
display the displaying object at the target displaying position in the live-action shooting image, wherein
when determining the target object image in the live-action shooting image, the at least one processor is further configured to:
acquire a reference image, wherein the reference image is an image that is preset in an image database and includes a standard image of the target object; and
determine, by performing feature matching on a feature of the live-action shooting image and a feature of the reference image, the target object image in the live-action shooting image,
the reference image comprises a preset displaying position,
when determining, according to the target object image, a target displaying position of the displaying object in the live-action shooting image, the processor is further configured to:
perform model adaptation on the target object image and the reference image, to determine the target displaying position of the displaying object in the live-action shooting image based on the preset displaying position in the reference image, and
the preset displaying position is a displaying position of the displaying object associated with the target object in the reference image.