Display method, display device and electronic equipment

By optimizing the cropping and camera movement of images in the gallery application, the problems of cluttered composition and screen adaptability were solved, and the display effect of the images was improved.

CN121764567APending Publication Date: 2026-03-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, image library applications often suffer from cluttered composition and incompatibility with screen size when displaying images via camera movement, resulting in poor display quality.

Method used

By cropping the target image, determining the camera movement method based on the subject type, subject position, and image size ratio, and adjusting the cropping area according to the screen size, a camera movement display screen adapted to the screen is generated.

Benefits of technology

It enhances the camera movement of images, making the subject stand out more, the composition more aesthetically pleasing, conforming to the user's visual senses, adapting to screen size, and improving the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764567A_ABST
    Figure CN121764567A_ABST
Patent Text Reader

Abstract

The invention provides a display method, a display device and electronic equipment, and the method comprises the steps: displaying a first interface which is a user interface of a gallery application; in response to a first operation acting on the first interface, a second interface is displayed, the second interface comprises a first video, the first video is a mirror moving display picture of a target picture, and at least one frame of image in the first video is an image corresponding to a first area of the target picture; the first area is an area obtained by cutting the target picture. According to the display method, the display device and the electronic equipment provided by the invention, the mirror display effect of the target picture can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and more specifically, to a display method, display device, and electronic device. Background Technology

[0002] To help users better organize and recall their photos, photo gallery apps on mobile phones and other electronic products offer a "Moments" feature. It automatically generates Moments albums based on information such as the time, theme, or scene of the photos taken by the user. When the user enters the Moments album, the pictures in the album are displayed to the user in the form of dynamic videos.

[0003] When displaying images in the form of dynamic videos, camera movement is often used, such as vertical movement, horizontal movement, center zoom, and center zoom. However, these video displays are usually randomly generated from the original images. During the display process, issues such as cluttered image composition and images not fitting the screen size can easily arise, resulting in poor image presentation. Summary of the Invention

[0004] This application provides a display method, display device, and electronic device that can improve the camera movement display effect of images.

[0005] In a first aspect, a display method is provided, comprising: displaying a first interface, the first interface being a user interface of a gallery application; and, in response to a first operation performed on the first interface, displaying a second interface, the second interface including a first video, the first video being a camera movement display of a target image, wherein at least one frame in the first video is an image corresponding to a first region of the target image, the first region being a region obtained by cropping the target image.

[0006] In the embodiments provided in this application, at least one frame of the camera movement display of the target image is obtained by cropping the target image. Using the cropped image as the camera movement frame can facilitate the removal of redundant parts in the target image, such as removing cluttered backgrounds, making the subject in the target image more prominent and the theme more prominent, thereby enhancing the aesthetics of the image and improving the camera movement display effect of the target image.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, the camera movement of the target image is determined based on first information, which includes at least one of the following: the type of subject in the target image, the position of the subject in the target image, and the size ratio of the target image. The camera movement is the movement mode of the target image in the first video.

[0008] In the embodiments provided in this application, the camera movement method of the target image is determined according to the subject type, subject position and size ratio of the target image. This makes the camera movement method of the target image more consistent with the content presented by the target image and the image features such as image size. The camera movement method is more in line with the user's visual senses, thereby improving the camera movement display effect of the target image.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, when the subject of the target image is a person, the camera movement of the target image is either center shrinkage or center magnification.

[0010] In the embodiments provided in this application, when the subject in the target image is a person, the camera movement is performed by center shrinking or center magnification, which can ensure that the subject is included in the camera movement display during the camera movement display, thereby making the subject stand out more during the camera movement display.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, when the ratio of the size of the subject of the target image in the first direction to the first side of the target image is greater than or equal to a first threshold, the camera movement of the target image is a center-shrinking motion, and the first direction is the direction in which the first side is located; when the ratio of the size of the subject in the first direction to the first side of the target image is less than the first threshold, the camera movement of the target image is a center-magnifying motion.

[0012] In the embodiments provided in this application, when the ratio of the size of the main body of the target image in the first direction to the first side of the target image is greater than or equal to a first threshold, a center-shrinking camera movement is adopted; when the ratio of the size of the main body in the first direction to the first side of the target image is less than the first threshold, a center-enlarging camera movement is adopted. This enables the main body to be fully presented during the camera movement display, and the subject of the target image to be more prominent.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, when the subject in the target image is of a type other than a person, and the ratio of the width to the height of the target image is greater than or equal to the second threshold, the camera movement of the target image is horizontal; when the ratio of the width to the height of the target image is less than or equal to the third threshold, the camera movement of the target image is vertical; and when the ratio of the width to the height of the target image is greater than the third threshold and less than the second threshold, the camera movement of the target image is center shrinking or center magnification.

[0014] In the embodiments provided in this application, when the subject in the target image is of a type other than a person, and the ratio of the width to the height of the target image is greater than or equal to the second threshold (i.e., the image is a landscape image), a horizontal camera movement method is used to ensure that the subject in the target image is fully displayed during the camera movement. When the ratio of the width to the height of the target image is less than or equal to the third threshold, or when the ratio of the width to the height of the target image is greater than the third threshold but less than the second threshold, a horizontal camera movement or a center-scaled camera movement method is used to ensure that the subject in the target image is fully displayed, thereby improving the camera movement display effect of the target image.

[0015] In conjunction with the first aspect, in some implementations of the first aspect, the position of the first region in the target image is determined based on the subject type and / or subject position in the target image.

[0016] In the embodiments provided in this application, the position of the first region in the target image is determined according to the subject type and / or subject position in the target image, which enables the subject in the image to be fully displayed in the camera movement scene and prevents problems such as subject omission.

[0017] In conjunction with the first aspect, in some implementations of the first aspect, the size ratio of the first region is determined according to the display screen size of the electronic device.

[0018] In the embodiments provided in this application, the proportion of the first area is determined according to the display screen size of the electronic device, which makes the camera movement display more adaptable to the screen size, thereby improving the camera movement display effect of the target image.

[0019] In conjunction with the first aspect, in some implementations of the first aspect, the aesthetic score of the image corresponding to the first region is greater than or equal to a fourth threshold, which is used to indicate the compositional quality of the cropped image.

