WO2023109842A1 - 图像展示方法、装置、电子设备及存储介质 - Google Patents

图像展示方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023109842A1
WO2023109842A1 PCT/CN2022/138868 CN2022138868W WO2023109842A1 WO 2023109842 A1 WO2023109842 A1 WO 2023109842A1 CN 2022138868 W CN2022138868 W CN 2022138868W WO 2023109842 A1 WO2023109842 A1 WO 2023109842A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
display
target
pixel
fused
Prior art date
Application number
PCT/CN2022/138868
Other languages
English (en)
French (fr)
Inventor
罗孺冲
刘文焘
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023109842A1 publication Critical patent/WO2023109842A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Definitions

  • Embodiments of the present disclosure relate to the technical field of image processing, for example, to an image display method, device, electronic equipment, and storage medium.
  • the relevant image display method is often to directly switch the current image to the next image to be displayed in accordance with the display order.
  • the display method is relatively simple and lacks the richness and interest of image display. Can not well meet the user's special effects needs.
  • Embodiments of the present disclosure provide an image display method, device, electronic device, and storage medium, so as to improve image display effects.
  • an embodiment of the present disclosure provides an image display method, which includes:
  • the second image is displayed in the image display area.
  • the embodiment of the present disclosure also provides an image display device, which includes:
  • An image acquisition module configured to acquire the first image and the second image to be displayed
  • the first display module is configured to display the first image in the image display area in response to receiving a display trigger operation for triggering image display;
  • the transition display module is configured to display the target transition image in the image display area in response to detecting that the display condition of the target transition image is reached, wherein the target transition image is the first image and the a fused image of the second image;
  • the second display module is configured to display the second image in the image display area in response to detecting that the display condition of the second image is met.
  • an embodiment of the present disclosure further provides an electronic device, which includes:
  • the processor When the program is executed by the processor, the processor is made to implement the image display method provided by any embodiment of the present disclosure.
  • an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the image presentation provided by any embodiment of the present disclosure is realized method.
  • FIG. 1 is a schematic flowchart of an image display method provided by Embodiment 1 of the present disclosure
  • FIG. 2 is a schematic flowchart of an image display method provided in Embodiment 2 of the present disclosure
  • FIG. 3 is a schematic flowchart of an image display method provided by Embodiment 3 of the present disclosure.
  • FIG. 4 is a schematic flowchart of an image display method provided by Embodiment 4 of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an image display device provided in Embodiment 6 of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by Embodiment 7 of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • Figure 1 is a schematic flow chart of an image display method provided by Embodiment 1 of the present disclosure.
  • This embodiment is applicable to the case of displaying multiple images. and/or hardware, and optionally, electronic equipment, where the electronic equipment may be a mobile terminal, a PC, or a server.
  • the scene of arbitrary image display is usually implemented by the cooperation of the client and the server.
  • the method provided in this embodiment can be executed by the server, the client, or the cooperation of the client and the server.
  • the method of this embodiment may include:
  • the first image and the second image may be understood as two images to be displayed.
  • the first image can be understood as the image displayed first when displaying the first image and the second image
  • the second image can be understood as an image displayed later when the first image and the second image are displayed.
  • the image display sequence may be determined according to the time sequence of uploading the images or the location where the images are uploaded.
  • the contents of the first image and the second image may be the same or different.
  • the first image and the second image may be a character image, an animal image, a landscape image, an item image, or a cartoon image.
  • parameters such as the size, format, acquisition method, and acquisition order of the first image and the second image may be set according to actual requirements.
  • target image features of at least one of the first image and the second image may be preset.
  • the first image may be set as a person image, and includes target parts of the person, such as face, shoulders, or limbs.
  • the first image and the second image to be displayed There are many ways to acquire the first image and the second image to be displayed.
  • the first image and the second image to be displayed uploaded by the user are received.
  • it may be to receive the first image added by the user at the first preset image adding position and the second image added at the second preset image adding position respectively.
  • the first image and the second image are collected based on the photographing device, and the collected first image and the second image are used as the first image and the second image to be displayed.
  • the display triggering operation may be understood as an operation for triggering the display of the first image and the second image.
  • the preset display trigger control may be a virtual sign set on the software interface. The triggering of the preset display trigger control can be used to characterize the start and perform image display in a preset manner.
  • receiving a display trigger operation for triggering image display may include at least one of the following operations: receiving voice information containing target keywords; collecting preset gesture information; receiving preset Display the click or press operation of the control input; detect that the first image and the second image have been acquired; recognize that the first image is an image of the first preset type; recognize that the first image is an image of the second preset type, etc. .
  • the first preset image type and the second preset image type may be the same or different. It should be noted that “first” and “second” in “first preset image type” and “second preset image type” are used to distinguish preset image types in different image recognition scenarios.
  • the preset image type may be set according to at least one of image format and image content.
  • identifying that the first image is an image of the first preset type may be, in response to detecting that the first image contains a target object with the first target attribute, determining that the first image is identified as the first Preset type of image.
  • recognizing that the second image is an image of the second preset type may be, in response to detecting that the second image contains a target object with a second target attribute, determining that the second image is recognized as the second preset type.
  • the first target object may be the same as or different from the second target object.
  • the first target attribute or the second target attribute may be an object type or a scene type, and the like.
  • the object type may include a building, a fruit, an animal or a human face and the like.
  • the scene category may include scenery or weather, and the like. For example, when it is recognized that the first image and the second image contain human face regions, it may be determined that a display trigger operation for triggering image display is received.
  • displaying the first image in the image display area includes: statically displaying the first image in the image display area, or dynamically displaying the first image in the image display area.
  • dynamically displaying the first image in the image display area may be, dynamically displaying the first image in the image display area for flashing display, enlarged display, or moving display, etc.
  • the target transition image can be understood as a transition image when the first image is switched to the second image for display.
  • the display condition of the target transition image can be understood as a condition for triggering the display of the transition image.
  • the display conditions of the target transition image can be set according to actual needs.
  • the display conditions of the target transition image may include at least one of the following conditions:
  • the ratio of the display progress of the first image to the total display duration of the first image, the target transition image, and the second image reaches a preset ratio threshold
  • the total display duration of the first image reaches a preset total display duration threshold of the first image
  • the display effect of the first image reaches a preset display effect
  • the display size of the first image reaches a preset display size threshold
  • the static display duration of static display of the first image reaches a preset static display duration threshold
  • the dynamic display duration for dynamically displaying the first image reaches a preset dynamic display duration threshold.
  • the target transition image may first be generated according to the first image and the second image, and then the target transition image is displayed in the image display area.
  • This scheme is especially suitable for the scene where the first image and the second image are flexibly configured, and the image fusion of the first image and the second image can be performed during the image display process to generate the target corresponding to the first image and the second image Transition images to achieve a smooth transition from displaying the second image to displaying the second image.
  • the target transition image is obtained by fusing the partial image of the first image and the second image, or obtained by fusing the partial image of the first image and the partial image of the second image.
  • the target transition image is obtained by fusing the area display image displayed in the image display area of the enlarged first image with the second image.
  • the display size of the second image may be smaller than or equal to the display size of the image displayed in the area.
  • the number of target transition images may be one frame, or two or more frames.
  • the displaying the target transition images in the image display area may include: sequentially displaying two or more target transition images in the in the image display area.
  • the target transition image of the first frame is obtained according to the fusion of the first image and the second image, and for the target transition image after the target transition image of the first frame, the target transition image is displayed according to the previous frame
  • the target transition image and the second image are fused to obtain.
  • the region display image displayed by the first image in the image display region is acquired, and the target transition scene of the first frame is generated according to the region display image and the second image Image; in response to detecting the display condition of reaching the second frame transition image, generating the second frame target transition image according to the first frame target transition image and the second image; in response to detecting reaching the third frame transition image Display conditions, generate a third frame of target transition image based on the second frame of target transition image and the second image, and so on. That is, when the target transition image needs to be generated, the target transition image is generated according to the image information displayed in the image display area and the second image.
  • displaying the target transition image in the image display area includes: statically displaying the target transition image in the image display area, or dynamically displaying the target transition image in the image display area .
  • dynamically displaying the target transition image in the image display area may be, dynamically displaying the target transition image in the image display area for flashing display, enlarged display, or moving display.
  • the display condition of the second image may be understood as a condition for triggering the display of the second image.
  • the display condition of the second image may be set according to actual requirements.
  • the display condition of the second image may include at least one of the following conditions: the transition display duration of the target transition image reaches a preset transition display duration; the display frame number of the target transition image reaches a preset Display frame number threshold; the image size of the second image reaches the preset display size.
  • displaying the second image in the image display area may include: statically displaying the second image in the image display area, dynamically displaying the second image in the image display area in the area.
  • dynamically displaying the second image in the image display area may be dynamically displaying the second image in the image display area for flashing display, enlarged display, or moving display.
  • the second image can be gradually enlarged from a size smaller than the original size of the second image to the specified size during the display process. The original size of the second image or enlarged to fill the image display area.
  • the target transition image may be faded out of the image display area, and the second image may be faded into the image display area.
  • displaying the second image in the image display area may include: superimposing and displaying the target transition image and the second image in the image display area, wherein the target transition image The transparency of changes from high to low, and the transparency of the second image changes from low to high.
  • the second image in response to detecting that the display condition of the second image is reached, the second image is displayed by gradually adjusting the transparency of the target transition image from 100% to 0, and adjusting the transparency of the second image from 0 to 100%. .
  • the target transition image displayed superimposed with the second image is the last target transition image frame, or in other words, the target transition image frame adjacent to the second image.
  • the image display method in the embodiment of the present disclosure is introduced by taking two images to be displayed as an example, and the number of images to be displayed in the image display can be set according to actual needs.
  • the method of the embodiments of the present disclosure is applicable to the case of displaying three images or more than three images.
  • every two images that are adjacent to each other in the display order among the three images or more than three images to be displayed can be divided into a group of images to be displayed, wherein, each group of images to be displayed includes a first image and a second image.
  • each group of images to be displayed includes a first image and a second image.
  • the top-ranked image in each group of two images can be used as the first image
  • the bottom-ranked image in each group of two images can be used as the second image
  • the last image to be displayed can be used as the first image
  • the first image to be displayed can be used as the second image, continuing to use the
  • the described image display method displays the first image and the second image, so as to realize the cyclic display of all the images to be displayed.
  • image A and image C can be used as a group of images to be displayed, wherein image A is the first image of the group of images to be displayed, and image C is the second image of the group of images to be displayed; image C and image D are used as A group of images to be displayed, wherein image C is the first image of the group of images to be displayed, and image D is the second image of the group of images to be displayed; image D and image B are used as a group of images to be displayed, wherein image D is the first image of the group of images to be displayed, and image B is the second image of the group of images to be displayed; image B and image A are used as a group of images to be displayed, wherein image B is the first image of the group of images to be displayed , image A is the second image of the group of images to be displayed.
  • a target transition image corresponding to the first image and the second image will also be displayed between the first image and the second image, so as to realize a smooth transition between the first image and the second image.
  • a target transition image corresponding to the first image and the second image will also be displayed between the first image and the second image, so as to realize a smooth transition between the first image and the second image.
  • the first image and the second image to be displayed by acquiring the first image and the second image to be displayed, and displaying the first image in the image display area in response to receiving a display trigger operation for triggering image display, it is possible to obtain the first image and the second image.
  • the second image simply trigger image display, and display the first image first.
  • the target transition image is displayed in the image display area, and then, in response to detecting that the display condition of the second image is reached, the The second image is displayed in the image display area.
  • the target transition image is a fusion image of the first image and the second image
  • the transition from the first image to the second image is performed through the target transition image.
  • Transition which realizes the smooth transition from the first image to the second image, solves the problem that the image display method is relatively single, lacks richness and interest when displaying multiple images, enriches the transition effect, and increases the image display interesting, enhance the user experience.
  • Fig. 2 is a schematic flow chart of the image display method provided by Embodiment 2 of the present disclosure.
  • the display of the first image in In the image display area including: zooming in and displaying the first image in the image display area.
  • the method of this embodiment may include:
  • the first image is enlarged and displayed in the image display area according to a preset magnification ratio; the first image is gradually enlarged and displayed in the image display area, for example, according to a preset magnification ratio and
  • the preset zoom-in speed gradually zooms in and displays the first image in the image display area, or gradually zooms in and displays the first image in the image display area according to a preset zoom-in ratio and a preset zoom-in time point.
  • the first image is enlarged and displayed in the image display area, and the first image may also be enlarged and displayed according to the target enlarged area of the first image, so that the target enlarged area Displayed in the image display area.
  • the target enlarged area may be an area containing the target object. Taking the first image as an image containing a face part as an example, the target enlarged area may be an eye area, a temple area, an area between eyebrows, or a mouth area.
  • zooming in and displaying the first image according to the target zoom-in area of the first image may include: identifying the first image according to regional characteristic information of the target zoom-in area, and obtaining the first A target zoom-in area of the image, determining an zoom-in reference point of the target zoom-in area, and zooming in on the first image according to the zoom-in reference point, so that the target zoom-in area is displayed in the image display area.
  • the magnification reference point may be a pixel point at the center position of the target magnification area.
  • the display condition of the target transition image may further include: the enlarged display duration of the enlarged display of the first image reaches a preset enlarged display duration threshold.
  • the first image in response to receiving a display trigger operation for triggering image display, the first image is enlarged and displayed in the image display area, so that the first image can present a dynamic display effect, and the local information of the first image can be displayed Associated with the second image, not only can realize the smooth transition from the first image to the second image, but also can present the visualization effect of the second image emerging from the local area of the hell image, increasing the richness of the transition effect in the image display process and fun to enhance user experience.
  • FIG. 3 is a schematic flow chart of the image display method provided by Embodiment 3 of the present disclosure.
  • the image display conditions before displaying the target transition image in the image display area, it also includes: acquiring an area display image of the first image displayed in the image display area, wherein the first The display size of the second image is smaller than the display size of the area display image; image fusion is performed on the second image and the area display image to obtain a target transition image.
  • the method of this embodiment may include:
  • the preset size is gradually enlarged, wherein the preset size is smaller than the original size of the second image. It should be noted that the value of the preset size can be set according to desired display effects such as display duration.
  • canvas information of the image display area is generated according to the image information of the first image.
  • the resolution of the first image may be used as the resolution of the canvas, that is, the number of pixels of the canvas may be consistent with the number of pixels of the first image.
  • the timing when the second image starts to enlarge may be that the second image is gradually enlarged from a preset size in response to receiving a display trigger operation for triggering image display, or it may be in response to detecting that the target transition is reached Image display conditions, gradually enlarge the second image from the preset size.
  • the first image display at the current moment can be acquired An image and a second image at the current moment are displayed in an area of the image display area.
  • the target transition image is generated by the image displayed in real time in the image display area and the state of the second image at the current moment, which can maintain the continuity of perception and achieve a smooth transition between the first image and the second image in terms of visual experience .
  • the first image and the second image may be fused through Poisson fusion.
  • Poisson fusion involves solving equations, which requires a large amount of calculation and takes a long time, it generally needs to rely on the calculation of the central processing unit. Limited by the performance of the Graphics Processing Unit (GPU), it is often impossible to solve the equation quickly and effectively. , image fusion may not be possible.
  • the first image and the second image can also be fused by the Jacobian iterative method, but the Jacobian iterative method aims at approaching the real result, which takes a long time and has low image fusion efficiency.
  • the first image and the second image can be fused according to the gradient value of each pixel displayed in the image display area, wherein each pixel in the image display area can understand Pixels corresponding to the canvas used to display the target blended image.
  • an area display image in which the first image is displayed in the image display area is acquired, wherein the display size of the second image is smaller than the display size of the area display image,
  • the second image can be fully integrated into the area display image, and part of the information of the area display image can also be retained, and then the second image and the area display image are image fused to obtain a target transition image, which can be compared It can play a visual transition role from the first image to the second image and improve user experience.
  • Fig. 4 is a schematic flow chart of the image display method provided by Embodiment 4 of the present disclosure.
  • the solution of this embodiment is based on any optional solution in the embodiments of the present disclosure.
  • the second image Performing image fusion with the region display image to obtain a target transition image includes: using the region display image as a background image, determining a target fusion region corresponding to the second image and the background image; For each pixel to be fused in the fusion area, determine a first gradient value corresponding to the pixel to be fused and the background image and a second gradient value corresponding to the second image; according to the pixel to be fused The corresponding first gradient value and the second gradient value determine the target color value of the pixel to be fused; according to the target color value of each pixel to be fused in the target fusion area, a target transition image is obtained .
  • the method of this embodiment may include:
  • the area display image when merging the second image and the area display image, the area display image may be used as the background image, and further, the second image may be fused to all images of the area display image area or part of the image area.
  • the target fusion area can be the entire image area of the area display image or a part of the image area of the area display image.
  • determining the target fusion area corresponding to the second image and the background image may include: determining a display area corresponding to the area display image as corresponding to the second image and the area display image or, determining the target display area of the second image in the first image as the target fusion area corresponding to the second image and the area display image.
  • the target fusion area corresponding to the second image and the background image may be adjusted by adjusting the display size of the second image.
  • the gradient value is used to represent the speed at which the color of the pixel changes.
  • the gradient value of the pixel to be fused can be determined through the background image and the second image, and then the fusion of the background image and the second image can be realized through the gradient value of the pixel to be fused.
  • image fusion through gradient values has a smaller computational load, lower hardware requirements, and can quickly obtain fused images, especially suitable for GPU real-time processing of graphics fusion. .
  • it can be calculated according to the color values of the neighboring pixels of the pixel.
  • the gradient value of the pixel to be fused needs to be calculated according to the domain pixel of the pixel to be fused.
  • the domain pixel corresponding to the pixel to be fused can be determined by presetting the gradient sampling step.
  • the effect of image fusion may vary with the preset gradient sampling step size.
  • the preset gradient sampling step size can be set using the distance from the center of a pixel point to the center of the pixel point adjacent to the pixel point as the basic unit, that is, the point spacing is used as the basic unit of the preset gradient sampling step size unit.
  • the determining the first gradient value of the pixel to be fused according to the color value of each pixel in the first image includes: determining a target gradient sampling step corresponding to the fused pixel, Wherein, the target gradient sampling step is used to represent the target distance between the reference pixel to be determined and the fused pixel; according to the position information of the to-be-fused pixel in the image display area, the target Determine the reference pixel point corresponding to the fused pixel point in the first image with the gradient sampling step size and the preset gradient calculation direction; determine the to-be-fused pixel point according to the color value of the reference pixel point in the first image The second gradient value of the pixel.
  • the target gradient sampling step size can be understood as a parameter used to determine a reference pixel point corresponding to the fused pixel point, and the reference pixel point and the pixel point to be fused meet the requirement of a target distance.
  • only one preset gradient sampling step can be set, and the preset gradient sampling step can be used as the target gradient sampling step of the pixel to be fused.
  • different preset gradient sampling steps can be set for each frame of target transition images. In this case, the preset gradient sampling steps corresponding to the target transition images need to be It is determined as the target gradient sampling step corresponding to the pixels to be fused for generating the target transition image.
  • data such as the number and change value of multiple preset gradient sampling steps can be set according to actual needs. Exemplarily, it may be changed from 0 times the dot pitch to 2 times the dot pitch.
  • multiple preset gradient sampling steps can be set, and the multiple preset gradient sampling steps gradually change from small to large.
  • the preset gradient sampling step can be adjusted by setting an adjustment progress bar for adjusting the gradient sampling step.
  • multiple intermediate multiple point spacings can be set between 0 times the dot spacing and 2 times the dot spacing with an increment of 0.2 times the dot spacing.
  • the display conditions of the target transition image may also include: the preset gradient sampling step corresponding to the target transition image changes, wherein the preset gradient sampling step is used to measure The distance between two pixels in the target transition image.
  • the preset gradient sampling step corresponding to the target transition image changes, it can be understood that the gradient sampling step changes from one preset value to another preset value.
  • the determining the second gradient value of the pixel to be fused according to the color value of each pixel in the second image includes: determining a target gradient sampling step corresponding to the fused pixel, wherein , the target gradient sampling step is used to represent the target distance between the reference pixel point to be determined and the fusion pixel point; according to the position information of the pixel point to be fusion in the image display area, the target gradient
  • the sampling step size and the preset gradient calculation direction determine the reference pixel point corresponding to the fused pixel point in the second image; determine the pixel to be fused according to the color value of the reference pixel point in the second image The second gradient value of the point.
  • the first gradient value corresponding to each pixel to be fused and the background image and the second gradient value corresponding to the second image may be calculated in parallel.
  • the first gradient map corresponding to the background image and the second gradient map corresponding to the second image can be obtained. Gradient map for use in subsequent queries.
  • the color value can be understood as the value of each color channel, for example, for an RGB image, the color value can be understood as the value of three RGB channels.
  • the target color value of the pixel to be fused can be understood as the color value to be presented by the pixel to be fused.
  • a color value corresponding to a larger gradient value among the first gradient value and the second gradient value corresponding to the pixel to be fused is selected as the target color value of the pixel to be fused.
  • Two gradient values determining the color value of the pixel corresponding to the pixel to be fused in the second image as the target color value of the pixel to be fused.
  • the first weight value of the color value corresponding to the first gradient value may be determined respectively according to the magnitudes of the first gradient value and the second gradient value corresponding to the pixel to be fused, and the second weight value of the color value corresponding to the second gradient value, and then, according to the color value corresponding to the first gradient value of the pixel to be fused, the first weight value, and the second gradient value
  • the corresponding color value and the second weight value calculate the target color value of the pixel to be fused.
  • the transition image obtained after one calculation can be used as the target transition image, or the target transition image can be determined through two or more iterative calculations to improve the fusion of the target transition image Effect.
  • an intermediate transition image can be generated according to the target color value of each pixel to be fused in the target fusion area, and then the intermediate transition image is combined with The second image is fused to update the intermediate transition image, and the step of fusing the intermediate transition image with the second image is repeated to obtain the target transition image.
  • an intermediate transition image is obtained; using the intermediate transition image as a background image, repeatedly performing the determination and the second The target fusion area corresponding to the image and the background image; for each pixel to be fused in the target fusion area, determine the first gradient value corresponding to the pixel to be fused and the background image and the first gradient value corresponding to the second The second gradient value corresponding to the second image, determining the target color value of the pixel to be fused according to the first gradient value and the second gradient value corresponding to the pixel to be fused, and according to the target fused area
  • the target color value of each to-be-fused pixel in the operation to obtain the intermediate transition image; in response to detecting that the fusion end condition is reached, the intermediate transition image is used as the target transition image.
  • the target color value of each pixel to be fused in the target fused area can be obtained by
  • the intermediate transition image is obtained by off-screen rendering.
  • the way of off-screen rendering can be understood as rendering the intermediate transition image into the preset buffer area.
  • the intermediate transition images are not displayed in the image display area.
  • the fusion end condition can be set according to actual needs, for example, it can be that the preset number of iterations is reached, or the fused image parameters reach the preset parameter threshold.
  • the preset number of iterations represents the calculation times of calculating the transition image through which the target transition image is obtained, and its value can be set according to the desired image fusion effect, for example, it can be 5 times, 6 times or 8 times, etc.
  • the second image is fused into the background image by using the area display image as the background image, and the target fused area corresponding to the second image and the background image is determined first, so that each target fused area in the target fused area
  • the pixel points to be fused are processed respectively, and the pixel points to be fused are determined by determining the first gradient value corresponding to the pixel point to be fused and the background image and the second gradient value corresponding to the second image.
  • the target color value and then, according to the target color value of each pixel to be fused in the target fusion area, the target transition image is obtained. Since this image fusion method has low requirements for hardware support and fast calculation speed, it can In the process of displaying the first image and the second image, the target transition image is generated in real time, and the fusion efficiency of the second image and the background image is effectively improved.
  • This embodiment introduces the image display method provided by the embodiment of the present disclosure in conjunction with a specific application scenario.
  • the first image and the second image are images including the eye area, and the desired visual display of the first image and the second image
  • the effect is that the second image appears when the first image is enlarged to the eye area, and the second image is gradually enlarged and displayed clearly
  • the implementation method is as follows:
  • the first image is enlarged and displayed, in other words, the first image is enlarged and displayed centering on the eye area in the first image;
  • the image information of the eye area displayed in the image display area at the current moment is obtained as the image information of the background image, and the second image at the current moment is obtained, and the background image is Perform image fusion with the second image to obtain a target transition image, and display the target transition image;
  • the target transition image of the previous frame displayed in the image display area at the current moment can be obtained as a background image, and the second image at the current moment can be obtained, and the background image can be combined with the performing image fusion on the second image to obtain a target transition image, and displaying the target transition image;
  • the transparency of the target transition image is adjusted from high to low, and the transparency of the second image is adjusted from low to high at the same time, so as to display the second image in the image display area.
  • the pixels displayed in the image display area are used as the pixels to be fused, and for each pixel to be fused, the first gradient value corresponding to the pixel to be fused and the background image, and the gradient value corresponding to the second image are calculated.
  • the color value corresponding to the larger gradient value in the first gradient value and the second gradient value is selected as the target color value of the pixel to be fused, and according to the distance between the target color value of each pixel to be fused
  • the screen renders a new image as an intermediate transition image, repeats this operation, and uses the intermediate transition image as a target transition image in response to detecting that the fusion end condition is met.
  • fast image fusion in the process of image display, fast image fusion can be realized through the GPU, and the fusion effect can be obtained within one frame, which improves the efficiency of image fusion, enriches the transition effect of image display, and improves user experience .
  • Fig. 5 is a schematic structural diagram of an image display device provided in Embodiment 6 of the present disclosure.
  • the image display device provided in this embodiment can be realized by software and/or hardware, and can be configured in a terminal and/or server to implement the present disclosure
  • the device may include: an image acquisition module 510 , a first display module 520 , a transition display module 530 and a second display module 540 .
  • the image acquisition module 510 is configured to acquire the first image and the second image to be displayed;
  • the first display module 520 is configured to display the first image in response to receiving a display trigger operation for triggering image display In the image display area;
  • the transition display module 530 is configured to display the target transition image in the image display area in response to detecting that the display condition of the target transition image is reached, wherein the target transition image is A fused image of the first image and the second image;
  • a second display module 540 configured to display the second image in the image display area in response to detecting that a display condition for the second image is met.
  • the present disclosure by acquiring the first image and the second image to be displayed, and displaying the first image in the image display area in response to receiving a display trigger operation for triggering image display, it is possible to obtain the first image and after the second image, simply trigger the image show and show the first image first.
  • the target transition image is displayed in the image display area, and then, in response to detecting that the display condition of the second image is reached, the The second image is displayed in the image display area.
  • the target transition image is a fusion image of the first image and the second image
  • the transition from the first image to the second image is performed through the target transfer image Field, which realizes the smooth transition from the first image to the second image, solves the problem that the image display method is relatively single and lacks richness and interest when displaying multiple images, enriches the transition effect, and increases the image display. interesting, enhance the user experience.
  • the first display module is set to:
  • the first display module is set to:
  • the first image is enlarged and displayed according to the target enlarged area of the first image, so as to display the target enlarged area in the image display area.
  • the display conditions of the target transition image include at least one of the following conditions:
  • the ratio of the display progress of the first image to the total display duration of the first image, the target transition image, and the second image reaches a preset ratio threshold
  • the total display duration of the first image reaches a preset total display duration threshold of the first image
  • the display effect of the first image reaches a preset display effect
  • the display size of the first image reaches a preset display size threshold
  • the static display duration of static display of the first image reaches a preset static display duration threshold
  • the dynamic display duration for dynamically displaying the first image reaches a preset dynamic display duration threshold
  • the preset gradient sampling step corresponding to the target transition image changes, wherein the preset gradient sampling step is used to measure the distance between pixels in the image.
  • the image processing device further includes: an image determination module and an image fusion module.
  • the image determination module is configured to acquire the first image and display it on the The area display image in the image display area, wherein the display size of the second image is smaller than the display size of the area display image; the image fusion module is configured to perform image fusion on the second image and the area display image , to get the target transition image.
  • the image determination module is set to:
  • the first image is gradually enlarged from the original size of the first image
  • the second image is gradually enlarged from a preset size, wherein the preset size is smaller than the original size of the second image.
  • the image fusion module includes: a fusion area determination unit, a gradient value calculation unit, a color value determination unit, and a transition image generation unit.
  • the fusion area determination unit is configured to use the area display image as a background image to determine the target fusion area corresponding to the second image and the background image;
  • the gradient value calculation unit is configured to target the fusion area For each pixel to be fused, determine the first gradient value corresponding to the pixel to be fused and the background image and the second gradient value corresponding to the second image;
  • the color value determination unit is set to The first gradient value and the second gradient value corresponding to the pixel to be fused determine the target color value of the pixel to be fused;
  • the transition image generation unit is configured to The target color values of the pixels are fused to obtain the target transition image.
  • the gradient value calculation unit is set to:
  • the gradient value calculation unit is further set to:
  • the target gradient sampling step is used to represent a target distance between a reference pixel to be determined and the fused pixel
  • the color value determination unit is set to:
  • the target transition image generation unit is set to:
  • the intermediate transition image as a background image, repeatedly determine the target fusion area corresponding to the second image and the background image; for each pixel to be fused in the target fusion area, determine the to-be-fused Fusion of the first gradient value corresponding to the background image and the second gradient value corresponding to the second image of the pixel point to be fused, according to the first gradient value and the second gradient value corresponding to the pixel point to be fused determining the target color value of the pixel to be fused, and obtaining an intermediate transition image according to the target color value of each pixel to be fused in the target fused area;
  • the intermediate transition image is used as the target transition image.
  • the fusion region determination unit is set to:
  • a target display area of the second image in the first image Determining a target display area of the second image in the first image as a target fusion area corresponding to the second image and the area display image.
  • the second display module is set to:
  • the target transition image and the second image are superimposed and displayed in the image display area, wherein the transparency of the target transition image changes from high to low, and the transparency of the second image changes from low to high.
  • the display conditions of the second image include at least one of the following conditions:
  • the transition display duration of the target transition image reaches a preset transition display duration
  • the display frame number of the target transition image reaches a preset display frame number threshold
  • the image size of the second image reaches the preset display size.
  • the transition display module is set to:
  • the target transition images of two or more frames are sequentially displayed in the image display area, wherein the target transition image of the first frame is obtained by fusing the first image and the second image, and the target transition image of the first frame is A target transition image after the field image, the target transition image is obtained by fusing the target transition image shown in the previous frame with the second image.
  • the image display device provided by the embodiments of the present disclosure can execute the image display method provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by Embodiment 7 of the present disclosure.
  • the terminal equipment in the embodiments of the present disclosure may include mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), tablet computers (Portable Android Device, PAD), portable multimedia players (Portable Media Player, PMP), vehicle-mounted terminals (such as vehicle-mounted navigation terminals) and other mobile terminals, and fixed terminals such as digital television (television, TV), desktop computers and so on.
  • PDA Personal Digital Assistant
  • PMP portable multimedia players
  • vehicle-mounted terminals such as vehicle-mounted navigation terminals
  • fixed terminals such as digital television (television, TV), desktop computers and so on.
  • the electronic device shown in FIG. 5 is just an example.
  • the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.)
  • the storage device 606 loads programs in the random access memory (Random Access Memory, RAM) 603 to execute various appropriate actions and processes.
  • RAM Random Access Memory
  • various programs and data necessary for the operation of the electronic device 600 are also stored.
  • the processing device 601, ROM 602, and RAM 603 are connected to each other through a bus 604.
  • An edit/output (Input/Output, I/O) interface 5605 is also connected to the bus 604 .
  • an editing device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; including, for example, a liquid crystal display (Liquid Crystal Display, LCD) , an output device 607 such as a speaker, a vibrator, etc.; a storage device 606 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609.
  • the communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 6 shows electronic device 600 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer readable medium, the computer program including program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 609, or from storage means 606, or from ROM 602.
  • the processing device 601 the above-mentioned functions in the methods of the embodiments of the present disclosure are executed.
  • the electronic device provided by the embodiment of the present disclosure belongs to the same inventive concept as the image display method provided by the above embodiment.
  • the image display method provided by the above embodiment For technical details not described in detail in this embodiment, please refer to the above embodiment, and this embodiment has the same features as the above embodiment. Beneficial effect.
  • An embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the image display method provided in the foregoing embodiments is implemented.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • a computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof.
  • the computer readable storage medium may include: an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory, a read-only memory, an Erasable Programmable Read-Only Memory (EPROM or Flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • the program code contained on the computer readable medium can be transmitted by any appropriate medium, including: electric wire, optical cable, radio frequency (Radio Frequency, RF), etc., or any appropriate combination of the above.
  • the client and the server can communicate using any currently known or future network protocols such as Hypertext Transfer Protocol (HyperText Transfer Protocol, HTTP), and can communicate with digital data in any form or medium
  • the communication eg, communication network
  • Examples of communication networks include local area networks (Local Area Network, LAN), wide area networks (Wide Area Network, WAN), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently existing networks that are known or developed in the future.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device:
  • the target transition image In response to detecting that the display condition of the target transition image is reached, displaying the target transition image in the image display area, wherein the target transition image is a fusion image of the first image and the second image ;
  • the second image is displayed in the image display area.
  • Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a LAN or WAN, or it can be connected to an external computer (eg via the Internet using an Internet Service Provider).
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware.
  • the first obtaining unit may also be described as "a unit for obtaining at least two Internet Protocol addresses”.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Parts
  • SOC System on Chip
  • Complex Programmable Logic Device Complex Programmable Logic Device, CPLD
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may comprise an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
  • the machine-readable storage medium may include one or more wire-based electrical connections, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • Example 1 provides an image display method, which includes:
  • the target transition image In response to detecting that the display condition of the target transition image is reached, displaying the target transition image in the image display area, wherein the target transition image is a fusion image of the first image and the second image ;
  • the second image is displayed in the image display area.
  • Example 2 provides an image display method, the method further includes:
  • displaying the first image in the image display area includes:
  • Example 3 provides an image display method, and the method further includes:
  • the enlarged display of the first image in the image display area includes:
  • the first image is enlarged and displayed according to the target enlarged area of the first image, so as to display the target enlarged area in the image display area.
  • Example 4 provides an image display method, and the method further includes:
  • the display conditions of the target transition image include at least one of the following conditions:
  • the ratio of the display progress of the first image to the total display duration of the first image, the target transition image, and the second image reaches a preset ratio threshold
  • the total display duration of the first image reaches a preset total display duration threshold of the first image
  • the display effect of the first image reaches a preset display effect
  • the display size of the first image reaches a preset display size threshold
  • the static display duration of static display of the first image reaches a preset static display duration threshold
  • the dynamic display duration for dynamically displaying the first image reaches a preset dynamic display duration threshold
  • the preset gradient sampling step corresponding to the target transition image changes, wherein the preset gradient sampling step is used to measure the distance between pixels in the image.
  • Example 5 provides an image display method, the method further includes:
  • the method further includes:
  • Image fusion is performed on the second image and the region display image to obtain a target transition image.
  • Example 6 provides an image display method, and the method further includes:
  • the method before the acquisition of the first image displayed in the area display image in the image display area, the method further includes:
  • the first image is gradually enlarged from the original size of the first image
  • the second image is gradually enlarged from a preset size, wherein the preset size is smaller than the original size of the second image.
  • Example 7 provides an image display method, and the method further includes:
  • the image fusion of the second image and the region display image to obtain a target transition image includes:
  • a target transition image is obtained according to the target color value of each pixel to be fused in the target fusion area.
  • Example 8 provides an image display method, the method further includes:
  • the determining the first gradient value corresponding to the pixel point to be fused to the background image and the second gradient value corresponding to the second image includes:
  • Example 9 provides an image display method, the method further includes:
  • the determining the second gradient value of the pixel to be fused according to the color value of each pixel in the second image includes:
  • the target gradient sampling step is used to represent the target distance between the reference pixel to be determined and the fusion pixel;
  • Example 10 provides an image display method, and the method further includes:
  • the determining the target color value of the pixel to be fused according to the first gradient value and the second gradient value corresponding to the pixel to be fused includes:
  • Example Eleven provides an image display method, the method further includes:
  • the obtaining the target transition image according to the target color value of each pixel to be fused in the target fusion area includes:
  • the intermediate transition image as a background image, repeatedly determine the target fusion area corresponding to the second image and the background image; for each pixel to be fused in the target fusion area, determine the to-be-fused Fusion of the first gradient value corresponding to the background image and the second gradient value corresponding to the second image of the pixel point to be fused, according to the first gradient value and the second gradient value corresponding to the pixel point to be fused determining the target color value of the pixel to be fused, and obtaining an intermediate transition image according to the target color value of each pixel to be fused in the target fused area;
  • the intermediate transition image is used as the target transition image.
  • Example 12 provides an image display method, and the method further includes:
  • the determining the target fusion area corresponding to the second image and the background image includes:
  • a target display area of the second image in the first image Determining a target display area of the second image in the first image as a target fusion area corresponding to the second image and the area display image.
  • Example 13 provides an image display method, and the method further includes:
  • displaying the second image in the image display area includes:
  • the target transition image and the second image are superimposed and displayed in the image display area, wherein the transparency of the target transition image changes from high to low, and the transparency of the second image changes from low to high.
  • Example Fourteen provides an image display method, and the method further includes:
  • the display conditions of the second image include at least one of the following conditions:
  • the transition display duration of the target transition image reaches a preset transition display duration
  • the display frame number of the target transition image reaches a preset display frame number threshold
  • the image size of the second image reaches the preset display size.
  • Example 15 provides an image display method, and the method further includes:
  • displaying the target transition image in the image display area includes:
  • the target transition images of two or more frames are sequentially displayed in the image display area, wherein the target transition image of the first frame is obtained by fusing the first image and the second image, and the target transition image of the first frame A target transition image after the field image, the target transition image is obtained by fusing the target transition image shown in the previous frame with the second image.
  • Example 16 provides an image display device, including:
  • An image acquisition module configured to acquire the first image and the second image to be displayed
  • the first display module is configured to display the first image in the image display area in response to receiving a display trigger operation for triggering image display;
  • the transition display module is configured to display the target transition image in the image display area in response to detecting that the display condition of the target transition image is reached, wherein the target transition image is the first image and the a fused image of the second image;
  • the second display module is configured to display the second image in the image display area in response to detecting that the display condition of the second image is met.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

本公开实施例公开了一种图像展示方法、装置、电子设备及存储介质,其中,该方法包括:获取待展示的第一图像和第二图像;响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。

Description

图像展示方法、装置、电子设备及存储介质
本公开要求在2021年12月14日提交中国专利局、申请号为202111530229.2的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及图像处理技术领域,例如涉及一种图像展示方法、装置、电子设备及存储介质。
背景技术
随着智能终端和互联网技术的不断发展,终端与用户之间的交互越来越多样化。图像作为信息传播的重要载体之一,备受广大用户青睐。
在对多张图像进行展示的场景中,相关图像展示方式往往是按照展示顺序直接将当前图像切换为下一张待展示的图像,其展示方式比较单一,缺乏图像展示的丰富性和趣味性,不能很好地满足用户的特效需求。
发明内容
本公开实施例提供了一种图像展示方法、装置、电子设备及存储介质,以提升图像展示效果。
第一方面,本公开实施例提供了一种图像展示方法,该包括:
获取待展示的第一图像和第二图像;
响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
响应于检测到达到目标转场图像的展示条时,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
第二方面,本公开实施例还提供了一种图像展示装置,该装置包括:
图像获取模块,设置为获取待展示的第一图像和第二图像;
第一展示模块,设置为响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
转场展示模块,设置为响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
第二展示模块,设置为响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
第三方面,本公开实施例还提供了一种电子设备,该电子设备包括:
处理器;
存储装置,用于存储程序,
当所述程序被所述处理器执行,使得所述处理器实现本公开任意实施例所提供的图像展示方法。
第四方面,本公开实施例还提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述计算机计算机程序被处理器执行时实现本公开任意实施例所提供的图像展示方法。
附图说明
图1为本公开实施例一所提供的一种图像展示方法的流程示意图;
图2为本公开实施例二所提供的一种图像展示方法的流程示意图;
图3为本公开实施例三所提供的一种图像展示方法的流程示意图;
图4为本公开实施例四所提供的一种图像展示方法的流程示意图;
图5为本公开实施例六所提供的一种图像展示装置的结构示意图;
图6为本公开实施例七所提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过多种形式来实现,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用。
应当理解,本公开的方法实施方式中记载的多个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分。需要注意,本公开中提及的“一个”、“多个”的修饰是示意性,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的。
实施例一
图1为本公开实施例一所提供的一种图像展示方法的流程示意图,本实施例可适用于对多张图像进行展示的情况,该方法可以由图像展示装置来执行,该装置可以通过软件和/或硬件来实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等。任意图像展示的场景通常是由客户端和服务器来配合实现的,本实施例所提供的方法可以由服务端来执行,客户端来执行,或者是客户端和服务端的配合来执行。
如图1所示,本实施例的方法可包括:
S110、获取待展示的第一图像和第二图像。
本实施例中,第一图像和第二图像可以理解为待展示的两张图像。考虑到两张或两张以上的图像进行展示时,存在图像展示顺序,在本公开实施例中,第一图像可以理解为在对第一图像和第二图像进行展示时,先展示的图像,第二图像可以理解为在对第一图像和第二图像进行展示时,后展示的图像。其中,图像展示顺序可以根据图像上传的时间先后或者图像上传的位置进行确定。
可以理解的是,第一图像和第二图像的内容可以相同,也可以不同。示例性地,第一图像和第二图像可以是人物图像、动物图像、风景图像、物品图像或者卡通图像等。在本开实施例中,第一图像和第二图像的尺寸、格式、获取方式以及获取顺序等参数可以根据实际需求进行设置。
为了保证第一图像及第二图像能够达到预期的展示效果,可选地,可以预先设定第一图像和第二图像中至少之一的目标图像特征。示例性地,可以预先 设定第一图像需包含有目标对象。以第一图像为例,例如,可以设定第一图像为人物图像,且包含有人物的目标部位,如面部、肩膀或四肢等。
获取待展示的第一图像和第二图像的方式可以有多种。可选地,接收用户上传的待展示的第一图像和第二图像。例如可以是,接收用户分别在第一预设图像添加位置处添加的第一图像,和在第二预设图像添加位置处添加的第二图像。可选地,基于拍摄装置采集第一图像和第二图像,将采集到的第一图像和第二图像作为待展示的第一图像和第二图像。
S120、响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中。
本实施例中,展示触发操作可以理解为用于触发开始对第一图像和第二图像进行展示的操作。展示触发操作的触发方式可以有多种,例如可以通过语音、手势、预设时间条件以及预设展示触发控件等方式产生。其中,预设展示触发控件可以是设置于软件界面上的虚拟标识。预设展示触发控件的触发可以用于表征开始并以预设方式进行图像展示。示例性地,接收到用于触发图像展示的展示触发操作可包括下述操作中的至少一种:接收到包含有目标关键词的语音信息;采集到的预设手势信息;接收到针对预设展示控件输入的点击或按压操作;检测到已获取到第一图像和第二图像;识别到第一图像为第一预设类型的图像;识别到第一图像为第二预设类型的图像等。其中,第一预设图像类型和第二预设图像类型可以相同也可以不同。需要说明的是,“第一预设图像类型”和“第二预设图像类型”中的“第一”和“第二”用于区分不同的图像识别场景下的预设图像类型。预设图像类型可以根据图像格式和图像内容中的至少之一设置。
示例性地,识别到第一图像为第一预设类型的图像,可以是,响应于检测到第一图像中包含有第一目标属性的目标对象,确定为,识别到第一图像为第一预设类型的图像。类似地,识别到第二图像为第二预设类型的图像,可以是,响应于检测到第二图像中包含有第二目标属性的目标对象,确定为,识别到第二图像为第二预设类型的图像。其中,第一目标对象可以与第二目标对象相同,也可以不同。示例性地,第一目标属性或第二目标属性可以是对象种类或者场景种类等。其中,对象种类可以包括建筑物、水果、动物或人脸等。场景种类可以包括风景或天气等。举例而言,可以在识别到第一图像和第二图像中包含有人脸区域时,确定接收到用于触发图像展示的展示触发操作。
可选地,将所述第一图像展示于图像展示区域中,包括:将所述第一图像静态展示于图像展示区域中,或者,将所述第一图像动态展示于图像展示区域中。其中,将所述第一图像动态展示于图像展示区域中可以是,将所述第一图 像动态于图像展示区域中进行闪烁展示、放大展示或移动展示等。
S130、响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像。
本实施例中,目标转场图像可以理解为将第一图像切换为第二图像进行展示时的过渡图像。目标转场图像的展示条件可以理解为用于触发转场图像开始展示的条件。目标转场图像的展示条件可以根据实际需求进行设置。
可选地,目标转场图像的展示条件可包括下述条件中的至少一个:
所述第一图像的展示进度在所述第一图像、所述目标转场图像以及所述第二图像的总展示时长中的所占的比例达到预设比例阈值;
所述第一图像的总展示时长达到预设第一图像总展示时长阈值;
所述第一图像的展示效果达到预设展示效果;
所述第一图像的显示尺寸达到预设显示尺寸阈值;
将所述第一图像进行静态展示的静态展示时长达到预设静态展示时长阈值;
将所述第一图像进行动态展示的动态展示时长达到预设动态展示时长阈值。
响应于检测到达到目标转场图像的展示条件,可以先根据第一图像和第二图像生成目标转场图像,进而,将目标转场图像展示于所述图像展示区域中。该方案尤其适用于在第一图像和第二图像灵活配置的场景中,能够在图像展示过程中对第一图像和第二图像进行图像融合,生成与第一图像和第二图像相对应的目标转场图像,从而实现由展示第二图像到展示第二图像的平滑过渡。
可选地,目标转场图像由第一图像的局部图像和第二图像的融合得到,或者,第一图像的局部图像和第二图像的局部图像融合得到。示例性地,目标转场图像由放大后的第一图像在图像展示区域中所展示的区域显示图像与第二图像的融合得到。其中,第二图像的显示尺寸可小于或等于所述区域显示图像的显示尺寸。
在本公开实施例中,目标转场图像的数量可以一帧,也可以是两帧或两帧以上。在需展示两帧或两帧以上的目标转场图像时,所述将目标转场图像展示于所述图像展示区域中,可包括:将两帧或两帧以上的目标转场图像依次展示于图像展示区域中。其中,第一帧目标转场图像根据所述第一图像和所述第二图像融合得到,针对第一帧目标转场图像之后的目标转场图像,所述目标转场 图像根据前一帧展示的目标转场图像和所述第二图像融合得到。
可选地,响应于检测到达到第一帧转场图像的展示条件,获取第一图像在图像展示区域中所展示的区域展示图像,根据区域展示图像和第二图像生成第一帧目标转场图像;响应于检测到达到第二帧转场图像的展示条件,根据第一帧目标转场图像和第二图像生成第二帧目标转场图像;响应于检测到达到第三帧转场图像的展示条件,根据第二帧目标转场图像和第二图像生成第三帧目标转场图像,以此类推。即,需生成目标转场图像时,根据图像展示区域中所展示的图像信息以及第二图像生成目标转场图像。
类似地,将所述目标转场图像展示于图像展示区域中,包括:将所述目标转场图像静态展示于图像展示区域中,或者,将所述目标转场图像动态展示于图像展示区域中。其中,将所述目标转场图像动态展示于图像展示区域中可以是,将所述目标转场图像动态于图像展示区域中进行闪烁展示、放大展示或移动展示等。
S140、响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
本实施例中,第二图像的展示条件可以理解为用于触发第二图像开始展示的条件。第二图像的展示条件可以根据实际需求进行设置。示例性地,第二图像的展示条件可包括下述条件中的至少一个:所述目标转场图像的过渡展示时长达到预设过渡展示时长;所述目标转场图像的展示帧数达到预设展示帧数阈值;第二图像的图像尺寸达到预设显示尺寸。
类似地,将所述第二图像展示于所述图像展示区域中,可包括:将所述第二图像静态展示于所述图像展示区域中,将所述第二图像动态展示于所述图像展示区域中。其中,将所述第二图像动态展示于所述图像展示区域中可以是,将所述第二图像动态于图像展示区域中进行闪烁展示、放大展示或移动展示等。为了适配图像展示区域,在将所述第二图像动态于图像展示区域中进行放大展示时,可以在展示过程中,逐渐将所述第二图像从小于第二图像原始尺寸的尺寸放大至所述第二图像原始尺寸或者,放大至铺满图像显示区域。
为了实现目标转场图像与第二图像在展示过程中的平滑过渡,可以将目标转场图像淡出图像展示区域中,并将第二图像淡入图像展示区域中。示例性地,将所述第二图像展示于所述图像展示区域中可以包括:将所述目标转场图像和所述第二图像叠加展示于图像展示区域中,其中,所述目标转场图像的透明度由高向低变化,所述第二图像的透明度由低向高变化。示例性地,响应于检测到达到第二图像的展示条件,通过将目标转场图像的透明度由100%逐渐调整为0,将第二图像的透明度由0调整为100%的方式展示第二图像。
可以理解的是,与第二图像叠加展示的目标转场图像为最后一帧目标转场图像,或者说,与第二图像相邻的那一帧目标转场图像。
需要说明的是,本公开实施例的图像展示方法是以两张待展示图像为例进行介绍,图像展示中需要展示的图像数量可以根据实际需求进行设置。本公开实施例的方法适用于对三张图像或三张以上的图像进行展示的情况。
可选地,可以根据预先设定的与每张图像对应的展示顺序,将待展示的三张图像或三张以上的图像中每两张展示顺序相邻的图像划分为一组待展示图像,其中,每组待展示图像中包括第一图像和第二图像。针对每组待展示图像,可以将每组两张图像中排序靠前的图像作为第一图像,将每组两张图像中排序靠后的图像作为第二图像,然后采用本公开实施例中所记载的图像展示方法对于第一图像和第二图像进行展示。
可选地,在所有的待展示图像都完成第一次展示时,可以将最后一张待展示图像作为第一图像,将第一张待展示图像作为第二图像,继续采用本公开实施例中所记载的图像展示方法对于第一图像和第二图像进行展示,以实现所有待展示图像的循环展示。
以待展示的图像为四张图像为例,将该四张图像分别表示为图像A、图像B、图像C和图像D,假设其展示顺序为图像A、图像C、图像D和图像B,此时,可以将图像A和图像C作为一组待展示图像,其中,图像A为该组待展示图像的第一图像,图像C为该组待展示图像的第二图像;图像C和图像D作为一组待展示图像,其中,图像C为该组待展示图像的第一图像,图像D为该组待展示图像的第二图像;图像D和图像B作为一组待展示图像,其中,图像D为该组待展示图像的第一图像,图像B为该组待展示图像的第二图像;图像B和图像A作为一组待展示图像,其中,图像B为该组待展示图像的第一图像,图像A为该组待展示图像的第二图像。针对每一组待展示图像,分别执行本公开实施例中所记载的图像展示方法对于第一图像和第二图像进行展示,能够实现图像A转图像C转图像D转图像B再转回到图像A继续依序展示每个图像的技术效果,实现四张图像的循环展示。
需要说明的是,在第一图像和第二图像之间还会展示与第一图像和第二图像对应的目标转场图像,以实现第一图像和第二图像的平滑过渡。其中,目标转场图像的生成方法详见本公开实施例的解释内容,在此不做赘述。
本实施例通过获取待展示的第一图像和第二图像,响应于接收到用于触发图像展示的展示触发操作,将第一图像展示于图像展示区域中,能够在获取到第一图像和第二图像后,简单地触发图像展示,并先展示第一图像。响应于检测到达到目标转场图像的展示条件,在展示第二图像之前,先将目标转场图像 展示于所述图像展示区域中,进而,响应于检测到达到第二图像的展示条件,将所述第二图像展示于图像展示区域中。相比较于相关技术仅展示获取到的图像的方式,由于目标转场图像是第一图像和所述第二图像的融合图像,因此通过目标转场图像来进行由第一图像向第二图像的转场,实现了第一图像到第二图像的平滑过渡,解决了在多图像进行展示时,图像展示方式比较单一,缺乏丰富性和趣味性的问题,丰富了转场效果,增加了图像展示的趣味性,提升了用户体验。
实施例二
图2为本公开实施例二所提供的图像展示方法的流程示意图,本实施例在本公开实施例中任一可选方案的基础上,可选地,所述将所述第一图像展示于图像展示区域中,包括:将所述第一图像于图像展示区域中进行放大展示。其中,与上述实施例相同或者相应的技术术语在此不在赘述。
如图2所示,本实施例的方法可以包括:
S210、获取待展示的第一图像和第二图像。
S220、响应于接收到用于触发图像展示的展示触发操作,将所述第一图像于图像展示区域中进行放大展示。
将所述第一图像于图像展示区域中进行放大展示的方式可以有多种。可选地,根据预设放大比例将所述第一图像于图像展示区域中进行放大展示;将所述第一图像于图像展示区域中进行逐渐放大展示,例如可以是,根据预设放大比例以及预设放大速度将所述第一图像于图像展示区域中进行逐渐放大展示,或者,根据预设放大比例以及预设放大时间点将所述第一图像于图像展示区域中进行逐渐放大展示。
示例性地,将所述第一图像于图像展示区域中进行放大展示,还可以是,根据所述第一图像的目标放大区域将所述第一图像进行放大展示,以将所述目标放大区域展示于图像展示区域。其中,目标放大区域可以是包含有目标对象的区域。以第一图像为包含人脸部分的图像为例,目标放大区域可以是眼睛区域、太阳穴区域、眉心区域或嘴部区域等。
可选的地,根据所述第一图像的目标放大区域将所述第一图像进行放大展示,可包括:根据目标放大区域的区域特征信息对所述第一图像进行识别,得到所述第一图像的目标放大区域,确定所述目标放大区域的放大参考点,根据所述放大参考点对所述第一图像进行放大,以使所述目标放大区域展示于所述图像展示区域中。其中,所述放大参考点可以为所述目标放大区域的中心位置 处的像素点。
S230、响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像。
可选地,在将所述第一图像进行放大展示时,所述目标转场图像的展示条件还可包括:将所述第一图像进行放大展示的放大展示时长达到预设放大展示时长阈值。
S240、响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
本实施例通过响应于接收到用于触发图像展示的展示触发操作,于图像展示区域中将第一图像进行放大展示,能够使得第一图像呈现动态展示效果,且能够将第一图像的局部信息与第二图像进行关联,不仅可以实现第一图像向第二图像的平滑转场,同时可以呈现出第二图像从地狱图像的局部区域出现的可视化效果,增加图像展示过程中转场效果的丰富性及趣味性,提升用户体验。
实施例三
图3为本公开实施例三所提供的图像展示方法的流程示意图,本实施例的在本公开实施例中任一可选方案的基础上,可选地,在所述检测到达到目标转场图像的展示条件之后,所述将目标转场图像展示于所述图像展示区域中之前,还包括:获取所述第一图像显示于所述图像展示区域中的区域显示图像,其中,所述第二图像的显示尺寸小于所述区域显示图像的显示尺寸;将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像。
其中,与上述实施例相同或者相应的技术术语在此不在赘述。
如图3所示,本实施例的方法可包括:
S310、获取待展示的第一图像和第二图像。
S320、响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中。
S330、响应于检测到达到目标转场图像的展示条件,获取所述第一图像显示于所述图像展示区域中的区域显示图像,其中,所述第二图像的显示尺寸小于所述区域显示图像的显示尺寸。
本实施例中,在获取所述第一图像显示于所述图像展示区域中的区域显示图像之前,还包括:将所述第一图像由第一图像的原始大小逐渐放大,将第二 图像由预设尺寸逐渐放大,其中,所述预设尺寸小于所述第二图像的原始尺寸。需要说明的是,预设尺寸的数值可以根据展示时长等期望展示效果进行设置。
在展示第一图像时,可选地,根据第一图像的图像信息生成图像展示区域的画布信息。示例性地,可以将第一图像的分辨率作为画布的分辨率,即,画布的像素点数量可以与第一图像的像素点数量一致。这样设置的好处在于,将所述第一图像由第一图像的原始大小逐渐放大,可以使得第一图像从开始展示起一直处于铺满图像展示区域的状态,而且逐渐放大的方式使得第一图像的展示更具有视觉冲击力。
将第二图像由小于所述区域显示图像的显示尺寸的预设尺寸逐渐放大,可以实现从目标转场图像开始展示起,将第二图像逐渐展示至图像展示区域的动态展示效果。其中,第二图像开始放大的时机,可以是,响应于接收到用于触发图像展示的展示触发操作,将第二图像由预设尺寸逐渐放大,也可以是,响应于检测到达到目标转场图像的展示条件,将第二图像由预设尺寸逐渐放大。
考虑到在第一图像和第二图像在图像展示区域中的展示方式可以有多种。为了保证目标转场图像能够在第一图像和第二图像展示之间起到很好的衔接作用,可以响应于检测到达到目标转场图像的展示条件,获取当前时刻下所述第一图像显示于所述图像展示区域中的区域显示图像以及当前时刻下的第二图像。通过图像展示区域中实时显示的图像与第二图像在当前时刻下的状态来生成目标转场图像,能够保持观感上的连贯性,实现第一图像和第二图像在视觉体验上的平滑转场。
S340、将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像。
本实施例中,将所述第二图像与所述区域显示图像进行图像融合的方式可以有多种。例如可以是,可以通过泊松融合的方式将所述第一图像和所述第二图像进行融合。但考虑到柏松融合涉及到方程求解,运算量较大,耗时长,一般需要依赖于中央处理器计算,受限于图形处理器(Graphics Processing Unit,GPU)的性能往往无法快速有效地求解方程,可能无法图像融合。也可以用雅可比迭代法将所述第一图像和所述第二图像进行融合,但该雅可比迭代法旨在逼近真实结果,耗时较长,图像融合效率较低。在本公开实施例中,可以根据图像展示区域中所展示的每个像素点的梯度值将所述第一图像和所述第二图像进行融合,其中,图像展示区域中每个像素点可以理解为用于展示目标混合图像的画布对应的像素点。
S350、将目标转场图像展示于所述图像展示区域中。
S360、响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
本实施例,响应于检测到达到目标转场图像的展示条件,获取第一图像显示于图像展示区域中的区域显示图像,其中,第二图像的显示尺寸小于所述区域显示图像的显示尺寸,这样使得第二图像能够完整融合于区域显示图像中,且还能够保留区域显示图像的部分信息,进而将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像,能够较好起到第一图像向第二图像的视觉过渡作用,提升用户体验。
实施例四
图4为本公开实施例四所提供的图像展示方法的流程示意图,本实施例的方案在本公开实施例中任一可选方案的基础上,可选地,所述将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像,包括:将所述区域显示图像作为背景图像,确定与所述第二图像和所述背景图像对应的目标融合区域;针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值;根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值;根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像。
其中,与上述实施例相同或者相应的技术术语在此不在赘述。
如图4所示,本实施例的方法可包括:
S410、获取待展示的第一图像和第二图像。
S420、响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中。
S430、响应于检测到达到目标转场图像的展示条件,获取所述第一图像显示于所述图像展示区域中的区域显示图像,其中,所述第二图像的显示尺寸小于所述区域显示图像的显示尺寸。
S440、将所述区域显示图像作为背景图像,确定与所述第二图像和所述背景图像对应的目标融合区域。
本实施例中,在对所述第二图像和所述区域显示图像进行融合时,可以以区域显示图像作为背景图像,进而,可以将所述第二图像融合至所述区域显示图像的全部图像区域或部分图像区域中。换言之,目标融合区域可以是区域显 示图像的全部图像区域也可以是区域显示图像的部分图像区域。
可选地,确定与所述第二图像和所述背景图像对应的目标融合区域,可包括:将所述区域显示图像对应的显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域;或者,将所述第二图像在所述第一图像中的目标显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域。
在实际应用过程中,可以通过调整第二图像的显示尺寸来调整与所述第二图像和所述背景图像对应的目标融合区域。
S450、针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值。
本实施例中,梯度值用于表示像素点颜色变化的速度。在公开实施例中可通过背景图像和第二图像来确定待融合像素点的梯度值,进而通过待融合像素点的梯度值实现背景图像和第二图像的融合。相对于泊松融合及雅克比迭代法等图像融合方式,通过梯度值进行图像融合,其运算量更小,对硬件要求较低,且能够快速得到融合图像,尤其适合GPU实时处理图形融合的情况。在计算一个像素点的梯度值时,可以根据该像素点的邻域像素点的颜色值来计算。
针对所述目标融合区域中的每个待融合像素点而言,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,可包括:根据所述背景图像中每个像素点的颜色值确定所述待融合像素点的第一梯度值,并根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值。
需要说明的是,待融合像素点的梯度值需要根据待融合像素点的领域像素点来计算。在本公开实施例中,可以通过预设梯度采样步长来确定与待融合像素点对应的领域像素点。图像融合的效果可能会随预设梯度采样步长的变化而变化。可选地,预设梯度采样步长可以采用一个像素点的中心到与该像素点相邻的像素点的中心的距离作为基本单位来设置,即采用点间距作为预设梯度采样步长的基本单位。
示例性地,所述根据所述第一图像中每个像素点的颜色值确定所述待融合像素点的第一梯度值,包括:确定与所述融合像素点对应的目标梯度采样步长,其中,所述目标梯度采样步长用于表示待确定的参考像素点与所述融合像素点相隔的目标距离;根据所述待融合像素点在所述图像显示区域中的位置信息、所述目标梯度采样步长以及预设梯度计算方向确定所述第一图像中与所述融合像素点对应的参考像素点;根据所述参考像素点在所述第一图像中的颜色值确 定所述待融合像素点的第二梯度值。
本实施例中,目标梯度采样步长可以理解为用于确定与所述融合像素点的对应的参考像素点的参数,参考像素点与待融合像素点之间满足间隔目标距离的要求。在只需要生成一帧目标转场图像时,可以仅设置一个预设梯度采样步长,以该预设梯度采样步长作为待融合像素点的目标梯度采样步长。在需要生成两帧或两帧以上目标转场图像时,可以分别为每帧目标转场图像设置不同的预设梯度采样步长,此时需要将目标转场图像对应的预设梯度采样步长确定为用于生成该目标转场图像的待融合像素点对应的目标梯度采样步长。需要说明的是,多个预设梯度采样步长的数量及变化值等数据可以根据实际需求进行设置。示例性地,可以是由0倍点间距变化至2倍点间距。为了实现图像展示效果上的渐变效果,可以设置多个预设梯度采样步长,多个预设梯度采样步长从小到大逐渐变化。在一实施例中,预设梯度采样步长可以通过设置用于调整梯度采样步长的调整进度条来进行调整。多个预设梯度采样步长之间可以呈现线性变化关系。沿用上例,可以在0倍点间距与2倍点间距之间以0.2倍点间距为增长值设置多个中间倍数点间距。
在上述技术方案的基础上,所述目标转场图像的展示条件还可包括:与目标转场图像对应的预设梯度采样步长发生变化,其中,所述预设梯度采样步长用于衡量目标转场图像中两个像素点之间的距离。在本公开实施例中,与目标转场图像对应的预设梯度采样步长发生变化,可以理解为梯度采样步长由一个预设值变化为另一个预设值。
类似地,所述根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值,包括:确定与所述融合像素点对应的目标梯度采样步长,其中,所述目标梯度采样步长用于表示待确定的参考像素点与所述融合像素点相隔的目标距离;根据所述待融合像素点在所述图像显示区域中的位置信息、所述目标梯度采样步长以及预设梯度计算方向确定所述第二图像中与所述融合像素点对应的参考像素点;根据所述参考像素点在所述第二图像中的颜色值确定所述待融合像素点的第二梯度值。
为了提升图像融合的效率,可以并行计算每个待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值。将目标融合区域中所有的待融合像素点的第一梯度值和第二梯度值均计算完毕时,可以得到与所述背景图像对应的第一梯度图以及与所述第二图像对应的第二梯度图,以便后续查询使用。
S460、根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值。
本实施例中,颜色值可以理解为每个颜色通道的值,如针对RGB图像来说,颜色值可以理解为RGB三通道的值。待融合像素点的目标颜色值可以理解为待融合像素点所要呈现的颜色值。
可选地,选取所述待融合像素点对应的所述第一梯度值和所述第二梯度值中较大的梯度值对应的颜色值,作为所述待融合像素点的目标颜色值。示例性地,比较所述待融合像素点对应的所述第一梯度值和所述第二梯度值,确定出所述第一梯度值和所述第二梯度值中较大的梯度值,响应于较大的梯度值为第一梯度值,将该待融合像素点在背景图像中对应的像素点的颜色值确定为该待融合像素点的目标颜色值,响应于较大的梯度值为第二梯度值,将该待融合像素点在第二图像中对应的像素点的颜色值确定为该待融合像素点的目标颜色值。
可选地,还可以是根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值的大小分别确定与所述第一梯度值对应的颜色值的第一权重值,以及与所述第二梯度值对应的颜色值的第二权重值,进而,根据待融合像素点的所述第一梯度值对应的颜色值、所述第一权重值、所述第二梯度值对应的颜色值和所述第二权重值计算待融合像素点的目标颜色值。
S470、根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像。
在本公开实施例中,可以将经过一次计算得到的转场图像作为目标转场图像,也可以是经由两次或两次以上的迭代计算确定目标转场图像,以提升目标转场图像的融合效果。在经由两次或两次以上的迭代计算确定目标转场图像时,可以根据所述目标融合区域中每个待融合像素点的目标颜色值生成中间转场图像,进而,将中间转场图像与第二图像进行融合,以更新中间转场图像,重复执行将中间转场图像与第二图像进行融合的步骤,以得到目标转场图像。
示例性地,可以是,根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像;将所述中间转场图像作为背景图像,重复执行确定与所述第二图像和所述背景图像对应的目标融合区域;针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值,以及根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像的操作;响应于检测到达到融合结束条件,将所述中间转场图像作为目标转场图像。
本实施例中,在根据所述目标融合区域中每个待融合像素点的目标颜色值 得到中间转场图像时,可根据所述目标融合区域中每个待融合像素点的目标颜色值,通过离屏渲染的方式得到中间转场图像。离屏渲染的方式可以理解为将中间转场图像渲染至预设的缓存区域内。可选地,中间转场图像并不展示于图像展示区域中。
需要说明的是,融合结束条件可以根据实际需求进行设置,例如可以是达到预设迭代次数,或者,融合后的图像参数达到预设参数阈值等。其中,预设迭代次数表征得到目标转场图像所经过的计算转场图像的计算次数,其数值可以根据期望的图像融合效果设置,例如可以是5次,6次或8次等。
S480、将目标转场图像展示于所述图像展示区域中。
S490、响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
本实施例,通过将所述区域显示图像作为背景图像,将第二图像融合至背景图像中,先确定与第二图像和背景图像对应的目标融合区域,以针对所述目标融合区域中的每个待融合像素点分别进行处理,通过确定出的待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值来确定所述待融合像素点的目标颜色值,进而,据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像,由于该图像融合方式对硬件支撑要求较低,且计算速度快,因此,能够在第一图像和第二图像展示的过程中,实时生成目标转场图像,且有效提升第二图像和背景图像的融合效率。
实施例五
本实施例结合具体应用场景对本公开实施例提供的图像展示方法进行介绍,在该应用场景中第一图像和第二图像为包含眼睛区域的图像,期望的第一图像和第二图像的视觉展示效果是,第一图像放大至眼睛区域时出现第二图像,并且第二图像逐渐放大并清晰展示,其实现方式如下:
获取待展示的第一图像和第二图像;
将第一图像中的眼睛区域作为第一图像在图像展示区域中的区域展示图像,对第一图像进行放大展示,换言之,以第一图像中的眼睛区域为中心对第一图像进行放大展示;
将所述第二图像由小于第二图像原始尺寸的预设尺寸逐渐放大至第二图像的原始尺寸;
响应于检测到达到目标转场图像的展示条件,获取当前时刻下的图像展示 区域中所展示的眼睛区域的图像信息作为背景图像的图像信息,并获取当前时刻下的第二图像,将背景图像与第二图像进行图像融合,得到目标转场图像,并展示所述目标转场图像;
在需要展示多帧目标转场图像时,可以获取当前时刻下的图像展示区域中所展示的前一帧目标转场图像作为背景图像,并获取当前时刻下的第二图像,并将背景图像与第二图像进行图像融合,得到目标转场图像,并展示所述目标转场图像;
响应于检测到达到第二图像的展示条件,将所述目标转场图像的透明度由高到低进行调整,同时将所述第二图像的透明度由低到高进行调整,以将第二图像展示于所述图像展示区域中。
本实施例中,将图像展示区域中所展示的像素点作为待融合像素点,针对每个待融合像素点,计算该待融合像素点与背景图像对应的第一梯度值,以及与第二图像对应的第二梯度值,选取第一梯度值和第二梯度值中较大的梯度值对应的颜色值作为该待融合像素点的目标颜色值,根据每个待融合像素点的目标颜色值离屏渲染出一张新的图像,作为中间转场图像,重复执行该操作,响应于检测到达到融合结束条件,将所述中间转场图像作为目标转场图像。
本实施例,能实现在图像展示过程中,通过GPU即可实现图像快速融合,在一帧内即可得到融合效果,提升了图像融合效率,丰富了图像展示的转场效果,提升了用户体验。
实施例六
图5为本公开实施例六所提供的图像展示装置的结构示意图,本实施例所提供的图像展示装置可以通过软件和/或硬件来实现,可配置于终端和/或服务器中来实现本公开实施例中的图像展示方法。该装置可包括:图像获取模块510、第一展示模块520、转场展示模块530和第二展示模块540。
其中,图像获取模块510,设置为获取待展示的第一图像和第二图像;第一展示模块520,设置为响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;转场展示模块530,设置为响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;第二展示模块540,设置为响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
本公开实施例,通过获取待展示的第一图像和第二图像,响应于接收到用 于触发图像展示的展示触发操作,将第一图像展示于图像展示区域中,能够在获取到第一图像和第二图像后,简单地触发图像展示,并先展示第一图像。响应于检测到达到目标转场图像的展示条件,在展示第二图像之前,先将目标转场图像展示于所述图像展示区域中,进而,响应于检测到达到第二图像的展示条件,将所述第二图像展示于图像展示区域中。相比较于相关技术仅展示获取到的图像的方式,由于目标转场图像是第一图像和所述第二图像的融合图像,因此通过目标转账图像来进行由第一图像向第二图像的转场,实现了第一图像到第二图像的平滑过渡,解决了在多图像进行展示时,图像展示方式比较单一,缺乏丰富性和趣味性的问题,丰富了转场效果,增加了图像展示的趣味性,提升了用户体验。
在本公开实施例中任一可选技术方案的基础上,可选地,所述第一展示模块设置为:
将所述第一图像于图像展示区域中进行放大展示。
在本公开实施例中任一可选技术方案的基础上,可选地,所述第一展示模块是设置为:
根据所述第一图像的目标放大区域将所述第一图像进行放大展示,以将所述目标放大区域展示于图像展示区域。
在本公开实施例中任一可选技术方案的基础上,可选地,所述目标转场图像的展示条件,包括下述条件中的至少一个:
所述第一图像的展示进度在所述第一图像、所述目标转场图像以及所述第二图像的总展示时长中的所占的比例达到预设比例阈值;
所述第一图像的总展示时长达到预设第一图像总展示时长阈值;
所述第一图像的展示效果达到预设展示效果;
所述第一图像的显示尺寸达到预设显示尺寸阈值;
将所述第一图像进行静态展示的静态展示时长达到预设静态展示时长阈值;
将所述第一图像进行动态展示的动态展示时长达到预设动态展示时长阈值;
与目标转场图像对应的预设梯度采样步长发生变化,其中,所述预设梯度采样步长用于衡量图像中像素点之间的距离。
在本公开实施例中任一可选技术方案的基础上,可选地,所述图像处理装置还包括:图像确定模块和图像融合模块。
其中,图像确定模块,设置为在所述检测到达到目标转场图像的展示条件之后,所述将目标转场图像展示于所述图像展示区域中之前,获取所述第一图像显示于所述图像展示区域中的区域显示图像,其中,所述第二图像的显示尺寸小于所述区域显示图像的显示尺寸;图像融合模块,设置为将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像。
在本公开实施例中任一可选技术方案的基础上,可选地,所述图像确定模块是设置为:
将所述第一图像由第一图像的原始大小逐渐放大,将第二图像由预设尺寸逐渐放大,其中,所述预设尺寸小于所述第二图像的原始尺寸。
在本公开实施例中任一可选技术方案的基础上,可选地,所述图像融合模块包括:融合区域确定单元、梯度值计算单元、颜色值确定单元和转场图像生成单元。
其中,融合区域确定单元,设置为将所述区域显示图像作为背景图像,确定与所述第二图像和所述背景图像对应的目标融合区域;梯度值计算单元,设置为针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值;颜色值确定单元,设置为根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值;转场图像生成单元,设置为根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像。
在本公开实施例中任一可选技术方案的基础上,可选地,所述梯度值计算单元是设置为:
根据所述背景图像中每个像素点的颜色值确定所述待融合像素点的第一梯度值,并根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值。
在本公开实施例中任一可选技术方案的基础上,可选地,所述梯度值计算单元还设置为:
确定与所述融合像素点对应的目标梯度采样步长,其中,所述目标梯度采样步长用于表示待确定的参考像素点与所述融合像素点相隔的目标距离;
根据所述待融合像素点在所述图像显示区域中的位置信息、所述目标梯度采样步长以及预设梯度计算方向确定所述第二图像中与所述融合像素点对应的参考像素点;
根据所述参考像素点在所述第二图像中的颜色值确定所述待融合像素点的第二梯度值。
在本公开实施例中任一可选技术方案的基础上,可选地,所述颜色值确定单元是设置为:
选取所述待融合像素点对应的所述第一梯度值和所述第二梯度值中较大的梯度值对应的颜色值,作为所述待融合像素点的目标颜色值。
在本公开实施例中任一可选技术方案的基础上,可选地,所述目标转场图像生成单元是设置为:
根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像;
将所述中间转场图像作为背景图像,重复执行确定与所述第二图像和所述背景图像对应的目标融合区域;针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值,以及根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像的操作;
响应于检测到达到融合结束条件、,将所述中间转场图像作为目标转场图像。
在本公开实施例中任一可选技术方案的基础上,可选地,所述融合区域确定单元是设置为:
将所述区域显示图像对应的显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域;或者,
将所述第二图像在所述第一图像中的目标显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域。
在本公开实施例中任一可选技术方案的基础上,可选地,所述第二展示模块是设置为:
将所述目标转场图像和所述第二图像叠加展示于图像展示区域中,其中,所述目标转场图像的透明度由高向低变化,所述第二图像的透明度由低向高变化。
在本公开实施例中任一可选技术方案的基础上,可选地,所述第二图像的展示条件,包括下述条件中的至少一个:
所述目标转场图像的过渡展示时长达到预设过渡展示时长;
所述目标转场图像的展示帧数达到预设展示帧数阈值;
第二图像的图像尺寸达到预设显示尺寸。
在本公开实施例中任一可选技术方案的基础上,可选地,所述转场展示模块是设置为:
将两帧或两帧以上的目标转场图像依次展示于图像展示区域中,其中,第一帧目标转场图像根据所述第一图像和所述第二图像融合得到,针对第一帧目标转场图像之后的目标转场图像,所述目标转场图像根据前一帧展示的目标转场图像和所述第二图像融合得到。
本公开实施例所提供的图像展示装置可执行本公开任意实施例所提供的图像展示方法,具备执行方法相应的功能模块和有益效果。
值得注意的是,上述装置所包括的多个单元和模块只是按照功能逻辑进行划分的,只要能够实现相应的功能即可;另外,多个功能单元的具体名称也只是为了便于相互区分。
实施例七
图6为本公开实施例七所提供的一种电子设备的结构示意图。下面参考图6,示出了适于用来实现本公开实施例的电子设备(例如图5中的终端设备或服务器)600的结构示意图。本公开实施例中的终端设备可以包括诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、平板电脑(Portable Android Device,PAD)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字电视(television,TV)、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例。
如图6所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)601,电子设备500可以根据存储在只读存储器(Read-Only Memory,ROM)602中的程序或者从存储装置606加载到随机访问存储器(Random Access Memory,RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。编辑/输出(Input/Output,I/O)接口5605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的编辑装置606;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置606;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具 有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,该计算机程序产品包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置606被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的。
本公开实施例提供的电子设备与上述实施例提供的图像展示方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。
实施例七
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的图像展示方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质可以包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器、只读存储器、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。计 算机可读介质上包含的程序代码可以用任何适当的介质传输,包括:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如超文本传输协议(HyperText Transfer Protocol,HTTP)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:
获取待展示的第一图像和第二图像;
响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应 当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Parts,ASSP)、片上***(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行***、装置或设备使用或与指令执行***、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括电子的、磁性的、光学的、电磁的、红外的、或半导体***、装置或设备,或者上述内容的任何合适组合。机器可读存储介质可以包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、CD-ROM、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,【示例一】提供了一种图像展示方法,该方法包括:
获取待展示的第一图像和第二图像;
响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像 展示区域中。
根据本公开的一个或多个实施例,【示例二】提供了一种图像展示方法,该方法,还包括:
可选的,所述将所述第一图像展示于图像展示区域中,包括:
将所述第一图像于图像展示区域中进行放大展示。
根据本公开的一个或多个实施例,【示例三】提供了一种图像展示方法,该方法,还包括:
可选的,所述将所述第一图像于图像展示区域中进行放大展示,包括:
根据所述第一图像的目标放大区域将所述第一图像进行放大展示,以将所述目标放大区域展示于图像展示区域。
根据本公开的一个或多个实施例,【示例四】提供了一种图像展示方法,该方法,还包括:
可选的,所述目标转场图像的展示条件,包括下述条件中的至少一个:
所述第一图像的展示进度在所述第一图像、所述目标转场图像以及所述第二图像的总展示时长中的所占的比例达到预设比例阈值;
所述第一图像的总展示时长达到预设第一图像总展示时长阈值;
所述第一图像的展示效果达到预设展示效果;
所述第一图像的显示尺寸达到预设显示尺寸阈值;
将所述第一图像进行静态展示的静态展示时长达到预设静态展示时长阈值;
将所述第一图像进行动态展示的动态展示时长达到预设动态展示时长阈值;
与目标转场图像对应的预设梯度采样步长发生变化,其中,所述预设梯度采样步长用于衡量图像中像素点之间的距离。
根据本公开的一个或多个实施例,【示例五】提供了一种图像展示方法,该方法,还包括:
可选的,在所述检测到达到目标转场图像的展示条件之后,所述将目标转场图像展示于所述图像展示区域中之前,所述方法还包括:
获取所述第一图像显示于所述图像展示区域中的区域显示图像,其中,所述第二图像的显示尺寸小于所述区域显示图像的显示尺寸;
将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像。
根据本公开的一个或多个实施例,【示例六】提供了一种图像展示方法,该方法,还包括:
可选的,在所述获取所述第一图像显示于所述图像展示区域中的区域显示图像之前,所述方法还包括:
将所述第一图像由第一图像的原始大小逐渐放大,将第二图像由预设尺寸逐渐放大,其中,所述预设尺寸小于所述第二图像的原始尺寸。
根据本公开的一个或多个实施例,【示例七】提供了一种图像展示方法,该方法,还包括:
可选的,所述将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像,包括:
将所述区域显示图像作为背景图像,确定与所述第二图像和所述背景图像对应的目标融合区域;
针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值;
根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值;
根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像。
根据本公开的一个或多个实施例,【示例八】提供了一种图像展示方法,该方法,还包括:
可选的,所述确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,包括:
根据所述背景图像中每个像素点的颜色值确定所述待融合像素点的第一梯度值,并根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值。
根据本公开的一个或多个实施例,【示例九】提供了一种图像展示方法,该方法,还包括:
可选的,所述根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值,包括:
确定与所述融合像素点对应的目标梯度采样步长,其中,所述目标梯度采 样步长用于表示待确定的参考像素点与所述融合像素点相隔的目标距离;
根据所述待融合像素点在所述图像显示区域中的位置信息、所述目标梯度采样步长以及预设梯度计算方向确定所述第二图像中与所述融合像素点对应的参考像素点;
根据所述参考像素点在所述第二图像中的颜色值确定所述待融合像素点的第二梯度值。
根据本公开的一个或多个实施例,【示例十】提供了一种图像展示方法,该方法,还包括:
可选的,所述根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值,包括:
选取所述待融合像素点对应的所述第一梯度值和所述第二梯度值中较大的梯度值对应的颜色值,作为所述待融合像素点的目标颜色值。
根据本公开的一个或多个实施例,【示例十一】提供了一种图像展示方法,该方法,还包括:
可选的,所述根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像,包括:
根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像;
将所述中间转场图像作为背景图像,重复执行确定与所述第二图像和所述背景图像对应的目标融合区域;针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值,以及根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像的操作;
响应于检测到达到融合结束条件,将所述中间转场图像作为目标转场图像。
根据本公开的一个或多个实施例,【示例十二】提供了一种图像展示方法,该方法,还包括:
可选的,所述确定与所述第二图像和所述背景图像对应的目标融合区域,包括:
将所述区域显示图像对应的显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域;或者,
将所述第二图像在所述第一图像中的目标显示区域确定为与所述第二图像 和所述区域显示图像对应的目标融合区域。
根据本公开的一个或多个实施例,【示例十三】提供了一种图像展示方法,该方法,还包括:
可选地,所述将所述第二图像展示于所述图像展示区域中,包括:
将所述目标转场图像和所述第二图像叠加展示于图像展示区域中,其中,所述目标转场图像的透明度由高向低变化,所述第二图像的透明度由低向高变化。
根据本公开的一个或多个实施例,【示例十四】提供了一种图像展示方法,该方法,还包括:
可选的,所述第二图像的展示条件,包括下述条件中的至少一个:
所述目标转场图像的过渡展示时长达到预设过渡展示时长;
所述目标转场图像的展示帧数达到预设展示帧数阈值;
第二图像的图像尺寸达到预设显示尺寸。
根据本公开的一个或多个实施例,【示例十五】提供了一种图像展示方法,该方法,还包括:
可选的,所述将目标转场图像展示于所述图像展示区域中,包括:
将两帧或两帧以上的目标转场图像依次展示于图像展示区域中,其中,第一帧目标转场图像根据所述第一图像和所述第二图像融合得到,针对第一帧目标转场图像之后的目标转场图像,所述目标转场图像根据前一帧展示的目标转场图像和所述第二图像融合得到。
根据本公开的一个或多个实施例,【示例十六】提供了一种图像展示装置,该装置,包括:
图像获取模块,设置为获取待展示的第一图像和第二图像;
第一展示模块,设置为响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
转场展示模块,设置为响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
第二展示模块,设置为响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。

Claims (18)

  1. 一种图像展示方法,包括:
    获取待展示的第一图像和第二图像;
    响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
    响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
    响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
  2. 根据权利要求1所述的方法,其中,所述将所述第一图像展示于图像展示区域中,包括:
    将所述第一图像于图像展示区域中进行放大展示。
  3. 根据权利要求2所述的方法,其中,所述将所述第一图像于图像展示区域中进行放大展示,包括:
    根据所述第一图像的目标放大区域将所述第一图像进行放大展示,以将所述目标放大区域展示于图像展示区域。
  4. 根据权利要求1所述的方法,其中,所述目标转场图像的展示条件,包括下述条件中的至少一个:
    所述第一图像的展示进度在所述第一图像、所述目标转场图像以及所述第二图像的总展示时长中的所占的比例达到预设比例阈值;
    所述第一图像的总展示时长达到预设第一图像总展示时长阈值;
    所述第一图像的展示效果达到预设展示效果;
    所述第一图像的显示尺寸达到预设显示尺寸阈值;
    将所述第一图像进行静态展示的静态展示时长达到预设静态展示时长阈值;
    将所述第一图像进行动态展示的动态展示时长达到预设动态展示时长阈值;
    与目标转场图像对应的预设梯度采样步长发生变化,其中,所述预设梯度采样步长用于衡量图像中像素点之间的距离。
  5. 根据权利要求1所述的方法,在所述检测到达到目标转场图像的展示条 件之后,所述将目标转场图像展示于所述图像展示区域中之前,所述方法还包括:
    获取所述第一图像显示于所述图像展示区域中的区域显示图像,其中,所述第二图像的显示尺寸小于所述区域显示图像的显示尺寸;
    将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像。
  6. 根据权利要求5所述的方法,在所述获取所述第一图像显示于所述图像展示区域中的区域显示图像之前,所述方法还包括:
    将所述第一图像由第一图像的原始大小逐渐放大,将第二图像由预设尺寸逐渐放大,其中,所述预设尺寸小于所述第二图像的原始尺寸。
  7. 根据权利要求5所述的方法,其中,所述将所述第二图像与所述区域显示图像进行图像融合,得到目标转场图像,包括:
    将所述区域显示图像作为背景图像,确定与所述第二图像和所述背景图像对应的目标融合区域;
    针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值;
    根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值;
    根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像。
  8. 根据权利要求7所述的方法,其中,所述确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,包括:
    根据所述背景图像中每个像素点的颜色值确定所述待融合像素点的第一梯度值,并根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值。
  9. 根据权利要求8所述的方法,其中,所述根据所述第二图像中每个像素点的颜色值确定所述待融合像素点的第二梯度值,包括:
    确定与所述融合像素点对应的目标梯度采样步长,其中,所述目标梯度采样步长用于表示待确定的参考像素点与所述融合像素点相隔的目标距离;
    根据所述待融合像素点在所述图像显示区域中的位置信息、所述目标梯度采样步长以及预设梯度计算方向确定所述第二图像中与所述融合像素点对应的参考像素点;
    根据所述参考像素点在所述第二图像中的颜色值确定所述待融合像素点的第二梯度值。
  10. 根据权利要求7所述的方法,其中,所述根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值,包括:
    选取所述待融合像素点对应的所述第一梯度值和所述第二梯度值中较大的梯度值对应的颜色值,作为所述待融合像素点的目标颜色值。
  11. 根据权利要求7所述的方法,其中,所述根据所述目标融合区域中每个待融合像素点的目标颜色值,得到目标转场图像,包括:
    根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像;
    将所述中间转场图像作为背景图像,重复执行确定与所述第二图像和所述背景图像对应的目标融合区域;针对所述目标融合区域中的每个待融合像素点,确定所述待融合像素点与所述背景图像对应的第一梯度值以及与所述第二图像对应的第二梯度值,根据所述待融合像素点对应的所述第一梯度值和所述第二梯度值确定所述待融合像素点的目标颜色值,以及根据所述目标融合区域中每个待融合像素点的目标颜色值,得到中间转场图像的操作;
    响应于检测到达到融合结束条件,将所述中间转场图像作为目标转场图像。
  12. 根据权利要求7所述的方法,其中,所述确定与所述第二图像和所述背景图像对应的目标融合区域,包括:
    将所述区域显示图像对应的显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域;或者,
    将所述第二图像在所述第一图像中的目标显示区域确定为与所述第二图像和所述区域显示图像对应的目标融合区域。
  13. 根据权利要求1所述的方法,其中,所述将所述第二图像展示于所述图像展示区域中,包括:
    将所述目标转场图像和所述第二图像叠加展示于图像展示区域中,其中,所述目标转场图像的透明度由高向低变化,所述第二图像的透明度由低向高变化。
  14. 根据权利要求1所述的方法,其中,所述第二图像的展示条件,包括下述条件中的至少一个:
    所述目标转场图像的过渡展示时长达到预设过渡展示时长;
    所述目标转场图像的展示帧数达到预设展示帧数阈值;
    第二图像的图像尺寸达到预设显示尺寸。
  15. 根据权利要求1所述的方法,其中,所述将目标转场图像展示于所述图像展示区域中,包括:
    将两帧或两帧以上的目标转场图像依次展示于图像展示区域中,其中,第一帧目标转场图像根据所述第一图像和所述第二图像融合得到,针对第一帧目标转场图像之后的目标转场图像,所述目标转场图像根据前一帧展示的目标转场图像和所述第二图像融合得到。
  16. 一种图像展示装置,包括:
    图像获取模块,设置为获取待展示的第一图像和第二图像;
    第一展示模块,设置为响应于接收到用于触发图像展示的展示触发操作,将所述第一图像展示于图像展示区域中;
    转场展示模块,设置为响应于检测到达到目标转场图像的展示条件,将目标转场图像展示于所述图像展示区域中,其中,所述目标转场图像为所述第一图像和所述第二图像的融合图像;
    第二展示模块,设置为响应于检测到达到第二图像的展示条件,将所述第二图像展示于所述图像展示区域中。
  17. 一种电子设备,所述电子设备包括:
    处理器;
    存储装置,用于存储程序,
    当所述程序被所述处理器执行,使得所述处理器实现如权利要求1-15中任一所述的图像展示方法。
  18. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-15中任一所述的图像展示方法。
PCT/CN2022/138868 2021-12-14 2022-12-14 图像展示方法、装置、电子设备及存储介质 WO2023109842A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111530229.2 2021-12-14
CN202111530229.2A CN114245028B (zh) 2021-12-14 2021-12-14 图像展示方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023109842A1 true WO2023109842A1 (zh) 2023-06-22

Family

ID=80756001

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138868 WO2023109842A1 (zh) 2021-12-14 2022-12-14 图像展示方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN114245028B (zh)
WO (1) WO2023109842A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117785995A (zh) * 2024-02-28 2024-03-29 江西方兴科技股份有限公司 一种基于物联网屏的数据展示方法及***

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245028B (zh) * 2021-12-14 2024-02-06 北京字跳网络技术有限公司 图像展示方法、装置、电子设备及存储介质
CN115086265A (zh) * 2022-06-30 2022-09-20 上海掌门科技有限公司 一种生成群头像信息的方法与设备
CN117931330A (zh) * 2022-10-25 2024-04-26 华为技术有限公司 显示方法和电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080075388A1 (en) * 2006-09-25 2008-03-27 Fujifilm Corporation Image data reproducing apparatus, method of controlling same and control program therefor
CN105183296A (zh) * 2015-09-23 2015-12-23 腾讯科技(深圳)有限公司 交互界面显示方法及装置
CN112732377A (zh) * 2019-10-28 2021-04-30 广州极飞科技有限公司 图像的展示方法、装置及存储介质
CN113010249A (zh) * 2021-03-17 2021-06-22 北京字跳网络技术有限公司 页面切换方法、装置、设备及介质
CN113709545A (zh) * 2021-04-13 2021-11-26 腾讯科技(深圳)有限公司 视频的处理方法、装置、计算机设备和存储介质
CN114245028A (zh) * 2021-12-14 2022-03-25 北京字跳网络技术有限公司 图像展示方法、装置、电子设备及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5353391A (en) * 1991-05-06 1994-10-04 Apple Computer, Inc. Method apparatus for transitioning between sequences of images
CN102194441A (zh) * 2010-03-10 2011-09-21 鸿富锦精密工业(深圳)有限公司 在电子装置中切换显示图片的方法
US9734599B2 (en) * 2014-10-08 2017-08-15 Microsoft Technology Licensing, Llc Cross-level image blending
CN104299252B (zh) * 2014-10-17 2018-09-07 惠州Tcl移动通信有限公司 一种图片显示切换的过渡方法及其***
CN107704300A (zh) * 2017-09-25 2018-02-16 联想(北京)有限公司 信息处理方法及电子设备
CN109120869A (zh) * 2018-11-07 2019-01-01 深圳市道通智能航空技术有限公司 双光图像整合方法、整合设备及无人机
CN110062271B (zh) * 2019-04-28 2022-03-04 腾讯科技(成都)有限公司 场景切换方法、装置、终端及存储介质
CN113784038A (zh) * 2021-07-29 2021-12-10 深圳思为科技有限公司 转场方法、装置、电子设备及计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080075388A1 (en) * 2006-09-25 2008-03-27 Fujifilm Corporation Image data reproducing apparatus, method of controlling same and control program therefor
CN105183296A (zh) * 2015-09-23 2015-12-23 腾讯科技(深圳)有限公司 交互界面显示方法及装置
CN112732377A (zh) * 2019-10-28 2021-04-30 广州极飞科技有限公司 图像的展示方法、装置及存储介质
CN113010249A (zh) * 2021-03-17 2021-06-22 北京字跳网络技术有限公司 页面切换方法、装置、设备及介质
CN113709545A (zh) * 2021-04-13 2021-11-26 腾讯科技(深圳)有限公司 视频的处理方法、装置、计算机设备和存储介质
CN114245028A (zh) * 2021-12-14 2022-03-25 北京字跳网络技术有限公司 图像展示方法、装置、电子设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117785995A (zh) * 2024-02-28 2024-03-29 江西方兴科技股份有限公司 一种基于物联网屏的数据展示方法及***

Also Published As

Publication number Publication date
CN114245028B (zh) 2024-02-06
CN114245028A (zh) 2022-03-25

Similar Documents

Publication Publication Date Title
WO2023109842A1 (zh) 图像展示方法、装置、电子设备及存储介质
CN109168026B (zh) 即时视频显示方法、装置、终端设备及存储介质
WO2021031850A1 (zh) 图像处理的方法、装置、电子设备及存储介质
WO2023125374A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2021254502A1 (zh) 目标对象显示方法、装置及电子设备
WO2020253453A1 (zh) 图像切换方法、装置、电子设备及存储介质
WO2023040749A1 (zh) 图像处理方法、装置、电子设备及存储介质
US20230005194A1 (en) Image processing method and apparatus, readable medium and electronic device
US20220159197A1 (en) Image special effect processing method and apparatus, and electronic device and computer readable storage medium
WO2022171024A1 (zh) 图像显示方法、装置、设备及介质
WO2023138549A1 (zh) 图像处理方法、装置、电子设备及存储介质
US20240168615A1 (en) Image display method and apparatus, device, and medium
CN111432141B (zh) 一种混剪视频确定方法、装置、设备及存储介质
CN110519645B (zh) 视频内容的播放方法、装置、电子设备及计算机可读介质
US20220272283A1 (en) Image special effect processing method, apparatus, and electronic device, and computer-readable storage medium
JP2023509429A (ja) 画像処理方法及び装置
WO2024022391A1 (zh) 多媒体数据传输方法、装置、电子设备及存储介质
WO2023231918A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN111626922B (zh) 图片生成方法、装置、电子设备及计算机可读存储介质
WO2024027819A1 (zh) 图像处理方法、装置、设备及存储介质
WO2023138441A1 (zh) 视频生成方法、装置、设备及存储介质
WO2023165390A1 (zh) 变焦特效的生成方法、装置、设备及存储介质
WO2023098576A1 (zh) 图像处理方法、装置、设备及介质
WO2023088104A1 (zh) 视频的处理方法、装置、电子设备和存储介质
WO2023140787A2 (zh) 视频的处理方法、装置、电子设备、存储介质和程序产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22906587

Country of ref document: EP

Kind code of ref document: A1