Image processing method, related apparatus, device, and computer readable storage medium

By receiving the display area information of the target terminal and the key point positions of the image to be transmitted, the target display area information is determined and sent, enabling the target terminal to process the image to adapt to its display area. This solves the problem of poor display effect caused by differences in screen shape and achieves the best visual effect.

CN114820638BActive Publication Date: 2026-01-02HUAWEI TECH CO LTD

Patent Information

Application Number
CN202110064642.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-18
Publication Date
2026-01-02
Estimated Expiration
2041-01-18

AI Technical Summary

Technical Problem

Due to differences in screen shape between different terminals, multimedia resources may not be compatible with the target terminal screen, affecting the display effect.

Method used

By receiving the display area information of the target terminal and the location of key points in the image to be transmitted, the target display area is determined and its information is sent to the source terminal, so that the target terminal can process the image according to the information to adapt it to its display area.

Benefits of technology

It achieves the best visual effect of the image on the target terminal and solves the problem of image mismatch caused by different display area shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820638B_ABST
    Figure CN114820638B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an image processing method, comprising: a first device receiving request information of a second device; then, the first device acquiring position information of M key points in a to-be-transmitted image and determining a target display area in the to-be-transmitted image based on the request information and the position information of the M key points; then, the first device sending the target display area information to the second device, so that the second device processes the to-be-transmitted image into a target display image based on the target display area information. The second device receives the target display area information and processes the to-be-transmitted image into the target display image based on the target display area information and presents the target display image on a display area thereof. Through the above method, the to-be-transmitted image is presented on the display area of the second device with the best visual effect, and the problem that two devices cause the image to be not adaptive due to different shapes of display areas, thereby affecting the image presentation effect, is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to an image processing method, related apparatus, device and computer readable storage medium. BACKGROUND

[0002] At present, the forms of intelligent terminals on the market are various, including mobile phones, tablet computers, smart watches, smart wristwatches and the like. The interconnection technology between multiple terminals has begun to develop gradually, and there is often a demand for multimedia resource intercommunication between different forms of terminals, such as picture viewing, wallpaper synchronization, remote photographing, video chat, live broadcast and the like. However, because the screens (resolution, size) of different types of terminals are different, it is necessary to convert and adapt the multimedia, so as to achieve the best display effect.

[0003] At present, there are mainly two ways for the transmission and conversion of multimedia resources between multiple terminals: one way is to use H.263 to encode and transmit multimedia resources, and H.263 is mainly used in video conferencing, video telephony and network video; in the aspect of compressing a progressive video source, H.263 has a great improvement in performance compared with its previous video coding standard, especially at a low code rate end, it can greatly save the code rate under the premise of ensuring a certain quality. However, using H.263 to encode and transmit multimedia resources can only solve the difference in screen resolution and transmission performance between the source terminal and the target terminal, and cannot solve the difference in screen shape between the source terminal and the target terminal. The other way is to display the content displayed on the terminal screen on the screen of other terminals through screen projection. This way is based on video encoding and decoding to solve the multimedia sharing of different screens, and does not support screen projection of different screen shapes. SUMMARY

[0004] The embodiment of the present application provides an image processing method, which solves the problem that the multimedia resources such as images or videos transmitted by the source terminal and the target terminal are not adapted on the screen of the target terminal due to the difference in screen shape, and further affects the display effect of the multimedia resources on the screen of the target terminal.

[0005] In a first aspect, the embodiment of the present application provides an image processing method, comprising:

[0006] The first device receives the request information of the second device; wherein the request information comprises the information of the display area of the second device;

[0007] The first device obtains the position information of M key points in the to-be-transmitted image;

[0008] The first device determines a target display area in the to-be-transmitted image based on the request information and the position information of the M key points;

[0009] The first device sends the target display area information to the second device, so that the second device processes the image to be transmitted into a target display image based on the target display area information;

[0010] The target display area information includes size information of the target display area and position information of the target display area in the image to be transmitted.

[0011] In the embodiments of the present application, the first device determines the target display area of the image to be transmitted based on the shape information of the display area of the second device and the position information of the key points in the image to be transmitted, and sends the target display area information to the second device, so that the second device can process the received image based on the target display area information, so that the image presents the best visual effect on the display area of the second device, solving the problem that the two devices are not adapted to each other because of the different shapes of the display areas, and further affecting the image presentation effect.

[0012] In a possible implementation manner, the target display area is a target first cropping window; the target first cropping window is a window selected from one or more first cropping windows that can include the M key points based on the request information and the position information of the M key points; the first cropping window is completely covered by the image to be transmitted; the first cropping window is of the same shape as the display area of the second device; or,

[0013] The target display area is a second area; the second area is an overlapping area of the second cropping window and the image to be transmitted, the second cropping window includes the M key points, the second cropping window is not completely covered by the image to be transmitted, and the second cropping window is of the same shape as the display area of the second device; or,

[0014] The target display area is a region of the image to be transmitted.

[0015] In the embodiments of the present application, the target display area includes information of all key points of the image to be transmitted, and when the target display area is displayed on the display area of the second device, it is most suitable for the display area of the second device and is adapted to the display area of the second device, solving the problem that the two devices are not adapted to each other because of the different shapes of the display areas, and further affecting the image presentation effect.

[0016] In a possible implementation manner, the first device determines the target display area in the image to be transmitted based on the request information and the position information of the M key points, including:

[0017] The first device determines whether there is one or more first clipping windows capable of containing the M key points in the image to be transmitted; the first clipping window is of the same shape as the display area of the second device;

[0018] If the determination is yes, the first device selects a target first clipping window as a target display area from the one or more first clipping windows capable of containing the M key points;

[0019] If the determination is no, the first device analyzes whether there is a second clipping window; the second clipping window contains the M key points, the second clipping window is not completely covered by the image to be transmitted, and the second clipping window is of the same shape as the display area of the second device;

[0020] If the analysis is yes, the first device determines an overlapping area of the second clipping window and the image to be transmitted as a target display area; the overlapping area is smaller than the area of the image to be transmitted;

[0021] If the analysis is no, the first device determines the area of the image to be transmitted as a target display area.

[0022] Embodiments of the present application, the first device determines the target display area solves the problem that two devices are not adapted because the shapes of the display areas are different, thereby affecting the image presentation effect.

[0023] In a possible implementation manner, the first device selects a target first clipping window as a target display area from the one or more first clipping windows capable of containing the M key points, comprising:

[0024] The first device determines the shape of the first clipping window based on the request information;

[0025] The first device determines one or more first clipping windows in the image to be transmitted based on the shape of the first clipping window and the positions of the M key points;

[0026] The first device selects a first clipping window with the largest size as a target first clipping window from the one or more first clipping windows;

[0027] The first device determines an overlapping area of the target first clipping window and the image to be transmitted as the target display area;

[0028] The first device records the target display area information; wherein the target display area information includes size information of the target display area and position information of the target display area in the image to be transmitted.

