Picture processing method, apparatus, device and storage medium
Through facial detection and position information acquisition, it is determined whether the image complies with the rules of multi-person composition, and cropping and rotation correction are performed, which solves the problem that the existing technology is difficult to improve the overall image effect and achieves a significant improvement in image quality.
Patent Information
- Application Number
- JP2023513988
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-08-31
- Filing Date
- 2021-08-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-08-27
AI Technical Summary
The prior art is difficult to effectively improve image quality, especially from the perspective of local and overall image effects. How to improve the overall effect of the image is an urgent problem.
Through facial detection and position information acquisition, it is determined whether the image complies with the multi-person composition rules. If it does not comply, crop correction is performed, and the overall effect of the image is optimized through rotation correction and display composition display.
Through these technical means, the overall effect and quality of the image can be significantly improved and meet users' aesthetic needs for the overall effect of the image.
Smart Images

Figure 0007648745000001 
Figure 0007648745000002 
Figure 0007648745000003
Abstract
Description
[Technical field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application claims priority to a Chinese patent application bearing application number 202010900860.6 and entitled “Picture Processing Method, Apparatus, Device and Storage Medium” filed with the State Intellectual Property Office of the People's Republic of China on August 31, 2020, the entire contents of which are incorporated herein by reference.
[0002] [Technical field] The present disclosure relates to the field of picture data processing, and in particular to a picture processing method, apparatus, device and storage medium. [Background technology]
[0003] 2. Description of the Related Art With the diversified development of picture processing methods, people have higher and higher requirements for picture quality, which can be measured from local details and the whole picture respectively.
[0004] Nowadays, the demands on picture processing are no longer limited to processing for detail effects only, but also people pay attention to whether the overall effect of a picture meets people's aesthetic habits.
[0005] Therefore, from the viewpoint of improving the overall effect of a picture, how to improve the picture quality has become a technical problem that needs to be solved. Summary of the Invention [Means for solving the problem]
[0006] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a picture processing method, an apparatus, a device and a storage medium that can improve the efficiency of picture processing.
[0007] According to a first aspect, the present disclosure provides a picture processing method, the method comprising: performing face detection on a first picture and obtaining position information of each face in the first picture; determining whether the first picture complies with a multiple person composition rule based on position information of each face in the first picture; If the first picture does not conform to the multiple person composition rule, performing cropping correction on the first picture based on position information of each face in the first picture to obtain a processed picture.
[0008] In one possible embodiment, prior to the step of performing face detection on the first picture, further comprising: determining whether the second picture is in a scene horizontal state by detecting whether a target object in the second picture is in a scene vertical state; If the second picture is not in the scene horizontal state, performing rotation compensation on the second picture to obtain a first picture.
[0009] In one possible embodiment, the target object includes a plurality of sub-objects, and the step of determining whether the second picture is in a scene horizontal state by detecting whether the target object in the second picture is in a scene vertical state comprises: The method includes determining whether the second picture is in a scene horizontal state by detecting whether each sub-object in the second picture is in a scene vertical state.
[0010] In one possible embodiment, the target object includes human body parts and facial parts; The step of determining whether the second picture is in a scene horizontal state by detecting whether the target object in the second picture is in a scene vertical state comprises: The method includes determining whether the second picture is in a scene horizontal state by detecting whether the body parts and the face parts of the same person in the second picture are both in a vertical state.
[0011] In one possible embodiment, before the step of performing rotation correction on the picture to be processed to obtain a first picture, the method further comprises: if the second picture is not in the scene horizontal state, obtaining an offset angle of the target object in the second picture in a vertical direction; The step of performing rotation correction on the second picture to obtain a first picture includes: The method includes performing a rotation correction on the second picture based on the offset angle to obtain a first picture.
[0012] In one possible embodiment, the method further comprises: If the first picture or the processed picture does not satisfy a correction condition, displaying a composition suggestion.
[0013] In one possible embodiment, when the first picture or the processed picture does not satisfy the correction condition, the step of displaying a composition suggestion includes: displaying a composition suggestion when a part of a subject is missing from the first picture; Alternatively, the method includes the step of displaying a composition suggestion when the pixel value after the processed picture is enlarged is lower than a preset pixel value.
[0014] In one possible embodiment, the first picture is a current preview picture displayed in a camera preview window, and the method further comprises: Displaying the processed picture in the camera preview window is included.
[0015] In one possible embodiment, the step of displaying the processed picture in the camera preview window comprises: Displaying the processed picture in a picture-in-picture format in the camera preview window.
[0016] According to a second aspect, the present disclosure provides a picture processing device, the device comprising: a first determination module for performing face detection on a first picture and obtaining position information of each face in the first picture; a second determination module for determining whether the first picture complies with a multiple person composition rule based on position information of each face in the first picture; and a cropping correction module for performing cropping correction on the first picture based on position information of each face in the first picture if the first picture does not conform to the multiple person composition rule to obtain a processed picture.
[0017] According to a third aspect, the present disclosure provides a computer-readable storage medium having stored therein commands, the commands, when executed by a terminal device, causing the terminal device to implement the above-mentioned method.
[0018] According to a fourth aspect, the present disclosure provides a device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the device implementing the above-mentioned method when the processor executes the computer program. Effect of the Invention
[0019] The technical solutions provided by the embodiments of the present disclosure have the following advantages over the prior art: An embodiment of the present disclosure provides a picture processing method. First, perform face detection on a first picture to obtain position information of each face in the first picture. Then, determine whether the first picture conforms to a multiple person composition rule based on the position information of each face in the first picture. If it is determined that the first picture does not conform to the multiple person composition rule, perform cropping correction on the first picture based on the position information of each face in the first picture to obtain a processed picture. In an embodiment of the present disclosure, the image quality of a picture can be improved by correcting the composition of the picture in terms of the overall effect of the picture. [Brief description of the drawings]
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0021] In order to more clearly describe the technical solutions of the embodiments or prior art of the present disclosure, the following briefly introduces the drawings used to describe the embodiments or prior art. Obviously, those skilled in the art can also obtain other drawings from these drawings without exerting inventive efforts. [Figure 1] 1 is a flowchart of a picture processing method according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of a picture in which a portion of an object is missing according to an embodiment of the present disclosure. [Diagram 3] 4 is a flowchart of another picture processing method according to an embodiment of the present disclosure. [Figure 4] 1 is a configuration block diagram of a picture processing device according to an embodiment of the present disclosure. [Diagram 5] FIG. 2 is a configuration block diagram of a picture processing device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0022] In order to more clearly understand the above objectives, features and advantages of the present disclosure, the technical solutions of the present disclosure are further described below. It should be noted that, unless contradictory, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0023] In order to facilitate a thorough understanding of the present disclosure, many details are described in the following description, but the present disclosure can be implemented in other forms different from those described herein. Obviously, the embodiments described herein are only some of the embodiments of the present disclosure, but not all of them.
[0024] At present, people have higher and higher requirements for picture quality, and people also pay more attention to whether the overall effect of a picture meets people's aesthetic habits, etc. Therefore, from the viewpoint of improving the overall effect of a picture, how to improve the picture quality has become a technical problem that needs to be solved.
[0025] In view of this, an embodiment of the present disclosure provides a picture processing method. First, face detection is performed on a first picture to obtain position information of each face in the first picture. Then, based on the position information of each face in the first picture, it is determined whether the first picture complies with a multiple person composition rule. If the first picture does not complies with the multiple person composition rule, based on the position information of each face in the first picture, a cropping correction is performed on the first picture to obtain a processed picture. In an embodiment of the present disclosure, the image quality of a picture can be improved by correcting the composition of the picture in terms of the overall effect of the picture.
[0026] On this basis, an embodiment of the present disclosure provides a picture processing method. Referring to Figure 1, there is shown a flowchart of a picture processing method according to an embodiment of the present disclosure. The method includes the following steps:
[0027] Step S101: Perform face detection on a first picture, and determine position information of each face in the first picture.
[0028] In an embodiment of the present disclosure, the first picture may be any picture that includes multiple faces, such as the current preview image displayed in a camera preview window when the group photo is taken, or the group photo taken after the camera shutter button is pressed.
[0029] In the embodiment of the present disclosure, after the first picture is identified, face detection is performed on the first picture to determine position information of each face in the first picture. Here, the position information of the face may be two-dimensional coordinate information of the center point of the face, or the two-dimensional coordinate information may be coordinate information in a coordinate system with the upper left corner of the first picture as the origin.
[0030] In practical applications, a machine learning model can be used to detect the face in the first picture, so the description is omitted here.
[0031] In one possible embodiment, since a picture with a part of a subject missing cannot usually achieve composition correction by basic correction operations such as rotation and cropping, in an embodiment of the present disclosure, before face detection is performed on the first picture, it is first necessary to detect whether a part of a subject in the first picture is missing, for example, whether there is a missing part of a face or body in the first picture due to the shooting method. When it is determined that a part of a subject in the first picture is missing, processing on the overall effect of the first picture cannot be achieved by subsequent correction operations, so at this time, a composition presentation of the first picture can be displayed to the user, and thus the user can re-shoot the first picture based on the composition presentation to obtain a shot picture with a higher overall effect than the first picture.
[0032] As shown in FIG. 2, a schematic diagram of a picture with a missing part of a subject according to an embodiment of the present disclosure. Here, a part of a person's image is missing on the right side of the picture. Therefore, an embodiment of the present disclosure can prompt a user to change the position and orientation of the camera to retake a more effective picture by displaying a composition suggestion, such as a right arrow shown in FIG. 2. Here, the right arrow prompts the user to move the camera to the right. The composition suggestion can also prompt the user to change the position and orientation of a person captured in the picture, such as moving it to the left as shown in FIG. 2.
[0033] Also, if it is determined that there is no loss of a portion of the subject in the first picture, face detection may be performed on the first picture, and then the first picture may be corrected based on the face detection results.
[0034] Step S102: Determine whether the first picture complies with a multiple person composition rule based on the position information of each face in the first picture. If the first picture does not complies with the multiple person composition rule, proceed to step S103.
[0035] In an embodiment of the present disclosure, after obtaining position information of each face in the first picture, it is determined whether the first picture complies with a multiple person composition rule based on the position information of each face.
[0036] In practical application, the multiple person composition rule includes multiple types of composition rules such as the rule of thirds, central symmetry, etc. Based on the position information of each face, determine whether the first picture meets the multiple person composition rule. If YES, determine that the first picture meets the multiple person composition rule; otherwise, determine that the first picture does not meet the multiple person composition rule and needs composition correction processing.
[0037] In one possible embodiment, position information of each face in the first picture can be input into a multi-person composition rule model and compared with each rule in the multi-person composition rule model to determine whether the first picture matches at least one multi-person composition rule.
[0038] Step S103: According to the position information of each face in the first picture, perform cropping correction on the first picture to obtain a processed picture.
[0039] In an embodiment of the present disclosure, if it is determined that the first picture does not conform to the multiple person composition rule, a cropping correction is performed on the first picture. Specifically, the cropping correction can be performed on the first picture based on the position information of each face in the first picture. For example, if the position information of each face indicates that each face is in the right part of the first picture and most of the left part of the first picture does not have a face, a cropping correction can be performed on the left part of the first picture to improve the overall effect of the obtained processed picture.
[0040] In one possible embodiment, the processed picture that has been subjected to the cropping correction can be further judged as to whether it conforms to the multiple person composition rule. Specifically, based on the cropping correction for the first picture, the position information of each face in the first picture is updated, and then, based on the updated position information of each face, it can be determined again whether the first picture that has been subjected to one cropping correction conforms to the multiple person composition rule until a processed picture that conforms to the multiple person composition rule is obtained. For a specific identification method, the above understanding can be referred to, and the description will be omitted here.
[0041] In another possible embodiment, a processed picture is obtained after performing cropping correction on the first picture. In order to facilitate a user to check the processed picture, the processed picture can be enlarged. If the enlarged processed picture is detected to be blurred, specifically, if the pixel value after the processed picture is enlarged is lower than a preset pixel value, it is found that the image quality of the picture cannot be improved by cropping correction on the first picture. Therefore, in an embodiment of the present disclosure, a composition suggestion is displayed on the first picture, so that the user can re-take the first picture according to the composition suggestion.
[0042] In the picture processing method provided by the embodiment of the present disclosure, first, face detection is performed on a first picture, and position information of each face in the first picture is obtained. Then, based on the position information of each face in the first picture, it is determined whether the first picture conforms to a multiple person composition rule. If it is determined that the first picture does not conform to the multiple person composition rule, based on the position information of each face in the first picture, a cropping correction is performed on the first picture to obtain a processed picture. In the embodiment of the present disclosure, the image quality of a picture can be improved by correcting the composition of the picture in terms of the overall effect of the picture.
[0043] In order to further improve the picture quality, in addition to the above embodiment, the embodiment of the present disclosure further provides a picture processing method. Refer to Figure 3, which is a flowchart of another picture processing method according to an embodiment of the present disclosure. The method includes the following steps:
[0044] Step S301: Determine whether the second picture is in a scene horizontal state by detecting whether the target object in the second picture is in a vertical state. If the second picture is not in a scene horizontal state, proceed to step S302.
[0045] In an embodiment of the present disclosure, the second picture may be any picture that includes multiple faces, such as the current preview image displayed in a camera preview window when the group photo is taken, or the group photo taken after the camera shutter button is pressed.
[0046] In the embodiment of the present disclosure, after the second picture is specified, detect whether the target object in the second picture is in a vertical state, and determine whether the second picture is in a scene horizontal state according to whether the target object is in a vertical state. Here, the scene horizontal state refers to the scene in the picture not being inclined. For example, when a group photo of multiple people is taken on a beach, if the sea surface in the group photo of multiple people is horizontal, the group photo of multiple people can be said to be in a scene horizontal state.
[0047] In one possible embodiment, the target object may be a specific building that is pre-specified in the second picture, etc. By detecting whether the specific building is in a vertical state, it is determined whether the second picture is in a scene horizontal state.
[0048] In another possible embodiment, the target object may be a human body part captured in the second picture. By detecting whether the human body part is in a vertical state, it is determined whether the second picture is in a scene horizontal state. Specifically, whether the human body part is in a vertical state can be determined by whether the person's head and feet are on the same vertical line.
[0049] In another possible embodiment, the target object may be a face part that is captured in the second picture. By detecting whether the human face part is in a vertical state, it is determined whether the second picture is in a scene horizontal state. Specifically, whether the human face part is in a vertical state can be determined based on the five sense positions on the face part.
[0050] In another possible embodiment, in order to further improve the accuracy of scene horizontal state detection, the embodiment of the present disclosure can set the target object to be a human body part and a face part, and determine whether the second picture is in the scene horizontal state by detecting the vertical state of the body part and the face part of the same person.
[0051] Specifically, it is determined whether the second picture is in a scene horizontal state by detecting whether the body parts and face parts of the same person captured in the second picture are both in a vertical state.
[0052] In one application scenario, the target object in the second picture includes multiple sub-objects. In the embodiment of the present disclosure, the second picture can be determined to be in a scene horizontal state by detecting the vertical state of each sub-object. Specifically, the second picture is determined to be in a scene horizontal state by detecting the vertical state of each sub-object captured in the second picture.
[0053] In one possible embodiment, each sub-object captured in the second picture is detected to be in a vertical state, and if the ratio of the number of sub-objects in the vertical state to the total number of sub-objects is greater than a preset ratio threshold, it is determined that the second picture is in a scene horizontal state; otherwise, it is determined that the second picture is not in a scene horizontal state.
[0054] Here, the sub-objects included in the second picture may be face parts of multiple people captured in the second picture. That is, if the ratio of the number of faces in the vertical state to the total number of faces is greater than a preset ratio threshold, it is determined that the second picture is in the scene horizontal state. Otherwise, it is determined that the second picture is not in the scene horizontal state.
[0055] In one possible embodiment, after the second picture is identified, it may be first detected whether the second picture has a missing part of the subject, and if so, a composition suggestion may be displayed for the second picture to prompt the user to retake the picture.
[0056] Step S302: Perform rotation correction on the second picture to obtain a first picture.
[0057] In the embodiment of the present disclosure, after determining that the second picture is not in a scene horizontal state, a rotation correction is performed on the second picture so as to improve the overall effect of the second picture.
[0058] In one possible implementation, if it is determined that the second picture is not in a scene horizontal state, obtain an offset angle of the target object in the second picture in the vertical direction, and then perform a rotation correction on the second picture based on the offset angle to obtain the first picture.
[0059] In one possible embodiment, when the target object includes multiple sub-objects, the vertical offset angle of each sub-object is obtained, then the average value of the offset angles is calculated, and a rotation correction is performed on the second picture based on the average value to obtain the first picture.
[0060] In one possible embodiment, it can be seen that when the first picture after rotation correction has a problem such as missing part of the subject, resulting in a low picture quality, the picture quality cannot be improved by correcting the second picture. Therefore, in an embodiment of the present disclosure, a composition suggestion can be displayed for the second picture so that the user can retake the picture according to the composition suggestion.
[0061] Step S303: Perform face detection on the first picture, and determine position information of each face in the first picture.
[0062] Step S304: Determine whether the first picture complies with the multiple person composition rule according to the position information of each face in the first picture. If the first picture does not complies with the multiple person composition rule, proceed to step S302.
[0063] Step S305: According to the position information of each face in the first picture, perform cropping correction on the first picture to obtain a processed picture.
[0064] S303 to S305 in the embodiment of the present disclosure can be understood by referring to the description of S101 to S103 in the above embodiment, and therefore a description thereof will be omitted here.
[0065] In one application scenario, both the first picture in the above embodiment and the second picture in the present embodiment may be the current preview picture displayed in the preview window of the camera, and the processed picture obtained by processing according to the picture processing method of the present disclosure can be displayed in the preview window of the camera. At this time, the picture taken by the user pressing the shutter button becomes the processed picture displayed in the preview window of the camera.
[0066] In one possible implementation, the camera preview window can display the processed picture in a picture-in-picture format.
[0067] In addition, if it is determined that the current preview picture displayed in the camera preview window does not satisfy the correction conditions, for example, if there is a problem such as the subject being missing or the subject being missing or blurred after correction, a composition prompt is displayed in the camera preview window to instruct the user to move the position and orientation of the camera to the right, as shown in Figure 2.
[0068] The embodiment of the present disclosure further provides a picture processing device belonging to the same inventive structure as the above method embodiment. Referring to Figure 4, it is a schematic diagram of the configuration of a picture processing device according to an embodiment of the present disclosure. The device includes: a first determination module 401 for performing face detection on a first picture and obtaining position information of each face in the first picture; a second determination module 402 for determining whether the first picture meets a multiple person composition rule based on position information of each face in the first picture; and a cropping correction module 403 for performing cropping correction on the first picture based on position information of each face in the first picture if the first picture does not conform to the multiple person composition rule to obtain a processed picture.
[0069] In one possible embodiment, the apparatus further comprises: a third determination module for determining whether the second picture is in a scene horizontal state by detecting whether a target object in the second picture is in a scene vertical state; and a rotation correction module for performing rotation correction on the second picture to obtain a first picture if the second picture is not in the scene horizontal state.
[0070] In one possible embodiment, the target object includes a plurality of sub-objects, and the third determination module specifically comprises: The method is configured to determine whether the second picture is in a scene horizontal state by detecting whether each sub-object in the second picture is in a scene vertical state.
[0071] In one possible embodiment, the target object includes human body parts and facial parts; The third determination module specifically comprises: The method is configured to determine whether the second picture is in a scene horizontal state by detecting whether both the body parts and the face parts of the same person in a second picture are in a vertical state.
[0072] In one possible embodiment, the apparatus further comprises: an acquisition module for acquiring an offset angle of the target object in the second picture in a vertical direction when the second picture is not in the scene horizontal state; Accordingly, the rotation correction module specifically: The apparatus is configured to perform a rotation correction on the second picture based on the offset angle to obtain a first picture.
[0073] In one possible embodiment, the apparatus further comprises: and a first display module for displaying a composition suggestion if the first picture or the processed picture does not satisfy a correction condition.
[0074] In one possible embodiment, the first display module comprises: a first display sub-module for displaying a composition suggestion when the first picture is missing a part of a subject; or a second display sub-module for displaying a composition suggestion when the pixel value of the processed picture after being enlarged is lower than a preset pixel value.
[0075] In one possible embodiment, the first picture is a current preview picture displayed in a camera preview window, and the device further comprises: A second display module for displaying the processed picture in the camera preview window.
[0076] In one possible embodiment, the second display module specifically comprises: The camera preview window is configured to display the processed picture in a picture-in-picture format.
[0077] The picture processing device provided by the embodiment of the present disclosure first performs face detection on a first picture and obtains position information of each face in the first picture. Then, based on the position information of each face in the first picture, it is determined whether the first picture complies with a multiple person composition rule. If it is determined that the first picture does not complies with the multiple person composition rule, it performs cropping correction on the first picture based on the position information of each face in the first picture to obtain a processed picture. In the embodiment of the present disclosure, the image quality of a picture can be improved by correcting the composition of the picture in terms of the overall effect of the picture.
[0078] In addition to the above methods and devices, an embodiment of the present disclosure further provides a computer-readable storage medium having commands stored thereon, the commands, when executed on a terminal device, causing the terminal device to realize the picture processing method described in the embodiment of the present disclosure.
[0079] In addition, the embodiment of the present disclosure further provides a picture processing device. As shown in FIG. The picture processing device may include a processor 501, a memory 502, an input device 503, and an output device 504. The number of processors 501 in the picture processing device may be one or more, and Fig. 5 takes one processor as an example. In some embodiments of the present disclosure, the processor 501, the memory 502, the input device 503, and the output device 504 are connected via a bus or other methods. Fig. 5 takes the example of being connected via a bus.
[0080] The memory 502 is used to store software programs and modules, and the processor 501 can execute various functional applications and data processing of the picture processing device by executing the software programs and modules stored in the memory 502. The memory 502 mainly includes a program storage area and a data storage area, among which the program storage area can store an operating system, an application program required for at least one function, etc. In addition, the memory 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage device. The input device 503 is for receiving input numerical or text information and generating signal inputs related to user settings and function control of the picture processing device.
[0081] Specifically, in this embodiment, the processor 501 loads executable files corresponding to the processes of one or more application programs into the memory 502 in accordance with the following commands, and executes the application programs stored in the memory 502 by the processor 501, thereby realizing various functions of the picture processing device.
[0082] It should be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that any actual relationship or order exists between these entities or operations. Furthermore, the terms "comprise" and "comprises", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a set of elements not only includes those elements, but also includes other elements not expressly stated or that are inherent to such process, method, article, or apparatus. Furthermore, in the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0083] The above description is merely specific embodiments of the present disclosure that enable those skilled in the art to understand and practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Thus, the present disclosure is not limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. 1. A picture processing method comprising the steps of: performing face detection on a first picture to obtain position information of each face in the first picture; determining whether the first picture complies with a multiple person composition rule based on position information of each face in the first picture; if the first picture does not conform to the multiple person composition rule, performing cropping correction on the first picture based on position information of each face in the first picture to obtain a processed picture; Including, The method comprises: and displaying a composition suggestion to a user to re-take the first picture based on the composition suggestion in response to detecting that a portion of a subject is missing from the first picture before performing face detection on the first picture; The steps of determining whether the first picture complies with the multiple person composition rule and obtaining the processed picture include: updating the position information of each face in the first picture based on the cropping correction for the first picture, and determining whether the cropping-corrected processed picture complies with the multiple person composition rule based on the updated position information until a processed picture that complies with the multiple person composition rule is obtained; The method, wherein the composition presentation is displayed in response to detecting that a pixel value of the processed picture after being enlarged is lower than a preset pixel value.
2. Prior to the step of performing face detection on the first picture, further comprising: determining whether the second picture is in a scene horizontal state by detecting whether a target object in the second picture is in a scene vertical state; 2. The method of claim 1, further comprising: if the second picture is not in the scene horizontal state, performing a rotation correction on the second picture to obtain the first picture.
3. The target object includes a plurality of sub-objects, and the step of determining whether the second picture is in a scene horizontal state by detecting whether the target object in the second picture is in a scene vertical state includes:
3. The method of claim 2, further comprising determining whether the second picture is in a scene horizontal state by detecting whether each sub-object in the second picture is in a vertical state.
4. the target object includes a human body part and a face part; The step of determining whether the second picture is in a scene horizontal state by detecting whether the target object in the second picture is in a scene vertical state comprises:
3. The method of claim 2, further comprising determining whether the second picture is in a scene horizontal state by detecting whether the body parts and the face parts of the same person in the second picture are both in a vertical state.
5. before the step of performing rotation correction on the picture to be processed to obtain a first picture, if the second picture is not in the scene horizontal state, obtaining a vertical offset angle of the target object in the second picture; The step of performing rotation correction on the second picture to obtain a first picture includes:
3. The method of claim 2, further comprising: performing a rotation correction on the second picture based on the offset angle to obtain the first picture.
6. The method according to claim 1 , further comprising the step of displaying the composition suggestion if the processed picture does not satisfy a correction condition.
7. The first picture is a current preview picture displayed in a camera preview window, and the method further comprises:
6. The method of claim 1, further comprising the step of displaying the processed picture in the camera preview window.
8. The step of displaying the processed picture in the camera preview window comprises:
8. The method of claim 7, further comprising displaying the processed picture in a picture-in-picture format in the camera preview window.
9. a first determining module for performing face detection on a first picture and obtaining position information of each face in the first picture; a second determination module for determining whether the first picture complies with a multiple person composition rule based on position information of each face in the first picture; a cropping correction module for performing cropping correction on the first picture according to position information of each face in the first picture when the first picture does not conform to the multiple person composition rule to obtain a processed picture; Equipped with the crop correction module updates the position information of each face in the first picture based on the crop correction for the first picture, and determines whether the crop-corrected processed picture complies with the multiple person composition rule based on the updated position information until a processed picture that complies with the multiple person composition rule is obtained; The picture processing device is further characterized in that the first determination module is used to display a composition suggestion to encourage a user to re-shoot the first picture based on the composition suggestion in response to detecting that a portion of the subject is missing in the first picture before face detection is performed on the first picture, and the composition suggestion is displayed in response to detecting that a pixel value after the processed picture is enlarged is lower than a predetermined pixel value.
10. A computer-readable storage medium having stored thereon commands which, when executed on a terminal device, cause the terminal device to implement the method according to any one of claims 1 to 8.
11. A device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the device causing the processor to implement the method according to any one of claims 1 to 8 when it executes the computer program.
Citation Information
Patent Citations
Imaging device and control method thereof
JP2008219451A
Imaging system, image presentation method, and program
JP2010147769A
Medical imaging system, medical image processing apparatus, and program
JP2013102851A
Imaging device, composition assisting device, composition assisting method, and composition assisting program
JP2014192743A
Imaging apparatus
JP2016036183A