Photographing auxiliary composition method, terminal and storage medium
By detecting the key position characteristics of the human body image and calling the corresponding scene pattern, assisted composition of mobile phone photography is realized, solving the problem of insufficient composition assistance during the photography process in the prior art, and improving the user experience.
Patent Information
- Application Number
- CN202111566577.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-12-20
AI Technical Summary
Existing mobile phone photography technology is difficult to assist in composition, resulting in an increase in the time used by users to process preview images when taking photos in complex scenes, reducing the photo experience.
By detecting the human image in the preview screen of the photo, obtaining key position features, and calling the corresponding scene mode (far, close-up, and medium-scene modes) to automatically adjust the composition type and reduce the time for users to process the preview screen.
Improves the user's photography experience, and reduces the user's operation time in complex scenes through the automatic auxiliary composition function, and improves the shooting effect.
Smart Images

Figure CN114257745B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photographing technology, and in particular to a photographing auxiliary composition method, terminal and storage medium. Background Art
[0002] Taking photos with mobile phones is very common in daily life. Existing mobile phones and other mobile terminals have the functions of taking photos and video. However, it is difficult to take very beautiful and atmospheric pictures using the cameras of existing mobile terminals. Therefore, some methods focusing on auxiliary photography have emerged to make the photo effects more professional by providing auxiliary photography. However, the existing auxiliary photography methods cannot make up for all the problems of the original photos. For example, when the scene of the photo is complex and it is necessary to select the scene to compose the picture, because there is no auxiliary composition function, the process of taking pictures will increase the user's processing time for the preview screen, which reduces the user's photo experience. Summary of the invention
[0003] The main purpose of the present invention is to provide an auxiliary photographing composition method, a mobile terminal and a storage medium, aiming to solve the problem that the preview image cannot be assisted in composition during the photographing process in the prior art. To achieve the above purpose, the present invention provides an auxiliary photographing composition method, the method comprising the steps of:
[0004] When it is detected that the photo preview screen includes a human body image, key position features in the human body image are obtained;
[0005] The corresponding scene mode is called according to the acquired key position features.
[0006] Optionally, the scene mode includes a distant view mode, a medium view mode and a close view mode, and when it is detected that a human body image is included in the photo preview screen, obtaining key position features in the human body image further includes:
[0007] When it is detected that the photo preview screen includes a human image, obtaining the width and height values (Rw, Rh) of the human image;
[0008] When the portrait width and height values (Rw, Rh) are less than T*the preview image width and height values (Img_w, img_h), the distant view mode is called;
[0009] When the portrait width and height values (Rw, Rh) are greater than T*the preview image width and height values (Img_w, img_h), the close-up mode or the medium-up mode is called, where T is a preset value.
[0010] Optionally, the key position feature includes a first position area feature, a second position area feature, or a third position area feature, and calling a corresponding scene mode according to the acquired key position feature includes:
[0011] When the first position area feature, the second position area feature and the third position area feature are acquired, calling the mid-view mode;
[0012] When the second position area feature and the third position area feature are acquired, and the first position area feature is not acquired, calling the close view mode;
[0013] When the third position area feature is acquired, and the first position area feature and the second position area feature are not acquired, the close view mode is called.
[0014] Optionally, the distant view mode includes a fourth composition type, the mid-view mode includes a first composition type, a second composition type and a third composition type, the close-up mode includes the third composition type, and the distant view mode includes a fourth composition type, the first composition type is a seated three-point composition, the second composition type is a right three-point composition, the third composition type is a center composition, and the fourth composition type is a tic-tac-toe composition.
[0015] Optionally, when the second position area feature and the third position area feature are acquired, and the first position area feature is not acquired, calling the mid-view mode includes:
[0016] Obtaining a first feature coordinate a0, a second feature coordinate a1, and a third feature coordinate a2 in the third position region feature;
[0017] Calculating an average distance DIST(a0, a1) between the first feature coordinate a0 and the second feature coordinate a1 and an average distance DIST(a2, a1) between the third feature coordinate a2 and the second feature coordinate a1;
[0018] When DIST(a0,a1)>DIST(a1,a2), the first composition type is called;
[0019] When DIST(a0,a1)<DIST(a1,a2), the second composition type is called;
[0020] When DIST(a0, a1)=DIST(a1, a2), the third composition type is called.
[0021] Optionally, the third position area feature includes a face feature, and when the first position area feature, the second position area feature, and the third position area feature are acquired, calling the mid-view mode includes:
[0022] Obtain the left eye feature coordinate X1, the nose bridge region feature coordinate Xn, and the right eye region feature coordinate Xr in the third position region feature;
[0023] Calculate the average distance DIST(Xl, Xn) between the left eye feature coordinate Xl and the nose bridge region feature coordinate Xn and the average distance DIST(Xr, Xn) between the right eye region feature coordinate Xr and the nose bridge region feature coordinate Xn;
[0024] When DIST(Xl, Xn)>DIST(Xr, Xn), the first composition type is called;
[0025] When DIST(Xl, Xn)<DIST(Xr, Xn), the second composition type is called;
[0026] When DIST(X1, Xn)=DIST(Xr, Xn)), the third composition type is called.
[0027] Optionally, the calling the third composition type further includes:
[0028] Constructing a rectangular annotation box containing the facial features;
[0029] Get the coordinates of the upper left corner of the rectangular annotation box as (X0, Y0), and the coordinates of the lower right corner as (X1, Y1);
[0030] Determine the main feature target position (Xz, Yz) of the human body image, where Xz=(X0+X1) / 2, Yz=Y1+0.25*(Y1-Y0)+0.3*img_h;
[0031] Set the subject feature target (Xz, Yz) as the center coordinates of the preview image.
[0032] Optionally, when it is detected that the photo preview screen does not include a human body image, the third composition type is called.
[0033] In addition, to achieve the above object, the present invention further provides a terminal, the terminal comprising:
[0034] A camera, a memory, a processor, and a computer program stored in the memory and executable on the processor;
[0035] When the computer program is executed by the processor, the steps of the above-mentioned method for auxiliary composition of photographs are implemented through the camera.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the photo auxiliary composition method as described above.
[0037] The mobile terminal photography auxiliary composition method, terminal and computer-readable storage medium proposed in the present invention obtain key position features in the human body image when detecting that the photography preview screen includes a human body image; call the corresponding scene mode according to the obtained key position features, recognize the human portrait in the preview screen, and select the corresponding scene according to the key points in the human portrait, thereby realizing the auxiliary composition function in the photography process, reducing the time for users to process the preview screen when taking pictures, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A schematic diagram of the hardware structure of an implementation method provided for an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of the process of the auxiliary composition method for photographing provided in the first embodiment of the present application;
[0042] Figure 3 A schematic diagram of a process for obtaining key position features in the human body image provided in the first embodiment of the present application;
[0043] Figure 4 A schematic diagram of a process of calling a corresponding scene mode according to the acquired key position features provided in the first embodiment of the present application;
[0044] Figure 5 This is a schematic diagram of the process of calling the corresponding composition type according to the feature coordinates in the first embodiment of the present application;
[0045] Figure 6 This is a schematic diagram of the process of calling the corresponding composition type according to the feature coordinates in the second embodiment of the present application;
[0046] Figure 7 This is a schematic diagram of the process of calling the third composition type in an embodiment of the present application;
[0047] Figure 8 for Figure 4 Contains a schematic diagram of key points of a human body in a human body image;
[0048] Fig. 9 for Figure 7 A schematic diagram of a rectangular annotation box containing the facial features. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0050] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0051] The mobile terminal provided in the embodiment of the present invention includes mobile terminals such as smart bracelets, smart watches, and smart phones. With the continuous development of screen technology and the emergence of screen forms such as flexible screens and folding screens, mobile terminals such as smart phones can also be used as mobile terminals. The mobile terminal provided in the embodiment of the present invention may include: RF (Radio Frequency) unit, WiFi module, audio output unit, A / V (audio / video) input unit, sensor, display unit, user input unit, interface unit, memory, processor, power supply and other components.
[0052] The following description will take the mobile terminal as an example. Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0053] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:
[0054] The RF unit 101 can be used for sending and receiving information or receiving and sending signals during a call. Specifically, the RF unit 101 can send uplink information to the base station. In addition, it can also receive downlink information sent by the base station and send it to the processor 110 of the mobile terminal for processing. The downlink information sent by the base station to the RF unit 101 can be generated based on the uplink information sent by the RF unit 101, or it can be actively pushed to the RF unit 101 after detecting that the information of the mobile terminal is updated. For example, after detecting that the geographical location of the mobile terminal has changed, the base station can send a message notification of the geographical location change to the RF unit 101 of the mobile terminal. After receiving the message notification, the RF unit 101 can send the message notification to the processor 110 of the mobile terminal for processing. The processor 110 of the mobile terminal can control the message notification to be displayed on the display panel 1061 of the mobile terminal. Generally, the RF unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication, which may specifically include: communicating with a server in the network system through wireless communication. For example, the mobile terminal can download file resources from the server through wireless communication, such as downloading applications from the server. After the mobile terminal completes downloading an application, if the file resources corresponding to the application in the server are updated, the server can push a message notification of the resource update to the mobile terminal through wireless communication to remind the user to update the application. The above-mentioned wireless communications can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing- Long Term Evolution) and TDD-LTE (Time Division Duplexing- Long Term Evolution), etc.
[0055] In one implementation, the mobile terminal 100 can access an existing communication network by inserting a SIM card.
[0056] In another implementation, the mobile terminal 100 can access the existing communication network by configuring an eSIM card (Embedded-SIM). The use of the eSIM card can save the internal space of the mobile terminal and reduce the thickness.
[0057] It is understandable that although Figure 1 The radio frequency unit 101 is shown, but it is understandable that the radio frequency unit 101 is not a necessary component of the mobile terminal and can be omitted as needed without changing the essence of the invention. The mobile terminal 100 can achieve communication connection with other devices or communication networks through the wifi module 102 alone, and the embodiments of the present invention are not limited thereto.
[0058] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
[0059] The audio output unit 103 can convert the audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0060] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise elimination (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and sending audio signals.
[0061] In one implementation, the mobile terminal 100 includes one or more cameras. By turning on the camera, images can be captured, and functions such as taking photos and recording videos can be achieved. The position of the camera can be set as needed.
[0062] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.
[0063] In one embodiment, the mobile terminal 100 further includes a proximity sensor. By using the proximity sensor, the mobile terminal can achieve contactless control and provide more operation modes.
[0064] In one embodiment, the mobile terminal 100 further includes a heart rate sensor, which can detect the heart rate when worn close to the user.
[0065] In one implementation, the mobile terminal 100 may further include a fingerprint sensor, which can implement functions such as security verification by reading fingerprints.
[0066] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0067] In one embodiment, the display panel 1061 adopts a flexible display screen. When the mobile terminal adopting the flexible display screen is worn, the screen can be bent so as to fit better. Optionally, the flexible display screen can adopt an OLED screen body and a graphene screen body. In other embodiments, the flexible display screen can also be other display materials, and this embodiment is not limited thereto.
[0068] In one embodiment, the display panel 1061 of the mobile terminal can be in a rectangular shape, so as to be surrounded when worn. In other embodiments, other forms can also be adopted.
[0069] The user input unit 107 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch panel 1071), and drive corresponding connection devices according to a pre-set program. The touch panel 1071 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.
[0070] In one embodiment, one or more buttons may be provided on the side of the mobile terminal 100. The buttons may be operated in various ways, such as short press, long press, rotation, etc., so as to achieve various operation effects. There may be multiple buttons, and different buttons may be used in combination to achieve various operation functions.
[0071] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of the touch event. Then, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Figure 1 In the embodiment, the touch panel 1071 and the display panel 1061 are used as two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited here. For example, when a message notification of an application is received through the radio frequency unit 101, the processor 110 can control the message notification to be displayed in a preset area of the display panel 1061, and the preset area corresponds to a certain area of the touch panel 1071. By performing a touch operation on a certain area of the touch panel 1071, the message notification displayed in the corresponding area on the display panel 1061 can be controlled.
[0072] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0073] In one implementation, the interface unit 108 of the mobile terminal 100 adopts a contact structure, and is connected to other corresponding devices through the contacts to achieve functions such as charging and connection. The use of contacts can also prevent water.
[0074] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0075] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0076] The mobile terminal 100 may further include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0077] although Figure 1 Not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail herein. The mobile terminal 100 may be connected to other terminal devices via Bluetooth to achieve communication and information exchange.
[0078] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0079] First embodiment
[0080] like Figure 2 As shown, Figure 2 This is a flowchart of the method for assisting composition of photographs provided in the first embodiment of the present application. Once the method of this embodiment is triggered by the user, the process in this embodiment is automatically executed by the mobile terminal, wherein each step can be executed in the order shown in the flowchart, or multiple steps can be executed simultaneously according to the actual situation, which is not limited here.
[0081] Step 210, when it is detected that the photo preview screen includes a human image, key position features in the human image are obtained;
[0082] Step 220: calling a corresponding scene mode according to the acquired key position features.
[0083] In photography and taking pictures, composition refers to the appropriate planning, organization and arrangement of the existing scenery and subjects in front of you according to the requirements of the shooting subject and theme, and using the camera's imaging technology to render them to form a coordinated, complete picture with a certain artistic form.
[0084] Shot size is an important factor that affects the composition of the picture. Shot size refers to the change in the distance between the subject and the lens, which causes the difference in the size of the subject in the picture. Shot sizes include long shot, full shot, medium shot, close shot and close-up.
[0085] Specifically, in this embodiment, three view modes are defined, namely, distant view mode, medium view mode and close view mode. In other embodiments, panoramic mode and close-up mode are also included.
[0086] In addition to the main subject, that is, the human body, the landscape mode also includes more environmental factors and other factors.
[0087] The medium shot mode includes the features of the subject above the knees and is used to describe some details of the character. At the same time, some environmental factors will also be included in the picture.
[0088] Close-up mode includes the subject's features from the chest or shoulders up, and this composition reduces the description of the subject's environment.
[0089] The acquisition of human body features can be done by pre-storing a number of corresponding part feature images, and judging whether the corresponding features are included by comparing the similarity between the captured image and the pre-stored image. It can also be done by a machine learning method, and after a computer executes a large number of machine learning processes, the judgment result is directly output. Through the above implementation, when it is detected that the mobile terminal enters the photo preview mode, the image information in the current viewfinder is obtained. When it is detected that the photo preview screen includes a human body image, the key position features in the human body image are obtained, such as knee features, chest features, shoulder features, etc., and the corresponding scene mode, such as distant view, mid-range view or close-up view, is called according to the key position features obtained. By identifying the portrait in the preview screen and selecting the corresponding scene according to the key points in the portrait, the auxiliary composition function in the photo shooting process is realized, which reduces the time for users to process the preview screen when taking photos and improves the user experience.
[0090] Each step in the above implementation will be explained in detail below.
[0091] Regarding step 210, if Figure 3 FIG. 2 is a schematic diagram of a sub-process of step 210, which further includes:
[0092] Step 310, when it is detected that the photo preview screen includes a human image, obtaining the width and height values (Rw, Rh) of the human image;
[0093] Step 320, when the portrait width and height values (Rw, Rh) are less than T*the preview image width and height values (Img_w, Img_h), calling the distant view mode;
[0094] Step 330: When the portrait width and height values (Rw, Rh) are greater than T*the preview image width and height values (Img_w, Img_h), the close-up mode or the medium-up mode is called, where T is a preset value.
[0095] In actual use scenarios, after opening the camera application of the mobile phone and entering the photo preview mode, the image in the viewfinder may be a human body, a pet or other subject. When it is determined in step 310 that the image in the current viewfinder includes a human image, the portrait width and height values (Rw, Rh) of the human image are obtained. Entering step 320 or step 330, when the entire portrait is captured, that is, when the portrait width and height values (Rw, Rh) are greater than T*the width and height values (Img_w, img_h) of the preview screen, the close-up mode or the mid-view mode is called, where T is a preset value.
[0096] In this embodiment, when assisting in composition, the size ratio of the captured human body image in the preview screen is first determined, that is, for the distant view of the distance between the photographed object and the mobile phone camera, when the photographed object is farther away, the smaller its ratio in the preview screen of the mobile phone camera, and when the photographed object is closer, the larger its ratio in the preview screen of the mobile phone camera. When the photographed object is farther away, the human body image can be fully displayed in the preview screen of the mobile phone camera, and the human body features can be fully detected. When the photographed object is closer, the human body image is partially displayed in the preview screen of the mobile phone camera, and the human body features can only be partially detected.
[0097] When the subject is far away, the long shot mode is called, and when the subject is close, the close shot mode or the medium shot mode is called. By presetting or modifying the value of T, the user can decide how far the subject is from the camera and select the long shot mode, the close shot mode or the medium shot mode according to the situation.
[0098] When the long shot mode, close shot mode or medium shot mode is called, it is achieved by controlling the camera to automatically adjust the focal length. For example, the mobile phone processor sends a pulse signal to the motor that controls the focus adjustment of the mobile phone camera, and the number of pulse signals is used to control the corresponding angle and number of circles of click rotation, so that the camera lens moves forward or backward to the corresponding step length of the foreground.
[0099] Regarding step 210, if Figure 4 FIG. 2 is a schematic diagram of a sub-process of step 210, which further includes:
[0100] Step 410, when the first position area feature, the second position area feature and the third position area feature are acquired, calling the mid-view mode;
[0101] Step 420: when the second position area feature and the third position area feature are acquired, and the first position area feature is not acquired, calling the close view mode;
[0102] Step 430: When the third position area feature is acquired, and the first position area feature and the second position area feature are not acquired, calling the close view mode.
[0103] Specifically, in order to make the process of the auxiliary composition method for photographing of this embodiment clearer and easier to understand, Figure 8 This is illustrated with the example in .
[0104] The first location area, the second location area and the third location area are Figure 8 The key points in are key points H, I and above, and the key points are represented by dot_. The first position area corresponds to dot_H and dot_I, which are the characteristics of the human knee area in the preview image. The second position area corresponds to dot_F and dot_G, which are the characteristics of the human abdomen area in the preview image. The third position area corresponds to dot_D and dot_E, which are the characteristics of the human chest area in the preview image.
[0105] In other embodiments, shoulder features or facial features may also be defined as third position area features, or other features such as fourth area features, and then the corresponding scene mode may be called according to a preset rule.
[0106] Among them, when the key points of dot_H and dot_I and above are obtained, that is, when all of the first position area features, the second position area features and the third position area features are obtained, the mid-view mode is called; when the key points of dot_G and dot_F and above are obtained, that is, when the second position area features and the third position area features are obtained, and the first position area features are not obtained, the close-up mode is called; when the key points of dot_D and dot_E and above are obtained, that is, when the third position area features are obtained, and the first position area features and the second position area features are not obtained, the close-up mode is called.
[0107] Specifically, in this embodiment, when features above the knees are detected, that is, the human body's knees, abdomen, chest, shoulders and face appear in the preview screen at the same time, the medium shot mode is called; when features above the abdomen are detected, that is, the human body, abdomen, chest, shoulders and face appear in the preview screen at the same time but the knees do not appear, the close shot mode is called.
[0108] In other embodiments, the close-up mode can be called when features above the shoulder features are detected, that is, when the shoulders and face appear simultaneously in the preview image, but the knees, abdomen, and chest do not appear. Different scene modes can be called according to the detected features of different position areas. The modes can be customized according to the user's personalized preferences and are not limited here.
[0109] In this embodiment, the camera device can determine one or more target shooting positions based on various feature information of the subject. At this time, correspondingly, step 210 may also include: collecting feature information of the subject, wherein the feature information of the subject may include at least one of the following: facial information of the subject, posture information of the subject, and height information of the subject, and determining at least one target shooting position based on the feature information of the subject, and using the determined at least one target shooting position as the target shooting position of the subject. Since the key position features of the subject are obtained, this composition method is adopted, and the algorithm gives different framing modes, which can ensure that the formed composition is better.
[0110] like Figure 5 As shown, in step 410, when the first position area feature, the second position area feature and the third position area feature are acquired, calling the mid-view mode includes:
[0111] Step 510, obtaining the first feature coordinate a0, the second feature coordinate a1 and the third feature coordinate a2 in the third position region feature;
[0112] Step 520, calculate the average distance DIST(a0, a1) between the first feature coordinate a0 and the second feature coordinate a1, and the average distance DIST(a2, a1) between the third feature coordinate a2 and the second feature coordinate a1;
[0113] Wherein, when DIST(a0, a1) > DIST(a1, a2), call the first composition type.
[0114] Wherein, when DIST(a0, a1) < DIST(a1, a2), call the second composition type.
[0115] Wherein, when DIST(a0, a1) = DIST(a1, a2), call the third composition type.
[0116] In this embodiment, the medium shot mode includes a first composition type, a second composition type, and a third composition type, the close shot mode includes the third composition type, the long shot mode includes a fourth composition type, the first composition type is the left thirds composition, the second composition type is the right thirds composition, the third composition type is the center composition, the fourth composition type is the tic-tac-toe composition. When the subject of the captured image is not a human body, call the third composition type.
[0117] Specifically, as Figure 8 shown, compare the distances in the horizontal axis direction between the key points A, B, and C. DIST(A, C) represents the distance between A and C in the horizontal direction, and the distances between other key points are the same.
[0118] Case 1: When DIST(A, C) = DIST(B, C), it is determined as the center composition.
[0119] Case 2: When DIST(A, C) > DIST(B, C) + T0, it is a candidate for the left thirds composition. Statistically analyze the key point information of the face DIST(a0, a1) > DIST(a1, a2) + T1, and recommend the left thirds composition.
[0120] When DIST(a0, a1) < abs(DIST(a1, a2) - T2) (abs represents the absolute value), there is ambiguity, and the processing in this case is to be consistent with the recommendation method of the previous frame image.
[0121] Case 3: When DIST(A, C) < DIST(B, C) - T0, it is a candidate for the right thirds composition. Statistically analyze the key point information of the face DIST(a0, a1) < DIST(a1, a2) + T1, and recommend the right thirds composition.
[0122] When DIST(a0,a1)) >abs(DIST(a1,a2)-T2), there is ambiguity. The processing of this case is consistent with the recommendation method of the previous frame image.
[0123] Among them, T0, T1 and T2 are preset thresholds, a0, a1 and a2 correspond to the features of the human face, and when the first position area feature, the second position area feature and the third position area feature are obtained, the mid-view mode is called, that is, when dot_D, dot_E, dot_A, dot_B, dot_C, and dot_F, dot_G, dot_H and dot_I are obtained, the mid-view mode is called.
[0124] Since the mid-shot mode includes the first composition type, the second composition type and the third composition type, the specific composition type to be adopted is confirmed by calculating the portrait posture information in the preview screen, for example, the different ratios of corresponding position features to reference points caused by different postures. When it is detected which direction the face or body is facing, the corresponding left third composition or right third composition is adopted. Generally speaking, according to general composition principles, when a person faces to the left, the right third composition is adopted, that is, the portrait is placed at the left third of the preview screen. When a person faces to the right, the left third composition is adopted, that is, the portrait is placed at the right third of the preview screen. When the person is facing the camera, the center composition is adopted.
[0125] If it is detected that the photo preview screen does not include a human body image, the third composition type, ie, the center composition, is called.
[0126] If the orientation of the person and the orientation of the face are inconsistent, ambiguity will arise, and the orientation of the person will be used as the basis for composition. For example, Figure 8 In the figure, a0 is the key point of the left ear of the face, a1 is the key point of the bridge of the nose, a2 is the key point of the right ear of the face, and DIST represents the horizontal distance between the two key points. Based on the DIST information, it is judged that the human body is facing the terminal, and the center composition is recommended. In fact, the human body is facing left, so the right third composition should be recommended.
[0127] Second embodiment
[0128] like Figure 6 As shown, in the second embodiment, based on the first embodiment, step 410, when the first position area feature, the second position area feature and the third position area feature are acquired, calling the mid-view mode further includes:
[0129] Step 610, obtaining the left eye feature coordinates X1, the nose bridge region feature coordinates Xn, and the right eye region feature coordinates Xr in the third position region feature.
[0130] Step 620, calculating the average distance DIST(Xl, Xn) between the left eye feature coordinate Xl and the nose bridge region feature coordinate Xn and the average distance DIST(Xr, Xn) between the right eye region feature coordinate Xr and the nose bridge region feature coordinate Xn.
[0131] Wherein, when DIST(Xl, Xn)>DIST(Xr, Xn), the first composition type is called. Wherein, when DIST(Xl, Xn)<DIST(Xr, Xn), the second composition type is called. Wherein, when DIST(Xl, Xn)=DIST(Xr, Xn), the third composition type is called.
[0132] like Fig. 9 As shown, when the calling mode is the medium shot mode, the three-point composition is divided into the left three-point composition and the right three-point composition. The feature coordinates of the left eye are (Xl, Yl), the feature coordinates of the right eye are (Xr, Yr), and the coordinates of the bridge of the nose are (Xn, Yn).
[0133] When DIST(Xl, Xn)>DIST(Xr, Xn), the first composition type is called, that is, the left third composition. When DIST(Xl, Xn)<DIST(Xr, Xn), the second composition type is called, that is, the right third composition. When DIST(Xl, Xn)=DIST(Xr, Xn), the third composition type is called, that is, the center composition.
[0134] In the second embodiment, different from the first embodiment, the second embodiment obtains the face orientation through face features, and determines the corresponding composition type only by obtaining the face orientation.
[0135] like Figure 7 As shown, in step 620 of the second embodiment (or in step 520 of the first embodiment), calling the third composition type includes:
[0136] Step 710, constructing a rectangular annotation frame containing the facial features;
[0137] Step 720, obtaining the coordinates of the upper left corner of the rectangular annotation box as (X0, Y0), and the coordinates of the lower right corner as (X1, Y1);
[0138] Step 730, determining the main feature target position (Xz, Yz) of the human body image, where Xz=(X0+X1) / 2, Yz=Y1+0.25*(Y1-Y0)+0.3*img_h;
[0139] Step 740: Set the subject feature target (Xz, Yz) as the center coordinates of the preview image.
[0140] More specifically, in order to make the process of the auxiliary composition method for photographing of this embodiment clearer and easier to understand, an example is given to illustrate:
[0141] When the close-up mode is called, a rectangular annotation box containing the facial features is constructed, and the position (x, y) of the subject target is determined according to the relevant posture and information of the face, where h is the height of the image and w is the width of the image;
[0142] Get the coordinates of the upper left corner of the rectangular annotation box as (X0, Y0), and the coordinates of the lower right corner as (X1, Y1);
[0143] Determine the main feature target position (Xz, Yz) of the human body image, where Xz=(X0+X1) / 2, Yz=Y1+0.25*(Y1-Y0)+0.3*img_h;
[0144] Set the subject feature target (Xz, Yz) as the center coordinates of the preview image.
[0145] For the central composition, it is necessary to set the main feature target position of the human image as the central coordinate of the central composition. In the central composition in the mid-shot communication or the close-shot composition, the face is generally used as the main target, and a specific position of the face, such as the nose or the philtrum, is used as the main feature target position. By constructing a rectangular annotation box containing the facial features, the coordinates of the upper left corner of the rectangular annotation box are obtained as (X0, Y0), and the coordinates of the lower right corner are obtained as (X1, Y1). The formula Xz=(X0+X1) / 2, Yz=Y1+0.25*(Y1-Y0)+0.3*img_h is used to determine the main feature target position. Finally, the main feature target position is set as the central coordinate of the preview screen, that is, the nose or philtrum of the person in the portrait image is placed in the center of the preview screen.
[0146] In the first and second embodiments of the present application, a portrait in a preview screen is identified, and a corresponding scene type is selected according to key points in the portrait. When it is detected that a human body image is included in the photo preview screen, the portrait width and height values of the human body image are obtained, and the ratio of the portrait width and height values to the width and height values of the preview screen is calculated, and by judging whether features of different position areas in the portrait are detected, the distant view mode, the close view mode or the medium view mode in the scene type is called, and the features of different position areas in the portrait are calculated to determine the body orientation or the face orientation in the human body image to determine the corresponding composition type in the corresponding scene type, thereby realizing an auxiliary composition function in the photo taking process, reducing the time for users to process the preview screen when taking photos, and improving the user experience.
[0147] Third embodiment
[0148] A mobile terminal provided in another embodiment of the present invention, based on the above embodiment, includes a processor 110, a memory 109, and a camera 1041;
[0149] The processor 110 is used to execute the auxiliary composition program for taking photos stored in the memory 109 to implement the following steps:
[0150] When it is detected that the photo preview screen includes a human body image, key position features in the human body image are obtained;
[0151] The corresponding scene mode program is called according to the acquired key position features.
[0152] Optionally, the scene mode includes a distant scene mode, a medium scene mode and a close scene mode, and the processor 110 is used to execute the auxiliary composition program for taking photos stored in the memory 109 to implement the following steps:
[0153] When it is detected that the photo preview screen includes a human image, obtaining the width and height values (Rw, Rh) of the human image;
[0154] When the portrait width and height values (Rw, Rh) are less than T*the preview image width and height values (Img_w, img_h), the distant view mode is called;
[0155] When the portrait width and height values (Rw, Rh) are greater than T*the preview image width and height values (Img_w, img_h), the close-up mode or the medium-up mode is called, where T is a preset value.
[0156] Optionally, the key position feature includes a first position area feature, a second position area feature, or a third position area feature, and the processor 110 is used to execute a photographing auxiliary composition program stored in the memory 109 to implement the following steps:
[0157] When the first position area feature, the second position area feature and the third position area feature are acquired, calling the mid-view mode;
[0158] When the second position area feature and the third position area feature are acquired, and the first position area feature is not acquired, calling the close view mode;
[0159] When the third position area feature is acquired, and the first position area feature and the second position area feature are not acquired, the close view mode is called.
[0160] Optionally, the distant view mode includes a fourth composition type, the mid-view mode includes a first composition type, a second composition type and a third composition type, the close-up mode includes the third composition type, and the distant view mode includes a fourth composition type, the first composition type is a seated three-point composition, the second composition type is a right three-point composition, the third composition type is a center composition, and the fourth composition type is a tic-tac-toe composition.
[0161] Optionally, the processor 110 is used to execute the auxiliary composition program for taking photos stored in the memory 109 to implement the following steps:
[0162] Obtaining a first feature coordinate a0, a second feature coordinate a1, and a third feature coordinate a2 in the third position region feature;
[0163] Calculating an average distance DIST(a0, a1) between the first feature coordinate a0 and the second feature coordinate a1 and an average distance DIST(a2, a1) between the third feature coordinate a2 and the second feature coordinate a1;
[0164] When DIST(a0,a1)>DIST(a1,a2), the first composition type is called;
[0165] When DIST(a0,a1)<DIST(a1,a2), the second composition type is called;
[0166] When DIST(a0, a1)=DIST(a1, a2), the third composition type is called.
[0167] Optionally, the processor 110 is used to execute the auxiliary composition program for taking photos stored in the memory 109 to implement the following steps:
[0168] Obtain the left eye feature coordinate X1, the nose bridge region feature coordinate Xn, and the right eye region feature coordinate Xr in the third position region feature;
[0169] Calculate the average distance DIST(Xl, Xn) between the left eye feature coordinate Xl and the nose bridge region feature coordinate Xn and the average distance DIST(Xr, Xn) between the right eye region feature coordinate Xr and the nose bridge region feature coordinate Xn;
[0170] When DIST(Xl, Xn)>DIST(Xr, Xn), the first composition type is called;
[0171] When DIST(Xl, Xn)<DIST(Xr, Xn), the second composition type is called;
[0172] When DIST(Xl, Xn)=DIST(Xr, Xn)), the third composition type is called
[0173] Optionally, the processor 110 is used to execute the auxiliary composition program for taking photos stored in the memory 109 to implement the following steps:
[0174] Constructing a rectangular annotation box containing the facial features;
[0175] Get the coordinates of the upper left corner of the rectangular annotation box as (X0, Y0), and the coordinates of the lower right corner as (X1, Y1);
[0176] Determine the main feature target position (Xz, Yz) of the human body image, where Xz=(X0+X1) / 2, Yz=Y1+0.25*(Y1-Y0)+0.3*img_h;
[0177] Set the subject feature target (Xz, Yz) as the center coordinates of the preview image.
[0178] Optionally, when it is detected that the photo preview screen does not include a human body image, the third composition type is called.
[0179] In the third embodiment of the present application, a portrait in a preview screen is identified, and a corresponding scene type is selected according to key points in the portrait. When it is detected that a human body image is included in the photo preview screen, the portrait width and height values of the human body image are obtained, and the ratio of the portrait width and height values to the width and height values of the preview screen is calculated, and by judging whether features of different position areas in the portrait are detected, the distant view mode, the close view mode or the medium view mode in the scene type is called, and the features of different position areas in the portrait are calculated to determine the body orientation or the face orientation in the human body image to determine the corresponding composition type in the corresponding scene type, thereby realizing an auxiliary composition function in the photo taking process, reducing the time for users to process the preview screen when taking photos, and improving the user experience.
[0180] Fourth embodiment
[0181] The embodiment of the present invention also provides a computer-readable storage medium. The computer-readable storage medium here stores one or more programs. The computer-readable storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state hard disk; the memory may also include a combination of the above-mentioned types of memory. When one or more programs in the computer-readable storage medium can be executed by one or more processors, the auxiliary composition method for taking pictures provided in the first embodiment, the second embodiment or the third embodiment is implemented.
[0182] In the fourth embodiment of the present application, a portrait in a preview screen is identified, and a corresponding scene type is selected according to key points in the portrait. When it is detected that a human body image is included in the photo preview screen, the portrait width and height values of the human body image are obtained, and the ratio of the portrait width and height values to the width and height values of the preview screen is calculated, and by judging whether features of different position areas in the portrait are detected, the distant view mode, the close view mode or the medium view mode in the scene type is called, and the features of different position areas in the portrait are calculated to determine the body orientation or the face orientation in the human body image to determine the corresponding composition type in the corresponding scene type, thereby realizing an auxiliary composition function in the photo taking process, reducing the time for users to process the preview screen when taking photos, and improving the user experience.
[0183] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0184] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0185] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0186] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0187] Those skilled in the art will appreciate that the camera application may be a program provided by the mobile terminal or a third-party application, and the present invention does not impose any specific limitation thereto.
Claims
1. A method for assisting composition in photographing, characterized in that: include: When it is detected that the photo preview screen includes a human body image, key position features in the human body image are obtained; Calling a corresponding scene mode according to the acquired key position features; The key position feature includes a first position region feature, a second position region feature or a third position region feature, wherein the first position region feature is a human knee region feature, the second position region feature is a human abdomen region feature, and the third position region feature is a human face feature; The calling of the corresponding scene mode according to the acquired key position feature includes: When the first location area feature, the second location area feature and the third location area feature are acquired, calling the mid-view mode; When the second position area feature and the third position area feature are acquired, and the first position area feature is not acquired, calling the close view mode; When the third position area feature is acquired, and the first position area feature and the second position area feature are not acquired, calling the close view mode; The distant view mode includes a fourth composition type, the mid-view mode includes a first composition type, a second composition type and a third composition type, the close-up view mode includes the third composition type, the first composition type is a left third composition, the second composition type is a right third composition, the third composition type is a center composition, and the fourth composition type is a tic-tac-toe composition. When the subject of the image captured is not a human body, the third composition type is called; When the first position area feature, the second position area feature, and the third position area feature are acquired, calling the mid-view mode includes: Obtain the first feature coordinate a0, the second feature coordinate a1 and the third feature coordinate a2 in the third position region feature, wherein a0 is the key point of the left ear of the face, a1 is the key point of the bridge of the nose of the face, and a2 is the key point of the right ear of the face; Calculating an average distance DIST(a0, a1) between the first feature coordinate a0 and the second feature coordinate a1 and an average distance DIST(a2, a1) between the third feature coordinate a2 and the second feature coordinate a1; When DIST(a0,a1)>DIST(a1,a2), the first composition type is called; When DIST(a0,a1)<DIST(a1,a2), the second composition type is called; When DIST(a0,a1)=DIST(a1,a2), the third composition type is called; in, Compare the distances in the horizontal direction between key point A of the left shoulder, key point B of the right shoulder, and key point C of the neck. DIST(A,C) represents the distance between key point A and key point C in the horizontal direction, and DIST(B,C) represents the distance between key point B and key point C in the horizontal direction. When DIST(A, C) = DIST(B, C), it is determined to be the central composition; When DIST(A, C) > DIST(B, C) + T0, it is a candidate left三分构图 (left three-part composition), and the facial key point information is counted. When DIST(a0, a1) > DIST(a1, a2) + T1, a left three-part composition is recommended. When DIST(a0, a1) < abs(DIST(a1, a2) - T2), it is consistent with the recommendation method of the previous frame image; When DIST(A, C) < DIST(B, C) - T0, it is a candidate right三分构图 (right three-part composition), and the facial key point information is counted. When DIST(a0, a1) < DIST(a1, a2) + T1, a right three-part composition is recommended. When DIST(a0, a1) > abs(DIST(a1, a2) - T2), it is consistent with the recommendation method of the previous frame image; Among them, T0, T1, and T2 are preset thresholds, and abs represents the absolute value; Among them, Let the left eye feature coordinates be (Xl, Yl), the right eye feature coordinates be (Xr, Yr), and the nose bridge coordinates be (Xn, Yn); The invocation of the third composition type further includes: Construct a rectangular annotation box containing the facial features; Obtain the upper left corner coordinates of the rectangular annotation box as (X0, Y0), and the lower right corner coordinates as (X1, Y1); Determine the main feature target position (Xz, Yz) of the human body image, where Xz = (X0 + X1) / 2, Yz = Y1 + 0.25 * (Y1 - Y0) + 0.3 * img_h; Set the main feature target (Xz, Yz) as the center coordinates of the preview screen.
2. A terminal, characterized in that: The terminal includes: A camera, a memory, a processor, and a computer program stored on the memory and executable on the processor; When the computer program is executed by the processor, the steps of the photo-taking auxiliary composition method as claimed in claim 1 are implemented through the camera.
3. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the photo-taking auxiliary composition method as claimed in claim 1.