[0029] In the embodiment of the present application, the first device determines a target display area and sends the target display area information to the second device, so that the second device can process the image received by it based on the target display area information, so as to make the image present the best visual effect on the display area of the second device, thereby solving the problem that the two devices cannot adapt to the image due to the different shapes of the display areas, and further affecting the image presentation effect.

[0030] In a possible implementation manner, the first device takes the overlapping area of the second cropping window and the to-be-transmitted image as the target display area, including:

[0031] The first device acquires a third cropping window based on the request information; the third cropping window is a maximum cropping window in the to-be-transmitted image, the shape of the third cropping window is the same as that of the display area of the second device; the third cropping window is taken as a current cropping window; and the enlarged cropping window is a second cropping window.

[0032] The first device enlarges the size of the current cropping window by a first value based on the position information of the M key points to obtain an enlarged cropping window;

[0033] The first device acquires a first straight line; the first straight line is a straight line passing through the center point of the to-be-transmitted image in a first direction, and the first direction is a positive direction of the display area of the second device for presenting the image.

[0034] The first device performs sliding window scanning on the geometric center of the second cropping window on the first straight line according to a preset step length between the first boundaries, to determine whether the second cropping window including the M key points exists; if it is determined that the second cropping window including the M key points does not exist, the first device repeats the step of enlarging the size of the current cropping window by a first value based on the position information of the M key points until it is determined that the second cropping window including the M key points exists.

[0035] The first device determines the area of the second cropping window including the M key points and overlapping with the to-be-transmitted image as the second area.

[0036] The first device records the information of the second area; the information of the second area includes the size information of the second area and the position information of the second area in the to-be-transmitted image.

[0037] The embodiment of the present application is characterized in that the first device determines a target display area and sends the target display area information to the second device, so that the second device can process the image received by the second device based on the target display area information, thereby making the image present the best visual effect on the display area of the second device, and solving the problem that the image is not adapted and the image presentation effect is affected due to the different shapes of the display areas of the two devices.

[0038] In a possible implementation manner, the first device takes the overlapping area of the second cropping window and the image to be transmitted as the target display area, and the method comprises the following steps.

[0039] The first device obtains a first straight line, wherein the first straight line is a straight line passing through the center point of the image to be transmitted in a first direction, and the first direction is a positive direction of the display area of the second device for presenting the image.

[0040] The first device obtains a reference point in the image to be transmitted, wherein the reference point is a first intersection point of the first straight line and the boundary of the image to be transmitted.

[0041] The first device calculates distance values between the reference point and the M key points based on the position information of the M key points, and obtains M first distance values.

[0042] The first device selects a key point corresponding to the first distance value with the largest value as a target key point.

[0043] The first device determines the second cropping window based on the request information, the reference point, the target key point and the first straight line, wherein the center point of the second cropping window is on the first straight line.

[0044] The first device determines the second area as an area where the second cropping window overlaps with the image to be transmitted.

[0045] The first device records information of the second area, wherein the information of the second area comprises size information of the second area and position information of the second area in the image to be transmitted.

[0046] The embodiment of the present application is characterized in that the first device determines a target display area and sends the target display area information to the second device, so that the second device can process the image received by the second device based on the target display area information, thereby making the image present the best visual effect on the display area of the second device, and solving the problem that the image is not adapted and the image presentation effect is affected due to the different shapes of the display areas of the two devices.

[0047] In a possible implementation, the first device targets the region of the image to be displayed as a target display region, including:

[0048] The first device determines the target display region of the image to be transmitted based on the request information and the position information of the M key points as the image to be transmitted;

[0049] The first device records the size information of the image to be transmitted.

[0050] In the embodiments of the present application, the first device determines the target display region and sends the target display region information to the second device, so that the second device can process the image received by the second device based on the target display region information, so as to make the image present the best visual effect on the display region of the second device, and solve the problem that the image is not adapted and the image presentation effect is affected due to the different shapes of the display regions (such as screens) of the two devices.

[0051] In a second aspect, the embodiments of the present application provide a method for image processing, including:

[0052] The second device sends request information to the first device; wherein the request information includes display region information of the second device;

[0053] The second device receives the target display region information sent by the first device; the target display region information includes size information of the target display region and position information of the target display region in the image to be transmitted;

[0054] The second device processes the image transmitted by the first device into a target display image based on the target display region information;

[0055] The second device presents the target display image on the display region of the second device.

[0056] In the embodiments of the present application, the second device processes the image received by the second device based on the target display region information, and obtains a target display image which is adapted to the display region of the second device, so as to solve the problem that the image is not adapted and the image presentation effect is affected due to the different shapes of the display regions of the two devices.

[0057] In a possible implementation, the second device processes the image to be transmitted into a target display image based on the target display region information, including:

[0058] If the target display region is a target first clipping window, the second device clips the image transmitted by the first device based on the target display region information, and obtains a clipped image;

[0059] The second device scales the cropped image based on the size of the target display area and the size of the second device display area to obtain a target display image.

[0060] If the target display area is a second area, the second device crops the image transmitted by the first device based on the target display area information to obtain a cropped image.

[0061] The second device scales the cropped image based on the size of the target display area and the size of the second device display area to obtain a target display image.

[0062] If the target display area is the area of the image to be displayed, the second device scales the image transmitted by the first device based on the size of the image transmitted by the first device and the size of the second device display area to obtain a target display image.

[0063] In the embodiments of the present application, the second device processes the image received by the second device based on the target display area information to obtain a target display image that is adapted to the second device display area, thereby solving the problem that the image is not adapted due to the different shapes of the display areas of the two devices, and further affecting the image presentation effect.

[0064] In a third aspect, the embodiments of the present application provide an image processing apparatus, which is a first device, and includes:

[0065] A receiving unit configured to receive request information of a second device.

[0066] An obtaining unit configured to obtain position information of M key points in an image to be transmitted.

[0067] A determining unit configured to determine a target display area in the image to be transmitted based on the request information and the position information of the M key points.

[0068] A sending unit configured to send the target display area information to the second device, so that the second device processes the image to be transmitted into a target display image based on the target display area information.

[0069] In a possible implementation manner, the determining unit includes:

[0070] A judging unit configured to judge whether there is one or more first cropping windows capable of including the M key points in the image to be transmitted.

[0071] A selecting unit configured to, after the judging unit judges that the answer is yes, select a target first cropping window from the one or more first cropping windows capable of including the M key points as the target display area.

[0072] an analysis unit, configured to analyze whether the second cropping window exists after the determination unit determines that the target display region does not exist;

[0073] a first determination unit, configured to take an overlapping region of the second cropping window and the to-be-transmitted image as the target display region after the analysis unit analyzes that the target display region exists;

[0074] a second determination unit, configured to take a region of the to-be-transmitted image as the target display region after the analysis unit analyzes that the target display region does not exist.

[0075] In a possible implementation, the selection unit includes:

[0076] a shape determination unit, configured to determine a shape of the first cropping window based on the request information;

[0077] a third determination unit, configured to determine one or more first cropping windows in the to-be-transmitted image based on the shape of the first cropping window and the positions of the M key points;

[0078] a first selection unit, configured to select a first cropping window with a largest size as a target first cropping window from the one or more first cropping windows;

