Image processing method and device, electronic equipment and computer readable storage medium
By performing the outline and composition processing of the image, the target area is determined and cropped, the problem of low image composition processing efficiency in the existing technologies has been solved, and the composition image that meets the user's expectations is achieved quickly, and the user experience is improved.
Patent Information
- Application Number
- CN202310886235.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-01-21
AI Technical Summary
The image composition processing method in the prior art is inefficient and cannot quickly obtain composition images that meet users' expectations, which affects the experience in actual applications.
By performing the contour identification of the image, the contour frame of the human body is determined. Based on the human contour box and the reference composition box, the target area is made in the image to obtain the target image.
The efficiency of generating different composition images is improved, and it is convenient to quickly obtain images that meet the expectations of users, and enhance the user's sense of experience.
Smart Images

Figure CN119338846A_ABST
Abstract
Description
Background Art
[0002] With the rapid development of imaging technology, the functions of imaging equipment are becoming more and more powerful, and users' requirements for image quality are gradually increasing. In order to obtain more aesthetic images, it is necessary to process the image composition. Composition processing is to select and arrange the elements and objects in the image to achieve the effects of highlighting the subject, explaining the background, depicting emotions, and beautifying the image.
[0003] However, the image composition processing method in the related art has the disadvantages of low efficiency and failure to quickly obtain a composition image that meets the user's expectations, which affects the user experience in actual applications. Summary of the invention
[0004] The purpose of the present disclosure is to provide an image processing method, an image processing device, an electronic device and a computer-readable storage medium, thereby improving the efficiency of generating images of different compositions at least to a certain extent, and conveniently and quickly obtaining images that meet user expectations.
[0005] According to a first aspect of the present disclosure, there is provided an image processing method, comprising: performing human body contour recognition on an image to determine a human body contour frame of the image; composing a regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image; determining at least one target region in the image based on the human body contour frame and the reference composition frame, and cropping the at least one target region to obtain at least one target image.
[0006] According to a second aspect of the present disclosure, there is provided an image processing device, comprising: a contour recognition module, used to perform human contour recognition on an image to determine a human contour frame of the image; a composition processing module, used to compose a regional image corresponding to the human contour frame in the image to obtain a reference composition frame of the regional image; and an image generation module, used to determine at least one target region in the image based on the human contour frame and the reference composition frame, and to crop the at least one target region to obtain at least one target image.
[0007] According to a third aspect of the present disclosure, an electronic device is provided, characterized in that it includes: a processor; and a memory for storing one or more programs, which enables the one or more processors to implement the above method when the one or more programs are executed by the one or more processors.
[0008] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.
[0009] The image processing method provided by the embodiment of the present disclosure, on the one hand, composes the area image corresponding to the human body contour frame obtained by performing human body contour recognition on the image to obtain a reference composition frame, and determines at least one target area in the image based on each reference composition frame and the corresponding human body contour frame for cropping to obtain at least one target image. This process can obtain multiple target images and each target image includes a different human body, that is, composition images that maintain beauty and contain different image contents can be obtained at the same time, and the efficiency of generating different composition images is high; on the other hand, since multiple composition images can be obtained for the same image at the same time, it is easier to provide a composition result that meets the user's expectations, thereby improving the user's usage experience to a certain extent.
[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0012] Figure 1 A schematic diagram schematically illustrates an exemplary application environment involved in an image processing method and apparatus according to an exemplary embodiment of the present disclosure.
[0013] Figure 2 A schematic diagram schematically illustrates an exemplary application environment involved in another image processing method and apparatus according to an exemplary embodiment of the present disclosure.
[0014] Figure 3 The flowchart schematically shows an image processing method in an exemplary embodiment of the present disclosure.
[0015] Figure 4 A schematic diagram schematically illustrates an expanded frame boundary in an exemplary embodiment of the present disclosure.
[0016] Figure 5 A schematic diagram schematically illustrates a method of composing a regional image corresponding to a human body contour frame in an image in an exemplary embodiment of the present disclosure.
[0017] Figure 6 The flowchart schematically shows an implementation method of confirming a human body contour frame of an image in an exemplary embodiment of the present disclosure.
[0018] Figure 7 The following is a schematic diagram schematically showing a method for determining a human body contour frame in an exemplary embodiment of the present disclosure.
[0019] Figure 8 The flowchart schematically shows an implementation manner of determining a reference composition frame in an exemplary embodiment of the present disclosure.
[0020] Fig. 9 A flowchart schematically illustrates an implementation method of determining a target image based on a human body contour frame and a reference composition frame in an exemplary embodiment of the present disclosure.
[0021] Fig.10 A schematic diagram schematically illustrates a method of determining a target area based on an aesthetic score in an exemplary embodiment of the present disclosure.
[0022] Fig.11 A complete flowchart of an image processing method in an exemplary embodiment of the present disclosure is schematically shown.
[0023] Fig.12 Schematically illustrates an exemplary embodiment of the present disclosure Fig.11 Data flow diagram of the image processing method.
[0024] Fig.13 The following is a schematic diagram schematically showing the composition of an image processing device in an exemplary embodiment of the present disclosure.
[0025] Fig.14 A schematic diagram of an electronic device to which the embodiments of the present disclosure can be applied is shown. DETAILED DESCRIPTION
[0026] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0027] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0028] Figure 1 A schematic diagram showing an exemplary application environment involved in an image processing method and apparatus according to an embodiment of the present disclosure.
[0029] like Figure 1 As shown, the terminal device can be an intelligent device with image processing function, for example, it can be a smart phone, computer, tablet computer, smart watch, vehicle-mounted device, wearable device, monitoring equipment and other intelligent devices. The terminal device can also be called a mobile terminal, terminal, mobile device, etc. The present disclosure does not limit the type of terminal device.
[0030] The image to be processed in the embodiment of the present disclosure may be obtained by photographing a terminal device, or may be an image obtained from a network or other device, and there is no special limitation on this. In the embodiment of the present disclosure, the image processing device of the terminal device may perform human body contour recognition on the image based on the image processing method of the embodiment of the present disclosure to determine the human body contour frame of the image; compose the regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image; determine at least one target area in the image based on the human body contour frame and the reference composition frame, and crop the at least one target area to obtain at least one target image.
[0031] It should be noted that the image processing method provided in the embodiment of the present disclosure can be executed by a terminal device. The image processing method provided in the embodiment of the present disclosure can also be executed by a server, and accordingly, the image processing device can also be set in the server. Figure 2 As shown, the terminal device can send an image to the server, so that the server processes the image based on the image processing method of the embodiment of the present disclosure, and sends the obtained at least one target image to the terminal device. The server can be a background system that provides image processing related services in the embodiment of the present disclosure, and can include a portable computer, a desktop computer, a smart phone, etc., with a computing function, or a cluster formed by multiple electronic devices. In the embodiment of the present disclosure, the image processing method is executed by the terminal device as an example for description.
[0032] Composition is to select and arrange the elements and objects contained in the image to achieve the purpose of highlighting the subject, explaining the background, depicting emotions, beautifying the image, etc. In the related art, the composition of the image includes a composition method based on a saliency map and a composition method based on aesthetics. For example, a composition template can be created, and a fast composition can be achieved based on the affine of the composition template and the corresponding key points in the image to be processed, or based on the golden section composition, the rule of thirds composition, etc. However, the composition method of the related art is difficult to efficiently obtain the composition image result that meets the user's expectations, and the generation efficiency of the composition image is low.
[0033] Based on one or more of the above problems, the exemplary embodiments of the present disclosure provide an image processing method. Figure 3 As shown, the image processing method may include the following steps S310 to S330:
[0034] In step S310, human body contour recognition is performed on the image to determine a human body contour frame of the image.
[0035] In an exemplary embodiment of the present disclosure, the image can be obtained in any of the following ways: shooting with an imaging device, downloading from the network, obtaining from other terminal devices, etc. Human body contour recognition on an image includes face contour recognition and body contour recognition, and a human body contour frame refers to a rectangular frame circumscribed with a human body in the image, such as a rectangular frame circumscribed with a face and a rectangular frame circumscribed with a body.
[0036] The human body contour frame may be a human face contour frame including only the human face, a body contour frame including only the body, or a contour frame including both the human face and the body. It is worth noting that the human face and the body of the same object are located in the same human body contour frame.
[0037] Among them, the face detection network model and the body detection network model can be used to perform face detection and body detection on the image respectively, and then determine the human body contour frame according to the obtained face detection results and body detection results. The face detection network model and the body detection network model can be pre-trained network models, such as CNN (Convolutional Neural Networks), RNN (Recurrent Neural Network), DBN (Deep Belief Network), Deep Auto Encoder (Auto Encoder) and GAN (Generative Adversarial Networks), etc. The embodiment of the present disclosure does not specifically limit the face detection network model and the body detection network model.
[0038] In the disclosed embodiment, before inputting the image into the face detection network model or the body detection network model, the image may be preprocessed to obtain the image required by the corresponding network, for example, image format conversion (such as conversion to RGB format), size scaling, value normalization, light compensation, filtering, sharpening, etc., which are not limited thereto.
[0039] In addition, after the human body contour frame of the image is determined, in order to obtain an effective composition result when subsequently composing the image of the area corresponding to the human body contour frame, the frame boundary of the human body contour frame may also be expanded.
[0040] For example, Figure 4A schematic diagram of expanding the frame boundary according to an exemplary embodiment of the present disclosure is shown. First, the outline frame size is evaluated to obtain the ratio of the shortest side of the human body outline frame to the longest side of the image. If the ratio is less than a set threshold (such as 3%), the human body outline frame is removed; otherwise, the frame boundary of the human body outline frame is expanded. Of course, the frame boundary can be expanded based on the result of comparing the ratio of the shortest side of the human body outline frame to the shortest side of the image with the corresponding threshold, or based on the result of comparing the ratio of the longest side of the human body outline frame to the shortest side of the image with the corresponding threshold, or based on the result of comparing the ratio of the longest side of the human body outline frame to the longest side of the image with the corresponding threshold. The embodiment of the present disclosure can select the corresponding method according to actual needs, and does not impose specific restrictions on the specific method of removing the human body outline frame.
[0041] See also Figure 4 , the human body contour frame after the contour frame size evaluation can be expanded according to the contour frame size required for the composition processing to obtain the expanded human body contour frame. The expansion method can be to expand each frame of the human body contour frame, or to expand a pair of adjacent frames of the human body contour frame (such as Figure 4 ), or expanding a certain frame in the human body contour frame. The embodiment of the present disclosure can select the expansion method according to actual needs.
[0042] The disclosed embodiment eliminates small-sized human body contour frames and expands the human body contour frames, so that it is easier to find a suitable composition within the visual range of the human body contour frame that is finally determined.
[0043] In step S320, the regional image corresponding to the human body contour frame in the image is composed to obtain a reference composition frame of the regional image.
[0044] In an exemplary embodiment of the present disclosure, composition processing can be performed on the area image corresponding to the human body contour frame in the image to obtain a reference composition frame of the area image based on the composition result, that is, after composing the area image corresponding to each human body contour frame respectively, a corresponding reference composition frame is obtained.
[0045] Figure 5 FIG. 1 shows a schematic diagram of composing an area image corresponding to a human body contour frame in an image according to an exemplary embodiment of the present disclosure. Figure 5 First, multiple human body contour frames (A to D) of the image are determined by performing human body contour recognition on the image, and then the regional images corresponding to each human body contour frame in the image are composed respectively to obtain reference composition frames (A' to D') of each regional image.
[0046] Among them, the regional image corresponding to the human body outline frame can be processed by composition based on a plurality of set composition types, such as horizontal composition, triangular composition, radial composition, etc. Alternatively, a pre-trained composition network model can be used to process the regional image corresponding to the human body outline frame. The embodiment of the present disclosure does not specifically limit the manner in which the regional image corresponding to the human body outline frame is processed by composition, and can be set according to actual needs.
[0047] In step S330, at least one target area is determined in the image based on the human body contour frame and the reference composition frame, and the at least one target area is cropped to obtain at least one target image.
[0048] In an exemplary embodiment of the present disclosure, the reference composition frame is a contour frame determined after aesthetic composition of the regional image. Since there may be overlap or intersection of frame boundaries between each pair of human body contour frames and the reference composition frame, in order to avoid image content loss due to aesthetic composition, the coordinate range of the reference composition frame can also be adjusted based on the frame boundary matching result of the human body contour frame and the corresponding reference composition frame, and then the target area is determined according to the reference composition frame after the adjusted coordinate range.
[0049] The disclosed embodiment can determine a target area according to each pair of human body contour frames and reference composition frames. When there are multiple pairs of human body contour frames and reference composition frames in an image, multiple target areas can be determined at the same time, and each target area includes a different human body. One or more target images can be obtained by cropping one or more target areas, that is, multiple composition images that maintain beauty and contain different image contents can be obtained at the same time, and the efficiency of generating different composition images is high.
[0050] In an exemplary embodiment, a method for implementing a human body contour frame of an image is provided. Figure 6 As shown, performing human body contour recognition on an image to determine a human body contour frame of the image may include step S610 and step S620:
[0051] Step S610: Perform body contour recognition and face contour recognition on the image.
[0052] The disclosed embodiment can perform face detection and body detection on an image through a face detection network model and a body detection network model, respectively, and then determine a human body contour frame based on the obtained face detection results and body detection results. Figure 7 As shown, the body contour frame and face contour frame of each person in the image are obtained through body contour recognition and face contour recognition.
[0053] Step S620: Perform feature integrity detection on the body contour recognition results and the face contour recognition results to determine at least one human contour frame in the image according to the feature integrity detection results, each human contour frame including at least one of a body contour frame and a face contour frame.
[0054] Since the human body parts in the body contour frame and the face contour frame may not be complete, such as part of the human body is blocked, the corresponding area image's field of view cannot find a suitable composition. Therefore, the embodiment of the present disclosure determines at least one of the body contour frame and the face contour frame to form a human contour frame based on the feature integrity detection results of the body contour recognition results and the face contour recognition results.
[0055] In some possible embodiments, feature integrity refers to including all key feature points, and then performing feature integrity detection on the body contour recognition results and the face contour recognition results, which can be to judge the integrity of the human body key feature points in the body contour and the face contour. If all facial key feature points are included, the facial features are determined to be complete, and if all body key feature points are included, the body features are determined to be complete.
[0056] The disclosed embodiments may set key feature points according to actual needs. For example, the key feature points of the face may include all facial features, and the key features of the body may include neck features, trunk features, and limb features, without any special limitation.
[0057] In some possible embodiments, due to the standing posture of the person in the image and the shooting angle of the image, the key facial feature points and body key feature points of the person in the image may not be fully captured, but the corresponding regional image field range can also find a suitable composition, and thus it is also necessary to obtain a composition result that includes the person.
[0058] Based on this, feature integrity may also refer to including a target number of key feature points. For example, if a target number of facial key feature points are included, the facial features are determined to be complete. If a target number of body key feature points are included, the body features are determined to be complete.
[0059] For example, Figure 7 In the person 4 shown, the right arm of the person 4 is not captured, but the number of key feature points of the body of the person 4 reaches the target number (such as the number of key feature points reaches 60%), and the body features of the person 4 are determined to be complete. If the number of key feature points of the face reaches the target number (such as the number of key feature points reaches 85%), the facial features of the person 4 are determined to be complete.
[0060] The disclosed embodiment determines at least one human body contour frame in the image based on the facial feature integrity and body feature integrity. One possible situation is that only the body of a person exists in the image and the body satisfies the body feature integrity, and the face is blocked (e.g. Figure 7 In the example shown in FIG. 1 , the person 1 is facing away from the camera), and the face does not satisfy the facial feature integrity, then a human body contour frame is determined to include a body contour frame; a possible situation is that only the face of a person exists in the image and the face satisfies the facial feature integrity, then a human body contour frame is determined to include a face contour frame; a possible situation is that both the body part and the face part of a person exist in the image (such as person 2 and person 4) and both satisfy the corresponding feature integrity, then a human body contour frame is determined to include a body contour frame and a face contour frame. In other words, each human body contour frame includes at least one of a body contour frame and a face contour frame.
[0061] In an illustrative example, the number of human body contour frames in the image may be multiple. Before composing the regional image corresponding to the human body contour frames in the image to obtain a reference composition frame of the regional image, the human body contour frames with overlapping contour points may be merged.
[0062] Specifically, for a plurality of human body contour frames of a determined image, all human body contour frames may be traversed, and crossed or overlapped human body contour frames may be merged in pairs until no crossed or overlapped contour frames exist in the image.
[0063] Among them, only the human body contour frames whose number of overlapping contour points is greater than the number threshold can be merged. Based on this, the number of overlapping contour points can be obtained to merge the human body contour frames whose number of overlapping contour points is greater than the number threshold, thereby improving the accuracy of the determined human body contour frames, facilitating composition processing within a suitable field of view, and facilitating subsequent acquisition of more different composition results.
[0064] In an exemplary embodiment, after determining the human body contour frame of the image, in order to obtain an effective composition result when subsequently composing the image of the area corresponding to the human body contour frame, the frame boundary of the human body contour frame can be expanded, and after the frame boundary is expanded, the human body contour frames with overlapping contour points can be merged.
[0065] For details, please refer to Figure 4 As shown, the outline frame size can be evaluated, and based on the outline frame size evaluation result, the outline frame is expanded according to the outline frame size required for composition processing to obtain an expanded human body outline frame. Then, the expanded human body outline frames with overlapping outline points are merged, so that the visual range corresponding to the final human body outline frame is convenient for composition processing.
[0066] In an exemplary embodiment, in order to meet different user preferences for composition and reduce the amount of composition calculation, a selection operation may also be detected to determine the area image that needs to be compositionally processed according to the selection operation to obtain a corresponding reference composition frame.
[0067] Based on this, Figure 8 FIG. 1 is a flow chart showing an implementation method of determining a reference composition frame according to an exemplary embodiment of the present disclosure. Figure 8 , composing the regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image may include steps S810 and S820:
[0068] Step S810: in response to the selection operation, obtaining an operation track of the selection operation;
[0069] Step S820: compose the area image corresponding to the human body contour frame that overlaps with the operation trajectory to obtain a reference composition frame.
[0070] The selection operation may be an operation performed by a user on the terminal device through a touch medium (such as a user's finger, a stylus, etc.), including but not limited to a sliding operation, a pressing operation, etc.
[0071] Continue to see Figure 7 As shown, in response to a selection operation (sliding operation), the area image corresponding to the human body contour frame that overlaps with the operation trajectory is composed, and a reference composition frame corresponding to the selection operation can be obtained. That is, the area image corresponding to the human body contour frame that does not overlap with the operation trajectory does not need to be composed, thereby obtaining the composition result expected by the user and avoiding the waste of computing resources caused by composing all human body contour frames.
[0072] Furthermore, when determining the human body contour frames of the image as described above, if there are overlapping contour points between the human body contour frames, the human body contour frames with overlapping contour points will be merged. However, this method only merges according to the positional relationship corresponding to different persons in the image. If the human body contour frames corresponding to two persons do not have overlapping contour points, the two persons cannot be located within the range of the same human body contour frame, and thus the composition result of the two persons in the same target image cannot be obtained.
[0073] Based on this, in some possible embodiments, the selection operation can be detected to obtain the trajectory points of the selection operation. If there are multiple human body contour frames that overlap with the operation trajectory, the multiple human body contour frames that overlap with the operation trajectory can be merged to obtain a target contour frame, and the target area image corresponding to the target contour frame can be composed to obtain a reference composition frame corresponding to the target area image.
[0074] For example, see Figure 7As shown, in the operation trajectory A→B of the sliding operation, the trajectory line AC segment overlaps with the human body contour frame corresponding to person 2, and the trajectory line DB segment overlaps with the human body contour frame corresponding to person 4. The human body contour frame corresponding to person 2 and the human body contour frame corresponding to person 4 are merged to obtain the target contour frame.
[0075] Furthermore, only the target area image corresponding to the target contour frame can be subjected to composition processing to obtain a reference composition frame corresponding to the target area image, and then a composition result including two persons (person 2 and person 4) in the same target image can be obtained subsequently, thereby satisfying the user's personalized needs for composition results.
[0076] Furthermore, in order to provide more possible composition results at the same time, other human body contour frames in the human body contour frame that do not overlap with the operation trajectory can also be obtained, and the area images corresponding to the other human body contour frames in the image are composed to obtain reference composition frames of the area images corresponding to the other human body contour frames.
[0077] See also Figure 7 In addition to obtaining a reference composition frame that includes two persons (personnel 2 and person 4) at the same time, the regional images corresponding to other human body contour frames that do not overlap with the operation trajectory can also be composed to obtain the results of other persons in the image being in a reference composition frame (such as a reference composition frame corresponding to person 1, and a reference composition frame corresponding to person 3), thereby achieving the simultaneous generation of multiple composition results, providing more composition materials, facilitating user selection, and providing a good user experience.
[0078] In an exemplary embodiment, before composing the area image corresponding to the human body contour frame in the image to obtain a reference composition frame of the area image, biometric recognition can also be performed on the area image corresponding to the human body contour frame to determine the identity type corresponding to the human body contour frame based on the biometric recognition result, and then determine the reference composition frame corresponding to the identity type.
[0079] The biometric recognition result can be matched with the preset biometric information to determine the identity type corresponding to the human body outline frame according to the matching result. The preset biometric information includes but is not limited to facial feature information and body feature information. The user can enter the biometric information (such as facial features) and establish an association relationship between the user and other users (biometric information) to obtain the identity type of other users.
[0080] Table 1 shows an exemplary correspondence between biometric information and identity types. As shown in Table 1, the user can pre-set different identity types of other users and enter the corresponding biometric information of other users. Then, when processing the image, the biometric identification of the regional image can be performed, and the biometric identification result can be matched with the preset biometric information to determine the identity type of the person corresponding to the regional image.
[0081] Table 1
[0082]
[0083] Exemplarily, a user may directly capture a facial image through a camera and perform feature recognition to obtain preset biometric information, or a user may select a facial image from an existing gallery for feature recognition to save the recognition result as preset biometric information, such as calling a related feature recognition application to perform feature recognition; or, the user may also call entered facial information, such as facial information used to unlock a device, facial information used to log into an application, etc., and save the facial information as preset biometric information. The embodiments of the present disclosure include but are not limited to the above methods for obtaining preset biometric information.
[0084] It should be noted that the correspondence between identity types and biometric information shown in Table 1 is only exemplary. Different identity types can be set and relevant biometric information can be entered according to actual needs. For example, the identity types can be set to only acquaintances and strangers. There is preset biometric information corresponding to the acquaintance identity type, and people who do not have preset biometric information are determined as strangers.
[0085] Furthermore, if there are multiple human body contour frames in the image, the image area corresponding to the human body contour frame whose identity type is the target identity type may be composed to obtain a reference composition frame.
[0086] Among them, the target identity type can be customized by the user, such as setting family and friends as the target identity type, and then composing the image area corresponding to the human body contour box corresponding to family and friends to obtain a reference composition frame, so that the composition result corresponds to a specific person, increasing the fun of outputting multiple composition results, and making it easier to obtain a composition image that meets user needs.
[0087] In some possible embodiments, the human body contour frames corresponding to the target identity type may be merged to obtain a target contour frame, and the image area corresponding to the target contour frame may be composed to obtain a reference composition frame, that is, a composition result of the person with the target identity type in the image in the same target image is obtained.
[0088] In some possible embodiments, the area images corresponding to other contour boxes that do not correspond to the target identity type can also be composed to obtain the results of other people in the image being in a reference composition frame respectively, thereby achieving the simultaneous generation of multiple composition results, providing more composition materials, and facilitating user selection.
[0089] In an exemplary embodiment, a method for determining a target image based on a human body contour frame and a reference composition frame is provided. Fig. 9 As shown, determining at least one target area in the image based on the human body contour frame and the reference composition frame, and cropping the at least one target area to obtain at least one target image may include step S910 and step S920:
[0090] Step S910: performing frame boundary matching between the reference composition frame and the corresponding human body contour frame, and determining a target composition frame corresponding to the reference composition frame according to the frame boundary matching result;
[0091] Step S920: determining at least one target area based on the target composition frame corresponding to the reference composition frame, and cropping the at least one target area to obtain at least one target image.
[0092] There may be overlapping or crossing frame boundaries between each pair of human body contour frames and reference composition frames. In order to avoid missing image content due to aesthetic composition, the reference composition frame can also be matched with the corresponding human body contour frame for frame boundary matching, so as to adjust the coordinate range of the reference composition frame according to the frame boundary matching result, and then determine the target composition frame according to the reference composition frame with the adjusted coordinate range.
[0093] Among them, if there are no overlapping contour points between the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame, the reference composition frame is determined as the target composition frame; if there are overlapping contour points between the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame, the target frame boundary is obtained so that the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame are within the range of the target frame boundary, and the target composition frame is determined according to the target frame boundary.
[0094] Specifically, if the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame have overlapping contour points, such as intersection, a target frame boundary that frames both the frame boundary of the reference composition frame and the frame boundary of the human body contour frame can be obtained, and the target frame boundary is the minimum frame boundary that frames both the frame boundary of the reference composition frame and the frame boundary of the human body contour frame. The coordinate range of the reference composition frame is adjusted based on the target frame boundary to obtain the target composition frame corresponding to the reference composition frame, so as to ensure the integrity of the composition effect and the image content at the same time.
[0095] The disclosed embodiment can obtain at least one target image by acquiring at least one target composition frame and composing a regional image corresponding to the at least one target composition frame.
[0096] In order to further improve the composition effect of the provided target image, the embodiment of the present disclosure also provides another implementation method for determining the target image based on the human body contour frame and the reference composition frame, including:
[0097] Performing aesthetic evaluation on the regional image corresponding to the target composition frame in the image to obtain aesthetic evaluation information;
[0098] At least one target area is determined from the area image corresponding to the target composition frame based on the aesthetic evaluation information, and the at least one target area is cropped to obtain at least one target image.
[0099] Among them, a pre-trained aesthetic evaluation model can be used to perform aesthetic evaluation on the area images corresponding to each target composition frame to obtain aesthetic evaluation information, such as an aesthetic score, and then at least one target area is determined from the area images corresponding to each target composition frame based on the aesthetic evaluation information.
[0100] See also Fig.10 FIG. 2 shows a schematic diagram of determining a target area based on an aesthetic score according to an exemplary embodiment of the present disclosure. Fig.10 First, a target composition frame is determined according to each pair of reference composition frames and human body composition frames, and then an aesthetic evaluation is performed on the regional image corresponding to the target composition frame to obtain an aesthetic score, and then at least one target region is determined from the regional image corresponding to each target composition frame according to the aesthetic score, and finally at least one target region in the image is cropped to obtain at least one target image.
[0101] The above method of determining the target image based on the aesthetic evaluation information increases the aesthetic expressiveness of the target image, improves the beauty of the composed image, and lowers the threshold for general users to perform composition processing.
[0102] In addition, the disclosed embodiment can also perform composition processing on the complete image, and simultaneously determine the composition processing result as a reference composition frame. Furthermore, a target area can be determined based on the reference composition frame corresponding to the complete image and the corresponding contour frame (the coordinate frame corresponding to the outer contour of the image). In this case, in addition to being able to obtain a target area containing different human bodies, a target area containing all human bodies can also be obtained. Based on this, while being able to obtain a variety of composition results containing different people in the image, a composition result of a complete image is also provided, which has high image output efficiency and composition beauty, meeting the personalized needs of different users for composition results.
[0103] Fig.11 shows a complete flow chart of an image processing method according to an exemplary embodiment of the present disclosure, Fig.12 The corresponding Fig.11 The data flow diagram of the image processing method. Fig.11 and Fig.12 The image processing method according to the embodiment of the present disclosure is described.
[0104] Step S1110, acquiring an image and initializing a human body contour frame queue.
[0105] The human body contour frame queue is used to place the human body contour frame of the image, and is initially empty.
[0106] Step S1120, performing human body contour recognition on the image, determining the human body contour frame of the image and adding it to a human body contour frame queue.
[0107] The image can be subjected to body contour recognition and face contour recognition by calling the face detection network model and the body detection network model. For example, the image is converted into RGB format and pre-processed such as size scaling and numerical normalization, and then respectively input into the face detection network model and the body detection network model to obtain a face contour frame and a body contour frame. Furthermore, the integrity of the human body parts in the face contour frame and the body contour frame can be detected, so as to determine at least one human body contour frame from the body contour frame and the face contour frame according to the feature integrity detection result. That is, each human body contour frame includes at least one item of the body contour frame and the face contour frame, and then, each obtained human body contour frame is added to the human body contour frame queue.
[0108] Among them, it is also possible to eliminate small-sized human body contour frames (such as human body contour frames whose ratio of the shortest side of the human body contour frame to the longest side of the image is less than 3%) and expand the human body contour frames, so that the field of view of the human body contour frames finally determined is easy to find a suitable composition, and all human body contour frames can be traversed, and the crossed or overlapping human body contour frames can be merged two by two until there are no crossed or overlapping contour frames in the image.
[0109] It is worth noting that if no face or body is detected in the image, the contour frame corresponding to the entire image can be added to the human body contour frame queue. The contour frame corresponding to the entire image refers to the coordinate frame corresponding to the outer contour of the image, and the coordinate frame corresponding to the outer contour of the image is added to the human body contour frame queue.
[0110] Step S1130: compose the regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image.
[0111] The composition network model can be called to perform composition processing on the area image corresponding to the human body contour frame in the image to obtain a reference composition frame.
[0112] In response to a selection operation, an operation trajectory of the selection operation can be obtained, and a composition network model can be called to perform composition processing on an area image corresponding to a human body contour frame that overlaps with the operation trajectory to obtain a reference image; other human body contour frames in the human body contour frame that do not overlap with the operation trajectory can also be obtained, and a composition network model can be called to compose area images corresponding to other human body contour frames in the image to obtain a reference composition frame; biometric feature recognition can also be performed on the area image corresponding to the human body contour frame to determine the identity type corresponding to the human body contour frame based on the biometric feature recognition result, and then the composition network model can be called to compose the image area corresponding to the human body contour frame whose identity type is the target identity type to obtain a reference composition frame.
[0113] Among them, before using the composition network model to perform composition processing on the regional image corresponding to the human body contour frame, each regional image can also be preprocessed by size scaling, numerical normalization, etc., and the preprocessed regional image is input into the composition network model to obtain a recommended cropping frame, and the coordinates of the recommended cropping frame are converted into coordinates corresponding to the original image, that is, a reference composition frame is obtained, and a reference composition frame queue is formed according to the reference composition frame.
[0114] Step S1140: determining at least one target area in the image based on the human body contour frame and the reference composition frame.
[0115] For each reference composition frame in the reference composition frame queue, the reference composition frame can be matched with the corresponding human body contour frame by frame boundary matching, and the target composition frame corresponding to the reference composition frame is determined according to the frame boundary matching result. If there is no intersection between the reference composition frame and the corresponding human body contour frame, the reference composition frame is determined as the target composition frame, otherwise, the target frame boundary is obtained so that the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame are within the range of the target frame boundary, and the target composition frame is determined according to the target frame boundary.
[0116] Furthermore, at least one corresponding target area is determined in the image based on the at least one target composition frame.
[0117] Step S1150: cropping at least one target area to obtain at least one target image.
[0118] The images may be cropped respectively based on the target areas determined by the target composition frames corresponding to each reference composition frame in the reference composition frame queue to obtain a plurality of target images with different composition modes.
[0119] like Fig.12 As shown in FIG, when the application layer processes the image, it can call the model in sequence based on the software development kit (SDK) to perform the corresponding processing. Fig.11 and Fig.12The specific details of the image processing involved have been described in detail in the above exemplary embodiments and will not be repeated here.
[0120] As can be seen from the above, the image processing method provided by the embodiment of the present disclosure, on the one hand, composes the regional image corresponding to the human body contour frame obtained by human body contour recognition of the image to obtain a reference composition frame, and determines at least one target area in the image based on each reference composition frame and the corresponding human body contour frame for cropping to obtain at least one target image. This process can obtain multiple target images and each target image includes a different human body, so that a composition image that maintains beauty and contains different image contents can be obtained at the same time, and the efficiency of generating different composition images is high; on the other hand, since multiple composition images can be obtained at the same time for the same image, it is easier to provide a composition result that meets the user's expectations, and improve the user's user experience to a certain extent. On the other hand, in actual applications, users only need to turn on the relevant functions of automatic composition to obtain multiple images with different compositions and maintain beauty with one click, and different images present different people, which greatly improves the efficiency of users in obtaining image materials with different compositions, and the user experience is excellent.
[0121] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0122] For further reference, Fig.13 As shown, in an exemplary embodiment of the present disclosure, an image processing device 1300 is provided, comprising a contour recognition module 1310, a composition processing module 1320 and an image generation module 1330. Among them:
[0123] The contour recognition module 1310 is used to perform human contour recognition on the image to determine the human contour frame of the image; the composition processing module 1320 is used to compose the regional image corresponding to the human contour frame in the image to obtain a reference composition frame of the regional image; the image generation module 1330 is used to determine at least one target area in the image based on the human contour frame and the reference composition frame, and crop the at least one target area to obtain at least one target image.
[0124] In an exemplary embodiment, the composition processing module 1320 is configured to execute: in response to a selection operation, obtain an operation trajectory of the selection operation; compose an area image corresponding to a human body contour frame that overlaps with the operation trajectory to obtain a reference composition frame.
[0125] In an exemplary embodiment, there are multiple human body contour frames that overlap with the operation trajectory, and the composition processing module 1320 is configured to execute: merging the multiple human body contour frames that overlap with the operation trajectory to obtain a target contour frame; composing the target area image corresponding to the target contour frame to obtain a reference composition frame corresponding to the target area image.
[0126] In an exemplary embodiment, the composition processing module 1320 is configured to execute: obtaining other human body contour frames in the human body contour frame that do not overlap with the operation trajectory; composing the area images corresponding to other human body contour frames in the image to obtain a reference composition frame of the area images corresponding to other human body contour frames.
[0127] In an exemplary embodiment, there are multiple human body contour frames in the image, and the composition processing module 1320 is configured to execute: performing biometric recognition on the area image corresponding to the human body contour frame to determine the identity type corresponding to the human body contour frame based on the biometric recognition result; and composing the image area corresponding to the human body contour frame whose identity type is the target identity type to obtain a reference composition frame.
[0128] In an exemplary embodiment, the composition processing module 1320 is configured to perform: matching the biometric feature recognition result with the preset biometric feature information to determine the identity type corresponding to the human body contour frame according to the matching result.
[0129] In an exemplary embodiment, the image generation module 1330 is configured to perform: matching the reference composition frame with the corresponding human body contour frame in terms of frame boundaries, and determining a target composition frame corresponding to the reference composition frame based on the frame boundary matching result; determining at least one target area based on the target composition frame corresponding to the reference composition frame, and cropping the at least one target area to obtain at least one target image.
[0130] In an exemplary embodiment, the image generation module 1330 is configured to perform: if there are no overlapping contour points between the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame, the reference composition frame is determined as the target composition frame; if there are overlapping contour points between the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame, the target frame boundary is obtained so that the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame are within the range of the target frame boundary, and the target composition frame is determined according to the target frame boundary.
[0131] In an exemplary embodiment, the image generation module 1330 is configured to perform: performing aesthetic evaluation on the area image corresponding to the target composition frame in the image to obtain aesthetic evaluation information; determining at least one target area from the area image corresponding to the target composition frame based on the aesthetic evaluation information, and cropping the at least one target area to obtain at least one target image.
[0132] In an exemplary embodiment, the contour recognition module 1310 is configured to perform: body contour recognition and face contour recognition on the image; feature integrity detection on the body contour recognition results and the face contour recognition results to determine at least one human contour frame in the image based on the feature integrity detection results, each human contour frame includes at least one item of a body contour frame and a face contour frame.
[0133] In an exemplary embodiment, there are multiple human body contour frames in the image, and the contour recognition module 1310 is configured to execute: merging human body contour frames with overlapping contour points.
[0134] In an exemplary embodiment, the contour recognition module 1310 is configured to execute: obtaining the number of overlapping contour points; and merging the human body contour frames whose number of overlapping contour points is greater than a threshold value.
[0135] In an exemplary embodiment, the composition processing module 1320 is configured to perform: performing composition processing on an image, and simultaneously determining the composition processing result as a reference composition frame.
[0136] The specific details of each module in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0137] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0138] The exemplary embodiments of the present disclosure also provide an electronic device for the above method, which may be the above imaging device or server. Generally, the electronic device includes at least a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the above method by executing the executable instructions.
[0139] Below Fig.14 Taking the mobile terminal 1400 in the example, the structure of the electronic device in the embodiment of the present disclosure is exemplarily described. It should be understood by those skilled in the art that in addition to the components specifically used for mobile purposes, Fig.14The structure in the figure can also be applied to fixed type devices. In other embodiments, the mobile terminal 1400 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the components is only shown schematically and does not constitute a structural limitation of the mobile terminal 1400. In other embodiments, the mobile terminal may also adopt the same Fig.14 Different interface connection methods, or a combination of multiple interface connection methods.
[0140] like Fig.14 As shown, the mobile terminal 1400 may specifically include: a processor 1401, a memory 1402, a bus 1403, a mobile communication module 1404, an antenna 1, a wireless communication module 1405, an antenna 2, a display screen 1406, a camera module 1407, an audio module 1408, a power module 1409, and a sensor module 1410.
[0141] Processor 1401 may include one or more processing units, for example: processor 1401 may include AP (Application Processor), modem processor, GPU (Graphics Processing Unit), ISP (Image Signal Processor), controller, encoder, decoder, DSP (Digital Signal Processor), baseband processor and / or NPU (Neural-Network Processing Unit), etc.
[0142] The encoder can encode (i.e. compress) an image or video to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of the image or video to restore the image or video data. The mobile terminal 1400 can support one or more encoders and decoders, such as: image formats such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), and video formats such as MPEG (Moving Picture Experts Group) 1, MPEG10, H.1063, H.1064, and HEVC (High Efficiency Video Coding).
[0143] The processor 1401 may be connected to the memory 1402 or other components via a bus 1403 .
[0144] The memory 1402 may be used to store computer executable program codes, which may include instructions. The processor 1401 executes various functional applications and data processing of the mobile terminal 1400 by running the instructions stored in the memory 1402. The memory 1402 may also store application data, such as images, videos, and other files.
[0145] The communication function of the mobile terminal 1400 can be implemented by the mobile communication module 1404, antenna 1, wireless communication module 1405, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 1404 can provide 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 1400. The wireless communication module 1405 can provide wireless communication solutions such as wireless LAN, Bluetooth, and near field communication applied to the mobile terminal 1400.
[0146] The display screen 1406 is used to implement display functions, such as displaying user interfaces, images, videos, etc., and displaying abnormal prompt information. The camera module 1407 is used to implement shooting functions, such as shooting images, videos, etc., to collect scene images. The audio module 1408 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 1409 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 1410 may include one or more sensors to implement corresponding induction detection functions.
[0147] In addition, the exemplary embodiments of the present disclosure further provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification.
[0148] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0149] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0150] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0151] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. An image processing method, characterized in that: include: Performing human body contour recognition on the image to determine a human body contour frame of the image; Composing a regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image; At least one target area is determined in the image based on the human body contour frame and the reference composition frame, and the at least one target area is cropped to obtain at least one target image.
2. The method according to claim 1, characterized in that Composing a regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image includes: In response to a selection operation, obtaining an operation track of the selection operation; Composition is performed on the regional image corresponding to the human body contour frame that overlaps with the operation trajectory to obtain the reference composition frame.
3. The method according to claim 2, characterized in that The number of the human body contour frames that overlap with the operation trajectory is multiple, and composing the regional images corresponding to the human body contour frames that overlap with the operation trajectory to obtain the reference composition frame includes: Merging a plurality of human body contour frames that overlap with the operation trajectory to obtain a target contour frame; The target area image corresponding to the target outline frame is composed to obtain a reference composition frame corresponding to the target area image.
4. The method according to claim 3, characterized in that The step of composing a regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image further includes: Acquire other human body contour frames in the human body contour frame that do not overlap with the operation trajectory; Composing the area image corresponding to the other human body contour frame in the image to obtain a reference composition frame of the area image corresponding to the other human body contour frame.
5. The method according to claim 1, characterized in that: The number of human body contour frames in the image is multiple. Before composing the regional image corresponding to the human body contour frames in the image to obtain a reference composition frame of the regional image, the method further includes: Performing biometric feature recognition on the area image corresponding to the human body contour frame to determine the identity type corresponding to the human body contour frame based on the biometric feature recognition result; Composing a regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image includes: The image area corresponding to the human body contour frame corresponding to the target identity type is composed to obtain the reference composition frame.
6. The method according to claim 5, characterized in that The determining the identity type corresponding to the human body outline frame based on the biometric recognition result includes: The biometric feature recognition result is matched with preset biometric feature information to determine the identity type corresponding to the human body contour frame according to the matching result.
7. The method according to claim 1, characterized in that The determining at least one target area in the image based on the human body contour frame and the reference composition frame, and cropping the at least one target area to obtain at least one target image, comprises: Perform frame boundary matching between the reference composition frame and the corresponding human body contour frame, and determine the target composition frame corresponding to the reference composition frame according to the frame boundary matching result; The at least one target area is determined based on the target composition frame corresponding to the reference composition frame, and the at least one target area is cropped to obtain the at least one target image.
8. The method according to claim 7, characterized in that The step of performing frame boundary matching between the reference composition frame and the corresponding human body contour frame, and determining a target composition frame corresponding to the reference composition frame according to the frame boundary matching result, comprises: If there are no overlapping contour points between the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame, the reference composition frame is determined as the target composition frame; If there are overlapping contour points between the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame, the target frame boundary is obtained so that the frame boundary of the reference composition frame and the frame boundary of the corresponding human body contour frame are within the range of the target frame boundary, and the target composition frame is determined according to the target frame boundary.
9. The method according to claim 7, characterized in that: The determining the at least one target area based on the target composition frame corresponding to the reference composition frame, and cropping the at least one target area to obtain at least one target image, includes: Performing aesthetic evaluation on a region image corresponding to the target composition frame in the image to obtain aesthetic evaluation information; At least one target area is determined from the area image corresponding to the target composition frame based on the aesthetic evaluation information, and the at least one target area is cropped to obtain the at least one target image.
10. The method according to claim 1, characterized in that The step of performing human body contour recognition on an image to determine a human body contour frame of the image includes: Performing body contour recognition and face contour recognition on the image; A feature integrity check is performed on the body contour recognition result and the face contour recognition result to determine at least one human contour frame in the image according to the feature integrity check result, each of the human contour frames including at least one of a body contour frame and a face contour frame.
11. The method according to claim 1, characterized in that: The number of human body contour frames in the image is multiple. Before composing the regional image corresponding to the human body contour frames in the image to obtain a reference composition frame of the regional image, the method further includes: The human body contour frames with overlapping contour points are merged.
12. The method according to claim 11, characterized in that The step of merging the human body contour frames having overlapping contour points comprises: Obtaining the number of overlapping contour points; The human body contour frames whose number of overlapping contour points is greater than a number threshold are merged.
13. The method according to any one of claims 1 to 12, characterized in that The method further comprises: Composition processing is performed on the image, and the composition processing result is simultaneously determined as the reference composition frame.
14. An image processing device, characterized in that: include: A contour recognition module, used to perform human contour recognition on an image to determine a human contour frame of the image; A composition processing module, used for composing the regional image corresponding to the human body contour frame in the image to obtain a reference composition frame of the regional image; The image generation module is used to determine at least one target area in the image based on the human body contour frame and the reference composition frame, and to crop the at least one target area to obtain at least one target image.
15. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 13 by executing the executable instructions.
16. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.