WO2023284632A1 - Image display method and apparatus, and electronic device - Google Patents

Image display method and apparatus, and electronic device Download PDF

Info

Publication number
WO2023284632A1
WO2023284632A1 PCT/CN2022/104510 CN2022104510W WO2023284632A1 WO 2023284632 A1 WO2023284632 A1 WO 2023284632A1 CN 2022104510 W CN2022104510 W CN 2022104510W WO 2023284632 A1 WO2023284632 A1 WO 2023284632A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
map
dynamic
electronic device
background
Prior art date
Application number
PCT/CN2022/104510
Other languages
French (fr)
Chinese (zh)
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 WO2023284632A1 publication Critical patent/WO2023284632A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Definitions

  • the present application belongs to the technical field of image processing, and in particular relates to an image display method, device and electronic equipment.
  • the current photo storage mode is mainly static images, that is, for the cover image of the album, the processing flow only includes operations such as optimal cropping of the cover image, and most of the display forms are in the format of static images.
  • the processing flow only includes operations such as optimal cropping of the cover image, and most of the display forms are in the format of static images.
  • the purpose of the embodiments of the present application is to provide an image display method, which can solve the problem that most of the existing album cover images are static images, which affect the user's visual experience.
  • the embodiment of the present application provides an image display method, the method comprising:
  • the background complement map Based on the depth map, the background complement map, the contour map and the visual data, generate a dynamic image corresponding to the first image with different vision;
  • the dynamic image is displayed as a cover image of an album.
  • an image display device which includes:
  • a first acquiring module configured to acquire a first image
  • the second acquisition module is used to perform preset processing on the first image, and acquire a depth map, a background complement map, and a contour map of the first image;
  • a third acquisition module configured to acquire visual data of the first image
  • a generating module configured to generate a dynamic image corresponding to the first image of different visions based on the depth map, the background complement map, the contour map and the visual data;
  • a display module configured to display the dynamic image as a cover image of the photo album.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the method described in the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented .
  • the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect the method described.
  • an embodiment of the present application provides a computer program product, the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the computer program product described in the first aspect. method.
  • an embodiment of the present application provides an electronic device configured to execute the method described in the first aspect.
  • the dynamic image is automatically displayed as the cover image of the album. That is, it can perform dynamic processing based on the images in the album to obtain a dynamic image, and then display the dynamic image as the cover image of the album to improve the user's visual experience.
  • Fig. 1 is a flow chart of the image display method provided by the embodiment of the present application.
  • Fig. 2a-Fig. 2c are schematic diagrams of the interface display of the electronic device provided by the embodiment of the present application.
  • Fig. 3a-Fig. 3b are the interface display diagrams of the electronic device provided by another embodiment of the present application.
  • Fig. 4 is a flow chart of an example image display method provided by the embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of an image display device provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 7 is a schematic structural diagram of an electronic device provided by another embodiment of the present application.
  • FIG. 1 is a flowchart of an image display method provided by an embodiment of the present application.
  • the method can be applied to an electronic device, and the electronic device can be a mobile phone, a tablet computer, a notebook computer, and the like.
  • the method may include step S1100 to step S1500, which will be described in detail below.
  • Step S1100 acquiring a first image.
  • each photo album contains at least one different image.
  • the first image is a static image
  • the static image may be the image shown in FIG. 3a.
  • the static image is a red (Red, R) green (Green, G) blue (Blue, B) image.
  • acquiring the first image in this step S1100 may further include the following steps S1110-S1130:
  • Step S1110 acquiring the target image in the photo album.
  • the target image can be an image with the highest score selected by the electronic device from all the images contained in any album.
  • the image with the highest score is directly displayed as the cover image of the album.
  • the target image may be an image with the highest aesthetic score selected from all the images contained in the photo album by the electronic device.
  • the target image may include any one of still image, live image and video.
  • the static image may be an RGB image.
  • Step S1120 if the target image is a static image, use the target image as the first image.
  • the target image when the target image is a static image, the target image may be directly used as the first image.
  • processing such as cropping may be performed on the target image first, and the processed target image may be used as the first image.
  • Step S1130 if the target image is a live image or a video, select a target frame image from the target image as the first image.
  • an image with the highest score may be selected from the live image or video as the first image.
  • the clearest frame of image may be selected from the live image or video as the first image.
  • the highest-scoring frame image can be selected from the live image or video, and the frame image with the highest score can be cropped and processed, and the The frame image with the highest score after processing is used as the first image.
  • the clearest frame of image may be selected from the live image or video, and the clearest frame of image may be cropped, and then the processed clearest frame of image may be used as the first image.
  • it can process the optimal image in the album selected by the electronic device to obtain the static cover image of the album, and then process the static cover image according to the following steps to obtain the corresponding static cover image dynamic image.
  • Step S1200 perform preset processing on the first image, and obtain a depth map, a background complement map, and a contour map of the first image.
  • the first image may be processed based on the deep learning network first, so as to generate a dynamic image corresponding to the first image.
  • the preset processing is performed on the first image in this step S1200, and the acquisition of the depth map, background complement map, and contour map of the first image may further include the following steps S1210-S1250:
  • Step S1210 according to the first image, obtain a depth map corresponding to the first image.
  • the pixel value corresponding to each pixel in the depth map can be called a depth value, and the depth value is used to represent the real distance between the camera in the electronic device and each point in the shooting scene.
  • the first image may be input to a depth estimation network module in the deep learning network, so as to obtain a depth map corresponding to the first image.
  • Step S1220 acquiring subject contour information of the depth map.
  • edge detection may be performed on the depth map to obtain edge contour information of the subject in the depth map.
  • the first image is processed according to the contour information of the subject to generate a contour map.
  • the contour map includes a second image and a third image.
  • the pixel value of the main body area of the second image is the first value
  • the pixel value of the background area of the second image is the same as that of the background area of the first image.
  • the pixel values of the main body area of the third image are the same as the pixel values of the main body area of the first image
  • the pixel values of the background area of the third image are the first value.
  • the mask (Mask) information of the subject can be obtained first according to the obtained edge contour information of the subject, and then the Mask information of the subject is combined with the first image,
  • the pixel values of the outline area of the subject are all set to 0 to obtain the second image, as shown in Figure 2a, the RGB value of the subject area of the second image is 0, indicating that the subject area of the second image is black, and the RGB value of the subject area of the second image is black.
  • the RBG values of the background area and the background area of the first image are the same.
  • the Mask information of the subject can be combined with the first image, so that the pixel values of the background area are all set to 0 to obtain the third image, as shown in Figure 2b, the RGB value of the background area of the third image is 0, indicating that the third image
  • the background area of the second image is black, and the RGB value of the subject area of the third image is the same as that of the subject area of the first image.
  • Step S1240 perform background complement processing on the second image according to the first image, and obtain a background complement map.
  • the background completion network module in the deep learning network can perform background completion processing on the second image according to the image information of the first image, that is, complete the main body of the second image according to the image information of the first image The black area where the region is located, and the background information is fused and completed to obtain the background completion map shown in Figure 2c.
  • Step S1300 acquiring visual data of the first image.
  • different angles are preset in the electronic device, for example, 30°-150° in the horizontal direction.
  • Step S1400 based on the depth map, the background complement map, the contour map and the visual data, generate dynamic images corresponding to the first images of different visual perceptions.
  • the depth map, the background complement map, the third image, and the angle data with a horizontal angle range of 30° to 150° into the dynamic perspective rendering network module in the deep learning network, and then it can
  • the depth value information of different angles and the data of different angles, the background complement map and the third image are fused to generate static images corresponding to different angles, and the static images corresponding to different angles are synthesized as video frames to obtain the horizontal angle A dynamic image corresponding to the first image with a range of 30°-150°.
  • the obtained dynamic images may be stored.
  • Step S1500 displaying the dynamic image as a cover image of an album.
  • displaying the dynamic image as the cover image of the album in step S1500 may further include the following steps S1510-S1520:
  • Step S1510 receiving an input to open a photo album.
  • the electronic device detects that the user opens the photo album and stays on the photo album page.
  • Step S1520 in response to the input, display the dynamic image as the cover image of the album.
  • step S1520 in response to the input, displaying the dynamic image as the cover image of the album may further include: in response to the input, displaying the dynamic image in a loop using the dynamic image as the cover image of the album.
  • the electronic device detects that the user opens the photo album and stays on the photo album page, if the user does not have any interactive behavior, as shown in FIG. 3 b , the dynamic image in the direction of the forward-looking horizontal line is played in a loop.
  • the first image after the first image is acquired, it will perform preset processing on the first image to generate the depth map, background complement map and contour map corresponding to the first image, and then according to the depth map, background complement
  • the full image, the outline image, and the obtained visual data generate dynamic images corresponding to the first images of different visions.
  • the dynamic image is automatically displayed as the cover image of the album. That is, it can perform dynamic processing based on the images in the album to obtain a dynamic image, and then display the dynamic image as the cover image of the album to improve the user's visual experience.
  • the image display method may further include the following steps S1600a-S1800a:
  • Step S1600a receiving a first input from the user shaking the electronic device.
  • step S1600a when the electronic device detects that the user opens the photo album, and detects that the user shakes the electronic device, it acquires the current tilt angle information of the electronic device detected by the gyroscope or acceleration sensor inside the electronic device.
  • Step S1700a in response to the first input, determine the shaking direction of the electronic device.
  • the shaking direction of the electronic device will be determined according to the current tilt angle information of the electronic device detected by the gyroscope or acceleration sensor inside the electronic device.
  • Step S1800a based on the shaking direction, the dynamic images are continuously displayed according to the shaking direction.
  • the dynamic image can be displayed according to the shaking direction of the electronic device shaken by the user, so that the moving track of the dynamic image changes with the shaking track of the electronic device.
  • the image display method may further include the following steps S1600b-S1800b:
  • Step S1600b receiving a second input from the user sliding the electronic device.
  • the electronic device detects that the user opens the photo album, and detects that the user's finger slides the display screen in the dynamic image area.
  • Step S1700b in response to the second input, acquire the sliding direction of the slide.
  • step S1700b when the electronic device detects that the user opens the photo album, and detects that the user's finger slides the display screen in the dynamic image area, it acquires the sliding direction of the finger sliding the display screen.
  • step S1800b the dynamic images are continuously displayed according to the sliding direction.
  • step S1800b when the electronic device detects that the user opens the photo album and detects that the user's finger slides the display screen in the dynamic image area, it will obtain the sliding direction of the finger sliding on the display screen, and then display the dynamic image according to the sliding direction, so that The moving track of the dynamic image changes with the sliding track of the finger.
  • the above embodiment and this embodiment can trigger the running direction of the dynamic image according to the user's finger sliding direction and the direction of shaking the mobile phone, thereby greatly improving the playability of the photo album function, increasing user stickiness, and improving user experience.
  • the image display method includes the following steps:
  • Step S4010 acquire the target image in the photo album.
  • Step S4020 judging whether the target image is a static image, if it is a static image, execute the following step S4030, otherwise, execute the following step S4040.
  • Step S4030 take the target image as the first image, and execute the following step S4050.
  • Step S4040 select the target frame image from the target image as the first image, and execute the following step S4050.
  • Step S4050 obtaining a depth map corresponding to the first image.
  • the main key to dynamizing a static image is: the main area and the background area can create a dynamic effect by making the motion assistance different in the process of changing the viewing angle. In short, it is to make the movement range of distant objects larger, and make the movement range of nearby objects relatively smaller. From the user's perspective, the photo is a dynamic one. To complete this operation, you first need to change the static state. image to estimate.
  • the first image may be input to the depth estimation network module in the deep learning network to obtain a depth map corresponding to the second image.
  • Step S4060 acquiring subject contour information of the depth map, and processing the first image according to the subject contour information to generate a second image and a third image.
  • the subject contour information in the depth map is obtained first, and the first image is processed according to the subject contour information to generate a second image and a third image.
  • the RGB value of the subject area of the second image is black, and the RBG value of the background area of the second image remains unchanged.
  • the RGB value of the background area of the third image is black, and the RGB value of the subject area of the third image remains unchanged.
  • Step S4070 perform background complementation processing on the second image according to the first image, and obtain a background complement map.
  • the first image can be input to the background completion network module in the deep learning network, and the black area where the main body area of the second image is located is completed according to the image information of the first image, and the background information is fused and supplemented. Complete, get the background complement map shown in Figure 2c.
  • Step S4080 according to the depth map, the background complement map, the third image and different visual data, generate a dynamic image corresponding to the first image with different vision.
  • Step S4090 detecting whether the user opens the photo album.
  • Step S4100 if it is detected that the user has opened the photo album, further detect whether the user has interacted with the electronic device, and if it is detected that the user has not interacted with the electronic device, perform the following step S4110, otherwise, perform the following step S4120 .
  • Step S4110 according to the horizontal forward-looking direction, display the dynamic image as the cover image of the album in a loop, and the process ends.
  • Step S4120 detect whether the user shakes the electronic device, and if it is detected that the user shakes the electronic device, execute the following step S4130, otherwise, execute the following step S4140.
  • Step S4130 the moving track of the dynamic image changes with the shaking direction of the electronic device, and the process ends.
  • Step S4140 detect whether the user slides the display screen in the dynamic image area, and if it is detected that the user slides the display screen in the dynamic image area, perform the following step S4150, otherwise, perform the above step S4110.
  • Step S4150 the motion track of the dynamic image changes along with the finger sliding track.
  • the dynamic display method of the mobile phone album cover based on human-computer interaction can complete the operation without manual participation of the user, and can trigger the movement direction of the dynamic image according to the user's gesture sliding direction and the direction of shaking the mobile phone.
  • This example can greatly improve the playability of the photo album function, enhance user stickiness, improve user experience, and realize mobile terminal interaction.
  • an image display device 500 including:
  • the first obtaining module 510 is configured to obtain a first image.
  • the second acquiring module 520 is configured to perform preset processing on the first image, and acquire a depth map, a background complement map, and a contour map of the first image.
  • the third acquiring module 530 is configured to acquire the visual data of the first image.
  • the generating module 540 is configured to generate dynamic images corresponding to the first images of different visions based on the depth map, the background complementation map, the contour map and the visual data.
  • the display module 550 is configured to display the dynamic image as a cover image of the photo album.
  • the second obtaining module 520 is specifically configured to: obtain a depth map of the first image according to the first image; obtain subject contour information of the depth map; obtain subject contour information according to the subject contour information to process the first image to generate the contour map; wherein, the contour map includes a second image and a third image; wherein, the pixel value of the main body area of the second image is a first value, and the The pixel values of the background area of the second image and the background area of the first image are the same; the pixel values of the main body area of the third image are the same as the pixel values of the main area of the first image, and the third The pixel value of the background area of the image is the first value; according to the first image, background complement processing is performed on the second image to obtain the background complement map.
  • the display module 550 is further configured to: receive a first input of shaking the electronic device from the user; determine the shaking direction of the electronic device in response to the first input; Orientation for continued presentation.
  • the display module 550 is further configured to: in the case of displaying the dynamic image as the cover image of the album, receive a second input that the user slides the dynamic image; in response to the The second input is used to obtain the sliding direction of the sliding; and the dynamic images are continuously displayed according to the sliding direction.
  • the image display device in the embodiment of the present application may be a device, or a component, an integrated circuit, or a chip in a terminal.
  • the device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant).
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the image display device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
  • the image display device provided in the embodiment of the present application can implement the various processes implemented in the foregoing method embodiments, and details are not repeated here to avoid repetition.
  • the embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, which are stored in the memory 602 and can be stored in the processor 601.
  • the program or instruction running on the computer when the program or instruction is executed by the processor 601, implements the various processes of the above image display method embodiment, and can achieve the same technical effect. To avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 7 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc. part.
  • the electronic device 700 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 710 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions.
  • a power supply such as a battery
  • the structure of the electronic device shown in FIG. 7 does not constitute a limitation to the electronic device.
  • the electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .
  • the processor 710 is configured to obtain a first image; perform preset processing on the first image, obtain a depth map, a background complement map, and a contour map of the first image; obtain the first image Visual data; based on the depth map, the background complement map, the contour map and the visual data, generate a dynamic image corresponding to the first image of different vision; use the dynamic image as the cover image of the album to show.
  • the processor 710 obtains a depth map of the first image according to the first image
  • the contour map includes a second image and a third image; wherein the pixel value of the subject area of the second image is The first value, the pixel values of the background area of the second image and the background area of the first image are the same; the pixel values of the main body area of the third image are the same as the pixel values of the main body area of the first image , the pixel value of the background area of the third image is the first value;
  • background complement processing is performed on the second image to obtain the background complement map.
  • the processor 710 is further configured to receive a first input that the user shakes the electronic device;
  • the processor 710 is further configured to receive a second input that the user slides the dynamic image when the dynamic image is displayed as the cover image of the album; in response to the second Inputting, obtaining the sliding direction of the sliding; according to the sliding direction, displaying the dynamic image continuously.
  • the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 is used for the image capture device (such as the image data of the still picture or video obtained by the camera) for processing.
  • the display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 707 includes a touch panel 7071 and other input devices 7072 .
  • the touch panel 7071 is also called a touch screen.
  • the touch panel 7071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • Memory 709 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, user interface, application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 910 .
  • the embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the various processes of the above-mentioned comment display method embodiment are realized, and the same To avoid repetition, the technical effects will not be repeated here.
  • the processor is the processor in the electronic device described in the above embodiments.
  • the readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above-mentioned comment display method embodiment
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is used to run programs or instructions to implement the above-mentioned comment display method embodiment
  • chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
  • the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
  • the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