[0079] a target display region determination unit, configured to determine an overlapping region of the target first cropping window and the to-be-transmitted image as the target display region;

[0080] a first recording unit, configured to record the target display region information.

[0081] In a possible implementation, the first determination unit includes:

[0082] a third cropping window acquisition unit, configured to acquire a third cropping window based on the request information;

[0083] an expansion unit, configured to expand a size of the current cropping window by a first value based on the position information of the M key points to obtain an expanded cropping window;

[0084] a straight line acquisition unit, configured to acquire a first straight line;

[0085] a sliding window scanning unit, configured to perform sliding window scanning on a geometric center of the expanded cropping window on the first straight line according to a preset step length between the first boundaries;

[0086] a first determination unit, configured to determine whether the expanded cropping window including the M key points exists after the sliding window scanning unit performs sliding window scanning on the expanded cropping window;

[0087] The fourth determining unit is configured to determine an area, in which the expanded clipping window including the M key points is overlapped with the to-be-transmitted image, as the second area.

[0088] The second recording unit is configured to record information of the second area.

[0089] In a possible implementation, the first determining unit comprises:

[0090] The reference point obtaining unit is configured to obtain a reference point in the to-be-transmitted image.

[0091] The calculating unit is configured to calculate distance values between the reference point and the M key points based on position information of the M key points, to obtain M first distance values.

[0092] The key point selecting unit is configured to select a key point corresponding to a first distance value with the largest value as a target key point.

[0093] The clipping window determining unit is configured to determine the second clipping window based on the request information, the reference point, the target key point and the first straight line.

[0094] The fifth determining unit is configured to determine an area, in which the second clipping window is overlapped with the to-be-transmitted image, as the second area.

[0095] The third recording unit is configured to record information of the second area.

[0096] In a possible implementation, the target display area determining unit comprises:

[0097] The sixth determining unit is configured to determine the target display area of the to-be-transmitted image as the to-be-transmitted image based on the request information and position information of the M key points.

[0098] The fourth recording unit is configured to record size information of the to-be-transmitted image.

[0099] In a fourth aspect, an image processing apparatus is provided, which is a second device and comprises:

[0100] The sending unit is configured to send request information to a first device.

[0101] The receiving unit is configured to receive target display area information sent by the first device.

[0102] The image processing unit is configured to process an image transmitted by the first device into a target display image based on the target display area information.

[0103] a presentation unit configured to present the target display image on the second device display area.

[0104] In a possible implementation manner, the image processing unit comprises:

[0105] a first cropping unit configured to, if the target display area is a second area, crop the image transmitted by the first device based on the target display area information to obtain a cropped image;

[0106] a first scaling unit configured to scale the cropped image based on a size of the target display area and a size of the second device display area to obtain a target display image;

[0107] a second cropping unit configured to, if the target display area is a second area, crop the image transmitted by the first device based on the target display area information to obtain a cropped image;

[0108] a second scaling unit configured to scale the cropped image based on a size of the target display area and a size of the second device display area to obtain a target display image;

[0109] a third scaling unit configured to, if the target display area is the area of the image to be displayed, scale the image transmitted by the first device based on a size of the image transmitted by the first device and a size of the second device display area to obtain a target display image.

[0110] In a fifth aspect, an embodiment of the present application provides an image processing device, the image processing device being a first device, comprising a memory and a processor;

[0111] The memory is configured to store program code, and the processor is configured to invoke the program code stored in the memory to execute the image processing method in the first aspect and various possible implementation manners thereof.

[0112] In a sixth aspect, an embodiment of the present application provides an image processing device, the image processing device being a second device, comprising a memory and a processor;

[0113] The memory is configured to store program code, and the processor is configured to invoke the program code stored in the memory to execute the image processing method in the second aspect and various possible implementation manners thereof.

[0114] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the image processing method in the first aspect and various possible implementation manners thereof, or implement the image processing method in the second aspect and various possible implementation manners thereof.

[0115] In an eighth aspect, an embodiment of the present application provides a computer program, which includes instructions. When the computer program is executed by a computer, the first device can perform the processes executed by the first device in the first aspect and various possible implementation manners thereof, or the second device can perform the processes executed by the second device in the second aspect and various possible implementation manners thereof.

[0116] In a ninth aspect, an embodiment of the present application provides a chip system, which includes a processor. The processor is configured to support the functions of the first device in the first aspect and various possible implementation manners thereof, or support the functions of the second device in the second aspect and various possible implementation manners thereof.

[0117] In a possible design, the chip system further includes a memory. The memory is configured to store necessary program instructions and data of the first device or the second device. The chip system can be composed of a chip, or include the chip and other discrete devices. BRIEF DESCRIPTION OF DRAWINGS

[0118] The following describes the drawings used in the embodiments of the present application.

[0119] Figure 1 FIG. 1 is a schematic diagram of a scenario of image processing provided by an embodiment of the present application;

[0120] Figure 2 FIG. 2 is a schematic diagram of a process of image processing provided by an embodiment of the present application;

[0121] Figure 3 FIG. 3 is a schematic diagram of a first clipping window provided by an embodiment of the present application;

[0122] Figure 4 FIG. 4 is a schematic diagram of sliding scanning provided by an embodiment of the present application;

[0123] Figure 5 FIG. 5 is a schematic diagram of a second clipping window provided by an embodiment of the present application;

[0124] Figure 6 FIG. 6 is a schematic diagram of a target display image provided by an embodiment of the present application;

[0125] Figure 7 FIG. 7 is a schematic diagram of a structure of an image processing apparatus provided by an embodiment of the present application;

[0126] Figure 8 is a structural schematic diagram of another image processing apparatus provided by an embodiment of the present application;

[0127] Figure 9 is a structural schematic diagram of an image processing device provided by an embodiment of the present application;

[0128] Figure 10 is a structural schematic diagram of another image processing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0129] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. In this document, the phrase "embodiments" means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears at various places in the specification is not necessarily referring to the same embodiments, nor is it necessarily mutually exclusive of other embodiments. It will be apparent to those skilled in the art from this disclosure that the embodiments described herein can be combined with other embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0130] The terms "first", "second", "third", etc. in the specification and claims of the present application and the drawings are to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a series of steps or units are included, or optionally, other steps or units not listed are included, or optionally, other steps or units inherent to the process, method, product or equipment are included.

[0131] Only parts related to the present application are shown in the drawings, rather than all. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The processes can be terminated when the operations are completed, but can also have additional steps not included in the drawings. The processes can correspond to methods, functions, procedures, subroutines, etc.