[0020] In the embodiments provided in this application, the aesthetic score of the image corresponding to the first region is greater than or equal to the fourth threshold, which enables the first video to display a better aesthetic composition and better meet the user's aesthetic preferences.

[0021] In conjunction with the first aspect, in some implementations of the first aspect, the image corresponding to the first region is the end image or the start image of the first video.

[0022] In the embodiments provided in this application, the image corresponding to the first region is used as the end image or the start image of the first video, which makes the image corresponding to the first region more prominent during the camera movement display.

[0023] In conjunction with the first aspect, in some implementations of the first aspect, when the image corresponding to the first region is the end image of the first video, the start image of the first video is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image; when the image corresponding to the first region is the start image of the first video, the end image of the first video is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image.

[0024] In the embodiments provided in this application, the cropped image is used as the end image or the start image of the first video, and the other of the end image or the start image is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image. This makes the display of the target image more consistent with the background music and camera movement of the video, and further improves the camera movement display effect of the target image.

[0025] In conjunction with the first aspect, in some implementations of the first aspect, when the subject type in the target image is a person, the image corresponding to the first region includes the person.

[0026] In the embodiments provided in this application, when the subject type in the target image is a person, the image corresponding to the first region includes the person, which makes the subject of the person stand out more.

[0027] Secondly, a display device is provided, comprising: a display module for displaying a first interface, the first interface being a user interface for a gallery application; the device further comprising: an acquisition module for acquiring a first operation performed on the first interface; the display module is further configured to display a second interface, the second interface including a first video, the first video being a camera movement display of a target image, at least one frame in the first video being an image corresponding to a first region of the target image, the first region being a region obtained by cropping the target image.

[0028] In conjunction with the second aspect, in some implementations of the second aspect, the camera movement of the target image is determined based on first information, which includes at least one of the following: the type of subject in the target image, the position of the subject in the target image, and the size ratio of the target image. The camera movement is the movement mode of the target image in the first video.

[0029] In conjunction with the second aspect, in some implementations of the second aspect, when the subject of the target image is a person, the camera movement of the target image is either center shrinkage or center magnification.

[0030] In conjunction with the second aspect, in some implementations of the second aspect, when the ratio of the size of the subject in the target image in the first direction to the first side of the target image is greater than or equal to a first threshold, the camera movement of the target image is a center-shrinking motion, and the first direction is the direction in which the first side is located; when the ratio of the size of the subject in the first direction to the first side of the target image is less than the first threshold, the camera movement of the target image is a center-magnifying motion.

[0031] In conjunction with the second aspect, in some implementations of the second aspect, when the subject in the target image is of a type other than a person, and the ratio of the width to the height of the target image is greater than or equal to the second threshold, the camera movement of the target image is horizontal; when the ratio of the width to the height of the target image is less than or equal to the third threshold, the camera movement of the target image is vertical; and when the ratio of the width to the height of the target image is greater than the third threshold and less than the second threshold, the camera movement of the target image is center shrinking or center magnification.

[0032] In conjunction with the second aspect, in some implementations of the second aspect, the position of the first region in the target image is determined based on the subject type and / or subject position in the target image.

[0033] In conjunction with the second aspect, in some implementations of the second aspect, the size ratio of the first region is determined according to the display screen size of the electronic device.

[0034] In conjunction with the second aspect, in some implementations of the second aspect, the aesthetic score of the image corresponding to the first region is greater than or equal to the fourth threshold, which is used to indicate the compositional quality of the cropped image.

[0035] In conjunction with the second aspect, in some implementations of the second aspect, the image corresponding to the first region is the end image or the start image of the first video.

[0036] In conjunction with the second aspect, in some implementations of the second aspect, when the image corresponding to the first region is the end image of the first video, the start image of the first video is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image; when the image corresponding to the first region is the start image of the first video, the end image of the first video is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image.

[0037] In conjunction with the second aspect, in some implementations of the second aspect, when the subject type in the target image is a person, the image corresponding to the first region includes the person.

[0038] Thirdly, an electronic device is provided, including a memory and a processor, the memory for storing program code that, when executed on a computer, the processor performs the methods described in the first aspect or any possible implementation thereof.

[0039] Fourthly, a readable storage medium is provided that stores a computer program, which is executed by a computer to implement the method as described in the first aspect or any possible implementation thereof.

[0040] Fifthly, a computer program product is provided that runs on a computer to implement the method as described in the first aspect or any possible implementation thereof. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the hardware functional structure of an electronic device provided in an embodiment of this application;

[0042] Figure 2 This is a schematic diagram of the software functional structure of an electronic device provided in an embodiment of this application;

[0043] Figure 3 This is a schematic flowchart illustrating a display method provided in an embodiment of this application;

[0044] Figure 4 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application;

[0045] Figure 5 This is a schematic flowchart illustrating an image cropping method provided in an embodiment of this application;

[0046] Figure 6 This is a schematic diagram of the user interface of an electronic device provided in an embodiment of this application;

[0047] Figure 7 This is a schematic diagram of image cropping provided in an embodiment of this application;

[0048] Figure 8 This is a schematic diagram showing the dimensions of the electronic device and the displayed image provided in the embodiments of this application;

[0049] Figure 9 This is a schematic diagram of image cropping provided in an embodiment of this application;

[0050] Figure 10 This is a schematic diagram of image cropping provided in an embodiment of this application;

[0051] Figure 11 This is a schematic structural block diagram of a display device provided in an embodiment of this application;

[0052] Figure 12 This is a schematic structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0053] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0054] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0055] In the various embodiments of this application, the terms "first," "second," etc., are merely to indicate that multiple objects are different. For example, a first interface and a second interface are only to indicate different interfaces. They should not have any impact on the interfaces themselves or their number, and the aforementioned "first," "second," etc., should not impose any limitations on the embodiments of this application.

[0056] The terms “including,” “comprising,” “having,” and variations thereof all mean “including but not limited to,” unless otherwise specifically emphasized.