Abstract

The present application discloses an image display method and apparatus, and an electronic device, which belong to the technical field of image processing. The method comprises: acquiring a first image in an album; performing preset processing on the first image, and acquiring a depth map, background completion map, and contour map of the first image; acquiring visual data of the first image; on the basis of the depth map, the background completion map, the contour map, and the visual data, generating a dynamic image that is visually different from and corresponds to the first image; and displaying the dynamic image as a cover image of the album.

Description

图像展示方法、装置及电子设备Image display method, device and electronic equipment
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021年07月12日提交中国专利局、申请号为202110782794.1、名称为“图像展示方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application with application number 202110782794.1 and titled "Image Display Method, Device, and Electronic Equipment" filed with the China Patent Office on July 12, 2021, the entire contents of which are hereby incorporated by reference in this application .
技术领域technical field
本申请属于图像处理技术领域,具体涉及一种图像展示方法、装置及电子设备。The present application belongs to the technical field of image processing, and in particular relates to an image display method, device and electronic equipment.
背景技术Background technique
随着移动终端摄像技术的发展,越来越多的用户使用移动终端例如手机拍照,并经常翻阅手机中的相册照片。With the development of mobile terminal camera technology, more and more users use mobile terminals such as mobile phones to take pictures, and often browse photos in albums in the mobile phones.
当前的照片存储模式主要是静态图像,即针对于相册的封面图像而言,处理流程仅包含封面图像优选裁剪等操作,展现形式多数为静态图像这种格式。对用户而言,在翻阅相册时,可以看到每个相册都拥有一张封面图像并在屏幕上整齐排列,而这个封面图像通常是一个随机挑选出来用来美化整体的相册结构的图片,观感体验一般。The current photo storage mode is mainly static images, that is, for the cover image of the album, the processing flow only includes operations such as optimal cropping of the cover image, and most of the display forms are in the format of static images. For users, when flipping through albums, they can see that each album has a cover image and is neatly arranged on the screen, and this cover image is usually a picture randomly selected to beautify the overall album structure. Average experience.
发明内容Contents of the invention
本申请实施例的目的是提供一种图像展示方法,能够解决现有的相册封面图像多数为静态图像,影响用户观感体验的问题。The purpose of the embodiments of the present application is to provide an image display method, which can solve the problem that most of the existing album cover images are static images, which affect the user's visual experience.
第一方面,本申请实施例提供了一种图像展示方法,该方法包括:In the first aspect, the embodiment of the present application provides an image display method, the method comprising:
获取第一图像;get the first image;
对所述第一图像进行预设处理,获取所述第一图像的深度图、背景补全图、及轮廓图;performing preset processing on the first image, and obtaining a depth map, a background complement map, and a contour map of the first image;
获取所述第一图像的视觉数据;obtaining visual data of the first image;
基于所述深度图、所述背景补全图、所述轮廓图和所述视觉数据,生成不同视觉的所述第一图像对应的动态图像;Based on the depth map, the background complement map, the contour map and the visual data, generate a dynamic image corresponding to the first image with different vision;
将所述动态图像作为相册的封面图像进行展示。The dynamic image is displayed as a cover image of an album.
第二方面,本申请实施例提供了一种图像展示装置,该装置包括:In the second aspect, the embodiment of the present application provides an image display device, which includes:
第一获取模块,用于获取第一图像;a first acquiring module, configured to acquire a first image;
第二获取模块,用于对所述第一图像进行预设处理,获取所述第 一图像的深度图、背景补全图、及轮廓图;The second acquisition module is used to perform preset processing on the first image, and acquire a depth map, a background complement map, and a contour map of the first image;
第三获取模块,用于获取所述第一图像的视觉数据;A third acquisition module, configured to acquire visual data of the first image;
生成模块,用于基于所述深度图、所述背景补全图、所述轮廓图和所述视觉数据,生成不同视觉的所述第一图像对应的动态图像;A generating module, configured to generate a dynamic image corresponding to the first image of different visions based on the depth map, the background complement map, the contour map and the visual data;
展示模块,用于将所述动态图像作为所述相册的封面图像进行展示。A display module, configured to display the dynamic image as a cover image of the photo album.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the method described in the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In the fifth aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect the method described.
第六方面,本申请实施例提供了一种计算机程序产品,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, an embodiment of the present application provides a computer program product, the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the computer program product described in the first aspect. method.
第七方面,本申请实施例提供了一种电子设备,所述电子设备被配置成用于执行如第一方面所述的方法。In a seventh aspect, an embodiment of the present application provides an electronic device configured to execute the method described in the first aspect.
在本申请实施例中,在获取第一图像后,会对第一图像进行预设处理,以生成该第一图像对应的深度图、背景补全图及轮廓图,进而根据该深度图、背景补全图、轮廓图以及获取到的视觉数据,生成不同视觉的第一图像对应的动态图像,在用户查看相册时,自动将该动态图像作为相册的封面图像进行展示。即,其能够基于相册中的图像进行动态处理得到动态图像,进而将该动态图像作为相册的封面图像进行展示,提高用户的观感体验。In the embodiment of the present application, after the first image is acquired, preset processing is performed on the first image to generate a depth map, a background complement map, and a contour map corresponding to the first image, and then according to the depth map, background Complementary graphs, contour graphs, and the acquired visual data are used to generate dynamic images corresponding to the first images of different visions. When users view an album, the dynamic image is automatically displayed as the cover image of the album. That is, it can perform dynamic processing based on the images in the album to obtain a dynamic image, and then display the dynamic image as the cover image of the album to improve the user's visual experience.
附图说明Description of drawings
图1是本申请实施例提供的图像展示方法的流程图;Fig. 1 is a flow chart of the image display method provided by the embodiment of the present application;
图2a-图2c是本申请实施例提供的电子设备的界面显示示意图;Fig. 2a-Fig. 2c are schematic diagrams of the interface display of the electronic device provided by the embodiment of the present application;
图3a-图3b是本申请另一实施例提供的电子设备的界面显示示意 图;Fig. 3a-Fig. 3b are the interface display diagrams of the electronic device provided by another embodiment of the present application;
图4是本申请实施例提供的一个例子的图像展示方法的流程图;Fig. 4 is a flow chart of an example image display method provided by the embodiment of the present application;
图5是本申请实施例提供的图像展示装置的结构示意图;Fig. 5 is a schematic structural diagram of an image display device provided by an embodiment of the present application;
图6是本申请实施例提供的电子设备的结构示意图;FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图7是本申请另一实施例提供的电子设备的结构示意图。Fig. 7 is a schematic structural diagram of an electronic device provided by another embodiment of the present application.
具体实施例specific embodiment
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will clearly describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application belong to the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein, and that references to "first," "second," etc. distinguish Objects are generally of one type, and the number of objects is not limited. For example, there may be one or more first objects. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的图像展示方法进行详细地说明。The image display method provided by the embodiment of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
请参看图1,其是本申请实施例提供的一种图像展示方法的流程图。该方法可以应用于电子设备中,该电子设备可以为手机、平板电脑、笔记本电脑等。如图1所示,该方法可以包括步骤S1100~步骤S1500,以下予以详细说明。Please refer to FIG. 1 , which is a flowchart of an image display method provided by an embodiment of the present application. The method can be applied to an electronic device, and the electronic device can be a mobile phone, a tablet computer, a notebook computer, and the like. As shown in Fig. 1, the method may include step S1100 to step S1500, which will be described in detail below.
步骤S1100,获取第一图像。Step S1100, acquiring a first image.
电子设备中通常显示有不同的相册,并且,每一个相册中包含有不同的至少一张图像。Different photo albums are usually displayed in the electronic device, and each photo album contains at least one different image.
第一图像为静态图像,静态图像可以为图3a所示的图像,通常,该静态图像为红(Red,R)绿(Green,G)蓝(Blue,B)图像。The first image is a static image, and the static image may be the image shown in FIG. 3a. Usually, the static image is a red (Red, R) green (Green, G) blue (Blue, B) image.
本实施例中,本步骤S1100中获取第一图像可以进一步包括如下步骤S1110~S1130:In this embodiment, acquiring the first image in this step S1100 may further include the following steps S1110-S1130:
步骤S1110,获取相册中的目标图像。Step S1110, acquiring the target image in the photo album.
目标图像可以为电子设备从任一相册中包含的所有图像中选取出的评 分最高的一张图像,现有技术中,其是直接将该评分最高的图像作为相册的封面图像进行展示。例如目标图像可以为电子设备从相册中包含的所有图像中选取出美学评分最高的一张图像。目标图像可以包括静态图像、实况图像和视频中的任意一种。其中,静态图像可以为RGB图像。The target image can be an image with the highest score selected by the electronic device from all the images contained in any album. In the prior art, the image with the highest score is directly displayed as the cover image of the album. For example, the target image may be an image with the highest aesthetic score selected from all the images contained in the photo album by the electronic device. The target image may include any one of still image, live image and video. Wherein, the static image may be an RGB image.
步骤S1120,在目标图像为静态图像的情况下,将目标图像作为第一图像。Step S1120, if the target image is a static image, use the target image as the first image.
例如,在目标图像为静态图像的情况下,可以直接将该目标图像作为第一图像。For example, when the target image is a static image, the target image may be directly used as the first image.
又例如,在目标图像为静态图像的情况下,可以先对目标图像进行裁剪等处理,并将处理后的目标图像作为第一图像。For another example, when the target image is a static image, processing such as cropping may be performed on the target image first, and the processed target image may be used as the first image.
步骤S1130,在目标图像为实况图像或视频的情况下,从目标图像中选取目标帧图像作为第一图像。Step S1130, if the target image is a live image or a video, select a target frame image from the target image as the first image.
例如,在目标图像为实况图像或视频的情况下,可以从该实况图像或者视频中选取出评分最高的一帧图像作为第一图像。例如可以从该实况图像或者视频中选取出最清晰的一帧图像作为第一图像。For example, in the case that the target image is a live image or a video, an image with the highest score may be selected from the live image or video as the first image. For example, the clearest frame of image may be selected from the live image or video as the first image.
又例如,在目标图像为实况图像或视频的情况下,可以先从该实况图像或者视频中选取出评分最高的一帧图像,并对该评分最高的该帧图像进行裁剪等处理,并将该处理后的该评分最高的该帧图像作为第一图像。例如可以从该实况图像或者视频中选取出最清晰的一帧图像,并对该最清晰的该帧图像进行裁剪等处理,进而将处理后的该最清晰的该帧图像作为第一图像。For another example, in the case that the target image is a live image or a video, the highest-scoring frame image can be selected from the live image or video, and the frame image with the highest score can be cropped and processed, and the The frame image with the highest score after processing is used as the first image. For example, the clearest frame of image may be selected from the live image or video, and the clearest frame of image may be cropped, and then the processed clearest frame of image may be used as the first image.
根据本例子,其能够对电子设备所选取出的相册中的最优图像进行处理,获得相册的静态的封面图像,进而根据以下步骤对该静态的封面图像进行处理,得到对应该静态的封面图像的动态图像。According to this example, it can process the optimal image in the album selected by the electronic device to obtain the static cover image of the album, and then process the static cover image according to the following steps to obtain the corresponding static cover image dynamic image.
在获取第一图像之后,进入:After getting the first image, enter:
步骤S1200,对第一图像进行预设处理,获取第一图像的深度图、背景补全图、及轮廓图。Step S1200, perform preset processing on the first image, and obtain a depth map, a background complement map, and a contour map of the first image.
本实施例中,可以先基于深度学习网络对该第一图像进行处理,以生成第一图像对应的动态图像。In this embodiment, the first image may be processed based on the deep learning network first, so as to generate a dynamic image corresponding to the first image.
本实施例中,本步骤S1200中对第一图像进行预设处理,获取第一图像的深度图、背景补全图、及轮廓图可以进一步包括如下步骤S1210~S1250:In this embodiment, the preset processing is performed on the first image in this step S1200, and the acquisition of the depth map, background complement map, and contour map of the first image may further include the following steps S1210-S1250:
步骤S1210,根据第一图像,获得第一图像对应的深度图。Step S1210, according to the first image, obtain a depth map corresponding to the first image.
深度图中的每一个像素点对应的像素值可以称之为深度值,该深度值用 于表示电子设备中的摄像装置距离拍摄场景中的各点的真实距离。The pixel value corresponding to each pixel in the depth map can be called a depth value, and the depth value is used to represent the real distance between the camera in the electronic device and each point in the shooting scene.
本步骤S1210中,可以将该第一图像输入至该深度学习网络中的深度估计网络模块,从而能够得到第一图像对应的深度图。In this step S1210, the first image may be input to a depth estimation network module in the deep learning network, so as to obtain a depth map corresponding to the first image.
步骤S1220,获取深度图的主体轮廓信息。Step S1220, acquiring subject contour information of the depth map.
本步骤S1220中,可以对深度图进行边缘检测,以得到深度图中的主体的边缘轮廓信息。In this step S1220, edge detection may be performed on the depth map to obtain edge contour information of the subject in the depth map.
步骤S1230,根据主体轮廓信息对第一图像进行处理,生成轮廓图。轮廓图包括第二图像和第三图像。第二图像的主体区域的像素值为第一数值,第二图像的背景区域和第一图像的背景区域的像素值相同。第三图像的主体区域的像素值与第一图像的主体区域的像素值相同,第三图像的背景区域的像素值为第一数值。In step S1230, the first image is processed according to the contour information of the subject to generate a contour map. The contour map includes a second image and a third image. The pixel value of the main body area of the second image is the first value, and the pixel value of the background area of the second image is the same as that of the background area of the first image. The pixel values of the main body area of the third image are the same as the pixel values of the main body area of the first image, and the pixel values of the background area of the third image are the first value.
以上第一数值为0,在此,本步骤S1230中,可以先根据所得到的主体的边缘轮廓信息,得到主体的掩膜(Mask)信息,然后将主体的Mask信息与第一图像相结合,使得主体的轮廓区域的像素值全部置为0以得到第二图像,如图2a所示,第二图像的主体区域的RGB值为0,表示第二图像的主体区域为黑色,第二图像的背景区域和第一图像的背景区域的RBG值相同。The above first value is 0. Here, in this step S1230, the mask (Mask) information of the subject can be obtained first according to the obtained edge contour information of the subject, and then the Mask information of the subject is combined with the first image, The pixel values of the outline area of the subject are all set to 0 to obtain the second image, as shown in Figure 2a, the RGB value of the subject area of the second image is 0, indicating that the subject area of the second image is black, and the RGB value of the subject area of the second image is black. The RBG values of the background area and the background area of the first image are the same.
或者,可以将主体的Mask信息与第一图像相结合,使得背景区域的像素值全部置为0得到第三图像,如图2b所示,第三图像的背景区域的RGB值为0,表示第二图像的背景区域为黑色,第三图像的主体区域和第一图像的主体区域的RGB值相同。Alternatively, the Mask information of the subject can be combined with the first image, so that the pixel values of the background area are all set to 0 to obtain the third image, as shown in Figure 2b, the RGB value of the background area of the third image is 0, indicating that the third image The background area of the second image is black, and the RGB value of the subject area of the third image is the same as that of the subject area of the first image.
步骤S1240,根据第一图像,对第二图像进行背景补全处理,获得背景补全图。Step S1240, perform background complement processing on the second image according to the first image, and obtain a background complement map.
本步骤S1240中,深度学习网络中的背景补全网络模块可以根据第一图像的图像信息对第二图像进行背景补全处理,即,根据第一图像的图像信息来补全第二图像的主体区域所在的黑色区域,并将背景信息融合补全,得到图2c所示的背景补全图。In this step S1240, the background completion network module in the deep learning network can perform background completion processing on the second image according to the image information of the first image, that is, complete the main body of the second image according to the image information of the first image The black area where the region is located, and the background information is fused and completed to obtain the background completion map shown in Figure 2c.
在对第一图像进行预设处理,获取第一图像的深度图、背景补全图、及轮廓图之后,进入:After performing preset processing on the first image and obtaining the depth map, background complement map, and contour map of the first image, enter:
步骤S1300,获取第一图像的视觉数据。Step S1300, acquiring visual data of the first image.
本实施例中,电子设备中预先设置有不同的角度,例如水平方向30°~150°。In this embodiment, different angles are preset in the electronic device, for example, 30°-150° in the horizontal direction.
在获取第一图像的视觉数据之后,进入:After getting the visual data for the first image, enter:
步骤S1400,基于深度图、背景补全图、轮廓图和视觉数据,生成不同视觉的第一图像对应的动态图像。Step S1400, based on the depth map, the background complement map, the contour map and the visual data, generate dynamic images corresponding to the first images of different visual perceptions.
本实施例中,其可以将深度图、背景补全图、第三图像和水平方向角度范围30°~150°的角度数据输入至深度学习网络中的动态视角渲染网络模块,便可根据深度图的深度值信息及不同角度数据,将背景补全图与第三图像进行融合,生成不同角度对应的静态图像,并将该不同角度对应的静态图像作为视频帧进行合成,即可得到水平方向角度范围30°~150°的第一图像对应的动态图像。In this embodiment, it can input the depth map, the background complement map, the third image, and the angle data with a horizontal angle range of 30° to 150° into the dynamic perspective rendering network module in the deep learning network, and then it can The depth value information of different angles and the data of different angles, the background complement map and the third image are fused to generate static images corresponding to different angles, and the static images corresponding to different angles are synthesized as video frames to obtain the horizontal angle A dynamic image corresponding to the first image with a range of 30°-150°.
本步骤S1400中,在生成不同视觉的第一图像对应的动态图像后,便可将得到的动态图像进行存储。In this step S1400, after the dynamic images corresponding to the first images with different visions are generated, the obtained dynamic images may be stored.
在基于深度图、背景补全图、轮廓图和视觉数据,生成不同视觉的第一图像对应的动态图像之后,进入:After generating dynamic images corresponding to the first images of different visions based on the depth map, background completion map, contour map and visual data, enter:
步骤S1500,将动态图像作为相册的封面图像进行展示。Step S1500, displaying the dynamic image as a cover image of an album.
本实施例中,本步骤S1500中将动态图像作为相册的封面图像进行展示可以进一步包括如下步骤S1510~S1520:In this embodiment, displaying the dynamic image as the cover image of the album in step S1500 may further include the following steps S1510-S1520:
步骤S1510,接收开启相册的输入。Step S1510, receiving an input to open a photo album.
本实施例中,如图3a所示,当用户打开相册时,电子设备检测到用户打开相册并停留在相册页面。In this embodiment, as shown in FIG. 3a, when the user opens the photo album, the electronic device detects that the user opens the photo album and stays on the photo album page.
步骤S1520,响应于该输入,将动态图像作为相册的封面图像进行展示。Step S1520, in response to the input, display the dynamic image as the cover image of the album.
本步骤S1520中响应于该输入,将动态图像作为相册的封面图像进行展示可以进一步包括:响应于该输入,将动态图像作为相册的封面图像,循环展示动态图像。In this step S1520, in response to the input, displaying the dynamic image as the cover image of the album may further include: in response to the input, displaying the dynamic image in a loop using the dynamic image as the cover image of the album.
当电子设备检测到用户打开相册并停留在相册页面的情况下,用户如果没有任何交互行为,如图3b所示,则循环播放前视水平线方向的动态图像。When the electronic device detects that the user opens the photo album and stays on the photo album page, if the user does not have any interactive behavior, as shown in FIG. 3 b , the dynamic image in the direction of the forward-looking horizontal line is played in a loop.
根据本实施例,其在获取第一图像后,会对第一图像进行预设处理,以生成该第一图像对应的深度图、背景补全图及轮廓图,进而根据该深度图、背景补全图、轮廓图以及获取到的视觉数据,生成不同视觉的第一图像对应的动态图像,在用户查看相册时,自动将该动态图像作为相册的封面图像进行展示。即,其能够基于相册中的图像进行动态处理得到动态图像,进而将该动态图像作为相册的封面图像进行展示,提高用户的观感体验。According to this embodiment, after the first image is acquired, it will perform preset processing on the first image to generate the depth map, background complement map and contour map corresponding to the first image, and then according to the depth map, background complement The full image, the outline image, and the obtained visual data generate dynamic images corresponding to the first images of different visions. When the user views the album, the dynamic image is automatically displayed as the cover image of the album. That is, it can perform dynamic processing based on the images in the album to obtain a dynamic image, and then display the dynamic image as the cover image of the album to improve the user's visual experience.
在一个实施例中,在执行以上步骤S1500在将动态图像作为相册的封面图像进行展示之后,该图像展示方法还可以进一步包括如下步骤 S1600a~S1800a:In one embodiment, after performing the above step S1500 to display the dynamic image as the cover image of the album, the image display method may further include the following steps S1600a-S1800a:
步骤S1600a,接收用户晃动电子设备的第一输入。Step S1600a, receiving a first input from the user shaking the electronic device.
本步骤S1600a中,当电子设备检测到用户打开相册,并且,检测到用户晃动电子设备的情况下,则获取电子设备内部的陀螺仪或者加速度传感器检测到的电子设备的当前倾斜角度信息。In this step S1600a, when the electronic device detects that the user opens the photo album, and detects that the user shakes the electronic device, it acquires the current tilt angle information of the electronic device detected by the gyroscope or acceleration sensor inside the electronic device.
步骤S1700a,响应于第一输入,确定电子设备的晃动方向。Step S1700a, in response to the first input, determine the shaking direction of the electronic device.
本步骤S1700a中,在检测到用户晃动电子设备的情况下,会根据电子设备内部的陀螺仪或者加速度传感器检测到的电子设备的当前倾斜角度信息,确定电子设备的晃动方向。In this step S1700a, when it is detected that the user shakes the electronic device, the shaking direction of the electronic device will be determined according to the current tilt angle information of the electronic device detected by the gyroscope or acceleration sensor inside the electronic device.
步骤S1800a,基于晃动方向,将动态图像按照晃动方向进行接续展示。Step S1800a, based on the shaking direction, the dynamic images are continuously displayed according to the shaking direction.
本实施例中,可以根据用户晃动电子设备的晃动方向,来展示动态图像,使得动态图像运动轨迹随着电子设备的晃动轨迹变化。In this embodiment, the dynamic image can be displayed according to the shaking direction of the electronic device shaken by the user, so that the moving track of the dynamic image changes with the shaking track of the electronic device.
在一个实施例中,在执行以上步骤S1500在将动态图像作为相册的封面图像进行展示之后,该图像展示方法还可以进一步包括如下步骤S1600b~S1800b:In one embodiment, after performing the above step S1500 to display the dynamic image as the cover image of the album, the image display method may further include the following steps S1600b-S1800b:
步骤S1600b,接收用户滑动电子设备的第二输入。Step S1600b, receiving a second input from the user sliding the electronic device.
例如当电子设备检测到用户打开相册,并且,检测到用户手指在动态图像区域滑动显示屏幕。For example, when the electronic device detects that the user opens the photo album, and detects that the user's finger slides the display screen in the dynamic image area.
步骤S1700b,响应于第二输入,获取滑动的滑动方向。Step S1700b, in response to the second input, acquire the sliding direction of the slide.
本步骤S1700b中,当电子设备检测到用户打开相册,并且,检测到用户手指在动态图像区域滑动显示屏幕的情况下,会获取手指滑动显示屏幕的滑动方向。In this step S1700b, when the electronic device detects that the user opens the photo album, and detects that the user's finger slides the display screen in the dynamic image area, it acquires the sliding direction of the finger sliding the display screen.
步骤S1800b,将动态图像按照滑动方向进行接续展示。In step S1800b, the dynamic images are continuously displayed according to the sliding direction.
本步骤S1800b中,当电子设备检测到用户打开相册,并且,检测到用户手指在动态图像区域滑动显示屏幕的情况下,会获取手指滑动显示屏幕的滑动方向,进而根据滑动方向展示动态图像,使得动态图像运动轨迹随着手指的滑动轨迹变化。In this step S1800b, when the electronic device detects that the user opens the photo album and detects that the user's finger slides the display screen in the dynamic image area, it will obtain the sliding direction of the finger sliding on the display screen, and then display the dynamic image according to the sliding direction, so that The moving track of the dynamic image changes with the sliding track of the finger.
根据以上实施例和本实施例,其可以根据用户手指滑动方向以及晃动手机方向触发动态图像的运行方向,从而可以大幅提升相册功能的可玩性,增加用户粘性,提升用户体验。According to the above embodiment and this embodiment, it can trigger the running direction of the dynamic image according to the user's finger sliding direction and the direction of shaking the mobile phone, thereby greatly improving the playability of the photo album function, increasing user stickiness, and improving user experience.
接下来以示出一个例子的图像展示方法,如图4所示,该例子中,该图像展示方法包括如下步骤:Next, an example image display method is shown, as shown in Figure 4, in this example, the image display method includes the following steps:
步骤S4010,获取相册中的目标图像。Step S4010, acquire the target image in the photo album.
步骤S4020,判断目标图像是否为静态图像,在为静态图像的情况下,执行以下步骤S4030,反之,执行以下步骤S4040。Step S4020, judging whether the target image is a static image, if it is a static image, execute the following step S4030, otherwise, execute the following step S4040.
步骤S4030,将目标图像作为第一图像,并执行以下步骤S4050。Step S4030, take the target image as the first image, and execute the following step S4050.
步骤S4040,从目标图像中选取目标帧图像作为第一图像,并执行以下步骤S4050。Step S4040, select the target frame image from the target image as the first image, and execute the following step S4050.
步骤S4050,获得对应于第一图像的深度图。Step S4050, obtaining a depth map corresponding to the first image.
对静态图像动态化的主要关键在于:主体区域和背景区域在视角变化的过程中令运动辅助不同即可营造出动态的效果。简而言之就是让远处的物体运动幅度更大,让近处的物体相对来说运动幅度小一些,从用户视角来看照片就是一个动态的,而想要完成这一操作首先需要对静态图像进行估计。The main key to dynamizing a static image is: the main area and the background area can create a dynamic effect by making the motion assistance different in the process of changing the viewing angle. In short, it is to make the movement range of distant objects larger, and make the movement range of nearby objects relatively smaller. From the user's perspective, the photo is a dynamic one. To complete this operation, you first need to change the static state. image to estimate.
本步骤S4050中,可以将第一图像输入至深度学习网络中的深度估计网络模块,得到第二图像对应的深度图。In this step S4050, the first image may be input to the depth estimation network module in the deep learning network to obtain a depth map corresponding to the second image.
步骤S4060,获取深度图的主体轮廓信息,并根据主体轮廓信息对第一图像进行处理,生成第二图像和第三图像。Step S4060, acquiring subject contour information of the depth map, and processing the first image according to the subject contour information to generate a second image and a third image.
本步骤S4060中,先获取深度图中的主体轮廓信息,并根据主体轮廓信息对第一图像进行处理,生成第二图像和第三图像。其中,如图2a所示,第二图像的主体区域的RGB值为黑色,第二图像的背景区域的RBG值保持不变。如图2b所示,第三图像的背景区域的RGB值为黑色,第三图像的主体区域的RGB值保持不变。In this step S4060, the subject contour information in the depth map is obtained first, and the first image is processed according to the subject contour information to generate a second image and a third image. Wherein, as shown in FIG. 2 a , the RGB value of the subject area of the second image is black, and the RBG value of the background area of the second image remains unchanged. As shown in Figure 2b, the RGB value of the background area of the third image is black, and the RGB value of the subject area of the third image remains unchanged.
步骤S4070,根据第一图像,对第二图像进行背景补全处理,获得背景补全图。Step S4070, perform background complementation processing on the second image according to the first image, and obtain a background complement map.
本步骤S4070中,可以将第一图像输入至深度学习网络中的背景补全网络模块,根据第一图像的图像信息来补全第二图像的主体区域所在的黑色区域,并将背景信息融合补全,得到图2c所示的背景补全图。In this step S4070, the first image can be input to the background completion network module in the deep learning network, and the black area where the main body area of the second image is located is completed according to the image information of the first image, and the background information is fused and supplemented. Complete, get the background complement map shown in Figure 2c.
步骤S4080,根据深度图、背景补全图、第三图像和不同视觉数据,生成不同视觉的第一图像对应的动态图像。Step S4080, according to the depth map, the background complement map, the third image and different visual data, generate a dynamic image corresponding to the first image with different vision.
步骤S4090,检测用户是否开启相册。Step S4090, detecting whether the user opens the photo album.
步骤S4100,在检测到用户开启相册的情况下,进一步检测用户是否和电子设备发生交互行为,在检测到用户和电子设备未发生交互行为的情况下,执行以下步骤S4110,反之,执行以下步骤S4120。Step S4100, if it is detected that the user has opened the photo album, further detect whether the user has interacted with the electronic device, and if it is detected that the user has not interacted with the electronic device, perform the following step S4110, otherwise, perform the following step S4120 .
步骤S4110,按照水平前视方向将动态图像作为相册的封面图像进行循 环展示,流程结束。Step S4110, according to the horizontal forward-looking direction, display the dynamic image as the cover image of the album in a loop, and the process ends.
步骤S4120,检测用户是否晃动电子设备,在检测到用户晃动电子设备的情况下,执行以下步骤S4130,反之,执行以下步骤S4140。Step S4120, detect whether the user shakes the electronic device, and if it is detected that the user shakes the electronic device, execute the following step S4130, otherwise, execute the following step S4140.
步骤S4130,动态图像的运动轨迹随着电子设备的晃动方向变化,流程结束。Step S4130, the moving track of the dynamic image changes with the shaking direction of the electronic device, and the process ends.
步骤S4140,检测用户是否在动态图像区域滑动显示屏幕,在检测到用户在动态图像区域滑动显示屏幕的情况下,执行以下步骤S4150,反之,执行以上步骤S4110。Step S4140, detect whether the user slides the display screen in the dynamic image area, and if it is detected that the user slides the display screen in the dynamic image area, perform the following step S4150, otherwise, perform the above step S4110.
步骤S4150,动态图像的运动轨迹随着手指滑动轨迹变化。Step S4150, the motion track of the dynamic image changes along with the finger sliding track.
根据本例子,其基于人机交互的手机相册封面动态化展示方法,无需用户手工参与就可以完成操作,同时可以根据用户手势滑动方向以及晃动手机的方向触发动态图像的运动方向。该例子可以大幅提升相册功能的可玩性,增强用户粘性,提升用户体验,实现移动端交互功能。According to this example, the dynamic display method of the mobile phone album cover based on human-computer interaction can complete the operation without manual participation of the user, and can trigger the movement direction of the dynamic image according to the user's gesture sliding direction and the direction of shaking the mobile phone. This example can greatly improve the playability of the photo album function, enhance user stickiness, improve user experience, and realize mobile terminal interaction.
与上述实施例相对应,参见图5,本申请实施例还提供一种图像展示装置500,包括:Corresponding to the above embodiment, referring to FIG. 5, the embodiment of the present application also provides an image display device 500, including:
第一获取模块510,用于获取第一图像。The first obtaining module 510 is configured to obtain a first image.
第二获取模块520,用于对所述第一图像进行预设处理,获取所述第一图像的深度图、背景补全图、及轮廓图。The second acquiring module 520 is configured to perform preset processing on the first image, and acquire a depth map, a background complement map, and a contour map of the first image.
第三获取模块530,用于获取所述第一图像的视觉数据。The third acquiring module 530 is configured to acquire the visual data of the first image.
生成模块540,基于所述深度图、所述背景补全图、所述轮廓图和所述视觉数据,生成不同视觉的所述第一图像对应的动态图像。The generating module 540 is configured to generate dynamic images corresponding to the first images of different visions based on the depth map, the background complementation map, the contour map and the visual data.
展示模块550,用于将所述动态图像作为所述相册的封面图像进行展示。The display module 550 is configured to display the dynamic image as a cover image of the photo album.
在一个实施例中,所述第二获取模块520,具体用于:根据所述第一图像,获得所述第一图像的深度图;获取所述深度图的主体轮廓信息;根据所述主体轮廓信息对所述第一图像进行处理,生成所述轮廓图;其中,所述轮廓图包括第二图像和第三图像;其中,所述第二图像的主体区域的像素值为第一数值,所述第二图像的背景区域和所述第一图像的背景区域的像素值相同;所述第三图像的主体区域的像素值与所述第一图像的主体区域的像素值相同,所述第三图像的背景区域的像素值为所述第一数值;根据所述第一图像,对所述第二图像进行背景补全处理,获得所述背景补全图。In one embodiment, the second obtaining module 520 is specifically configured to: obtain a depth map of the first image according to the first image; obtain subject contour information of the depth map; obtain subject contour information according to the subject contour information to process the first image to generate the contour map; wherein, the contour map includes a second image and a third image; wherein, the pixel value of the main body area of the second image is a first value, and the The pixel values of the background area of the second image and the background area of the first image are the same; the pixel values of the main body area of the third image are the same as the pixel values of the main area of the first image, and the third The pixel value of the background area of the image is the first value; according to the first image, background complement processing is performed on the second image to obtain the background complement map.
在一个实施例中,所述展示模块550,还用于:接收用户晃动电子设备的第一输入;响应于所述第一输入,确定电子设备的晃动方向;将所述动态 图像按照所述晃动方向进行接续展示。In one embodiment, the display module 550 is further configured to: receive a first input of shaking the electronic device from the user; determine the shaking direction of the electronic device in response to the first input; Orientation for continued presentation.
在一个实施例中,所述展示模块550,还用于:在将所述动态图像作为所述相册的封面图像进行展示的情况下,接收用户滑动所述动态图像的第二输入;响应于所述第二输入,获取所述滑动的滑动方向;将所述动态图像按照所述滑动方向进行接续展示。In one embodiment, the display module 550 is further configured to: in the case of displaying the dynamic image as the cover image of the album, receive a second input that the user slides the dynamic image; in response to the The second input is used to obtain the sliding direction of the sliding; and the dynamic images are continuously displayed according to the sliding direction.
本申请实施例中的图像展示装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The image display device in the embodiment of the present application may be a device, or a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的图像展示装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The image display device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
本申请实施例提供的图像展示装置能够实现上述方法实施例实现的各个过程,为避免重复,这里不再赘述。The image display device provided in the embodiment of the present application can implement the various processes implemented in the foregoing method embodiments, and details are not repeated here to avoid repetition.
与上述实施例相对应,可选的,如图6所示,本申请实施例还提供一种电子设备600,包括处理器601,存储器602,存储在存储器602上并可在所述处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现上述图像展示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Corresponding to the above embodiment, optionally, as shown in FIG. 6 , the embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, which are stored in the memory 602 and can be stored in the processor 601. The program or instruction running on the computer, when the program or instruction is executed by the processor 601, implements the various processes of the above image display method embodiment, and can achieve the same technical effect. To avoid repetition, details are not repeated here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图7为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、以及处理器710等部件。The electronic device 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc. part.
本领域技术人员可以理解,电子设备700还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示 出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 700 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 710 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions. The structure of the electronic device shown in FIG. 7 does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .
其中,处理器710,用于获取第一图像;对所述第一图像进行预设处理,获取所述第一图像的深度图、背景补全图、及轮廓图;获取所述第一图像的视觉数据;基于所述深度图、所述背景补全图、所述轮廓图和所述视觉数据,生成不同视觉的所述第一图像对应的动态图像;将所述动态图像作为相册的封面图像进行展示。Wherein, the processor 710 is configured to obtain a first image; perform preset processing on the first image, obtain a depth map, a background complement map, and a contour map of the first image; obtain the first image Visual data; based on the depth map, the background complement map, the contour map and the visual data, generate a dynamic image corresponding to the first image of different vision; use the dynamic image as the cover image of the album to show.
在一个实施例中,处理器710,根据所述第一图像,获得所述第一图像的深度图;In an embodiment, the processor 710 obtains a depth map of the first image according to the first image;
获取所述深度图的主体轮廓信息;Obtain subject outline information of the depth map;
根据所述主体轮廓信息对所述第一图像进行处理,生成所述轮廓图;其中,所述轮廓图包括第二图像和第三图像;其中,所述第二图像的主体区域的像素值为第一数值,所述第二图像的背景区域和所述第一图像的背景区域的像素值相同;所述第三图像的主体区域的像素值与所述第一图像的主体区域的像素值相同,所述第三图像的背景区域的像素值为所述第一数值;Process the first image according to the subject contour information to generate the contour map; wherein the contour map includes a second image and a third image; wherein the pixel value of the subject area of the second image is The first value, the pixel values of the background area of the second image and the background area of the first image are the same; the pixel values of the main body area of the third image are the same as the pixel values of the main body area of the first image , the pixel value of the background area of the third image is the first value;
根据所述第一图像,对所述第二图像进行背景补全处理,获得所述背景补全图。According to the first image, background complement processing is performed on the second image to obtain the background complement map.
在一个实施例中,处理器710,还用于接收用户晃动电子设备的第一输入;In one embodiment, the processor 710 is further configured to receive a first input that the user shakes the electronic device;
响应于所述第一输入,确定电子设备的晃动方向;基于所述晃动方向,将所述动态图像作为所述相册的封面图像进行展示。In response to the first input, determine the shaking direction of the electronic device; based on the shaking direction, display the dynamic image as the cover image of the photo album.
在一个实施例中,处理器710,还用于在将所述动态图像作为所述相册的封面图像进行展示的情况下,接收用户滑动所述动态图像的第二输入;响应于所述第二输入,获取所述滑动的滑动方向;根据所述滑动方向,接续展示所述动态图像。In one embodiment, the processor 710 is further configured to receive a second input that the user slides the dynamic image when the dynamic image is displayed as the cover image of the album; in response to the second Inputting, obtaining the sliding direction of the sliding; according to the sliding direction, displaying the dynamic image continuously.
应理解的是,本申请实施例中,输入单元704可以包括图形处理器(Graphics Processing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元706可包括显示面板7061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板7061。用户输入单元707包括触控面板7071以及其他输入设备7072。触控面板7071,也称为触摸屏。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其 他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器709可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器910中。It should be understood that, in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 is used for the image capture device ( Such as the image data of the still picture or video obtained by the camera) for processing. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 707 includes a touch panel 7071 and other input devices 7072 . The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts, a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 709 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, user interface, application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 910 .
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述评论展示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the various processes of the above-mentioned comment display method embodiment are realized, and the same To avoid repetition, the technical effects will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述评论展示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above-mentioned comment display method embodiment Each process can achieve the same technical effect, so in order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of computer software products, which are stored in a storage medium (such as ROM/RAM, magnetic disk, etc.) , optical disc), including several instructions to enable a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this application.