[0132] The terms "component," "module," "system," "unit," and the like as used herein are used to represent a computer-related entity, hardware, a combination of hardware and software, software, or software in execution. For example, a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a distributed system. In addition, these units can be executed from various computer-readable media having various data structures stored thereon. The units can communicate, for example, according to a signal having one or more data packets (for example, from a second unit interacting with a local system, a distributed system, and / or a network with another unit. For example, the Internet interacts with other systems through signals with other systems.

[0133] Please refer to Figure 1 , Figure 1 is a scene schematic diagram of image processing provided by an embodiment of the present application, in Figure 1 , the smart phone is a first device, and the smart watch is a second device. After a first user takes a selfie using the smart phone (the display area is a rectangular screen), the smart phone transmits a photo obtained by photographing to the smart watch. Because the screen shapes of the smart phone and the smart watch (the display area is a circular screen) are different, the shape of the photo is not adapted to the shape of the smart watch, resulting in a poor display effect of the photo on the smart watch. Therefore, the smart watch processes the photo received thereby, that is, the smart watch crops the photo into a circular shape adapted to the screen of the smart watch, and then presents the cropped photo on the smart watch to a second user. Through the above method, the photo can achieve the best presentation effect on the smart watch.

[0134] In the following, the entire flow and method of image processing are described in detail, Figure 2 , and Figure 2 is a flow schematic diagram of image processing. As Figure 2 indicated, a source terminal configures a corresponding display strategy for a to-be-transmitted image based on information of a display area of a target terminal and position information of key points of the to-be-transmitted image before transmitting the to-be-transmitted image to the target terminal, so that the visual presentation effect of the to-be-transmitted image in the target terminal is the best. Embodiments of the present application take the source terminal as a first device and the target terminal as a second device for example, and the specific flow of image processing is as follows:

[0135] Step S201: The first device receives request information of the second device.

[0136] Specifically, the first device receives request information of the second device before determining the target display area of the image to be transmitted, the request information comprising information of a display area of the second device, the information of the display area of the second device being obtained through interaction between the first device and the second device. The first device can determine the shape of the cropping window only after obtaining the information of the shape of the display area of the second device; the second device can be understood as a terminal that needs to display the image, such as the smart watch in the foregoing embodiments. The display area information can comprise the shape and size of the screen of the second device. The shape of the screen of the second device can be circular, elliptical, heart-shaped, etc., which are only examples.

[0137] Step S202: The first device obtains position information of M key points in the image to be transmitted.

[0138] Specifically, the M key points in the image to be transmitted can be understood as points where the key information is located, for example, the key information is a face image of a user, and the key point is the center point of the face image; the key information is a fruit (an apple), and the key point is the center point of the apple. Of course, the key point can also be a key region, which can be a region where the key information is located, for example, a region where the face image of the user is located, a region where the apple is located, etc. This is only an example and is not limited in particular.

[0139] The position information of the key points can be obtained through image processing techniques, such as image positioning techniques and feature extraction. Of course, the position information of the key points can also be obtained through other ways, such as through active marking by the user, etc.

[0140] Step S203: The first device determines the target display area of the image to be transmitted based on the request information and the position information of the M key points.

[0141] Specifically, the first device determines a target display area of the to-be-transmitted image according to information of a display area of the second device in the request information and position information of the key points in the to-be-transmitted image, the target display area being an area of the to-be-transmitted image displayed in the display area of the second device; wherein the information of the display area of the second device is used to determine the shape of the target display area, and the position information of the key points is used to determine the size and position of the target display area in the to-be-transmitted image; after determining the target display area, the first device records target display area information; wherein the target display area information includes size information of the target display area and position information of the target display area in the to-be-transmitted image, and the information of the target display area can indicate the shape, size and specific position of the target display area in the to-be-transmitted image. In the embodiments of the present application, the target display area is divided into three categories according to the relationship between the target display area and the to-be-transmitted image, and each category of target display area corresponds to a display strategy of the to-be-transmitted image in the second device, and the process of recording the target display area information by the first device is a configuration process of the display strategy.

[0142] The first device determines the shape of the clipping window according to the shape and other information of the display area of the second device in the request information, and the shape of the clipping window is the same as that of the display area in the target. For example, in the above embodiment, the second device is a smart watch, and the display area (screen) thereof is circular, so that the shape of the clipping window is circular to ensure that the shape of the overlapping area of the clipping window and the to-be-transmitted image (the overlapping area is the target display area) is consistent with the screen of the second device. The first device determines whether there is a first clipping window that can include the M key points and is completely covered by the to-be-transmitted image based on the information of the display area of the second device and the position information of the M key points. If the determination is yes, the first device determines that the target display area is the overlapping area of the first clipping window and the to-be-transmitted image, and the target display area is completely covered by the to-be-transmitted image. Then, the first device can determine the display strategy of the to-be-transmitted image in the second device as a first display strategy, and the first display strategy is used to indicate that the area of the to-be-transmitted image displayed in the second device is the overlapping area of the first clipping window and the to-be-transmitted image. After determining the target display area, the first device records the size information of the target display area and the position information of the target display area in the to-be-transmitted image, and completes the configuration of the first display strategy. As shown in Figure 3 The display area of the second device is circular, and the key points of the to-be-transmitted image are faces, so that the shape of the first clipping window is determined to be a circular clipping window according to the shape of the display area of the second device; in Figure 3In the specific implementation, the first device determines, based on the position of the face, that the circular cropping window in the rectangular to-be-transmitted image can include all the faces in the to-be-transmitted image; therefore, the first device determines the display strategy of the to-be-transmitted image in the second device as the first display strategy, and the first display strategy is used to indicate that the display area of the to-be-transmitted image in the second device is a circular area in which the circular cropping window and the to-be-transmitted image overlap; then, the first device records the coordinate information (X1, Y1) of the pixel at the center of the circular overlapping area and the radius R1 of the circular overlapping area, and completes the configuration of the first display strategy. It should be noted that the shape of the cropping window is determined by the shape of the display area of the second device, and the shape of the cropping window corresponding to different second devices can be different, and the shape and position of the target display area can also be different, therefore, the target display area information only needs to indicate the size and position in the to-be-transmitted image. For example, in the specific implementation, the first device can record the coordinate information (X1, Y1) of the pixel at the center of the circular overlapping area and the radius R1 of the circular overlapping area, to indicate the specific size and position of the circular overlapping area in the to-be-transmitted image. Figure 3 In the specific implementation, the first device records the coordinate information (X1, Y1) of the pixel at the center of the circular overlapping area and the radius R1 of the circular overlapping area, to indicate the specific size and position of the circular overlapping area in the to-be-transmitted image.

[0143] In a possible implementation, if there are multiple first cropping windows that can include the M key points in the to-be-transmitted image, the first device can select a first cropping window with the largest size from the multiple first cropping windows as a target first cropping window, determine the overlapping area of the target first cropping window and the to-be-transmitted image as a target display area, and record the information of the target display area, to complete the configuration of the first display strategy. For example, in the specific implementation, the first device can select a circular cropping window that is inscribed in the to-be-transmitted image as the target first cropping window, to complete the configuration of the first display strategy. Figure 3 In the specific implementation, the first device records the coordinate information (X1, Y1) of the pixel at the center of the circular overlapping area and the radius R1 of the circular overlapping area, to indicate the specific size and position of the circular overlapping area in the to-be-transmitted image.

[0144] In one possible implementation, the first device can determine the optimal first cropping window using a sliding window scanning method, and then configure a first display strategy. The first device scans along a first straight line with the geometric center of the first cropping window between the first boundaries of the image to be transmitted, according to a preset step size. The step size can be a fixed value or a variable value, obtained empirically or from historical data. The first straight line is a straight line passing through the center point of the image to be transmitted in a first direction, which is the positive direction in which the image is displayed in the display area of ​​the second device. There are multiple ways to determine the optimal first cropping window; for example, each time the first cropping window moves, the first device calculates a first set of distances from M key points to the center point of the moved first cropping window, and selects the first cropping window corresponding to the smallest first distance set as the optimal first cropping window; alternatively, the first cropping window where the M key points are relatively concentrated and located in the upper half of the moved first cropping window can be selected as the optimal first cropping window. This embodiment is only for illustrative purposes. For example, in... Figure 4 In the process, the circular cropping window, which is inscribed within the image to be transmitted, performs a sliding window scan downwards along the first straight line L1, moving K pixels at a time. When the coordinates of its center are (X2, Y2), its first distance set is minimized. The circular cropping window with the center coordinates (X2, Y2) is determined as the optimal first cropping window, and the overlapping area between it and the image to be transmitted is determined as the target display area. The information of the target display area, such as the center coordinates (X2, Y2) and the radius R2, is recorded to complete the configuration of the first display strategy.

[0145] The first device determines, based on the information of the second device's display area and the position information of M key points, whether a first cropping window exists that includes the M key points and is completely covered by the image to be transmitted. If the determination is negative, the first device analyzes, based on the information of the second device's display area and the position information of the M key points, whether a second cropping window exists that includes the M key points and is partially covered by the image to be transmitted. If the analysis is positive, the first device determines the target display area as the overlapping area between the second cropping window and the image to be transmitted, wherein the target display area is partially covered by the image to be transmitted. Then, the first device determines the display strategy for the image to be transmitted in the second device as a second display strategy, which indicates that the area displayed in the second device is the overlapping area between the second cropping window and the image to be transmitted. After determining the target display area, the first device records the size information of the target display area and the position information of the target display area in the image to be transmitted, thus completing the configuration of the second display strategy. There are two main methods for determining the second cropping window:

[0146] In a possible implementation, the first device determines, based on information such as the shape of the second device display area, a maximum cropping window in the image to be transmitted that is of the same shape as the second device display area and is covered by the image to be transmitted, the maximum cropping window being a third cropping window, and the third cropping window being a current cropping window. Then, the first device enlarges the size of the current cropping window by a first value to obtain an enlarged cropping window, that is, a second cropping window. The first value can be fixed or variable. The first value can be obtained based on experience, history, or position information of the key points, which is not limited in the embodiments of the present application. Then, the second cropping window is scanned in a sliding window manner, and it is determined whether the second cropping window after movement can include the M key points. If the determination result is yes, the overlapping area of the second cropping window after movement and the image to be transmitted is determined as the target display area, and information of the target display area is recorded, and the configuration of the second display strategy is completed. If the determination result is no, the step of enlarging the size of the current cropping window by the first value to obtain the enlarged cropping window is repeatedly performed until the second cropping window that can include the M key points is determined.

[0147] In a possible implementation, the first device determines a reference point of the image to be transmitted, and the reference point is a first intersection point of a first straight line and a boundary of the image to be transmitted. The first intersection point can be selected based on position information of the key points or obtained based on other factors such as the best presentation effect of the image to be displayed, which is not limited in the embodiments of the present application. Then, the first device calculates M first distance values from the M key points to the reference point based on the positions of the M key points, and selects a key point with the largest first distance value as a target key point. The first device determines, based on information such as the shape of the second device display area, position information of the reference point, position information of the target key point, and the first straight line, a second cropping window that is of the same shape as the second device display area and can include the M key points, and the center point of the second cropping window is on the first straight line. Then, the first device determines, as the target display area, an overlapping area of the second cropping window and the image to be transmitted, records information of the target display area, and completes the configuration of the second display strategy. As shown in Figure 5 As shown in the figure, the key points of the image to be transmitted are faces, the first straight line is L1, the straight line L1 has two intersection points A and B with the upper and lower boundaries of the image to be displayed in the vertical direction, and based on the visual presentation effect of the image (the key points are as far below the target display area as possible, and the visual effect of the target display area is better), the point A is determined as the first intersection point, and the point A is selected as the reference point. Then, the first device calculates distances from the faces in the image to be transmitted to the point A, and selects a face C with the largest distance as the target key point. The first device determines a point M on the straight line L1, so that the farthest distance between the edge of the face C and the point M is equal to the distance between the point M and the point A, that is, the center of the second cropping window is M, and the radius R is AM.

[0148] If the first device analyzes that there is no second cropping window that can include the M key points and can be covered by the image to be transmitted based on the information of the display area of the second device and the position information of the M key points, the first device determines that the display strategy of the image to be transmitted in the second device is a third display strategy, and the third display strategy is used to indicate that the area of the image to be transmitted displayed in the second device is the entire image to be transmitted.

[0149] Step S204: The first device sends the target display area information to the second device.

[0150] Step S205: The second device processes the image transmitted by the first device based on the target display area information to obtain a target display image.

[0151] Specifically, after the second device decodes the image received by the first device, the second device processes the image according to the size information of the target display area in the target display area information and the position information of the target display area in the image to be transmitted to obtain a processed target display image. When the display strategy configured by the first device is the first display strategy or the second display strategy, the first device crops the image decoded by the first device based on the size information of the target display area in the target display area information and the position information of the target display area in the image received by the first device to obtain a cropped image, and scales the cropped image based on the size of the display area of the second device to obtain a target display image. As shown in Figure 6 the display strategy configured by the first device is the first display strategy, the target display area information includes the coordinate information (X2, Y2) of the center O2 and the radius R2, the first device finds a pixel point with the coordinate (X2, Y2) in the image decoded by the first device, and determines the pixel point as a target pixel point; then, the first device takes the pixel point as the center and makes a circle with the radius R2, and retains the overlapping area of the circle and the image, and the overlapping area is the target display area of the image, and the obtained image is the cropped image. Then, the first device scales the cropped image based on the size of the screen of the first device and the size of the cropped image, so that the ratio of the cropped image to the screen of the second device is 1:1, and the scaled image is the target display image.

[0152] When the display strategy configured by the first device is the third display strategy, since the target display area of the image decoded by the second device is the image received by the second device itself, the second device scales the image received by the second device based on the size information of the image received by the second device and the size information of the screen of the second device, so that the image received by the second device is completely covered by the screen of the second device, and the scaled image is the target display image.

[0153] Step S206: The second device presents the target display image on the display area of the second device.

[0154] In the embodiment of the present application, the first device configures a display strategy for the image to be transmitted based on the information of the display area of the second device, and sends the target display area information to the second device, so that the second device can process the image to be transmitted according to the target display area information, obtain a target display image that is more suitable for the display area (such as a screen) of the second device, and provide a better visual effect for the user. The problem that the image transmitted by the first device to the second device is not suitable for the second device due to the different display areas (such as different screen shapes, different screen sizes, and different screen resolutions) of the first device and the second device, and affects the visual presentation effect is solved.

[0155] The above describes the method of the embodiment of the present application in detail, and the related device, equipment, computer readable storage medium, computer program, and chip system of the embodiment are provided below.

[0156] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of an image processing device provided by the embodiment of the present application. The image processing device 7 can be the first device in the above embodiment. The image processing device 7 can include a receiving unit 701, an obtaining unit 702, a determining unit 703, and a sending unit 704. The detailed description of each unit is as follows:

[0157] The receiving unit 701 is configured to receive the request information of the second device.

[0158] The obtaining unit 702 is configured to obtain the position information of M key points in the image to be transmitted.

[0159] The determining unit 703 is configured to determine a target display area in the image to be transmitted based on the request information and the position information of the M key points.

[0160] The sending unit 704 is configured to send the target display area information to the second device, so that the second device processes the image to be transmitted into a target display image based on the target display area information.

[0161] In a possible implementation manner, the determining unit 703 includes:

[0162] The judging unit is configured to judge whether there is one or more first clipping windows that can include the M key points in the image to be transmitted.

[0163] The selecting unit is configured to, after the judging unit judges that the answer is yes, select a target first clipping window from the one or more first clipping windows that can include the M key points as the target display area.

[0164] The analysis unit is configured to analyze whether the second cropping window exists after the judgment unit judges that the answer is no.

[0165] The first determination unit is configured to take an overlapping region of the second cropping window and the to-be-transmitted image as the target display region after the analysis unit analyzes that the answer is yes.

[0166] The second determination unit is configured to take a region of the to-be-transmitted image as the target display region after the analysis unit analyzes that the answer is no.

[0167] In a possible implementation, the selection unit includes:

[0168] The shape determination unit is configured to determine the shape of the first cropping window based on the request information.

[0169] The third determination unit is configured to determine one or more first cropping windows in the to-be-transmitted image based on the shape of the first cropping window and the positions of the M key points.

[0170] The first selection unit is configured to select a first cropping window with the largest size as a target first cropping window from the one or more first cropping windows.

[0171] The target display region determination unit is configured to determine an overlapping region of the target first cropping window and the to-be-transmitted image as the target display region.

[0172] The first recording unit is configured to record the target display region information.

[0173] In a possible implementation, the first determination unit includes:

[0174] The third cropping window acquisition unit is configured to acquire a third cropping window based on the request information.

[0175] The expansion unit is configured to expand the size of the current cropping window by a first value based on the position information of the M key points to obtain an expanded cropping window.

[0176] The straight line acquisition unit is configured to acquire a first straight line.

[0177] The sliding window scanning unit is configured to perform sliding window scanning on the geometric center of the expanded cropping window on the first straight line according to a preset step length between the first boundaries.

[0178] The first judgment unit is configured to judge whether the expanded cropping window including the M key points exists after the sliding window scanning unit performs sliding window scanning on the expanded cropping window.

[0179] A fourth determining unit is configured to determine a region overlapped by the expanded clipping window including the M key points and the to-be-transmitted image as the second region.

[0180] A second recording unit is configured to record information of the second region.

[0181] In a possible implementation, the first determining unit includes:

[0182] A reference point obtaining unit is configured to obtain a reference point in the to-be-transmitted image.

[0183] A calculating unit is configured to calculate distance values between the reference point and the M key points based on position information of the M key points, to obtain M first distance values.

[0184] A key point selecting unit is configured to select a key point corresponding to a first distance value with the largest value as a target key point.

[0185] A clipping window determining unit is configured to determine the second clipping window based on the request information, the reference point, the target key point, and the first straight line.

[0186] A fifth determining unit is configured to determine a region overlapped by the second clipping window and the to-be-transmitted image as the second region.

[0187] A third recording unit is configured to record information of the second region.

[0188] In a possible implementation, the target display region determining unit includes:

[0189] A sixth determining unit is configured to determine the target display region of the to-be-transmitted image as the to-be-transmitted image based on the request information and position information of the M key points.

[0190] A fourth recording unit is configured to record size information of the to-be-transmitted image.

[0191] See Figure 8 , Figure 8 is a structural schematic diagram of an image processing apparatus provided by an embodiment of the present application. The image processing apparatus 8 can be the second device in the above embodiment. The image processing apparatus 8 can include a sending unit 801, a receiving unit 802, an image processing unit 803, and a presentation unit 804. Detailed descriptions of each unit are as follows.

[0192] The sending unit 801 is configured to send request information to a first device.

[0193] The receiving unit 802 is configured to receive target display region information sent by the first device.

[0194] an image processing unit 803, configured to process the image to be transmitted into a target display image based on the target display region information;

[0195] a presentation unit 804, configured to present the target display image on the second device display region.

[0196] In a possible implementation, the image processing unit 803 comprises:

[0197] a first clipping unit, configured to clip the image transmitted by the first device based on the target display region information to obtain a clipped image, if the target display region is the second region;

[0198] a first scaling unit, configured to scale the clipped image based on the size of the target display region and the size of the second device display region to obtain the target display image;

[0199] a second clipping unit, configured to clip the image transmitted by the first device based on the target display region information to obtain a clipped image, if the target display region is the second region;

[0200] a second scaling unit, configured to scale the clipped image based on the size of the target display region and the size of the second device display region to obtain the target display image;

[0201] a third scaling unit, configured to scale the image transmitted by the first device based on the size of the image transmitted by the first device and the size of the second device display region to obtain the target display image, if the target display region is the region of the image to be displayed.

[0202] Please refer to Figure 9 , Figure 9 is a structural schematic diagram of an image processing device provided by an embodiment of the present application. The image processing device 9 can be the first device in the above method embodiment. The image processing device 9 can comprise a memory 901, a communication module 902 and a processor 903. The detailed description of each unit is as follows.

[0203] The memory 901 is configured to store program code.

[0204] The processor 903 is configured to invoke the program code stored by the memory to perform the following steps:

[0205] receive the request information of the second device through the communication module 902;

[0206] obtain the position information of M key points in the image to be transmitted;

[0207] determine a target display region in the image to be transmitted based on the request information and the position information of the M key points;

[0208] send the target display region information to the second device through the communication module 902, so that the second device processes the image to be transmitted into a target display image based on the target display region information.

[0209] In a possible implementation, the processor 903 determines a target display region in the image to be transmitted based on the request information and the position information of the M key points, including:

[0210] determining whether there is one or more first cropping windows capable of including the M key points in the image to be transmitted;

[0211] if the determination is yes, selecting a target first cropping window from the one or more first cropping windows capable of including the M key points as the target display region;

[0212] if the determination is no, analyzing whether there is a second cropping window;

[0213] if the analysis is yes, taking an overlapping region of the second cropping window and the image to be transmitted as the target display region; the overlapping region is smaller than a region of the image to be transmitted;

[0214] if the analysis is no, taking a region of the image to be transmitted as the target display region.

[0215] In a possible implementation, the processor 903 selects a target first cropping window from the one or more first cropping windows capable of including the M key points as the target display region, including:

[0216] determining a shape of the first cropping window based on the request information;

[0217] determining one or more first cropping windows in the image to be transmitted based on the shape of the first cropping window and the position of the M key points;

[0218] selecting a first cropping window with the largest size from the one or more first cropping windows as the target first cropping window;

[0219] determining an overlapping region of the target first cropping window and the image to be transmitted as the target display region;

[0220] recording the target display region information.

[0221] In a possible implementation, the processor 903 displays the second cropping window and an overlapping area of the image to be transmitted as a target display area, including:

[0222] obtaining a third cropping window based on the request information;

[0223] enlarging a size of the current cropping window by a first value based on the position information of the M key points to obtain an enlarged cropping window;

[0224] obtaining a first straight line;

[0225] between the first boundaries, sliding and scanning the geometric center of the enlarged cropping window on the first straight line according to a preset step length, to determine whether the enlarged cropping window including the M key points exists; if the determination result is no, repeating the step of enlarging the size of the current cropping window by the first value based on the position information of the M key points to obtain the enlarged cropping window until the determination result is yes, that is, the enlarged cropping window including the M key points exists;

[0226] determining an area, in which the enlarged cropping window including the M key points overlaps the image to be transmitted, as the second area;

[0227] recording information of the second area.

[0228] In a possible implementation, the processor 903 displays the second cropping window and an overlapping area of the image to be transmitted as a target display area, including:

[0229] obtaining a first straight line;

[0230] obtaining a reference point in the image to be transmitted;

[0231] calculating distance values between the reference point and the M key points based on the position information of the M key points to obtain M first distance values;

[0232] selecting a key point corresponding to a first distance value with the largest value as a target key point;

[0233] determining the second cropping window based on the request information, the reference point, the target key point, and the first straight line;

[0234] determining an area, in which the second cropping window overlaps the image to be transmitted, as the second area;

[0235] recording information of the second area.

[0236] In a possible implementation, the processor 903 displays the image to be displayed as a target display area, including:

[0237] determine, based on the request information and the position information of the M key points, a target display region of the image to be transmitted as the image to be transmitted;

[0238] record size information of the image to be transmitted.

[0239] Please refer to Figure 10 , Figure 10 is a structural schematic diagram of an image processing device provided by an embodiment of the present application. The image processing device 10 can be the second device in the method embodiment described above. The image processing device 10 can include a memory 1001, a communication module 1002, and a processor 1003. The detailed description of each unit is as follows.

[0240] The memory 1001 is configured to store program code.

[0241] The processor 1003 is configured to invoke the program code stored in the memory to perform the following steps:

[0242] send request information to the first device through the communication module 1002;

[0243] receive target display region information sent by the first device through the communication module 1002;

[0244] process the image to be transmitted into a target display image based on the target display region information;

[0245] present the target display image on the display region of the second device.

[0246] In a possible implementation, the processor 1003 processes the image to be transmitted by the first device into a target display image based on the target display region information, including:

[0247] if the target display region is a target first cropping window, cropping the image to be transmitted by the first device based on the target display region information to obtain a cropped image;

[0248] scaling the cropped image based on the size of the target display region and the size of the display region of the second device to obtain a target display image;

[0249] if the target display region is a second region, cropping the image to be transmitted by the first device based on the target display region information to obtain a cropped image;

[0250] scaling the cropped image based on the size of the target display region and the size of the display region of the second device to obtain a target display image;

[0251] If the target display region is a region of the image to be displayed, the image transmitted by the first device is scaled based on a size of the image transmitted by the first device and a size of the display region of the second device, to obtain a target display image.

[0252] The embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the image processing method in the above embodiment and various possible implementation manners thereof.

[0253] The embodiment of the present application provides a computer program, which includes instructions. When the computer program is executed by a computer, the first device can perform the process performed by the first device in the above embodiment and various possible implementation manners thereof, or the second device can perform the process performed by the second device in the above embodiment and various possible implementation manners thereof.

[0254] The embodiment of the present application provides a chip system, which includes a processor. The processor is configured to support the functions of the first device in implementing the method in the above embodiment and various possible implementation manners thereof, or the functions of the second device in implementing the method in the above embodiment and various possible implementation manners thereof.

[0255] In a possible design, the chip system further includes a memory. The memory is configured to store necessary program instructions and data of the first device or the second device. The chip system can be composed of a chip, or can include the chip and other discrete devices.

[0256] It should be noted that the memory in the above embodiment can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage medium or other magnetic storage devices, or any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory can exist independently and be connected to the processor through a bus. The memory can be integrated with the processor.

[0257] The processor in the above-described embodiments can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the above solutions.

[0258] For each method embodiment described above, in order to simply describe, it is expressed as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0259] In several embodiments provided by the present application, it should be understood that the disclosed apparatus can be implemented in other manners. For example, the apparatus embodiments described above are merely schematic; the division of the above-described units is only a logical function division; an actual implementation can be another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0260] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, and can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0261] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0262] The integrated unit described above, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of software. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in the computer device) to execute all or part of the steps of the above-mentioned method of each embodiment of the present application. Among them, the aforementioned storage medium can include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (read-only memory, ROM) or random access memory (random access memory, RAM) and various program code storage media.