[0057] In this application, "for indicating" can include both direct and indirect indication. When describing an indication message as indicating A, it can include whether the indication message directly or indirectly indicates A, but does not necessarily mean that the indication message carries A. In the embodiments of this application, descriptions such as "when," "in the case of," "if," and "if" all refer to the device taking corresponding actions under certain objective circumstances, and are not time-limited, nor do they require the device to perform a judgment action during implementation, nor do they imply any other limitations.

[0058] For example, Figure 1This is a schematic diagram of the hardware structure of a terminal device 100. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0059] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0060] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent components or integrated into one or more processors. In some embodiments, terminal device 100 may also include one or more processors 110. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. In other embodiments, processor 110 may also include a memory for storing instructions and data. For example, the memory in processor 110 may be a cache memory. This memory can store instructions or data that processor 110 has just used or is reusing. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the terminal device 100 in processing data or executing instructions.

[0061] Processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used for data transfer between the terminal device 100 and peripheral devices.

[0062] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100.

[0063] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also power the wearable device via the power management module 141.

[0064] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance).

[0065] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0066] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0067] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0068] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, including wireless local area networks (WLAN) (such as wireless fidelity (WiFi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0069] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0070] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. The display screen 194 of the terminal device 100 can be a flexible screen.

[0071] The terminal device 100 can perform shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP is used to process the data fed back by the camera 193.

[0072] Camera 193 is used to capture still images or videos. An object passes through the lens, generating an optical image that is projected onto a photosensitive element. The photosensitive element converts the light signal into an electrical signal, which is then passed to the ISP (Image Signal Processor) for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP (Digital Signal Processor) for further processing. The DSP converts the digital image signal into standard image signals in formats such as RGB and YUV.

[0073] A digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals.

[0074] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs.

[0075] NPU stands for Neural-Network (NN) Computing Processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.

[0076] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.

[0077] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the instructions stored in internal memory 121, thereby causing terminal device 100 to perform the methods provided in some embodiments of this application, as well as various applications and data processing. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system; the program storage area may also store one or more applications (such as a gallery, contacts, etc.). The data storage area may store data created by terminal device 100 during use (such as photos, contacts, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, processor 110 can execute instructions stored in internal memory 121 and / or instructions stored in memory disposed in processor 110, thereby causing terminal device 100 to perform the methods provided in embodiments of this application, as well as other applications and data processing. Terminal device 100 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0078] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0079] Figure 2 This is a software structure block diagram of a terminal device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0080] like Figure 2 As shown, the application layer can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0081] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0082] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0083] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0084] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0085] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0086] The phone manager is used to provide communication functions for terminal device 100. For example, it manages call status (including connection, hang-up, etc.).

[0087] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0088] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.

[0089] The display service is used to define the display content for each pixel.

[0090] The system runtime includes core libraries and a virtual machine. The system runtime is responsible for system scheduling and management. This system can be HarmonyOS, Android, Windows, or Linux, etc., and this application does not limit it to any particular system.

[0091] The core library consists of two parts: one part is the functionalities that the Java language needs to call, and the other part is the system's core library.

[0092] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0093] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0094] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0095] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0096] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0097] A 2D graphics engine is a graphics engine for 2D drawing.

[0098] The kernel layer is the layer between hardware and software. It includes display drivers, THP drivers, camera drivers, audio drivers, and sensor drivers. The THP driver implements the communication interface between the touchscreen and the system-on-chip (SoC) and controls the touchscreen timing, such as controlling the Serial Peripheral Interface (SPI) and Universal Serial Bus (USB) interfaces, controlling screen on / off states, and controlling the touchscreen in flat or folded states.

[0099] Camera movement refers to the techniques used in photography or videography to shoot by moving the camera, changing the lens direction (i.e., the optical axis position), or adjusting the lens focal length. Common camera movement techniques include: push-in, pull-out, panning, and crane shots. When pushing in, the camera moves closer to the subject, or the lens focal length is adjusted to focus on a specific area of ​​the subject; this corresponds to magnification in the image. Conversely, when pulling in, the camera moves away from the subject, or the focal length is adjusted to show more background material; this corresponds to shrinking the image. When panning, the camera moves horizontally; this corresponds to horizontal movement of the image, such as moving from the left side of the scene to the right side. When crane shots, the camera moves vertically; this corresponds to horizontal movement of the image, such as moving from the top side of the scene to the bottom side. Camera movement in an image means displaying the image using the techniques described above, such as zooming in or out from the center, moving horizontally or vertically, to make the image presentation more vivid.

[0100] As mentioned above, current image library applications use original images for camera movement display, which can easily lead to cluttered compositions, excessive white space due to the image not fitting the screen size, and poor image display quality. Therefore, this application provides an image display method to improve the camera movement display effect of images.

[0101] Figure 3 This is a schematic flowchart illustrating a method for displaying an image according to an embodiment of this application. This method can be applied to electronic devices, such as mobile phones, tablets, laptops, televisions, and smart screens, which have display functions. The method may include steps S310 to S320.

[0102] S310 displays the first interface, which is the user interface for the gallery application.