Claims (15)

  1. 一种图像展示方法,其中,所述方法包括:An image display method, wherein the method includes:
    获取第一图像;get the first image;
    对所述第一图像进行预设处理,获取所述第一图像的深度图、背景补全图、及轮廓图;performing preset processing on the first image, and obtaining a depth map, a background complement map, and a contour map of the first image;
    获取所述第一图像的视觉数据;obtaining visual data of the first image;
    基于所述深度图、所述背景补全图、所述轮廓图和所述视觉数据,生成不同视觉的所述第一图像对应的动态图像;Based on the depth map, the background complement map, the contour map and the visual data, generate a dynamic image corresponding to the first image with different vision;
    将所述动态图像作为相册的封面图像进行展示。The dynamic image is displayed as a cover image of an album.
  2. 根据权利要求1所述的方法,其中,所述对所述第一图像进行预设处理,获取第一图像的深度图、背景补全图、及轮廓图,包括:The method according to claim 1, wherein said performing preset processing on said first image to obtain a depth map, a background complement map, and a contour map of the first image comprises:
    根据所述第一图像,获得所述第一图像的深度图;Obtaining a depth map of the first image according to the first image;
    获取所述深度图的主体轮廓信息;Obtain subject outline information of the depth map;
    根据所述主体轮廓信息对所述第一图像进行处理,生成所述轮廓图;其中,所述轮廓图包括第二图像和第三图像;其中,所述第二图像的主体区域的像素值为第一数值,所述第二图像的背景区域和所述第一图像的背景区域的像素值相同;所述第三图像的主体区域的像素值与所述第一图像的主体区域的像素值相同,所述第三图像的背景区域的像素值为所述第一数值;Process the first image according to the subject contour information to generate the contour map; wherein the contour map includes a second image and a third image; wherein the pixel value of the subject area of the second image is The first value, the pixel values of the background area of the second image and the background area of the first image are the same; the pixel values of the main body area of the third image are the same as the pixel values of the main body area of the first image , the pixel value of the background area of the third image is the first value;
    根据所述第一图像,对所述第二图像进行背景补全处理,获得所述背景补全图。According to the first image, background complement processing is performed on the second image to obtain the background complement map.
  3. 根据权利要求1所述的方法,其中,在所述将所述动态图像作为所述相册的封面图像进行展示之后,还包括:The method according to claim 1, wherein, after displaying the dynamic image as the cover image of the album, further comprising:
    接收用户晃动电子设备的第一输入;receiving a first input from a user shaking the electronic device;
    响应于所述第一输入,确定所述电子设备的晃动方向;determining a shaking direction of the electronic device in response to the first input;
    将所述动态图像按照所述晃动方向进行接续展示。The dynamic images are continuously displayed according to the shaking direction.
  4. 根据权利要求1所述的方法,其中,在所述将所述动态图像作为所述相册的封面图像进行展示之后,还包括:The method according to claim 1, wherein, after displaying the dynamic image as the cover image of the album, further comprising:
    接收用户滑动所述动态图像的第二输入;receiving a second input that the user slides the dynamic image;
    响应于所述第二输入,获取所述滑动的滑动方向;Responding to the second input, acquiring a sliding direction of the sliding;
    将所述动态图像按照所述滑动方向进行接续展示。The dynamic images are continuously displayed according to the sliding direction.
  5. 根据权利要求2所述的方法,其中,所述获取第一图像,包括:The method according to claim 2, wherein said acquiring the first image comprises:
    获取所述相册中的目标图像;Obtain the target image in the photo album;
    在所述目标图像为静态图像的情况下,将所述目标图像作为所述第一图像;或者,In the case where the target image is a static image, using the target image as the first image; or,
    在所述目标图像为实况图像或视频的情况下,从所述目标图像中选取目标帧图像作为所述第一图像。When the target image is a live image or a video, a target frame image is selected from the target image as the first image.
  6. 一种图像展示装置,其中,包括:An image display device, including:
    第一获取模块,用于获取第一图像;a first acquiring module, configured to acquire a first image;
    第二获取模块,用于对所述第一图像进行预设处理,获取所述第一图像的深度图、背景补全图、及轮廓图;The second acquisition module is configured to perform preset processing on the first image, and acquire a depth map, a background complement map, and a contour map of the first image;
    第三获取模块,用于获取所述第一图像的视觉数据;A third acquisition module, configured to acquire visual data of the first image;
    生成模块,用于基于所述深度图、所述背景补全图、所述轮廓图和所述视觉数据,生成不同视觉的所述第一图像对应的动态图像;A generating module, configured to generate a dynamic image corresponding to the first image of different visions based on the depth map, the background complement map, the contour map and the visual data;
    展示模块,用于将所述动态图像作为相册的封面图像进行展示。The display module is used to display the dynamic image as the cover image of the photo album.
  7. 根据权利要求6所述的装置,其中,所述第二获取模块,具体用于:The device according to claim 6, wherein the second acquiring module is specifically configured to:
    根据所述第一图像,获得所述第一图像的深度图;Obtaining a depth map of the first image according to the first image;
    获取所述深度图的主体轮廓信息;Obtain subject outline information of the depth map;
    根据所述主体轮廓信息对所述第一图像进行处理,生成所述轮廓图;其中,所述轮廓图包括第二图像和第三图像;其中,所述第二图像的主体区域的像素值为第一数值,所述第二图像的背景区域和所述第一图像的背景区域的像素值相同;所述第三图像的主体区域的像素值与所述第一图像的主体区域的像素值相同,所述第三图像的背景区域的像素值为所述第一数值;Process the first image according to the subject contour information to generate the contour map; wherein the contour map includes a second image and a third image; wherein the pixel value of the subject area of the second image is The first value, the pixel values of the background area of the second image and the background area of the first image are the same; the pixel values of the main body area of the third image are the same as the pixel values of the main body area of the first image , the pixel value of the background area of the third image is the first value;
    根据所述第一图像,对所述第二图像进行背景补全处理,获得所述背景补全图。According to the first image, background complement processing is performed on the second image to obtain the background complement map.
  8. 根据权利要求6所述的装置,其中,所述展示模块,还用于:The device according to claim 6, wherein the display module is also used for:
    接收用户晃动电子设备的第一输入;receiving a first input from a user shaking the electronic device;
    响应于所述第一输入,确定所述电子设备的晃动方向;determining a shaking direction of the electronic device in response to the first input;
    将所述动态图像按照所述晃动方向进行接续展示。The dynamic images are continuously displayed according to the shaking direction.
  9. 根据权利要求6所述的装置,其中,所述展示模块,还用于:The device according to claim 6, wherein the display module is also used for:
    接收用户滑动所述动态图像的第二输入;receiving a second input that the user slides the dynamic image;
    响应于所述第二输入,获取所述滑动的滑动方向;Responding to the second input, acquiring a sliding direction of the sliding;
    将所述动态图像按照所述滑动方向进行接续展示。The dynamic images are continuously displayed according to the sliding direction.
  10. 根据权利要求7所述的装置,其中,所述第一获取模块,具体用于:The device according to claim 7, wherein the first acquisition module is specifically configured to:
    获取所述相册中的目标图像;Obtain the target image in the photo album;
    在所述目标图像为静态图像的情况下,将所述目标图像作为所述第一图像;或者,In the case where the target image is a static image, using the target image as the first image; or,
    在所述目标图像为实况图像或视频的情况下,从所述目标图像中选取目标帧图像作为所述第一图像。When the target image is a live image or a video, a target frame image is selected from the target image as the first image.
  11. 一种电子设备,其中,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-5中任一项所述的图像展示方法的步骤。An electronic device, including a processor, a memory, and a program or instruction stored in the memory and operable on the processor, when the program or instruction is executed by the processor, the invention according to claim 1 is realized -The steps of the image presentation method described in any one of 5.
  12. 一种可读存储介质,其中,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-5中任一项所述的图像展示方法的步骤。A readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the image presentation method according to any one of claims 1-5 are realized .
  13. 一种芯片,其中,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-5中任一项所述的图像展示方法的步骤。A chip, wherein the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction, to achieve any one of claims 1-5 The images show the steps of the method.
  14. 一种计算机程序产品,其中,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1-5中任一项所述的图像展示方法的步骤。A computer program product, wherein the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to realize the image presentation according to any one of claims 1-5 method steps.
  15. 一种电子设备,其中,所述电子设备被配置成用于执行如权利要求1-5中任一项所述的图像展示方法的步骤。An electronic device, wherein the electronic device is configured to execute the steps of the image presentation method according to any one of claims 1-5.
