Image display method, device, equipment, and medium
The image display method automates image beautification and stitching by processing multiple images to create stylized composite images, reducing time and enhancing quality and user experience.
Patent Information
- Application Number
- JP2023548277
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-02-09
- Filing Date
- 2022-01-29
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2042-01-29
AI Technical Summary
Users face high time costs and uncertain quality in creating stitched images due to complex image beautification and editing operations, leading to a poor user experience, especially when they are not skilled in image beautification or editing.
An image display method and device that performs style transition processing on multiple original images to generate stylized images, which are then combined with a background image to create a composite image, automating beautification and stitching processes.
Reduces time and effort required for creating composite images while improving their quality and user experience by automating image beautification and stitching.
Smart Images

Figure 0007568378000001 
Figure 0007568378000002 
Figure 0007568378000003
Abstract
Description
[Technical field]
[0001] (Reference to Related Application) This application claims priority to a Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on February 9, 2021, bearing application number 202110178213.3 and entitled "Image Display Method, Apparatus, Equipment and Media", the entire contents of which are incorporated herein by reference.
[0002] (Technical field) The present disclosure relates to the field of multimedia technology, and in particular to an image display method, device, apparatus, and medium. [Background technology]
[0003] With the rapid development of computer technology and mobile communication technology, various image beautification platforms on electronic devices are widely applied to enrich people's daily life. More and more users use image beautification platforms to beautify images, such as adding filter effects or stitching several images together. Summary of the Invention [Problem to be solved by the invention]
[0004] In the process of image stitching, a user must first perform some complex image beautification operations on an image, such as face beautification, background beautification, etc., and then perform image editing operations, such as image cutting, image stitching, etc., on the beautified image, and finally generate a stitched image. If a user is not good at image beautification or image editing, not only will the time cost of creating a stitched image be high, but the quality of the stitched image cannot be guaranteed, which will reduce the user experience.
[0005] SUMMARY OF THE DISCLOSURE In order to solve the above technical problems, or at least a part thereof, the present disclosure provides an image display method, device, apparatus, and medium. [Means for solving the problem]
[0006] According to a first aspect, the present disclosure provides an image display method, the method comprising: obtaining a plurality of original images, the original images being images including an original object; performing a style transition process on original objects in the plurality of original images, respectively, to obtain a plurality of stylized images corresponding to the target styles of the plurality of original images; and displaying a composite image, the composite image being an image obtained by combining the plurality of stylized images with a background image corresponding to the target style.
[0007] According to a second aspect, the present disclosure provides an image display device, the device comprising: an image capture unit arranged to capture a plurality of original images, the original images being images including an original object; a first processing unit arranged to perform a style transition process on original objects in a plurality of original images respectively to obtain a plurality of stylized images of the plurality of original images corresponding to a target style; The first display unit includes a first display unit arranged to display a composite image, the composite image being an image obtained by combining a plurality of stylized images with a background image corresponding to the target style.
[0008] According to a third aspect, the present disclosure provides an image display device, the device comprising: A processor; a memory storing executable instructions; The processor implements the image display method according to the first aspect by reading and executing executable instructions from the memory.
[0009] According to a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored therein, the computer program causing the processor to realize the image display method according to the first aspect when executed by a processor. Effect of the Invention
[0010] Compared with the prior art, the technical solutions provided by the embodiments of the present disclosure have the following advantages: According to the image display method, device, equipment, and medium of the embodiments of the present disclosure, after obtaining a plurality of original images including original objects, a style transition process is performed on each of the original objects in the plurality of original images to obtain a plurality of stylized images corresponding to a target style of the plurality of original images, and a composite image obtained by combining the plurality of stylized images with a background image corresponding to the target style can be displayed; further, target style beautification and image stitching can be automatically performed on the original images, eliminating the need for a user to manually perform image beautification operations or image editing operations, and a composite image having the target style can be automatically generated using the original images, thereby reducing the time cost of creating the composite image, improving the quality of the composite image, and improving the user experience. [Brief description of the drawings]
[0011] The above and other features, advantages, and aspects of each embodiment of the present disclosure will become more apparent with reference to the following specific embodiments in conjunction with the drawings, in which the same or similar reference numerals indicate the same or similar elements, and in which the drawings are schematic and the parts and elements are not necessarily drawn to scale. [Figure 1] FIG. 2 is a flow diagram of an image display method according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a flow diagram of another image display method according to an embodiment of the present disclosure. [Diagram 3] FIG. 13 is a flow diagram of another image display method according to an embodiment of the present disclosure. [Figure 4] FIG. 2 is a flow diagram of an image processing procedure according to an embodiment of the present disclosure. [Diagram 5] FIG. 13 is a flow diagram of another image processing procedure according to an embodiment of the present disclosure. [Figure 6] 1 is a schematic diagram illustrating a configuration of an image display device according to an embodiment of the present disclosure. [Figure 7] FIG. 1 is a schematic diagram illustrating a configuration of an image display device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. The drawings show some embodiments of the present disclosure, but the present disclosure is not limited to the embodiments described herein and may be realized in various forms, and these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. Here, the drawings and embodiments of the present disclosure do not limit the scope of protection of the present disclosure, but are merely illustrative.
[0013] Here, the steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel, and the method embodiments may include additional steps and / or omit the performance of steps shown, and the scope of the present disclosure is not limited in this respect.
[0014] As used herein, the term "including" and variations thereof are intended to be open inclusive, i.e., meaning "including, but not limited to." The term "based on" means "based at least in part on." The term "in one embodiment" refers to "at least one embodiment," the term "in another embodiment" refers to "at least one other embodiment," and the term "in some embodiments" refers to "at least some embodiments." Relevant definitions of other terms are provided below.
[0015] Here, concepts such as "first", "second", etc. referred to in the present disclosure are merely intended to distinguish different devices, modules or units, and do not limit the order or interdependence of functions performed by these devices, modules or units.
[0016] Herein, the modifications "one" and "multiple" referred to in the present disclosure are intended to be general rather than limiting, and as will be understood by those skilled in the art, unless otherwise expressly indicated in the specification, they are to be understood as "one or multiple."
[0017] The names of messages or information interacted between multiple devices in the embodiments of the present disclosure do not limit the scope of these messages or information, but are merely for explanation.
[0018] The embodiments of the present disclosure provide an image display method, apparatus, device, and medium that can automatically perform image beautification and image stitching on an image.
[0019] Hereinafter, first, an image display method provided by an embodiment of the present disclosure will be described with reference to FIG.
[0020] In some embodiments of the present disclosure, the image display method is performed by an electronic device, which may include devices with communication functions, such as mobile phones, tablets, desktop computers, notebook computers, in-vehicle terminals, wearable devices, multifunction devices, and smart home devices, or may be devices simulated by a virtual machine or a simulator.
[0021] FIG. 1 is a schematic flow diagram of one image display method provided by an embodiment of the present disclosure.
[0022] As shown in FIG. 1, the image display method includes the following steps. S110: A plurality of original images are obtained, and the original images are images including an original object.
[0023] In an embodiment of the present disclosure, when a user wants to perform beautification and image stitching on a specified original object, the user obtains multiple original images containing the original object via an electronic device.
[0024] In the embodiment of the present disclosure, the original object can be preset according to actual needs, and is not limited here.
[0025] In some embodiments, the original object includes at least one of a person, an animal, or a thing.
[0026] In some alternative embodiments, the original object may include designated parts, such as designated body parts on people and animals.
[0027] For example, the original objects may include all human heads or animal heads.
[0028] In some embodiments of the present disclosure, the original image may be an image captured in real time by a user using an electronic device.
[0029] Specifically, the user controls the electronic device to enter an image capture mode, and while the electronic device is in the image capture mode, the user can continuously capture images in a capture manner specified by the image capture mode to obtain multiple original images.
[0030] For example, the original object may be the user's head, in which case, while the electronic device is in an image capture mode, the user triggers the electronic device to capture an image by blinking, thereby obtaining an original image, whereby the electronic device captures an image once each time a blinking action of the user is detected, to obtain an original image including the user's head.
[0031] In some alternative embodiments, the original image may be an image selected by the user from local images stored in the electronic device.
[0032] Specifically, the user controls the electronic device to enter an image selection mode, and during the process when the electronic device is in the image selection mode, the user can select multiple original images from the local images displayed on the electronic device.
[0033] Here, in the process of a user taking a photograph in real time using an electronic device, by loading algorithm resources such as a facial expression detection algorithm, a posture detection algorithm, an object modification algorithm, etc., the electronic device can trigger a photograph based on a specified posture or a specified facial expression, and perform initial modification, such as makeup, filters, etc., on the original object in the photographed original image. However, since the above algorithms require a large number of resources, in the process of a user selecting an original image from local images stored in the electronic device, the resources required for the above algorithms are released to reduce the resource occupancy rate of the electronic device.
[0034] In the embodiment of the present disclosure, the number of original images can be preset according to actual needs, and is not limited here, for example, the number of original images can be 3, 5, etc.
[0035] In the embodiment of the present disclosure, one original image may include one original object, or may include multiple original objects, which is not limited here.
[0036] For example, the original object may be a user's head, and one original object may include one user's head or may include multiple user's heads, which is not limiting here.
[0037] S120: Perform style transition processing on original objects in the multiple original images, respectively, to obtain multiple stylized images corresponding to target styles of the multiple original images.
[0038] In an embodiment of the present disclosure, an electronic device obtains a plurality of original images, and then performs a style transition process on an original object in each original image according to a predetermined stylization processing manner to obtain a stylized image having a target style corresponding to each original image, the stylized image being an image obtained by beautifying each original image. The predetermined stylization processing manner may be a style transition process for the target style.
[0039] The target style can be preset according to actual needs, and is not limited here, for example, the target style can be a cartoon style.
[0040] In some embodiments of the present disclosure, when an original image is an image containing one original object, the electronic device can directly perform style transition processing on the original object in the original image to obtain a stylized image.
[0041] In some other embodiments of the present disclosure, when the original image is an image including multiple original objects, S120 may specifically include a step of performing a style transition process on the original object with the largest size in each original image to obtain multiple stylized images.
[0042] Specifically, for each original image, the electronic device performs style transition processing on only the original object in the original image that has the largest size, and obtains a stylized image corresponding to the original image, thereby generating a stylized image corresponding to one most dominant original object from one original image.
[0043] In some other embodiments of the present disclosure, when the original image is an image including multiple original objects, S120 may specifically further include a step of performing a style transition process on each original object in each original image to obtain a stylized image corresponding to each original object in each original image.
[0044] Specifically, for each original image, the electronic device can perform a style transition process on each original object in the original image to obtain a styled image corresponding to each original object in the original image.
[0045] S130: Display a composite image, the composite image being an image obtained by combining a plurality of stylized images with a background image corresponding to a target style.
[0046] In an embodiment of the present disclosure, an electronic device acquires a plurality of stylized images, then acquires a background image corresponding to a target style, and displays a composite image by combining the plurality of stylized images with the background image corresponding to the target style, the composite image being an image obtained by performing image stitching on the plurality of stylized images.
[0047] In an embodiment of the present disclosure, multiple background images are pre-stored in the electronic device, and the multiple background images may have the same image style, for example, a target style, or may have different image styles, which is not limited here.
[0048] Specifically, after obtaining a plurality of stylized images, the electronic device can obtain a background image corresponding to a target style from a plurality of pre-stored background images for generating a composite image.
[0049] In some embodiments, the background image corresponding to the target style for generating the composite image may be an image randomly selected from a plurality of pre-stored background images corresponding to the target style.
[0050] Specifically, after generating a plurality of stylized images, the electronic device can randomly select one background image corresponding to the target style from pre-stored background images as the background image corresponding to the target style for generating a composite image.
[0051] In some other embodiments, the background image corresponding to the target style for generating the composite image is a pre-stored background image corresponding to the target style into which a target number of stylized images can be placed, and the target number may be the total number of original images.
[0052] Specifically, after generating a plurality of stylized images, the electronic device can determine the total number of acquired original images, and then select a background image in which the target number of stylized images can be placed from among pre-stored background images corresponding to the target style as the background image corresponding to the target style for generating a composite image.
[0053] In some other embodiments, the background image corresponding to the target style for generating a composite image may be a pre-stored background image corresponding to the target style onto which a target number of stylized images can be placed, and the target number may be the total number of stylized images generated by the electronic device, and the description will not be repeated here.
[0054] In the embodiment of the present disclosure, one background image belongs to one scenario type, for example, the scenario types may include a party scenario type, a shopping scenario type, a Chinese New Year reunion scenario type, etc.
[0055] In some embodiments, the background images corresponding to the target styles for generating the synthetic images belong to randomly selected scenario types.
[0056] Specifically, after generating a plurality of stylized images, the electronic device randomly selects a background image belonging to any scenario type from pre-stored background images corresponding to the target style as a background image corresponding to the target style for generating a composite image.
[0057] In some other embodiments, the background image corresponding to the target style for generating the synthetic image belongs to a target scenario type, and the target scenario type is determined based on the image background of the original image.
[0058] Specifically, after generating multiple stylized images, the electronic device recognizes a scenario type corresponding to the image background of each original image based on a pre-installed scenario recognition algorithm, sets the most common scenario type corresponding to the original image as a target scenario type, and selects a background image belonging to the target scenario type from the pre-stored background images corresponding to the target style as a background image corresponding to the target style for generating a composite image.
[0059] In an embodiment of the present disclosure, after obtaining a plurality of original images including original objects, a style transition process is respectively performed on the original objects in the plurality of original images to obtain a plurality of stylized images corresponding to the target styles of the plurality of original images, and a composite image obtained by synthesizing the plurality of stylized images with a background image corresponding to the target style can be displayed; and further, target style beautification and image stitching are automatically performed on the original images, so that the user does not need to manually perform image beautification operations or image editing operations, and a composite image having the target style can be automatically generated according to the original images, thereby reducing the time cost of creating the composite image, improving the quality of the composite image, and improving the user experience.
[0060] In one embodiment of the present disclosure, S120 specifically comprises: performing object recognition processing on each of the original images to obtain original object images corresponding to original objects in each of the original images; performing a style transition process on each original object image respectively to obtain a stylized image corresponding to each original object image.
[0061] In some embodiments, when an original image is an image containing one original object, the electronic device can directly use the object recognition model obtained by pre-training to perform object recognition processing on each original image to obtain original object images corresponding to the original objects in each original image, and then use the style transition model obtained by pre-training to perform style transition processing on each obtained original object image to obtain stylized images corresponding to each original object image.
[0062] In some other embodiments, when the original image is an image including multiple original objects, the electronic device can perform an object recognition process on each original image using an object recognition model obtained by pre-training to obtain an original object image corresponding to an original object having a maximum size in each original image, and then perform a style transition process on each of the obtained original object images using a style transition model obtained by pre-training to obtain a stylized image corresponding to each original object image.
[0063] In some other embodiments, when the original image is an image including multiple original objects, the electronic device may perform an object recognition process on each original image using an object recognition model obtained by pre-training to obtain original object images corresponding to each original object in each original image, and then perform a style transition process on each of the obtained original object images using a style transition model obtained by pre-training to obtain stylized images corresponding to each original object image.
[0064] Thus, in the embodiment of the present disclosure, a stylized image having a target style can be quickly obtained, which improves the interest and convenience of image beautification.
[0065] In another embodiment of the present disclosure, in order to improve the aesthetics of the stylized image obtained by style transition, S120 may specifically include the following steps: S121: A style transition process is performed on each of original object images in a plurality of original images to obtain a plurality of style transition images corresponding to target styles of the plurality of original images.
[0066] In some embodiments, when an original image is an image including one original object, the electronic device can directly perform object recognition processing on each original image using an object recognition model obtained by pre-training to obtain original object images and area matrices of the original object images corresponding to the original objects in each original image, and then perform style transition processing on each original object image using a style transition model obtained by pre-training to obtain style transition images corresponding to each original object image, and the area matrix of the original object image can be used as the area matrix of the style transition image.
[0067] In some other embodiments, when the original image is an image including a plurality of original objects, the electronic device performs an object recognition process on each original image using an object recognition model obtained by pre-training, to obtain an original object having a maximum size in each original image, an original object image corresponding to the original object having the maximum size, and a region matrix of the original object image, and performs a style transition process on each of the obtained original object images using a style transition model obtained by pre-training, to obtain a style transition image corresponding to each original object image, and the region matrix of the original object image can be the region matrix of the style transition image.
[0068] In some other embodiments, when the original image is an image including a plurality of original objects, the electronic device may perform an object recognition process on each original image using an object recognition model obtained by pre-training to obtain original object images and area matrices of the original object images corresponding to each original object in each original image, and then perform a style transition process on each of the obtained original object images using a style transition model obtained by pre-training to obtain style transition images corresponding to each original object image, and use the area matrix of the original object images as the area matrix of the style transition images.
[0069] S122: Object modification processing is performed on each of the plurality of style transition images to obtain a plurality of stylized images corresponding to the plurality of style transition images.
[0070] After obtaining the style transition image and the area matrix of the style transition image, the electronic device performs background removal processing on each original image to obtain a main body image corresponding to the main body to which each original object in each original image belongs, and performs the following object modification processing on each style transition image, i.e., performs forward matrix transformation based on the area matrix of the style transition image to merge the style transition image into the corresponding main body image to obtain a fused image, performs object modification on the fused image to obtain a modified image, and performs inverse matrix transformation on the modified image based on the area matrix of the style transition image to obtain a stylized image.
[0071] After obtaining the original object having the largest size, the style transition image, and the area matrix of the style transition image in each original image, the electronic device performs a background removal process on each original image, obtains a main body image corresponding to the main body to which the original object having the largest size in each original image belongs, and performs the following object modification process on each style transition image, i.e., performs a forward matrix transformation based on the area matrix of the style transition image to merge the style transition image into the corresponding main body image to obtain a fusion image, performs object modification on the fusion image to obtain a modified image, and performs an inverse matrix transformation on the modified image based on the area matrix of the style transition image to obtain a stylized image.
[0072] The object modification may include object enlargement / deformation, filter addition, and other modification methods, and is not limited thereto.
[0073] Therefore, in the embodiment of the present disclosure, a stylized image having a target style and a target decoration effect can be quickly obtained, which improves the interest of image beautification.
[0074] In order to improve the interest of interaction, the embodiment of the present disclosure further provides another image display method, in which before displaying the composite image, the method further includes displaying a plurality of stylized images according to a predetermined image display manner, and the display of the composite image specifically includes switching the plurality of stylized images into the composite image according to a predetermined image switching manner. Hereinafter, the description will be given with reference to FIG. 2.
[0075] In some embodiments of the present disclosure, the image display method can be performed by an electronic device, which may include devices with communication functions, such as mobile phones, tablets, desktop computers, notebook computers, in-vehicle terminals, wearable devices, multifunction devices, and smart home devices, or may be devices simulated by a virtual machine or a simulator.
[0076] FIG. 2 is a schematic flow diagram of another image display method provided by an embodiment of the present disclosure.
[0077] As shown in FIG. 2, the image display method includes the following steps. S210: A plurality of original images are obtained, and the original images are images including an original object. S220: Perform style transition processing on original objects in the multiple original images, respectively, to obtain multiple stylized images corresponding to the target styles of the multiple original images. S210 to S220 are similar to S110 to S120 in the embodiment of FIG. 1, and therefore the description will not be repeated here. S230: A plurality of stylized images are displayed according to a predetermined image display method.
[0078] In the embodiment of the present disclosure, after acquiring the plurality of stylized images, the electronic device can further display the plurality of stylized images according to an image display manner corresponding to the acquisition manner of the original images.
[0079] In some embodiments, when the acquisition method of the original images is real-time shooting and acquisition by the electronic device, each time the electronic device captures an original image, it performs a style transition process on the captured original image to obtain a stylized image corresponding to the original image, displays the stylized image corresponding to the original image in the middle of the shooting preview interface according to a specified size, rotates and moves the stylized image corresponding to the original image to the top of the shooting preview interface, and after the capture of all the original images is completed, the stylized images corresponding to all the original images are displayed at the top of the shooting preview interface.
[0080] In some other embodiments, when the acquisition method of the original images is real-time shooting and acquisition by the electronic device, after completing the shooting of all the original images, the electronic device further performs a style transition process on the original objects in each original image respectively to obtain a stylized image corresponding to each original image, and displays the stylized images corresponding to each original image in sequence in the shooting preview interface according to the image shooting order, displays the stylized images corresponding to the original images in the middle of the shooting preview interface according to a specified size, and rotates and moves the stylized images corresponding to all the original images to the top of the shooting preview interface until they are displayed at the top of the shooting preview interface.
[0081] In some other embodiments, when the original image acquisition manner is local selection by the electronic device, after the selection of all the original images is completed, the electronic device further performs a style transition process on the original objects in each original image respectively, acquires a stylized image corresponding to each original image, displays the stylized image corresponding to each original image in sequence according to the image selection order, displays the original images in full screen, makes the original images disappear with a white flash animation, pops in the stylized image corresponding to the original image so as to rotate from a designated boundary of the interface, and places the popped-in stylized image in the designated position until the stylized images corresponding to all the original images are displayed in their respective designated positions.
[0082] S240: Display a composite image, the composite image being an image obtained by combining a plurality of stylized images with a background image corresponding to the target style.
[0083] Specifically, the electronic device can switch between a plurality of stylized images to display a composite image in accordance with a predetermined image switching method.
[0084] Optionally, the predetermined image switching scheme may include a predetermined transition animation scheme.
[0085] After displaying the plurality of stylized images, the electronic device switches from the interface in which the plurality of stylized images is displayed to the interface in which the composite image is displayed in accordance with a predetermined transition animation scheme, and displays the composite image.
[0086] The transition video method may be preset according to actual needs, and is not limited here, For example, the transition video method may be a crayon video transition method, a gradation video transition method, etc.
[0087] Therefore, in an embodiment of the present disclosure, before displaying the composite image, a plurality of stylized images may be first displayed based on a predetermined image display manner, thereby increasing the interaction process with the user and further improving the interest of the interaction.
[0088] In order to improve the interest of the image stitching effect, an embodiment of the present disclosure further provides another image display method, in which the method further includes the steps of: before displaying a composite image, obtaining image parameters of each stylized image, determining display parameters of each stylized image according to the image parameters, and stitching a plurality of stylized images to a background image according to the display parameters to obtain a composite image. Hereinafter, the description will be given with reference to FIG. 3.
[0089] In some embodiments of the present disclosure, the image display method can be performed by an electronic device, which may include devices with communication functions, such as mobile phones, tablets, desktop computers, notebook computers, in-vehicle terminals, wearable devices, multifunction devices, and smart home devices, or may be devices simulated by a virtual machine or a simulator.
[0090] FIG. 3 is a schematic flow diagram of another image display method provided by an embodiment of the present disclosure.
[0091] As shown in FIG. 3, the image display method can include the following steps. S310: A plurality of original images are obtained, and the original images are images including an original object. S320: Perform style transition processing on original objects in the multiple original images, respectively, to obtain multiple stylized images corresponding to target styles of the multiple original images. Since S310 to S320 are similar to S110 to S120 in the embodiment of FIG. 1, the description will not be repeated here. S330: Obtain image parameters for each stylized image.
[0092] In an embodiment of the present disclosure, the electronic device may obtain a stylized image corresponding to each original image, and then obtain image parameters of each stylized image.
[0093] Optionally, the image parameters may include any one of: an acquisition order of an original image corresponding to the stylized image; an object rotation angle corresponding to the stylized image.
[0094] In some embodiments, the electronic device may determine original images corresponding to the stylized images, and the order of acquisition of the original images corresponding to each stylized image may be an image parameter for each stylized image.
[0095] In some other embodiments, the electronic device may perform object rotation angle detection for each stylized image based on a predetermined object pose detection algorithm to obtain an object rotation angle corresponding to each stylized image.
[0096] The object rotation angle may include at least one of an object yaw angle, an object pitch angle, and an object roll angle.
[0097] For example, if the original object includes a head, the object rotation angles of the stylized image may include at least one of a head yaw angle, a head pitch angle, and a head roll angle.
[0098] S340: Determine display parameters for each stylized image based on the image parameters.
[0099] In an embodiment of the present disclosure, the electronic device can obtain image parameters of each stylized image, and then determine display parameters of each stylized image within a background image based on the image parameters of each stylized image.
[0100] Specifically, the electronic device first obtains a background image for generating a composite image, and obtains a plurality of sets of predetermined display parameters corresponding to the background image, and the set of predetermined display parameters is used to arrange one stylized image in the background image. The electronic device can select display parameters of each stylized image in the background image from the plurality of sets of predetermined display parameters corresponding to the background image according to the image parameters of each stylized image.
[0101] When the image parameters are the acquisition order of an original image corresponding to a stylized image, a set of predefined display parameters can correspond to one acquisition order, so that the electronic device directly selects, from multiple sets of predefined display parameters corresponding to background images, a set of predefined display parameters corresponding to the acquisition order of an original image corresponding to the stylized image as display parameters of the stylized image within a predefined stylized background image.
[0102] When the image parameter is an object rotation angle corresponding to a stylized image, a set of predefined display parameters can correspond to a rotation angle range, so that the electronic device can directly select, from multiple sets of predefined display parameters corresponding to background images, a set of predefined display parameters corresponding to the rotation angle range within which the object rotation angle corresponding to the stylized image falls, as display parameters for the stylized image in the background image.
[0103] For example, when the stylized image is a head image having a target style and the object rotation angle of the stylized image includes the head yaw angle, a set of predefined display parameters can correspond to a yaw angle range, so that the electronic device can directly select, from multiple sets of predefined display parameters corresponding to the background image, a set of predefined display parameters corresponding to the yaw angle range into which the head yaw angle corresponding to the head image of the target style falls, as the display parameters in the background image of the stylized image.
[0104] In the embodiment of the present disclosure, optionally, the display parameters may include at least one of a display size, a display position, and a display angle.
[0105] The display size may be the size at which the stylized image is displayed within the background image to determine a scaling ratio for the size of the stylized image.
[0106] The display position may be the display position of the stylized image in the background image for determining the placement position of the stylized image in the background image.
[0107] The viewing angle may be the viewing angle of the stylized image within the background image to determine the rotation angle of the stylized image.
[0108] S350: Stitch a plurality of stylized images onto a background image according to display parameters to obtain a composite image.
[0109] In an embodiment of the present disclosure, the electronic device can adjust each stylized image from its initial display parameters to display parameters within the background image, and stitch the stylized image after the display parameters are adjusted to the background image to obtain a composite image.
[0110] Specifically, the electronic device first determines a size scaling ratio for each stylized image based on the initial display size of each stylized image and its display size in the background image, performs size adjustment for each stylized image according to the determined size scaling ratio, determines a rotation angle for each stylized image based on the initial display angle of each stylized image and its display angle in the background image, performs angle adjustment for each stylized image according to the determined selected angle, and stitches each stylized image to the background image according to its display position in the background image to obtain a composite image.
[0111] S360: Display a composite image, the composite image being an image obtained by combining a plurality of stylized images with a background image corresponding to the target style.
[0112] Thus, in an embodiment of the present disclosure, the electronic device can automatically determine display parameters in a background image for a stylized image corresponding to each original object, and then perform image stitching on the stylized image in the background image based on the display parameters to obtain a composite image, thereby improving the interest of the image stitching effect.
[0113] For ease of understanding, the image processing procedure according to the embodiment of the present disclosure will be described in detail below with reference to FIG. 4 and FIG.
[0114] FIG. 4 is a flow diagram of an image processing procedure provided by an embodiment of the present disclosure.
[0115] As shown in FIG. 4, the image processing procedure specifically includes the following steps:
[0116] S401: A user inputs a number of original images.
[0117] Specifically, the user controls the electronic device to enter an image selection mode, and during the process when the electronic device is in the image selection mode, selects a number of original images from the local images displayed on the electronic device.
[0118] S402: Generate a cartoon head image corresponding to each original image.
[0119] Specifically, the electronic device inputs each original image into a cartoon style transition model obtained by pre-training, and obtains a cartoon head image corresponding to the head with the largest size in each original image, and a region matrix of each cartoon head image.
[0120] The cartoon head images may include at least one of cartoon human head images and cartoon animal head images.
[0121] S403: Perform background removal processing on each original image to obtain a body image of the body to which the head with the largest size belongs.
[0122] Specifically, the electronic device can perform background removal processing on the main body to which the head having the largest size belongs for each original image, and obtain a main body image corresponding to each original image.
[0123] The body may include at least one of a person and an animal.
[0124] S404: Generate a fused image corresponding to each cartoon head image.
[0125] Specifically, the electronic device performs a positive matrix transformation according to the region matrix of each cartoon head image to fuse each cartoon head image into a corresponding body image, and obtains a fused image corresponding to each cartoon head image.
[0126] S405: Object modification is performed on each fusion image to obtain a modified image.
[0127] Specifically, the electronic device performs modifications such as head enlargement transformation and filter addition on each fusion image to obtain modified images.
[0128] S406: A cartoon big head image corresponding to each modification image is generated.
[0129] Specifically, the electronic device performs inverse matrix transformation on the corresponding modification image according to the area matrix of each cartoon head image, obtains a canvas including a cartoon big head image corresponding to each modification image, and performs image cropping on the canvas based on the area matrix to obtain the cartoon big head image.
[0130] S407: A composite image is generated.
[0131] Specifically, the electronic device can select a cartoon background image of a Spring Festival reunion scenario type, and stitch the cartoon big head image to the cartoon background image respectively to obtain a composite image.
[0132] S408: Display a cartoon big head image.
[0133] Specifically, the electronic device can sequentially display the cartoon head images corresponding to each original image according to the image selection order, display the original images full screen, then cause the original images to disappear by a white flash animation, and the cartoon head images corresponding to the original images pop in from the bottom boundary of the white flash in a rotating manner, and place the popped in cartoon head images at designated positions until the cartoon head images corresponding to all the original images are displayed at their respective designated positions.
[0134] S409: The composite image is displayed.
[0135] Specifically, the electronic device uses a crayon animation transition scheme to switch from displaying a cartoon big head image to displaying a composite image.
[0136] Therefore, in the embodiment of the present disclosure, a user can upload multiple original images, and perform beautification and image stitching on the multiple original images to form a cartoon group photo with the effect of Chinese New Year reunion.
[0137] FIG. 5 is a schematic flow diagram of another image processing procedure provided by an embodiment of the present disclosure.
[0138] As shown in FIG. 5, the image processing procedure specifically includes the following steps:
[0139] S501: A user takes an original image.
[0140] A user can control the electronic device to enter an image capture mode, and while the electronic device is in the image capture mode, it captures an original image in a capture manner designated by the image capture mode.
[0141] S502: A cartoon head image corresponding to the original image is generated.
[0142] Specifically, the electronic device can input the original image into a cartoon style transition model obtained through pre-training, and obtain a cartoon head image corresponding to the head with the largest size in the original image and a region matrix of the cartoon head image.
[0143] The cartoon head images may include at least one of cartoon human head images and cartoon animal head images.
[0144] S503: A background removal process is performed on the original image to obtain a body image of the body to which the head having the maximum size belongs.
[0145] Specifically, the electronic device can perform background removal processing on the main body to which the head having the largest size belongs for each original image, and obtain a main body image corresponding to the original image.
[0146] The body may include at least one of a person and an animal.
[0147] S504: Generate a fused image corresponding to the cartoon head image.
[0148] Specifically, the electronic device performs a positive matrix transformation according to the domain matrix of the cartoon head image to fuse the cartoon head image into the corresponding body image, and obtains a fused image corresponding to the cartoon head image.
[0149] S505: Object modification is performed on the fusion image to obtain a modified image.
[0150] Specifically, the electronic device can perform modifications such as head enlargement transformation and filter addition on the fusion image to obtain a modified image.
[0151] S506: A cartoon big head image corresponding to the decorated image is generated.
[0152] Specifically, the electronic device performs an inverse matrix transformation on a corresponding modified image using the area matrix of the cartoon head image to obtain a canvas including a large cartoon head image corresponding to the modified image, and performs image cropping on the canvas based on the area matrix to obtain the large cartoon head image.
[0153] S507: A cartoon big head image is displayed.
[0154] Specifically, the electronic device displays the cartoon big head image in the middle of the shooting preview interface according to the specified size, and rotates and moves the cartoon big head image to the top of the shooting preview interface.
[0155] S508: Determine whether it is the last original image. If YES, execute S509; if NO, return to S501.
[0156] In one example, the electronic device can determine whether the number of original images captured has reached a specified number, and if YES, it determines that it is the last original image, and if NO, it determines that it is not the last original image.
[0157] In another example, the electronic device determines whether or not it has received a command to end shooting sent by the user, and if so, determines that it is the last original image, and if not, determines that it is not the last original image.
[0158] S509: A composite image is generated.
[0159] Specifically, the electronic device selects a cartoon background image of a Spring Festival reunion scenario type, and stitches the cartoon big head image to the cartoon background image respectively to obtain a composite image.
[0160] S510: The composite image is displayed.
[0161] Specifically, the electronic device switches from displaying a cartoon big head image to displaying a composite image in a crayon animation transition manner.
[0162] Thus, in the embodiment of the present disclosure, a user takes a number of original images, and performs beautification and image stitching on the number of original images to form a cartoon group photo with the effect of Spring Festival reunion.
[0163] It should be noted that the above cartoon big head images are for illustrative purposes only.
[0164] The embodiments of the present disclosure further provide an image display device capable of implementing the above image display method. Hereinafter, the image display device provided by the embodiments of the present disclosure will be described with reference to FIG.
[0165] In some embodiments of the present disclosure, the image display device may be an electronic device, which may include a device having a communication function, such as a mobile phone, a tablet, a desktop computer, a notebook computer, an in-vehicle terminal, a wearable device, a multifunction printer, or a smart home device, or may be a device simulated by a virtual machine or a simulator.
[0166] FIG. 6 is a schematic diagram of a configuration of an image display device provided according to an embodiment of the present disclosure.
[0167] As shown in FIG. 6, the image display device 600 includes: an image acquisition unit 610 arranged to acquire a plurality of original images, the original images being images including an original object; a first processing unit 620 arranged to perform a style transition process on original objects in a plurality of original images respectively to obtain a plurality of stylized images of the plurality of original images corresponding to target styles; The first display unit 630 may include a first display unit 630 arranged to display a composite image, the composite image being an image obtained by combining a plurality of stylized images with a background image corresponding to the target style.
[0168] In an embodiment of the present disclosure, after obtaining a plurality of original images including original objects, a style transition process is respectively performed on the original objects in the plurality of original images to obtain a plurality of stylized images corresponding to a target style of the plurality of original images, and a composite image obtained by combining the plurality of stylized images with a background image corresponding to the target style can be displayed; further, target style beautification and image stitching can be automatically performed on the original images, so that a user does not need to manually perform image beautification or image editing, and a composite image having the target style can be automatically generated using the original images, thereby reducing the time cost of creating the composite image, improving the quality of the composite image, and improving the user experience.
[0169] In some embodiments of the present disclosure, the image display device 600 further includes a second display unit arranged to display a plurality of stylized images according to a predetermined image display scheme.
[0170] Correspondingly, the first display unit 630 is further arranged to switch and display the multiple stylized images into a composite image according to a predetermined image switching manner.
[0171] In some embodiments of the present disclosure, the first processing unit 620 is a first sub-processing unit arranged to perform a style transition process on original objects in a plurality of original images respectively to obtain a plurality of style transition images corresponding to target styles of the plurality of original images; and a second sub-processing unit arranged to perform object modification processing on the plurality of style transition images, respectively, to obtain a plurality of stylized images corresponding to the plurality of style transition images.
[0172] In some embodiments of the present disclosure, the original image is an image that includes multiple original objects.
[0173] Correspondingly, the first processing unit 620 is further configured to respectively perform a style transition process on the original object with the largest size in each original image to obtain a plurality of stylized images.
[0174] In some embodiments of the present disclosure, the image display device 600 includes: a parameter obtaining unit arranged to obtain image parameters of each stylized image; a second processing unit arranged to determine display parameters of each stylized image based on the image parameters; and an image synthesis unit arranged to stitch the plurality of stylized images onto the background image according to display parameters to obtain a synthetic image.
[0175] In some embodiments of the present disclosure, the image parameters include any one of: an acquisition order of an original image corresponding to the stylized image; and an object rotation angle corresponding to the stylized image.
[0176] In some embodiments of the present disclosure, the display parameters include at least one of a display size, a display position, and a display angle.
[0177] In some embodiments of the present disclosure, a background image is used to place a target number of stylized images, which may be the total number of original images.
[0178] In some embodiments of the present disclosure, the background image belongs to a target scenario type, and the target scenario type is determined based on the image background of the original image.
[0179] Here, the image display device 600 shown in Figure 6 can execute each step in the method embodiments shown in Figures 1 to 5 to realize each procedure and effect in the method embodiments of Figures 1 to 5, and the description will not be repeated here.
[0180] An embodiment of the present disclosure further provides an image display device, the image display device including a processor and a memory, the memory storing executable instructions, the processor reading and executing the executable instructions from the memory to realize the image display method of the embodiment.
[0181] 7 is a schematic diagram of an image display device provided by an embodiment of the present disclosure. Hereinafter, with specific reference to FIG. 7, a schematic diagram of an image display device 700 according to an embodiment of the present disclosure is shown.
[0182] The image display device 700 according to the embodiment of the present disclosure may be an electronic device, which may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and wearable devices, and fixed terminals such as digital TVs, desktop computers, and smart home devices.
[0183] Here, the image display device 700 shown in FIG. 7 is only an example and does not limit the functions and scope of use of the embodiments of the present disclosure.
[0184] 7, the image display device 700 includes a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701 that can perform various appropriate operations and processes according to a program stored in a read only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 further stores various programs and data necessary for the operation of the image display device 700. The processing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0185] Typically, input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyro, etc., output devices 707 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc., storage devices 708 including, for example, a magnetic tape, hard disk, etc., and communication devices 709 may be connected to the I / O interface 705. The communication devices 709 enable the image display device 700 to communicate wirelessly or via wires with other devices to exchange data. Although FIG. 7 illustrates the image display device 700 having various devices, it is not required that the image display device 700 implement or include all of the devices shown. Instead, more or fewer devices may be implemented or included.
[0186] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, causes the processor to realize the image display method of the above embodiment.
[0187] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts are implemented as a computer software program.
[0188] An embodiment of the present disclosure further provides a computer program product, which includes a computer program, which, when executed by a processor, causes the processor to realize the image display method of the above embodiment.
[0189] For example, an embodiment of the present disclosure includes a computer program product, the computer program product includes a computer program carried on a non-transitory computer-readable medium, the computer program includes a program code for performing the method shown in the flowchart. In this embodiment, the computer program is downloaded and installed from a network via a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, it performs the above functions limited to the image display method according to the embodiment of the present disclosure.
[0190] Here, the above computer readable medium of the present disclosure may be a computer readable signal medium, or a computer readable storage medium, or any combination of the above. The computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electrical connection having one or more leads, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a compact disk read only memory (CD-ROM), an optical memory, a magnetic memory, or any suitable combination of the above. In the present disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or be used in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, the computer readable signal medium includes a data signal propagated in baseband or as part of a carrier, the data signal carrying the computer readable program code. Such propagated data signals may take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which transmits, propagates, or transmits a program used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted over any suitable medium, including, but not limited to, wire, optical cable, RF (radio frequency), or the like, or any suitable combination of the above.
[0191] In some embodiments, clients and servers may communicate using any now known or later developed network protocol, such as HTTP, and may be connected to one another via any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), an international network (e.g., the Internet), an end-to-end network (e.g., an ad hoc end-to-end network), and any now known or later developed networks.
[0192] The computer-readable medium may be included in the image display device, or may be separate from and not integrated with the image display device.
[0193] The computer-readable medium includes one or more programs, and when the one or more programs are executed by the image display device, the image display device: obtaining a plurality of original images, the original images being images including an original object; performing a style transition process on original objects in the plurality of original images, respectively, to obtain a plurality of stylized images corresponding to the target styles of the plurality of original images; and displaying a composite image, the composite image being an image obtained by combining the plurality of stylized images with a background image corresponding to the target style.
[0194] In an embodiment of the present disclosure, computer program code for carrying out the operations of the present disclosure is written in one or more program design languages, or a combination thereof, including, but not limited to, object-oriented program design languages such as Java, Smalltalk, C++, conventional procedural program design languages such as the "C" language or similar program design languages. The program code may be executed entirely on the user computer, partially on the user computer, as a separate software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).
[0195] The flowcharts and block diagrams in the drawings illustrate possible system architectures, functions, and operations of the systems, methods, and computer program products of various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams represents a module, program segment, or part of code, which includes one or more executable instructions for implementing a certain logical function. In addition, in some alternative implementations, the functions described in the blocks may occur in a different order from that shown in the drawings. For example, two blocks shown in succession in practice may essentially be executed in parallel, or may be executed in a reverse order in some cases, depending on the functions involved. In addition, each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts may be implemented by a specialized system using hardware that executes a certain function or operation, or may be implemented by a combination of specialized hardware and computer instructions.
[0196] The units according to the embodiments of the present disclosure may be implemented in the form of software or hardware. In some cases, the names of the units do not limit the units themselves.
[0197] The functionality described herein may be implemented, at least in part, in one or more hardware logic components. For example, and without limitation, types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0198] In this disclosure, a machine-readable medium is a tangible medium that contains or stores a program used by or in conjunction with an instruction-executing system, device, or machine. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or machine, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0199] The above description is only a description of the preferred embodiments of the present disclosure and the technical principles used. As can be understood by those skilled in the art, the disclosure scope of the present disclosure is not limited to the technical solution composed of a specific combination of the above technical features, and further includes other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept of the above disclosure, such as by replacing the above features with technical features having similar functions disclosed (but not limited to) in the present disclosure.
[0200] Also, although operations have been described in a particular sequence, there is no requirement that these operations be performed in the particular sequence or order shown. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, the above discussion includes some specific implementation details, but these should not be construed as limiting the scope of the present disclosure. Some features described in separate embodiments may be combined and implemented in a single embodiment. Also, various features described in a single embodiment may be implemented in multiple embodiments, either alone or in any suitable subcombination.
[0201] Although the present subject matter has been described in language specific to structural features and / or methodological operations, the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above, and the specific features and operations described above are merely example forms of implementing the claims.
Claims
1. An image display method executed by an image display device, comprising: obtaining a plurality of original images, the original images being images including an original object; performing a style transition process on original objects in the original images to obtain a plurality of stylized images corresponding to target styles of the original images; and displaying a composite image, the composite image being an image obtained by combining the plurality of stylized images with a background image corresponding to the target style. Image display method.
2. and before displaying the composite image, displaying the plurality of stylized images according to a predetermined image display scheme; The step of displaying the composite image includes: The method includes a step of switching the plurality of stylized images to the composite image in accordance with a predetermined image switching method. The image display method according to claim 1 .
3. performing a style transition process on each of the original objects in the original images to obtain a plurality of stylized images corresponding to the target styles of the original images, performing a style transition process on each of the original objects in the original images to obtain a plurality of style transition images corresponding to target styles of the original images; and performing an object modification process on each of the plurality of style transition images to obtain the plurality of stylized images corresponding to the plurality of style transition images. The image display method according to claim 1 .
4. the original image is an image including a plurality of original objects; performing a style transition process on each of the original objects in the original images to obtain a plurality of stylized images corresponding to the target styles of the original images, performing a style transition process on an original object having a maximum size in each of the original images to obtain the plurality of stylized images. The image display method according to claim 1 .
5. before displaying the composite image, obtaining image parameters for each of the stylized images; determining display parameters for each of the stylized images based on the image parameters; the composite image is an image obtained by stitching the plurality of stylized images onto the background image according to the display parameters. The image display method according to claim 1 .
6. The image parameters are: a sequence of acquisition of original images corresponding to the stylized images; an object rotation angle corresponding to the stylized image; and characterized in that it comprises any one of 6. The image display method according to claim 5.
7. The display parameters are: The display information includes at least one of a display size, a display position, and a display angle.
6. The image display method according to claim 5.
8. 2. The method of claim 1, wherein the background image is used to place a target number of stylized images, the target number being a total number of the original images.
9. The image display method according to claim 1 , wherein the background image belongs to a target scenario type, and the target scenario type is determined based on an image background of the original image.
10. An image display device, an image capture unit arranged to capture a plurality of original images, the original images being images including an original object; a first processing unit arranged to perform a style transition process on original objects in the plurality of original images respectively to obtain a plurality of stylized images of the plurality of original images corresponding to target styles; a first display unit arranged to display a composite image, the composite image being an image obtained by combining the plurality of stylized images with a background image corresponding to the target style; Device.
11. An image display device, comprising: A processor; a memory storing executable instructions; The processor reads the executable instructions from the memory and executes them to realize the image display method according to any one of claims 1 to 9. Image display equipment.
12. 1. A computer-readable storage medium, comprising: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor realizes the image display method according to any one of claims 1 to 9. A computer-readable storage medium.
Citation Information
Patent Citations
Image style conversion method, apparatus, device, and storage medium
JP2020533660A