[0263] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of image processing, characterized by, The method comprises: A first device receives request information of a second device; wherein the request information comprises information of a display area of the second device; The first device obtains position information of M key points in a to-be-transmitted image; The first device determines a target display area in the to-be-transmitted image based on the request information and the position information of the M key points; The first device sends target display area information to the second device, so that the second device processes the to-be-transmitted image into a target display image based on the target display area information; The target display area information comprises size information of the target display area and position information of the target display area in the to-be-transmitted image; The first device determines a target display area in the to-be-transmitted image based on the request information and the position information of the M key points, comprising: in the case that there is no first cropping window in the to-be-transmitted image that can include the M key points; the first cropping window is the same in shape as the display area of the second device; the first device then analyzes whether there is a second cropping window; the second cropping window includes the M key points, the second cropping window is not completely covered by the to-be-transmitted image, and the second cropping window is the same in shape as the display area of the second device; If the analysis is yes, the first device takes an overlapping area between the second cropping window and the to-be-transmitted image as the target display area; and the overlapping area is smaller than the area of the to-be-transmitted image; The first device takes the overlapping area between the second cropping window and the to-be-transmitted image as the target display area, comprising: The first device obtains a third cropping window based on the request information; the third cropping window is the largest cropping window in the to-be-transmitted image, the third cropping window is the same in shape as the display area of the second device, the third cropping window is taken as a current cropping window, the first device enlarges the size of the current cropping window by a first value based on the position information of the M key points to obtain an enlarged cropping window, the enlarged cropping window is a second cropping window, the first device obtains a first straight line; the first straight line is a straight line passing through the center point of the to-be-transmitted image in a first direction, the first direction is the positive direction of the image presented by the display area of the second device, the first device performs sliding window scanning on the geometric center of the second cropping window on the first straight line between first boundaries according to a preset step length, and judges whether there is the second cropping window including the M key points; if the judgment is no, the first device repeats the step of enlarging the size of the current cropping window by the first value based on the position information of the M key points until it is judged that there is the second cropping window including the M key points; or The first device obtains a first straight line; the first straight line is a straight line passing through a center point of the image to be transmitted in a first direction, and the first direction is a positive direction of the image displayed on the display area of the second device; the first device obtains a reference point in the image to be transmitted; the reference point is a first intersection point of the first straight line and a boundary of the image to be transmitted; the first device calculates distance values between the reference point and the M key points based on the position information of the M key points, to obtain M first distance values; the first device selects a key point corresponding to a first distance value with the largest value as a target key point; and the first device determines the second cropping window based on the request information, the reference point, the target key point, and the first straight line; wherein a center point of the second cropping window is on the first straight line.