[0103] For example, Figure 4 The user interface of the gallery application provided in this embodiment allows users to access the gallery application by clicking on it. This first interface can be the photo function interface 410 of the gallery application (e.g., ...). Figure 4 (a) in the figure can also be the album function interface in the gallery application (not shown in the figure), or it can be the time function interface 420 in the gallery application (e.g., Figure 4 (b) in the middle.

[0104] When a user enters the gallery application, the interface displayed by the gallery application can be the interface when the user last exited the gallery application, or it can be the default interface of the gallery application, such as the album function interface.

[0105] S320, in response to a first operation applied to the first interface, a second interface is displayed, the second interface including a first video, the first video including a camera movement display of a target image, at least one frame in the first video being an image corresponding to a first region of the target image, the first region being a region obtained by cropping the target image.

[0106] As an example, when the first interface is the aforementioned time-of-day function interface 420, in response to the user clicking on an album in the time-of-day function interface 420, such as clicking on the "Shanghai" album shown in the illustration, the electronic device can display a preview interface of the "Shanghai" album, such as... Figure 4 The interface 430 shown in (c) is shown in the image. The interface 430 may include a camera movement preview screen 432 of the pictures contained in the album. The camera movement preview screen 432 can show the pictures in the album to the user in the form of dynamic video. The interface 430 may also include the specific pictures contained in the album. The user can scroll up and down on the interface 430 to display all the pictures in the album.

[0107] Furthermore, users can also click the playback control 433 on the interface 430 to play the camera movement display of the pictures contained in the "Shanghai" album in full-screen mode, such as... Figure 4 Interface 440 is shown in (d) of the diagram.

[0108] The interface 430 can be referred to as the second interface, or the interface 440 can be referred to as the second interface. The first operation can be the above-mentioned click operation. The first operation can be a one-step operation or a multi-step operation. This application does not limit it in this regard.

[0109] As another example, when the first interface is the aforementioned photo function interface 410, in response to the user clicking the time control 411 in the photo function interface 410, the electronic device can display the time function interface 420. The method of entering the second interface from the time function interface 420 can be similar to the above embodiment, and will not be repeated here. When the first interface is the album function interface, the method of entering the second interface can be similar to the method of entering when the first interface is the photo function interface.

[0110] like Figure 3The described method involves cropping a target image from at least one frame displayed in the first video. The method for cropping the target image is described below. This method can be executed by an electronic device or by the cloud, which may also be referred to as a cloud server or cloud platform. The cropping method may include steps S510 to S540, such as... Figure 5 As shown.

[0111] S510, acquire the target image.

[0112] In some embodiments, when the cropping method is performed by an electronic device, the target image can be obtained from the application layer by the media intelligence analysis layer of the electronic device, which can be located at the aforementioned... Figure 2 The application framework layer in the media intelligence analysis layer can obtain target images from the gallery application.

[0113] For example, see [link to previous article] Figure 4 The user interface diagram shown illustrates that this media intelligence analysis layer can select target images from the photo library application based on the location where the image was taken. For example, if an image taken in Shanghai is selected as the target image, the "Shanghai" album can be displayed in the photo library application's time-of-day function interface 420 accordingly. Figure 4 As shown in (b) above. This media intelligence analysis layer can also select target images from the image library based on the image's shooting time. For example, if an image taken on August 17, 2024 is selected as the target image, the corresponding time function interface 420 can display the "Weekend Memories" album.

[0114] It should be noted that this media intelligence analysis layer can also select images from the image library application based on the type of subject contained in the image. The subject can be elements contained in the image, such as people, flowers, food, buildings, etc. For example, this media intelligence analysis layer can select images containing food as target images to generate a food album, and select photos containing scenery to generate a scenery album, etc. (not shown in the figure).

[0115] The number of target images can be one or multiple. When there are multiple target images, they can be acquired simultaneously. For example, when a user enters the "Moment" function interface, images from a specific time or location can be acquired simultaneously to generate a corresponding moment album. Alternatively, the multiple target images can be acquired sequentially. For example, in response to the completion of image capture, the image can be synchronized to the moment album.

[0116] This media intelligence analysis layer can obtain target images directly from the application layer based on information such as shooting time and location, or it can obtain target images based on the user's editing operations in the gallery application.

[0117] For example, Figure 4 (c) shows the preview interface of the "Shanghai" album mentioned above, where users can... Figure 4 In the time-lapse function interface 420 shown in (b), clicking the "Shanghai" album will take you to interface 430. Users can click the add control 431 in interface 430 to add pictures to this time-lapse album. For example... Figure 6 As shown in (a), in response to the user clicking the add control 431, the display interface can jump to interface 610, which shows pictures in the gallery application, so that the user can select pictures to add to the "Shanghai" album. Interface 610 may include a checkbox 612, which the user can click, or click the image corresponding to the checkbox 612, to select the photo as the desired material. After the user selects the photo to add, they can click the "Done" control 613 to complete the image addition operation. Interface 610 displays available materials in photo format. The user can also click the album control 611 to make the electronic device display pictures in the gallery application in album format. The user can select a target album, enter the target album, and select the desired pictures to add to that moment's album (not shown in the figure).

[0118] Users can also edit or delete photos in the time album. For example, users can select... Figure 4 The specific images contained in the "Shanghai" album in interface 430 shown in (c) can be accessed by clicking on image 434. Figure 6 The interface 620 shown in (b) can be an editing interface for the image 434. Users can click the editing control 621 to perform editing operations such as cropping, drawing, and erasing on the image 434, or they can click the delete control 622 to delete the image 434.

[0119] After a user edits, deletes, or adds images to the time-lapse album, the electronic device's media intelligence analysis layer can retrieve the processed images from the gallery application as target images.

[0120] In some embodiments, when the method is executed by the cloud, the electronic device can upload the acquired target image to the cloud. The method by which the electronic device acquires the target image can be similar to the method described above, obtained from a gallery application by the electronic device's media intelligence analysis layer; to avoid repetition, it will not be elaborated further here.

[0121] It should be noted that the user interface provided in the embodiments of this application is only an example to illustrate the method of obtaining the target image, and should not be used to limit the form of user interface that can be applied to the method provided in the embodiments of this application.

[0122] S520, crop the target image according to the size ratio.

[0123] In step S520, the electronic device or cloud can crop the target image into images with various aspect ratios. For example, the aspect ratio of the cropped image can include 2:3, 3:4, 1:1, 4:3, 3:2, 16:9, etc. That is, the aspect ratio of the first region of the target image can be 2:3, 3:4, 1:1, 4:3, 3:2, 16:9, etc. This aspect ratio can be the ratio of the image's width to its height, where the image width can be the horizontal dimension and the image height can be the vertical dimension.

[0124] In some embodiments, the number of images of various sizes and proportions can be one or multiple. For example, such as Figure 7 The image 701 shown, with a cropped aspect ratio of 2:3, can be one of two images, corresponding to rectangles 702 and 703. Alternatively, it can be a single image, corresponding to either rectangle 702 or rectangle 703.

[0125] It should be noted that the aspect ratio of the cropped image can be the same as or different from that of the original image.

[0126] Cropping a target image into multiple aspect ratios allows it to be displayed on screens of different sizes during camera movements.

[0127] The cropped image can be used as the camera movement area of ​​the target image, that is, it can be used as the display area of ​​the target image during camera movement, and it can be used as the image corresponding to at least one frame during the camera movement of the target image. Still using... Figure 7 Taking the image shown as an example, assuming that the image corresponding to the rectangle 703 is used as the cropped image, at least one frame of the image 701 during the camera movement process can be the image corresponding to the rectangle 703.

[0128] In some embodiments, cropping of a target image can be performed according to aesthetic composition principles. These principles refer to cropping the image in a way that ensures the distribution of the main subject within the image satisfies the user's aesthetic preferences.

[0129] For example, the aesthetic composition principle may include the rule of thirds, which means dividing the width and height of an image into three equal parts, with key elements in the image, such as people, located near the intersection of the dividing lines.

[0130] For example, the aesthetic composition principle may include the principle of subject integrity, which may refer to preserving the integrity of the subject in the original image in the cropped image. For example, ensuring the integrity of the person in the image, such as preserving the person's face during cropping, or preserving the entire area of ​​the person involved in the original image.

[0131] For example, the aesthetic composition principle may also include the principle of maximizing information content, which means preserving as much information as possible in the image while ensuring the clarity of the target subject. For example, preserving a certain amount of background information in the image makes it easier to understand the environment in which the target subject is located and avoids unnecessary cropping that leads to information loss.

[0132] It should be noted that the above examples are only for illustrating the principles followed when cropping target images, and should not be construed as limiting the specific methods of cropping target images in the embodiments of this application.

[0133] This step S520 can be performed by the programming framework layer of the electronic device, which can be located in... Figure 2 The application framework layer of the electronic device shown.

[0134] By cropping the target image, cluttered backgrounds can be removed, making the subject stand out more during camera movement.

[0135] S530: Obtain the screen size and select the cropped image based on the screen size.

[0136] As an example, the electronic device used to project the target image can be a foldable electronic device, such as a foldable phone, which can be a bi-fold phone that folds vertically. Figure 8 As shown in (a), Figure 8 The location of the hinge mechanism of this foldable phone is schematically shown in dashed lines. The aspect ratio of this vertically folding phone could be, for example, 9:21, and the aspect ratio of the display screen could also be approximately 9:21. Figure 8 (a) exemplarily illustrates a common display ratio for this foldable phone, as shown in the area indicated by the thick rectangle and the size ratios marked in the figure. When an image is displayed on an electronic device, a smaller margin on the screen results in a better display, or in other words, a fuller image fills the screen. In this example, for a good image display, the electronic device could display an image in a 2:3 or 3:4 ratio.

[0137] Furthermore, depending on the size of the display screen, an image with a aspect ratio of 2:3 or 3:4 can be selected from the cropped image as the camera movement area of ​​the target image.

[0138] As another example, electronic devices could be bi-fold phones that fold left and right, such as... Figure 8 As shown in (b), the size ratio of this left-right folding phone can be approximately 1:1, and the size ratio of the display screen can also be 1:1. Figure 8 (b) in the figure exemplifies a common display ratio for this foldable phone, as shown in the area indicated by the thick rectangle and the size ratios marked in the figure. In this example, for good image display, the electronic device can display images at a ratio of 1:1, or 4:3 or 3:4.

[0139] Furthermore, depending on the size of the display screen, images with a aspect ratio of 1:1, 4:3, or 3:4 can be selected from the cropped images as the images corresponding to the first area.

[0140] For foldable electronic devices, the display screen in the display state can be different when the electronic device is in a folded state and an unfolded state. For example, for... Figure 8 The electronic device shown in (b) can display an image with a 1:1 aspect ratio when both displays on both sides of the pivot mechanism are on; and can display an image with a 2:3 aspect ratio when one display on one side of the pivot mechanism is on and the other display is off.

[0141] Electronic devices can be equipped with a screen size detector (resize listener). This screen size detector can be used to obtain changes in the size of the display screen, that is, to obtain the size of the display screen when it is on. Based on the size of the display screen, it can query the cropped image to find an image with the corresponding size ratio so that the image can have a better display effect on the display screen of that size.

[0142] Similarly, for candybar phones, i.e., non-foldable electronic devices, a screen size detector can be registered within the device. The optimal display size for images can differ depending on whether the device is in landscape or portrait mode. For example, the optimal aspect ratio for an image might be 2:3 in portrait mode and 1:1 in landscape mode. This change in screen width-to-height ratio between landscape and portrait modes can be considered a change in screen size. Based on the change in display mode, images with the corresponding aspect ratio are searched among the cropped images to ensure better display on screens with different display modes.

[0143] It should be noted that the electronic devices with different aspect ratios and the corresponding image sizes are only examples illustrating how to select and crop images based on the screen size, and should not be construed as limiting the size of the electronic devices used in the embodiments of this application or the size of the displayed images.

[0144] In the example described above, the electronic device or cloud can query and select the image to be displayed based on the size of the display screen. In some embodiments, the electronic device or cloud can also crop the target image according to the size of the display screen.

[0145] For example, before cropping the target image, the electronic device or the cloud can first obtain the screen size of the electronic device. For instance, if the screen size ratio of the electronic device is determined to be 1:1, the target image can be cropped to a 1:1 ratio image without having to crop it to an image of other ratios.

[0146] When the aspect ratio of an electronic device's display changes, for example to 1:2, the target image can be cropped to a 2:3 aspect ratio without having to be cropped to another aspect ratio.

[0147] Selecting a cropped image based on the screen size ensures that the image's display size matches the screen size during video playback, preventing situations where the image is too small on a large screen or compressed on a small screen. This also reduces the amount of black borders on the screen and improves the display effect of the target image.

[0148] S540 performs an aesthetic score on the cropped image and selects the cropped image based on the aesthetic score.

[0149] This aesthetic score can be used to indicate the quality of the composition of a cropped image. For example, it can indicate the degree to which the subject setting in a cropped image meets aesthetic composition principles, which may include the rule of thirds, the principle of subject integrity, and the principle of maximizing information, as described above. The higher the aesthetic score, the better the image composition; the lower the aesthetic score, the worse the image composition.

[0150] The aesthetic score of the image corresponding to the first region can be greater than or equal to the fourth threshold.

[0151] The aesthetic score can be output by an aesthetic composition network, which can output cropped images and the aesthetic score corresponding to the cropped images.

[0152] As an example, as described in step S530, for Figure 8The electronic device described in (a) can display images with an aspect ratio of 2:3 or 3:4. Further, images with an aesthetic score greater than or equal to a fourth threshold can be selected as the image corresponding to the first region, for example, the image with the highest aesthetic score can be selected as the cropped image as the image corresponding to the aforementioned first region. When the aesthetic score corresponding to the 2:3 aspect ratio image is higher than the aesthetic score corresponding to the 3:4 aspect ratio image, the 2:3 aspect ratio image can be selected as the image corresponding to the first region; otherwise, the 3:4 aspect ratio image can be selected as the image corresponding to the first region.

[0153] As another example, for Figure 8 The electronic device described in (b) can display images in aspect ratios of 1:1, 4:3, or 3:4, thereby allowing the selection of the image with the highest aesthetic score among these three aspect ratios as the image corresponding to the first region.

[0154] It should be understood that when the aesthetic scores of the images selected based on the screen size are all greater than or equal to the fourth threshold, any image can be selected as the image corresponding to the first region.

[0155] In some embodiments, the number of images of each size ratio in the cropped image can be one or more. When there are multiple images of each size ratio, the multiple images can be aesthetically scored separately, and the image with the highest aesthetic score for each size ratio can be selected as the cropped image for that size ratio.

[0156] Selecting cropped images based on aesthetic scores can improve the composition of the images displayed in the target image's video, thereby optimizing the display effect of the target image.

[0157] It should be noted that in the example described above, step S530 is executed before step S540, but step S530 can also be executed after step S540.

[0158] For example, after cropping the target image according to its size ratio, images whose aesthetic scores meet a first condition can be selected as candidate images for the first region. This first condition can be, for example, that the aesthetic score of the cropped image is greater than or equal to a preset threshold, or that the aesthetic score of the cropped image is the top N images (N is an integer greater than or equal to 1) with the highest aesthetic scores among all cropped images of different sizes. Further, the electronic device or the cloud can obtain the screen size of the electronic device and select the best display image for the electronic device from the images whose aesthetic scores meet the first condition based on the screen size.

[0159] In some embodiments, the cropped image can be used as the starting or ending frame of the target image during the camera movement display process; or, the image corresponding to the first region can be the starting or ending frame of the target image during the camera movement display process.

[0160] In some embodiments, when the cropped image is used as the starting frame in the camera movement of the target image, the ending frame in the camera movement of the target image can be determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image. Similarly, when the cropped image is used as the ending frame in the camera movement of the target image, the starting frame in the camera movement of the target image can be determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image.

[0161] For example, the starting and ending frames of the first video can be located at the beat points of the background music in the first video. When the cropped image serves as the ending frame in the camera movement process, the displacement of the rectangle corresponding to the first region on the target image can be determined based on the playback duration and speed of the background music. The playback duration of the background music can be the camera movement duration of the target image. Figure 9 The target image shown, the area corresponding to the rectangle 901 can be considered as the target image based on... Figure 5 The area obtained after cropping by the described cropping method can be determined by the displacement of the rectangle 901 as S based on the background music of the first video. Assuming that the camera movement of the target image is horizontal, the position of the starting frame of the first video can be determined, for example, it can be the image corresponding to the rectangle 902.

[0162] Similarly, assuming the camera movement of the target image is a center-shrinking motion, and the image corresponding to the first region is the starting image, the size of the ending image can be determined based on the playback duration and speed of the background music.

[0163] In some embodiments, the aspect ratio of the image corresponding to the ending frame of the first video can be the same as the aspect ratio of the image corresponding to the starting frame of the first video. Specifically, when the camera movement is horizontal or vertical, the sizes of the ending and starting frames of the first video can be the same; when the camera movement is center zoom-out or center zoom-in, the sizes of the ending and starting frames of the first video can be different, but the aspect ratio of width and height can be the same.

[0164] It should be noted that the cropped image can also be used as an intermediate frame during the camera movement display of the target image, and this application does not limit this. The selected background music can be music selected by the user, or music added to the video when it is generated by the cloud or electronic device.

[0165] In some embodiments, the camera movement of the target image can be determined based on first information, which may include at least one of the following: the type of subject in the target image, the position of the subject in the target image, and the aspect ratio of the target image. The camera movement can be a method of moving the target image, such as center zooming, center magnification, vertical movement, and horizontal movement. This camera movement can also be referred to as a camera movement strategy or camera movement technique.

[0166] Determining the camera movement of the target image based on the first piece of information above ensures that the camera movement matches the image content and size, making the image display more vivid and aesthetically pleasing.

[0167] This camera movement method can be determined by a computer vision (CV) analysis network performing CV analysis on the target image and based on the results of the CV analysis. This CV analysis network can be deployed in the aforementioned media intelligence analysis layer, that is, it can be deployed in... Figure 2 The application framework layer of the described electronic device.

[0168] This CV analysis network can analyze and identify the main subject in an image. The main subject can be the most critical element in the image, such as the element occupying the largest area in the foreground. The foreground can be a concept relative to the background; it can be the part closer to the camera lens, while the background can be the part farther away. The foreground and background can be determined based on the depth of field of each element in the image.

[0169] This CV analysis network can also analyze each pixel in an image, assigning a category label to each pixel to distinguish the elements involved in the image, such as people, plants, food, sky, and buildings. These category labels can also be called CV tags. Thus, this CV analysis network can determine the subject type in an image.

[0170] This CV analysis network can also locate the subject in an image. It uses bounding boxes to mark the position of objects; these bounding boxes can be rectangles, and the subject's position is located using the coordinates of the four corners of the rectangle.

[0171] The aspect ratio of the target image can be included in the parameter information of the target image, and the electronic device or cloud can obtain the aspect ratio of the target image.

[0172] In some embodiments, when the subject in the target image is a person, the camera movement of the target image can be either a center-zoom-out or a center-zoom-in. For example, when the camera movement is a center-zoom-in, the cropped image can be the final image in the camera movement of the target image, allowing the camera to zoom in gradually from the starting image towards the person's location according to the rhythm of the background music. Similarly, when the camera movement of the target image is a center-zoom-out, the cropped image can be the starting image in the camera movement of the target image, allowing the camera to zoom in from the person's location towards the final image during the camera movement.

[0173] In some embodiments, when the subject of the target image includes a person, the cropped image includes the person. The cropped image including the person may mean that the cropped image includes the entire area of ​​the person involved in the target image, or it may mean that the cropped image includes a face.

[0174] When the subject of the target image is not a person, for example, when the subject of the target image is food or scenery, the camera movement of the target image can be vertical or horizontal, or it can be center zooming or center magnification.

[0175] In some embodiments, when the ratio of the size of the subject in the target image in a first direction to the first side of the target image is greater than or equal to a first threshold, the camera movement of the target image can be a center-shrinking motion. The first direction can be the direction in which the first side is located, and the first side can be the width or the height of the target image.

[0176] Conversely, when the proportion of the subject in the target image occupying the first side of the target image is less than a first threshold, the camera movement of the target image can be a center magnification.

[0177] As described above, the CV analysis network can determine the position of the subject and mark it with a bounding box. Based on the position of the marked rectangle, such as the coordinates of the top corner of the rectangle, the CV analysis network can determine the size of the subject in the target image in the width direction and the height direction. Then, it can determine the ratio between the size of the subject in the height direction of the target image and the height of the target image, and the ratio between the size of the subject in the width direction of the target image and the width of the target image. When any ratio is greater than a preset threshold, it can be determined that the camera movement of the target image is a center-shrinking motion.

[0178] It should be noted that the target image can contain one or more subjects. For example, if the subject is a person, the target image can be a single selfie or a group photo. In this example, multiple subjects can be considered as a whole, and the cropped image can include all of them. Similarly, if the subject is a building or other non-human subject, there can be one or more buildings, and the camera movement of the image is determined by the overall size of the image formed by the one or more subjects.

[0179] In some embodiments, when the subject in the target image is of a type other than a person, and the width-to-height ratio of the target image is greater than or equal to a second threshold, the camera movement of the target image can be horizontal. When the width-to-height ratio of the target image is greater than or equal to the second threshold, for example, when the width-to-height ratio is greater than or equal to 2:1, the target image can be a landscape image, and horizontal camera movement allows for a comprehensive display of the content of the target image.

[0180] Similarly, when the main subject in the target image is of a type other than a person, and the width-to-height ratio of the target image is less than or equal to the third threshold, the camera movement of the target image can be vertical. When the width-to-height ratio of the target image is less than or equal to the third threshold, for example, when the width-to-height ratio is less than or equal to 1:2, the target image can be a portrait image, and vertical camera movement allows for a comprehensive display of the content of the target image.

[0181] When the subject in the target image is of a type other than a person, and the ratio of the width to the height of the target image is less than the second threshold and greater than the third threshold, the camera movement of the target image can be either center shrinkage or center magnification.

[0182] It should be understood that when the subject in the target image is of a type other than a person, the ratio of the size of the subject in the first direction to the first side of the target image is greater than or equal to a first threshold, and the ratio of the width to the height of the target image is greater than or equal to a second threshold, the camera movement of the target image can be either center-shrinking, horizontal movement, or a combination of both; for example, center-shrinking can be performed first, followed by horizontal movement. The reverse is similar.

[0183] It should be noted that the above-mentioned CV analysis process can be performed before or after cropping the target image; this application does not impose any limitation on this. The position of the first region in the target image can be determined based on the results of the CV analysis, or in other words, the position of the first region in the target image can be determined based on the subject type and / or subject position in the target image.

[0184] For example, if the target image is first cropped and then subjected to CV analysis, the electronic device or cloud can adjust the position of the first region in the target image based on the results of the CV analysis.

[0185] As described in step S520, when cropping the target image, cropping can be performed according to aesthetic composition principles. If the subject of the target image is a person, there may be cases where the cropped image does not include the person; that is, there may be cases where the subject of the target image is a person, but the first region does not include the person. Figure 10 In the example shown, the main subject of the target image is a person, and the area enclosed by the thick rectangle 1001 is the area corresponding to the cropped image. The main subject of the cropped image is a plant, while the person is only partially cropped, resulting in the subject of the target image not being prominent enough.

[0186] After performing subject recognition on the target image, the CV analysis network can identify that the target image includes a person and determine the position of the person. Therefore, based on the CV analysis results, the cropped image can be adjusted to select the person in the image into the first region.

[0187] In some embodiments, the media intelligence analysis layer can also deploy a face recognition network. When the subject in the target image includes a person, the face recognition network can perform face recognition to identify whether the target image contains a face and the location of the face. For example, when a face is identified in the target image, the face recognition network can use a bounding box to mark the location of the face. The bounding box can be a rectangle, and the coordinates of the four vertex corners of the rectangle are used to locate the face corresponding to the rectangle. Based on the face recognition result, the face portion can be selected into the first region.

[0188] It should be noted that this face recognition network can still perform face recognition even when the subject of the target image does not include people. When performing subject analysis on any image, the aforementioned subject type analysis and face analysis can be performed. For target images that do not include people, the face analysis result may be "no face detected." This face recognition function can also be deployed in a CV analysis network, where the CV analysis network performs face recognition.

[0189] Similarly, if the target image is first analyzed for its main subject and then cropped, the electronic device or cloud can adjust the cropped image based on the results of CV analysis.

[0190] In some embodiments, where the target image is first analyzed for its main subject and then cropped, the electronic device or cloud can also crop the target image based on the CV analysis results.

[0191] For example, when performing subject analysis on a target image, if the subject type is identified as including people, the positions of faces and the overall position of the person can be further marked. Therefore, when cropping the target image, the results of the subject analysis can be used to ensure that the face area or the entire person area is included in the cropped image. Furthermore, combined with aesthetic composition principles, the position of the person in the cropped image conforms to the user's aesthetic preferences.

[0192] It should be noted that the above example, which uses a person as the main subject in the target image, describes the method for determining the position of the first region in the target image. When the main subject in the target image is a person, the cropping region can be determined based on the results of CV analysis. When the main subject in the target image is something other than a person, the cropping region can be determined based on the results of CV analysis or solely based on aesthetic composition principles.

[0193] Determining the position of the first region within the target image based on the type and / or position of the subject can make the subject of the target image stand out more during camera movement.

[0194] The gallery application can read composition parameters from the database and render them on the page to display the first video. These composition parameters can include the results of the cropping and video characterization (CV) analysis processes described above, such as crop location information, image index information, camera movement duration, and CV tags. The crop location information can include the coordinates of the top corner of the cropping rectangle. The image index information can include the target image and its sequence number for easy image retrieval. The camera movement duration can be the duration of the target image's movement, such as the interval between the starting image and the next image in the first video, or the duration of the background music in the first video. The CV tags can be used to identify the types of elements involved in the image. Other parameter types can also be included in the composition parameters, which will not be listed here.

[0195] The above combination Figures 3 to 10 The display method provided in the embodiments of this application has been described below. Figure 11 and Figure 12 The display device and electronic device provided in the embodiments of this application will be described in detail.

[0196] Figure 11 This is a schematic structural block diagram of a display device provided in an embodiment of this application. The display device may include an acquisition module 1110 and a display module 1120. The acquisition module 1110 can be used to acquire user operations on the interface, such as the first operation mentioned above.

[0197] The acquisition module 1110 can also be used to perform... Figure 5 Step S510 in the described method.

[0198] The display module 1120 can be used to perform the above. Figure 3 The described steps S310 and S320 are used to display the first interface and the second interface.

[0199] Optionally, the display device may further include a processing module, which can be used to perform processing actions, such as executing... Figure 5 Steps S520 to S540 in the described method.

[0200] Figure 12 The schematic structural block diagram of the electronic device provided in this application embodiment includes at least one processor 1210 and a memory 1220. The processor 1210 is coupled to the memory 1220 and is used to execute instructions stored in the memory 1220 to control the electronic device 1200 to perform the display method described in the above method embodiment, for example, causing the electronic device 1200 to perform the above... Figure 3 The described method steps S310 to S320, or, cause the electronic device 1200 to perform... Figure 5 The described method steps S510 to S540, or the electronic device 1200 performing operations such as CV analysis, are described above. The processor 1210 can be used for the aforementioned... Figure 1 The processor 110 described herein.

[0201] In some embodiments, the processor 1210 and the memory 1220 can be combined into a single processing device, with the processor 1210 executing program code stored in the memory 1220 to achieve the aforementioned functions. Specifically, the memory 1220 can be integrated into the processor 1210 or independent of it.

[0202] This application also provides a chip system on which a computer program is stored. When the computer program is run on a computer, it causes the computer to perform actions such as... Figure 3 or Figure 5 The described display method.

[0203] This application embodiment also provides a readable storage medium having a program stored thereon, which, when executed by a computer, causes such... Figure 3 or Figure 5 The described method was executed.

[0204] This application also provides a computer program product, including a computer program, which, when executed by a computer, causes such... Figure 3 or Figure 5 The described method was executed.

[0205] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0206] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0207] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0208] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0209] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0210] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0211] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A display method, characterized in that, include: Display the first interface, which is the user interface of the gallery application; In response to a first operation performed on the first interface, a second interface is displayed. The second interface includes a first video, which is a camera movement display of a target image. At least one frame in the first video is an image corresponding to a first region of the target image, and the first region is a region obtained by cropping the target image.

2. The method according to claim 1, characterized in that, The camera movement of the target image is determined based on first information, which includes at least one of the following: The subject type in the target image, the position of the subject in the target image, and the aspect ratio of the target image. The camera movement method refers to the movement of the target image in the first video.

3. The method according to claim 2, characterized in that, When the subject in the target image is a person, the camera movement of the target image is either center-shrinking or center-enlarging.

4. The method according to claim 2 or 3, characterized in that, When the ratio of the size of the subject in the target image in the first direction to the first side of the target image is greater than or equal to a first threshold, the camera movement of the target image is a center shrinkage, and the first direction is the direction where the first side is located; When the ratio of the size of the subject in the first direction to the first side of the target image is less than a first threshold, the camera movement of the target image is a center magnification.

5. The method according to any one of claims 2 to 4, characterized in that, When the subject in the target image is of a type other than a person, and the width-to-height ratio of the target image is greater than or equal to a second threshold, the camera movement of the target image is horizontal. When the width-to-height ratio of the target image is less than or equal to the third threshold, the camera movement of the target image is vertical. When the width-to-height ratio of the target image is greater than the third threshold and less than the second threshold, the camera movement of the target image is either center shrinkage or center magnification.

6. The method according to any one of claims 1 to 5, characterized in that, The position of the first region in the target image is determined based on the subject type and / or subject position in the target image.

7. The method according to any one of claims 1 to 6, characterized in that, The size ratio of the first region is determined according to the display screen size of the electronic device.

8. The method according to any one of claims 1 to 7, characterized in that, The aesthetic score of the image corresponding to the first region is greater than or equal to the fourth threshold, and the aesthetic score is used to indicate the composition quality of the cropped image.

9. The method according to any one of claims 1 to 8, characterized in that, The image corresponding to the first region is the end image or the start image of the first video.

10. The method according to any one of claims 1 to 9, characterized in that, When the image corresponding to the first region is the end image of the first video, the start image of the first video is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image. When the image corresponding to the first region is the starting image of the first video, the ending image of the first video is determined based on the position of the first region in the target image, the background music of the first video, and the camera movement of the target image.

11. The method according to any one of claims 1 to 10, characterized in that, When the subject type in the target image is a person, the image corresponding to the first region includes the person.

12. A display device, characterized in that, Includes a module for performing the method as described in any one of claims 1 to 11.

13. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store program code, which, when run on a computer, executes the method as described in any one of claims 1 to 11.

14. A readable storage medium, characterized in that, The readable storage medium stores a computer program that is executed by a computer to implement the method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that, The computer program product runs on a computer to implement the method as described in any one of claims 1 to 11.