PCT/CN2022/104510 2021-07-12 2022-07-08 Image display method and apparatus, and electronic device WO2023284632A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110782794.1 2021-07-12
CN202110782794.1A CN113570609A (en) 2021-07-12 2021-07-12 Image display method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023284632A1 true WO2023284632A1 (en) 2023-01-19

Family

ID=78164527

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/104510 WO2023284632A1 (en) 2021-07-12 2022-07-08 Image display method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN113570609A (en)
WO (1) WO2023284632A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570609A (en) * 2021-07-12 2021-10-29 维沃移动通信有限公司 Image display method and device and electronic equipment
CN114339073A (en) * 2022-01-04 2022-04-12 维沃移动通信有限公司 Video generation method and video generation device
CN116627784A (en) * 2023-05-23 2023-08-22 青岛彬彬有礼网络科技有限公司 Image monitoring analysis system and method for personalized data analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090129675A1 (en) * 2006-11-16 2009-05-21 Honda Research Institute Europe Gmbh Method And Device For Continuous Figure-Ground Segregation In Images From Dynamic Visual Scenes
CN107909604A (en) * 2017-11-07 2018-04-13 武汉科技大学 Dynamic object movement locus recognition methods based on binocular vision
CN110688965A (en) * 2019-09-30 2020-01-14 北京航空航天大学青岛研究院 IPT (inductive power transfer) simulation training gesture recognition method based on binocular vision
CN111091582A (en) * 2019-12-31 2020-05-01 北京理工大学重庆创新中心 Single-vision target tracking algorithm and system based on deep neural network
CN113570609A (en) * 2021-07-12 2021-10-29 维沃移动通信有限公司 Image display method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090129675A1 (en) * 2006-11-16 2009-05-21 Honda Research Institute Europe Gmbh Method And Device For Continuous Figure-Ground Segregation In Images From Dynamic Visual Scenes
CN107909604A (en) * 2017-11-07 2018-04-13 武汉科技大学 Dynamic object movement locus recognition methods based on binocular vision
CN110688965A (en) * 2019-09-30 2020-01-14 北京航空航天大学青岛研究院 IPT (inductive power transfer) simulation training gesture recognition method based on binocular vision
CN111091582A (en) * 2019-12-31 2020-05-01 北京理工大学重庆创新中心 Single-vision target tracking algorithm and system based on deep neural network
CN113570609A (en) * 2021-07-12 2021-10-29 维沃移动通信有限公司 Image display method and device and electronic equipment