2. The method of claim 1, wherein, The target display area is a target first cropping window; the target first cropping window is a window selected from one or more first cropping windows that can include the M key points, based on the request information and the position information of the M key points; The first cropping window is completely covered by the image to be transmitted; the first cropping window has the same shape as the display area of the second device; or The target display area is a second area; the second area is an overlapping area of a second cropping window and the image to be transmitted, the second cropping window includes the M key points, the second cropping window is not completely covered by the image to be transmitted, and the second cropping window has the same shape as the display area of the second device; or The target display area is a region of the image to be transmitted.

3. The method of claim 1 or 2, wherein, The first device determines a target display area in the image to be transmitted based on the request information and the position information of the M key points, including: The first device determines whether there is one or more first cropping windows that can include the M key points in the image to be transmitted; the first cropping window has the same shape as the display area of the second device; If the determination is yes, the first device selects a target first cropping window from the one or more first cropping windows that can include the M key points as the target display area; If the first device analyzes that there is no second cropping window, the first device selects a region of the image to be transmitted as the target display area.

4. The method of claim 3, wherein, The first device selects a target first cropping window from the one or more first cropping windows that can include the M key points as the target display area, including: The first device determines the shape of the first cropping window based on the request information; The first device determines one or more first cropping windows in the image to be transmitted based on the shape of the first cropping window and the positions of the M key points; The first device selects a first cropping window with the largest size from the one or more first cropping windows as the target first cropping window; The first device determines an overlapping area of the target first cropping window and the image to be transmitted as the target display area; and The first device transmits the target display area to the second device. The first device records the target display area information; wherein the target display area information comprises size information of the target display area and position information of the target display area in the image to be transmitted.

5. The method of claim 1, wherein, The first device takes the overlapping area of the second cropping window and the image to be transmitted as the target display area, and further comprises: The first device determines the area where the second cropping window overlaps with the image to be transmitted as a second area; The first device records information of the second area; wherein the information of the second area comprises size information of the second area and position information of the second area in the image to be transmitted.

6. The method of claim 3, wherein, The first device takes an area of the image to be transmitted as the target display area, comprising: The first device determines the target display area of the image to be transmitted based on the request information and the position information of the M key points as the image to be transmitted; The first device records size information of the image to be transmitted.

7. A method of image processing, characterized by, Comprising: The second device sends request information to the first device; wherein the request information comprises display area information of the second device; The second device receives target display area information sent by the first device; the target display area information comprises size information of the target display area and position information of the target display area in the image transmitted by the first device; The second device processes the image transmitted by the first device into a target display image based on the target display area information; The second device presents the target display image on the display area of the second device; The second device processes the image transmitted by the first device into a target display image based on the target display area information, comprising: if the target display area is a second area, the second device crops the image transmitted by the first device based on the target display area information to obtain a cropped image; the second area is not the same shape as the display area of the second device; the second device scales the cropped image based on the size of the target display area and the size of the display area of the second device to obtain a target display image; If the target display area is a second area, the target display area is an overlapping area of a second cropping window and an image to be transmitted; the second cropping window is obtained in the following way: The first device obtains a third clipping window based on the request information; the third clipping window is a maximum clipping window in the image to be transmitted, and the shape of the third clipping window is the same as the shape of the display area of the second device; the third clipping window is a current clipping window; the first device enlarges the size of the current clipping window by a first value based on the position information of the M key points to obtain an enlarged clipping window; the enlarged clipping window is a second clipping window; the first device obtains a first straight line; the first straight line is a straight line passing through the center point of the image to be transmitted in a first direction, and the first direction is a positive direction of the image presented by the display area of the second device; the first device performs sliding window scanning on the geometric center of the second clipping window on the first straight line according to a preset step length between the first boundaries, and judges whether the second clipping window including the M key points exists; if the judgment is no, the first device repeats the step of enlarging the size of the current clipping window by a first value based on the position information of the M key points until it is judged that the second clipping window including the M key points exists; or, The first device obtains a first straight line; the first straight line is a straight line passing through the center point of the image to be transmitted in a first direction, and the first direction is a positive direction of the image presented by the display area of the second device; the first device obtains a reference point in the image to be transmitted; the reference point is a first intersection point of the first straight line and the boundary of the image to be transmitted; the first device calculates the distance values between the reference point and the M key points based on the position information of the M key points to obtain M first distance values; the first device selects the key point corresponding to the first distance value with the largest value as a target key point; the first device determines the second clipping window based on the request information, the reference point, the target key point and the first straight line; wherein the center point of the second clipping window is on the first straight line.

8. The method of claim 7, wherein, The second device processes the image transmitted by the first device into a target display image based on the target display area information, comprising: If the target display area is a target first clipping window, the second device clips the image transmitted by the first device based on the target display area information to obtain a clipped image; The second device scales the clipped image based on the size of the target display area and the size of the display area of the second device to obtain a target display image.

9. The method of claim 7, wherein, The second device processes the image transmitted by the first device into a target display image based on the target display area information, comprising: if the target display area is a region of the image to be transmitted, the second device scales the image based on the size of the image transmitted by the first device and the size of the display area of the second device to obtain a target display image.

10. The method according to any one of claims 7 to 9, characterized in that, The target display area information includes the target display area information obtained by the method of any one of claims 1-6.

11. An apparatus for image processing, characterized by The image processing apparatus is a first device comprising units for performing the image processing method according to any one of claims 1-6.

12. An apparatus for image processing, characterized by The image processing apparatus is a second device comprising units for performing the image processing method according to any one of claims 7-10.

13. An apparatus for image processing, characterized by The image processing device is a first device comprising a memory and a processor; The memory is configured to store program codes, and the processor is configured to invoke the program codes stored in the memory to perform the image processing method according to any one of claims 1-6.

14. An apparatus for image processing, characterized by The image processing device is a second device comprising a memory and a processor; The memory is configured to store program codes, and the processor is configured to invoke the program codes stored in the memory to perform the image processing method according to any one of claims 7-10.

15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, which, when executed by a processor, implements the image processing method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Dynamically Cropping Images

    US20130069980A1

  • Electronic device configured to non-uniformly encode / decode image data according to display shape

    US20170105009A1

Cited By

  • Image processing method, related apparatus, device, and computer-readable storage medium

    WO2022152284A1