Image generation, image display method and device
By acquiring and analyzing the area frame pairs of the image display device, determining the maximum overlap area and generating the target image, the full-screen display problem caused by device differences is solved, and the full-screen clear display effect is achieved on different devices.
Patent Information
- Application Number
- CN202211087834.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-09-07
AI Technical Summary
In video conferencing, screen projection and other scenarios, due to the different device size, screen aspect ratio and horizontal and vertical screen status, videos or images often have black borders, and cannot be displayed in full screen. The prior art processing methods are prone to loss of key information or distortion of the screen, and poor display effect.
By acquiring the area frame pair of the image display device, the maximum overlap area between the target area frame and the shooting screen of the current image acquisition device is determined, and the target image is shot and generated, and the target image and parameter information of the target image and the target area frame are sent to the image display end. The receiving end trims the target image according to the parameter information to match the aspect ratio of the display device and displays it.
It realizes clear full-screen display of the subject on display devices with different aspect ratios, avoids the appearance of black borders and improves the display effect of the image.
Smart Images

Figure CN115604566B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to the field of image processing technology, and particularly to an image generation, image display method and device. Background Art
[0002] Due to different devices having different sizes, screen aspect ratios, and different portrait and landscape screen states, in scenarios such as video conferencing and screen mirroring, there will be many black borders in the video or image, and it cannot be displayed full screen.
[0003] The existing processing methods mainly include 1) image cropping method; 2) picture adaptive display method based on semantic adaptability, that is, combining semantic analysis results such as text and faces to evaluate the adaptability of the picture, and then according to the adaptability of the picture, preferentially select a fast repositioning method. However, method 1) is prone to loss of key information, and method 2) is prone to distorting the picture and having poor display effects. Summary of the Invention
[0004] Embodiments of this application provide an image generation, image display method, device, equipment, and storage medium.
[0005] According to a first aspect, embodiments of this application provide an image generation method, the method includes: obtaining a pair of region frames corresponding to at least one image display device; determining the maximum overlapping area between the target region frame and the shooting screen of the current image acquisition device and displaying it; photographing an object set in the maximum overlapping area to generate a target image, and sending the target image and the parameter information of the target region frame to the image display end.
[0006] According to a second aspect, embodiments of this application provide an image display method, the method includes: in response to receiving the target image and the parameter information of the target region frame sent by the image generation end, determining, from the parameter information of the target region frame, the target parameter information that matches the aspect ratio of the current image display device; using the target parameter information as cropping information, and cropping the target image according to the cropping information; and performing display based on the cropped target image.
[0007] According to a third aspect, embodiments of this application provide an image generation device, including: an obtaining module configured to obtain a pair of region frames corresponding to at least one image display device; a determining module configured to determine the maximum overlapping area between the target region frame and the shooting screen of the current image acquisition device and display it; a generating module configured to photograph an object set in the maximum overlapping area to generate a target image, and send the target image and the parameter information of the target region frame to the image display end.
[0008] According to a fourth aspect, an embodiment of the present application provides an image display device, including: a receiving module configured to, in response to receiving the target image and the parameter information of the target region box sent by an image generation end, determine, from the parameter information of the target region box, target parameter information that matches the aspect ratio of the current image display device; a cropping module configured to use the target parameter information as cropping information and crop the target image according to the cropping information; and a display module configured to display based on the cropped target image.
[0009] According to a fifth aspect, an embodiment of the present application provides an electronic device, which includes one or more processors; a storage device storing one or more programs thereon, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the image generation method according to any embodiment of the first aspect or the image display method according to any embodiment of the second aspect.
[0010] According to a sixth aspect, an embodiment of the present application provides a computer-readable medium storing a computer program thereon, and when the program is executed by a processor, it implements the image generation method according to any embodiment of the first aspect or the image display method according to any embodiment of the second aspect.
[0011] The present application generates an image that supports full-screen display of a photographed object on display devices with different aspect ratios by obtaining at least one pair of region boxes corresponding to an image display device; determining and displaying the maximum overlapping area between the target region box and the shooting screen of the current image acquisition device; photographing an object disposed in the maximum overlapping area to generate a target image, and sending the target image and the parameter information of the target region box to an image display end.
[0012] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0014] Figure 2 is a flowchart of an embodiment of the image generation method according to the present application;
[0015] Figure 3 is a schematic diagram of an application scenario of the image generation method according to the present application;
[0016] Figure 4 is a schematic diagram of another application scenario of the image generation method according to the present application;
[0017] Figure 5 It is a schematic diagram of another application scenario of the image generation method according to the present application.
[0018] Figure 6 It is a flowchart of an embodiment of the image display method according to the present application;
[0019] Figure 7 It is a schematic diagram of an embodiment of the image generation apparatus according to the present application;
[0020] Figure 8 It is a schematic diagram of an embodiment of the image display apparatus according to the present application;
[0021] Figure 9 It is a schematic diagram of the structure of a computer system of a server suitable for implementing the embodiments of the present application. Detailed Embodiments
[0022] The following describes exemplary embodiments of the present application with reference to the accompanying drawings. Various details of the embodiments of the present application are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted below.
[0023] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0024] Figure 1 An exemplary system architecture 100 is shown in which embodiments of the image display method according to the present application can be applied.
[0025] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0026] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Client application software may be installed on the terminal devices 101, 102, 103. For example, image acquisition type application software, video playback type application software, communication type application software, etc.
[0027] The terminal devices 101, 102, and 103 can be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with screens, including but not limited to smartphones, tablet computers, laptop portable computers, desktop computers, and so on. When the terminal devices 101, 102, and 103 are software, they can be installed in the above-listed electronic devices. They can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0028] The server 105 can be a server that provides various services. For example, it can obtain the region box pairs corresponding to at least one image display device; determine the maximum overlapping area between the target region box and the shooting screen of the current image acquisition device and display it; capture an object set in the maximum overlapping area to generate a target image, and send the target image and the parameter information of the target region box to the image display end.
[0029] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the server is software, it can be implemented as multiple software or software modules (such as those used to provide image generation services) or as a single software or software module. No specific limitation is made here.
[0030] It should be pointed out that the image generation method provided by the embodiments of the present disclosure can be executed by the server 105, or by the terminal devices 101, 102, and 103, or by the server 105 and the terminal devices 101, 102, and 103 in cooperation with each other. Correspondingly, each part (such as each unit, subunit, module, and submodule) included in the image generation device can be all set in the server 105, or all set in the terminal devices 101, 102, and 103, or respectively set in the server 105 and the terminal devices 101, 102, and 103.
[0031] It should be understood that Figure 1 the numbers of the terminal devices, network, and server in
[0032] Figure 2 Fig. 200 shows a schematic flowchart of an embodiment of the image information generation method that can be applied to the present application. The image generation method includes the following steps:
[0033] Step 201, obtain the region box pairs corresponding to at least one image display device.
[0034] In this embodiment, the execution entity (image generation end, for example,Figure 1 The server 105 or the terminal devices 101, 102, 103) in [reference] can directly obtain the region frame pairs corresponding to one or more common image display devices, or can obtain the region frame pairs corresponding to one or more image display devices associated with the current image acquisition device. This application does not limit this.
[0035] Among them, if there is one image display device, the aspect ratio of the region frame pair corresponding to this image display device is usually different from the aspect ratio of the shooting screen of the current image acquisition device. If there are multiple image display devices, among the multiple image display devices, at least two image display devices have different aspect ratios of the region frame pairs. The region frame pair includes a horizontal region frame and a vertical region frame. The vertical region frame is used to indicate the region frame that is consistent with the aspect ratio of the screen in the vertical screen state of the corresponding image display device, and the horizontal region frame is used to indicate the region frame that is consistent with the aspect ratio of the screen in the horizontal screen state of the corresponding image display device.
[0036] Here, the image acquisition device can be a device that converts optical information into electrical signals for storage in existing technologies or future development technologies. For example, cameras, cameras, mobile phones, etc. This application does not limit this.
[0037] Among them, the image display device is a device that can output images in existing technologies or future development technologies. For example, computers, pads, TVs, etc. This application does not limit this.
[0038] In addition, the execution subject can also obtain the region frame pairs corresponding to at least one image display device in response to detecting that the user has enabled the function of obtaining the region frame pairs corresponding to at least one image display device to determine the maximum overlapping area.
[0039] It should be noted that the region frame pairs corresponding to at least one image display device are usually filtered region frame pairs, such as filtering out the region frame pairs that do not meet the preset conditions.
[0040] Among them, the preset conditions can be set according to actual needs, such as the aspect ratio is greater than 9:16, the aspect ratio is less than 16:9, etc.
[0041] In some alternative ways, obtaining the region frame pairs corresponding to at least one image display device includes: obtaining the region frame pairs corresponding to at least one image display device associated with the current image acquisition device.
[0042] In this implementation, the execution subject can obtain the region frame pairs corresponding to one or more different image display devices that are different from the current image acquisition device but associated with the current image acquisition device.
[0043] Here, one or more image display devices associated with the current image acquisition device can be one or more different image display devices under the same user identifier as the current image acquisition device; or one or more different image display devices that are in communication connection with the current image acquisition device.
[0044] Specifically, for example, if the current image acquisition device is a mobile phone, the execution entity can obtain at least one pair of region frames corresponding to image display devices such as a pad, a TV, etc. under the same user identifier as the mobile phone.
[0045] Also, for example, in scenarios such as video conferencing, live streaming, video calls, etc., if the current image acquisition device is a laptop computer, the execution entity can obtain the pair of region frames corresponding to the image display devices (such as a mobile phone, a pad, etc.) that are in communication connection with the laptop computer.
[0046] This implementation method improves the relevance of the obtained pair of region frames to the current image acquisition device by obtaining the pair of region frames corresponding to at least one image display device associated with the current image acquisition device, and thus improves the effectiveness of the generated image information.
[0047] Step 202, determine the maximum overlapping area between the target region frame and the shooting screen of the current image acquisition device and display it.
[0048] In this embodiment, the target region frame includes: a target vertical region frame or a target horizontal region frame. Among them, the target vertical region frame is obtained by setting the height and center point of the vertical region frame in the pair of region frames corresponding to at least one image display device to be the same as the height and center point of the shooting screen of the current image acquisition device, and the target horizontal region frame is obtained by setting the width and center point of the horizontal region frame in the pair of region frames corresponding to at least one image display device to be the same as the width and center point of the shooting screen of the current image acquisition device.
[0049] Here, the number of the target vertical region frames and the target horizontal region frames can be one or more, specifically depending on the number of pairs of region frames, that is, the number of image display devices.
[0050] After generating the target vertical region frame or the target horizontal region frame, the execution entity can directly determine and display the maximum overlapping area based on the generated target vertical region frame or target horizontal region frame and the shooting screen of the current image acquisition device, so that the user can set the shooting object in the maximum overlapping area. Or it can first determine the shooting mode (landscape mode or portrait mode) of the image acquisition device, and determine and display the maximum overlapping area based on the target vertical region frame or target horizontal region frame corresponding to the shooting mode and the screen of the current image acquisition device, so that the user can set the shooting object in the maximum overlapping area. This application does not make any limitations in this regard.
[0051] Specifically, the executing entity can obtain the region box pairs corresponding to two image display devices, that is, two region box pairs, which altogether include two horizontal region boxes and two vertical region boxes. For each vertical region box, set the height and center point of the vertical region box to be the same as the height and center point of the shooting screen of the current image acquisition device to obtain the target vertical region box; for each horizontal region box, set the width of the horizontal region box to be the same as the width of the shooting screen of the current image acquisition device, and set the width and center point of the horizontal region box to be the same as the width and center point of the shooting screen of the current image acquisition device to obtain the target horizontal region box. Further, determine the maximum overlapping area between the target vertical region box or the target horizontal region box and the shooting screen (which can be in landscape mode or portrait mode).
[0052] In some optional ways, in response to determining that the shooting mode of the current image acquisition device is landscape mode, determine the overlapping area between the target vertical region box and the shooting screen of the current image acquisition device as the maximum overlapping area.
[0053] In this implementation, the target region box includes the target vertical region box. The executing entity can first judge the shooting mode of the current image acquisition device. If it is landscape mode, then determine the overlapping area between the target vertical region box and the shooting screen as the maximum overlapping area.
[0054] Specifically, the target vertical region box includes: target vertical region box A and target vertical region box B. The executing entity can determine the overlapping area A between target vertical region box A and the shooting screen of the current image acquisition device, and the overlapping area B between target vertical region box B and the shooting screen of the current image acquisition device, and determine the smaller overlapping area among overlapping area A and overlapping area B as the maximum overlapping area, that is, the maximum overlapping area = MIN(overlapping area A, overlapping area B).
[0055] This implementation improves the accuracy of the determined maximum overlapping area by, in response to determining that the shooting mode of the current image acquisition device is landscape mode, determining the overlapping area between the target vertical region box and the shooting screen of the current image acquisition device as the maximum overlapping area.
[0056] In some optional ways, in response to determining that the shooting mode of the current image acquisition device is portrait mode, determine the overlapping area between the target horizontal region box and the shooting screen of the current image acquisition device as the maximum overlapping area.
[0057] In this embodiment, the target region box includes the target horizontal region box. The executing entity can first judge the shooting mode of the current image acquisition device. If it is portrait mode, then determine the overlapping area between the target horizontal region box and the shooting screen as the maximum overlapping area.
[0058] Specifically, the target horizontal area frames include: target horizontal area frame C and target horizontal area frame D. The executing entity can determine the overlapping area C between the target horizontal area frame C and the shooting screen of the current image acquisition device, and the overlapping area D between the target horizontal area frame D and the shooting screen of the current image acquisition device, and determine the smaller overlapping area among the overlapping area C and the overlapping area D as the maximum overlapping area, that is, maximum overlapping area = MIN(overlapping area C, overlapping area D).
[0059] This implementation method determines the overlapping area between the target horizontal area frame and the shooting screen of the current image acquisition device as the maximum overlapping area in response to determining that the shooting mode of the current image acquisition device is the portrait mode, improving the accuracy of the determined maximum overlapping area.
[0060] Step 203: Shoot the object set in the maximum overlapping area to generate a target image, and store the target image and the parameter information of the target area frame.
[0061] In this embodiment, after determining the maximum overlapping area, the executing entity can only display the frame of the maximum overlapping area on the shooting screen of the current image acquisition device, so that the user can set the object to be shot in the frame of the maximum overlapping area, and then shoot the image on the shooting screen to generate a target image. The target image can support full-screen clear display of the shooting object on at least one of the above image display devices.
[0062] It should be noted that the executing entity can also display all target area frames (the frame of the maximum overlapping area and at least one frame including the maximum overlapping area) on the shooting screen of the current image acquisition device for the user to select. If the frame selected by the user is the frame of the maximum overlapping area, shoot the object set in the maximum overlapping area to generate a target image; if the frame selected by the user is not the frame of the maximum overlapping area, shoot the object set in the frame selected by the user to generate a target image.
[0063] Here, the executing entity can also shoot the object to be shot that appears in the maximum overlapping area in response to receiving a shooting instruction input by the user.
[0064] Among them, the target image can be a single image or an image frame in a video, and the present application does not limit this.
[0065] Further, the executing entity can send the target image and the parameter information of the target area frame to the image display end in a wired or wireless manner.
[0066] Among them, the parameter information can include: information such as the width, height, width-to-height ratio, and position of the target area frame.
[0067] The above wireless connection methods may include, but are not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods known now or developed in the future.
[0068] In some alternative ways, the target area box further includes: a horizontal-adapted area box.
[0069] In this implementation, the target area box includes a target vertical area box and a horizontal-adapted area box, and the execution entity may send the target image, the parameter information of the target vertical area box, and the parameter information of the horizontal-adapted area box to the image display end.
[0070] Among them, the horizontal-adapted area box is used to indicate the smallest horizontal area box in the area box pair corresponding to each target vertical area box, with the same center point as the target vertical area box and capable of covering the target vertical area box.
[0071] Specifically, as Figure 3 shown, if the shooting mode of the current image acquisition device is the landscape mode, that is, the shooting screen 301 is in landscape, the target area box includes: the target vertical area box A302, the horizontal-adapted area box A (not shown in the figure), the target vertical area box B303, and the horizontal-adapted area box B (not shown in the figure), then the execution entity may determine the overlapping area between the target vertical area box A302 and the target vertical area box B303 and the shooting screen 301 as the maximum overlapping area. Among them, the horizontal-adapted area box A corresponding to the target vertical area box A is the smallest horizontal area box in the area box pair corresponding to the target vertical area box A, with the same center point as the target vertical area box A and capable of covering the target vertical area box A. The horizontal-adapted area box B corresponding to the target vertical area box B is the smallest horizontal area box in the area box pair corresponding to the target vertical area box B, with the same center point as the target vertical area box B and capable of covering the target vertical area box B.
[0072] This implementation enriches the subsequent cropping methods of the target image by sending the target image, the parameter information of the target vertical area box, and the parameter information of the horizontal-adapted area box to the image display end.
[0073] In some alternative ways, the target area box further includes: a vertical-adapted area box.
[0074] In this implementation, the target area box includes a target horizontal area box and a vertical-adapted area box, and the execution entity may send the target image, the parameter information of the target horizontal area box, and the parameter information of the vertical-adapted area box to the image display end.
[0075] Among them, the adapted vertical region box is used to indicate the region box pair corresponding to each target horizontal region box, where the center point is the same as that of the target horizontal region box, and it is the smallest vertical region box that can cover the target horizontal region box.
[0076] Specifically, as Figure 4 shown, if the shooting mode of the current image acquisition device is the portrait mode, that is, the shooting screen 401 is in portrait, the target region boxes include: the target horizontal region box C402, the adapted vertical region box C (not shown in the figure), the target horizontal region box D403, and the adapted vertical region box D (not shown in the figure). Then, the execution entity can determine the overlapping region of the target horizontal region box C402 and the target horizontal region box D403 with the shooting screen 401 as the maximum overlapping region. Among them, the adapted vertical region box C corresponding to the target horizontal region box C is the region box pair corresponding to the target horizontal region box C, the center point is the same as that of the target horizontal region box C402, and it is the smallest vertical region box that can cover the target horizontal region box C402. The adapted vertical region box D corresponding to the target horizontal region box D403 is the region box pair corresponding to the target horizontal region box D403, the center point is the same as that of the target horizontal region box D403, and it is the smallest vertical region box that can cover the target horizontal region box D403.
[0077] This implementation method enriches the subsequent cropping methods of the target image by sending the target image, the parameter information of the target vertical region box, and the parameter information of the adapted horizontal region box to the image display end.
[0078] Continue to refer to Figure 5 , Figure 5 which is a schematic diagram of an application scenario of the image generation method according to this embodiment.
[0079] In Figure 5 the application scenario, the current image acquisition device is a mobile phone 501, and the execution entity 502 can obtain at least one commonly used image display device 503, 504, such as a pad, a computer, and the corresponding region box pairs. The region box pair includes a horizontal region box and a vertical region box. The aspect ratio of the horizontal region box is consistent with the aspect ratio of the corresponding image display device in the landscape state, and the aspect ratio of the vertical region box is consistent with the aspect ratio of the corresponding image display device in the portrait state. For example, the aspect ratio of the horizontal region box in the region box pair corresponding to the pad is 16:9, and the aspect ratio of the vertical region box is 9:16. The aspect ratio of the horizontal region box in the region box pair corresponding to the computer is 4:3, and the aspect ratio of the vertical region box is 3:4.
[0080] Further, determine and display the maximum overlapping area 506 between the target region box and the shooting screen 505 of the current image acquisition device 501. The target region box includes: a target vertical region box or a target horizontal region box. The target vertical region box is obtained by setting the height and center point of the vertical region box in the region box pair corresponding to at least one image display device to be the same as the height and center point of the shooting screen of the current image acquisition device. The target horizontal region box is obtained by setting the width and center point of the horizontal region box in the region box pair corresponding to at least one image display device to be the same as the width and center point of the shooting screen of the current image acquisition device.
[0081] Further, the user can move the current image acquisition device 501 so that the object to be photographed appears in the maximum overlapping area 506. The execution entity 502 can photograph the object set in the maximum overlapping area 506 through the current image acquisition device, generate a target image, and send the target image and the parameter information of the target region box to the image display end.
[0082] The image generation method provided by the embodiments of the present disclosure obtains a region box pair corresponding to at least one image display device; determines and displays the maximum overlapping area between the target region box and the shooting screen of the current image acquisition device; photographs the object set in the maximum overlapping area to generate a target image, and sends the target image and the parameter information of the target region box to the image display end, thereby generating an image that supports the full-screen display of the photographed object on display devices with different aspect ratios.
[0083] Further refer to Figure 6 , which shows the flowchart 600 of an embodiment of the image information display method. In this embodiment, the flowchart 600 of the image information display method may include the following steps:
[0084] Step 601, in response to receiving the target image and the parameter information of the target region box sent by the image generation end, determine, from the parameter information of the target region box, the target parameter information that matches the aspect ratio of the current image display device.
[0085] In this embodiment, the parameter information includes the aspect ratio. The execution entity (the image display end, for example, Figure 1 the server 105 or the terminal devices 101, 102, 103 in
[0086] Here, the execution entity may first determine whether there is an aspect ratio in the parameter information of the target region box that is exactly the same as the aspect ratio of the current image display device. If there is, directly determine the parameter information corresponding to the exactly same aspect ratio as the target parameter information. If not, determine the parameter information corresponding to the closest aspect ratio as the target parameter information.
[0087] In some optional ways, in the parameter information of the target region box, determining the target parameter information that matches the aspect ratio of the current image display device includes: in response to determining that there is no parameter information in the parameter information of the target region box whose included aspect ratio is exactly the same as the aspect ratio of the current image display device, determining the parameter information whose included aspect ratio is closest to the aspect ratio of the current image display device as the target parameter information.
[0088] In this implementation manner, the execution entity may first determine whether there is an aspect ratio in the parameter information of the target region box that is exactly the same as the aspect ratio of the current image display device. If not, determine the parameter information whose included aspect ratio is closest to the aspect ratio of the current image display device as the target parameter information.
[0089] Specifically, in the picture sharing scenario, the image acquisition end may determine the maximum overlapping area according to the target region box generated by at least one image display device obtained, photograph the shooting subject that appears in the maximum overlapping area to generate a target image, and send the target image and the target region box to the image display end. If the parameter information of the target region box corresponding to the target image, that is, the aspect ratio of the display device supported by the target image, such as 16:9, 9:16, 4:3, 3:4, and the aspect ratio of the current display device is 1.25:1, then the image display end may use the parameter information corresponding to the aspect ratio of 4:3 (the aspect ratio closest to 1.25:1) as the cropping information to crop the target image to obtain the cropped image, and display the cropped image on the current image display device. Although this method cannot achieve full-screen display, it can make the black edges around the picture as small as possible.
[0090] This implementation manner, by in response to determining that there is no parameter information in the parameter information of the target region box whose included aspect ratio is exactly the same as the aspect ratio of the current image display device, determining the parameter information whose included aspect ratio is closest to the aspect ratio of the current image display device as the target parameter information, helps to improve the effectiveness and reliability of the determined cropping information, and further enables the target image to be as full-screen displayed as possible, ensuring the display effect of the image.
[0091] Step 602, use the target parameter information as the cropping information and crop the target image according to the cropping information.
[0092] In this embodiment, the executing entity may use the target parameter information as the cropping information and crop the target image according to the cropping information to obtain the cropped target image.
[0093] Step 603: Display based on the cropped target image.
[0094] In this embodiment, after obtaining the cropped target image, the executing entity may directly display the cropped target image on the current image display device, or first determine whether the resolution of the cropped target image is greater than or equal to the resolution of the current image display device. If so, directly display the cropped target image.
[0095] Specifically, in a live broadcast scenario, the image acquisition end may determine the maximum overlapping area according to the target area frames generated by at least one image display device, photograph the object set in the maximum overlapping area to generate a target image, and send the target image and the target area frame to the image display end. If the parameter information of the target area frame corresponding to the target image, that is, the aspect ratio of the display device supported by the target image, such as 16:9, 9:16, 4:3, 3:4, and the aspect ratio of the current display device is 3:4, the image display end may use the parameter information with an aspect ratio of 3:4 as the cropping information to crop the target image to obtain the cropped image and display the cropped image.
[0096] In some alternative ways, displaying based on the cropped image information includes: in response to determining that the resolution of the cropped target image is less than the resolution of the current image display device, using AI super-resolution technology to process the cropped target image to obtain the processed target image; displaying the processed target image.
[0097] In this implementation manner, the executing entity may compare the resolution of the cropped target image with the resolution of the current image display device. If the resolution of the cropped target image is less than the resolution of the image display device, use AI super-resolution technology to process the cropped target image so that the resolution of the processed target image is the same as the resolution of the current image display device.
[0098] Further, use the image display device to display the processed target image.
[0099] This implementation manner, by in response to determining that the resolution of the cropped target image is less than the resolution of the current image display device, using AI super-resolution technology to process the cropped target image to obtain the processed target image; displaying the processed target image, helps the photographed subject to be presented as complete and clear as possible on the display device, effectively improving the display effect of the image.
[0100] The above embodiments of the present application, compared withFigure 2 Compared with the corresponding embodiments, the process 500 of the image display method in this embodiment reflects that in response to receiving the target image and the parameter information of the target region box sent by the image generation end, among the parameter information of the target region box, the target parameter information matching the aspect ratio of the current image display device is determined; the target parameter information is used as the cropping information, and the target image is cropped according to the cropping information; based on the cropped target image for display, which helps to achieve the as-complete-as-possible presentation of the photographed object on different display devices and effectively improves the display effect of the image.
[0101] Further referring to Figure 7 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of an image generation device. This device embodiment corresponds to Figure 2 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0102] As Figure 7 shown, the image generation device 700 in this embodiment includes: an acquisition module 701, a determination module 702, and a generation module 703.
[0103] Among them, the acquisition module 701 can be configured to acquire at least one pair of region boxes corresponding to an image display device.
[0104] The determination module 702 can be configured to determine and display the maximum overlapping area between the target region box and the shooting screen of the current image acquisition device.
[0105] The generation module 703 can be configured to photograph the object set in the maximum overlapping area, generate a target image, and send the target image and the parameter information of the target region box to the image display end.
[0106] In some optional ways of this embodiment, the determination module is further configured to: in response to determining that the shooting mode of the current image acquisition device is the landscape mode, determine the overlapping area between the target portrait region box and the shooting screen of the current image acquisition device as the maximum overlapping area.
[0107] In some optional ways of this embodiment, the determination module is further configured to: in response to determining that the shooting mode of the current image acquisition device is the portrait mode, determine the overlapping area between the target landscape region box and the shooting screen of the current image acquisition device as the maximum overlapping area.
[0108] In some optional ways of this embodiment, the target region box further includes: a landscape-adapted region box.
[0109] In some optional ways of this embodiment, the target region box further includes: a portrait-adapted region box.
[0110] In some alternative embodiments of the present embodiment, the obtaining module is further configured to: obtain a pair of region boxes corresponding to at least one image display device associated with the current image acquisition device.
[0111] Further referring to Figure 8 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of an image display device. This device embodiment corresponds to Figure 6 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0112] As shown in Figure 8 , the image display device 800 in this embodiment includes: a receiving module 801, a cropping module 802, and a display module 803.
[0113] Among them, the receiving module 801 can be configured to, in response to receiving the target image and the parameter information of the target region box sent by the image generation end, determine, from the parameter information of the target region box, the target parameter information that matches the aspect ratio of the current image display device.
[0114] The cropping module 802 can be configured to use the target parameter information as cropping information and crop the target image according to the cropping information.
[0115] The display module 803 can be configured to display based on the cropped target image.
[0116] In some alternative embodiments of the present embodiment, the receiving module is further configured to, in response to determining that there is no parameter information in the parameter information of the target region box whose included aspect ratio is exactly the same as the aspect ratio of the current image display device, determine the parameter information whose included aspect ratio is closest to the aspect ratio of the current image display device as the target parameter information.
[0117] In some alternative embodiments of the present embodiment, the cropping module is further configured to, in response to determining that the resolution of the cropped target image is less than the resolution of the current image display device, process the cropped target image using AI super-resolution technology to obtain a processed target image, and display the processed target image.
[0118] According to the embodiments of the present application, the present application also provides an electronic device and a readable storage medium.
[0119] As shown in Figure 9 , it is a block diagram of an electronic device for an image generation method according to an embodiment of the present application.
[0120] FIG. 900 is a block diagram of an electronic device for an image generation method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0121] As Figure 9 shown, the electronic device includes: one or more processors 901, a memory 902, and an interface for connecting the components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be installed on a common motherboard or otherwise installed as required. The processor may process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as, a display device coupled to the interface). In other embodiments, multiple processors and / or multiple buses may be used in conjunction with multiple memories and multiple memories if necessary. Similarly, multiple electronic devices may be connected, each device providing part of the necessary operations (such as, as a server array, a set of blade servers, or a multi-processor system). Figure 9 Here, one processor 901 is taken as an example.
[0122] The memory 902 is the non-transitory computer-readable storage medium provided by the present application. Among them, the memory stores instructions executable by at least one processor, so that the at least one processor executes the image generation method provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the image generation method provided by the present application.
[0123] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the image generation method in the embodiments of the present application (for example, Figure 7 the acquisition module 701, the determination module 702, and the generation module 703 shown). The processor 901 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 902, that is, implements the image generation method in the above method embodiments.
[0124] The memory 902 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created for use by the electronic device that generates images, etc. In addition, the memory 902 may include high-speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 902 may optionally include a memory remotely located relative to the processor 901, and these remote memories may be connected to the electronic device that generates images through a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0125] The electronic device for the image generation method may further include: an input device 903 and an output device 904. The processor 901, the memory 902, the input device 903, and the output device 904 may be connected through a bus or other means. Figure 9 Taking connection through a bus as an example.
[0126] The input device 903 may receive input digital or character information and generate key signal inputs related to user settings and function controls of the electronic device for quality monitoring of the live video stream, such as input devices like a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light-emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
[0127] Various embodiments of the systems and techniques described herein may be implemented in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application-specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] These computing procedures (also known as programs, software, software applications, or code) include machine instructions for a programmable processor and can implement these computing procedures using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0129] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0130] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0131] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other.
[0132] According to the technical solution of the embodiment of the present application, an image that can support full-screen display on display devices with corresponding different aspect ratios is generated.
[0133] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved, and no limitations are imposed herein.
[0134] The above specific embodiments do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims
1. An image generation method, the method comprising: Obtaining a pair of region frames corresponding to at least one image display device, wherein the pair of region frames includes a horizontal region frame and a vertical region frame, the aspect ratio of the horizontal region frame is consistent with the aspect ratio of the corresponding image display device in the landscape screen state, and the aspect ratio of the vertical region frame is consistent with the aspect ratio of the corresponding image display device in the portrait screen state; Determining and displaying the maximum overlapping area between the target region frame and the shooting screen of the current image acquisition device, wherein the target region frame includes: a target vertical region frame or a target horizontal region frame, the target vertical region frame is obtained by setting the height and center point of the vertical region frame in the pair of region frames corresponding to the at least one image display device to be the same as the height and center point of the shooting screen of the current image acquisition device, the target horizontal region frame is obtained by setting the width and center point of the horizontal region frame in the pair of region frames corresponding to the at least one image display device to be the same as the width and center point of the shooting screen of the current image acquisition device, the aspect ratio of the pair of region frames is different from the aspect ratio of the shooting screen of the current image acquisition device, and the size of the target region frame is smaller than the size of the shooting screen; Shooting an object arranged in the maximum overlapping area to generate a target image, and sending the target image and the parameter information of the target region frame to the image display end.
2. The method according to claim 1, wherein, The target region frame includes a target vertical region frame, and the determining the maximum overlapping area between the target region frame and the shooting screen of the current image acquisition device includes: In response to determining that the shooting mode of the current image acquisition device is the landscape screen mode, determining the overlapping area between the target vertical region frame and the shooting screen of the current image acquisition device as the maximum overlapping area.
3. The method according to claim 1, wherein, The target region frame includes a target horizontal region frame, and the determining the maximum overlapping area between the target region frame and the shooting screen of the current image acquisition device includes: In response to determining that the shooting mode of the current image acquisition device is the portrait screen mode, determining the overlapping area between the target horizontal region frame and the shooting screen of the current image acquisition device as the maximum overlapping area.
4. The method according to claim 2, wherein, The target region frame further includes: an adapted horizontal region frame, which is used to indicate the smallest horizontal region frame in the pair of region frames corresponding to each target vertical region frame, with the same center point as the target vertical region frame and capable of covering the target vertical region frame.
5. The method according to claim 3, wherein, The target region frame further includes: an adapted vertical region frame, which is used to indicate the smallest vertical region frame in the pair of region frames corresponding to each target horizontal region frame, with the same center point as the target horizontal region frame and capable of covering the target horizontal region frame.
6. The method according to claim 1, wherein The obtaining the pair of region frames corresponding to at least one image display device includes: Obtaining the pair of region frames corresponding to at least one image display device associated with the current image acquisition device.
7. An image display method, comprising: In response to receiving the target image and the parameter information of the target region box sent by the image generation end, in the parameter information of the target region box, determine the target parameter information that matches the aspect ratio of the current image display device, where the parameter information includes the aspect ratio, and the parameter information of the target image and the target region box is the parameter information of the target image and the target region box obtained by the method according to any one of claims 1-6; Use the target parameter information as the cropping information, and crop the target image according to the cropping information; Display based on the cropped target image.
8. The method according to claim 7, and determining the target parameter information that matches the aspect ratio of the current image display device in the parameter information of the target region box includes: In response to determining that there is no parameter information in the parameter information of the target region box whose included aspect ratio is exactly the same as the aspect ratio of the current image display device, determine the parameter information with the closest included aspect ratio to the aspect ratio of the current image display device as the target parameter information.
9. The method according to claim 7, wherein, The displaying based on the cropped target image includes: In response to determining that the resolution of the cropped target image is less than the resolution of the current image display device, process the cropped target image using AI super-resolution technology to obtain a processed target image, and the resolution of the processed target image is the same as the resolution of the current image display device; Display the processed target image.
10. An image generation device, the device includes: An acquisition module configured to acquire at least one pair of region boxes corresponding to an image display device, where the pair of region boxes includes a horizontal region box and a vertical region box, the aspect ratio of the horizontal region box is consistent with the aspect ratio of the corresponding image display device in the landscape screen state, and the aspect ratio of the vertical region box is consistent with the aspect ratio of the corresponding image display device in the portrait screen state; A determination module configured to determine and display the maximum overlapping area between the target region box and the shooting screen of the current image acquisition device, where the target region box includes: a target vertical region box or a target horizontal region box, the target vertical region box is obtained by setting the height and center point of the vertical region box in the at least one pair of region boxes corresponding to the image display device to be the same as the height and center point of the shooting screen of the current image acquisition device, the target horizontal region box is obtained by setting the width and center point of the horizontal region box in the at least one pair of region boxes corresponding to the image display device to be the same as the width and center point of the shooting screen of the current image acquisition device, the aspect ratio of the pair of region boxes is different from the aspect ratio of the shooting screen of the current image acquisition device, and the size of the target region box is smaller than the size of the shooting screen; A generation module configured to photograph an object set in the maximum overlapping area to generate a target image, and send the target image and the parameter information of the target region box to the image display end.
11. An image display device, the device includes: A receiving module, configured to, in response to receiving a target image and parameter information of a target region box sent by an image generating end, determine, from the parameter information of the target region box, target parameter information that matches the aspect ratio of a current image display device, where the parameter information includes an aspect ratio, and the parameter information of the target image and the target region box is the parameter information of the target image and the target region box obtained by the method according to any one of claims 1-6; A cropping module, configured to use the target parameter information as cropping information and crop the target image according to the cropping information; A display module, configured to display based on the cropped target image.
12. An electronic device, characterized in that, Comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-6 or 7-9.
13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6 or 7-9.
Citation Information
Patent Citations
Electronic device with picture-adjusting function and picture-adjusting method
CN101673535A
Photographing method and device
CN105282441A
Interface adjusting method and device
CN106331488A