Also Published As

Publication number Publication date
CN113570609A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
WO2023284632A1 (en) Image display method and apparatus, and electronic device
US11231845B2 (en) Display adaptation method and apparatus for application, and storage medium
WO2019141100A1 (en) Method and apparatus for displaying additional object, computer device, and storage medium
US10222877B2 (en) Method and apparatus for presenting panoramic photo in mobile terminal, and mobile terminal
KR102063952B1 (en) Multi display apparatus and multi display method
US9571734B2 (en) Multi display device and method of photographing thereof
EP3547218B1 (en) File processing device and method, and graphical user interface
CN107357540B (en) Display direction adjusting method and mobile terminal
WO2019174628A1 (en) Photographing method and mobile terminal
EP2816545A2 (en) Method and apparatus for protecting eyesight
WO2022063023A1 (en) Video shooting method, video shooting apparatus, and electronic device
WO2022012657A1 (en) Image editing method and apparatus, and electronic device
WO2016124122A1 (en) Method and apparatus for zooming picture and switching played contents of handheld electronic device
US11030733B2 (en) Method, electronic device and storage medium for processing image
US10290120B2 (en) Color analysis and control using an electronic mobile device transparent display screen
US20230345113A1 (en) Display control method and apparatus, electronic device, and medium
WO2023025060A1 (en) Interface display adaptation processing method and apparatus, and electronic device
WO2022135409A1 (en) Display processing method, display processing apparatus, and wearable device
WO2022062808A1 (en) Portrait generation method and device
WO2023142915A1 (en) Image processing method, apparatus and device, and storage medium
CN111159449A (en) Image display method and electronic equipment
CN112911147A (en) Display control method, display control device and electronic equipment
WO2022111458A1 (en) Image capture method and apparatus, electronic device, and storage medium
WO2022068721A1 (en) Screen capture method and apparatus, and electronic device
WO2022156673A1 (en) Display control method and apparatus, electronic device, and medium

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: 22841268

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE