WO2022011534A1 - 拍摄控制方法、装置、智能设备及计算机可读存储介质 - Google Patents
拍摄控制方法、装置、智能设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2022011534A1 WO2022011534A1 PCT/CN2020/101792 CN2020101792W WO2022011534A1 WO 2022011534 A1 WO2022011534 A1 WO 2022011534A1 CN 2020101792 W CN2020101792 W CN 2020101792W WO 2022011534 A1 WO2022011534 A1 WO 2022011534A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- shooting
- preview image
- complete
- target
- target part
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
Definitions
- the present application relates to the field of terminal technologies, and in particular, to a shooting control method, apparatus, smart device, and computer-readable storage medium.
- the embodiments of the present application provide a shooting control method, device, intelligent device, and computer-readable storage medium, which can intelligently detect whether the target part of the shooting object in the preview image is complete, and then automatically process the shooting object accordingly, so that In the preview image, the target part of the shooting object is complete and the size of the shooting object is suitable, which improves the presentation effect of the preview image as a whole.
- an embodiment of the present application provides a shooting control method, including:
- the shooting device can intelligently detect whether the target part of the shooting object in the preview image is complete, and then automatically process the shooting object accordingly, so that the target part of the shooting object in the preview image is complete and the size of the shooting object is suitable. , which improves the rendering of the preview image as a whole.
- the detecting whether the target part of the shooting object is complete, and processing the shooting object according to a preset rule to make the shooting object in the preview image complete includes:
- the shooting device is controlled to adjust the shooting mode to the first shooting mode, so that the target part of the shooting object in the preview image is complete.
- the shooting device is controlled to automatically adjust the shooting mode to the first shooting mode according to the preset rules, so as to increase the shooting angle of view, so as to not only make the target part of the shooting object in the preview image It can be presented completely, and it also avoids the inconvenience and inefficiency of manual operation by users.
- controlling the photographing device to enter a first photographing mode, so that the target part of the photographing object in the preview image is complete includes:
- the shooting parameters to be switched are determined, and the to-be-switched shooting parameters are determined.
- Shooting parameters include viewing angle size and/or viewing angle direction;
- the target site is complete.
- the distance between the incomplete target part of the shooting object and the edge of the preview image, and the predicted complete size corresponding to the incomplete target part will be calculated.
- the shooting parameters to be switched including the viewing angle size and/or the viewing angle direction, and adjust the preset parameters in the first shooting mode to the shooting parameters to be switched, so as to not only make the target part of the shooting object in the preview image complete, but also Makes the overall composition of the preview image more harmonious.
- the detecting whether the target part of the shooting object is complete, and processing the shooting object according to a preset rule to make the shooting object in the preview image complete includes:
- the zooming of the shooting device is controlled to make the target part of the shooting object complete in the preview image.
- the zoom of the shooting device is automatically controlled, so that the target part of the shooting object is fully displayed in the preview image under the change of the focal length of the camera, that is, it can automatically, Intelligently control the zoom of the shooting device, improve the zoom efficiency of the shooting device, and improve the presentation effect of the preview image.
- controlling the zooming of the photographing device so that the target part of the photographed object in the preview image is complete includes:
- the target object being a target part of a part of the part included in the preview image
- the zooming of the photographing device is controlled according to the image parameters of the target object, so that the target part of the photographing object in the preview image is complete.
- the target part of a part of the preview image is determined as the target object, and then its image parameters are determined, and then the zoom information of the shooting device is directly determined according to the image parameters, and the shooting device previews the image according to the zoom information. It realizes automatic and intelligent control of the zoom of the shooting device, improves the zoom efficiency of the shooting device, and improves the presentation effect of the preview image.
- the acquiring the image parameters of the target object includes at least one of the following:
- controlling the zooming of the photographing device according to the image parameters of the target object, so that the target part of the photographing object in the preview image is complete includes:
- the zoom of the photographing device is controlled according to the zoom parameter, so that the target part of the photographed object in the preview image is complete.
- the zoom parameter includes a center point to be zoomed and a focal length to be zoomed, and the zoom parameter is based on the distance between the target object and the edge of the preview image, and/or the target object
- the predicted size of the corresponding complete target part determines the zoom parameters, including:
- the distance between the target object and the edge of the preview image, and/or the predicted size of the complete target part corresponding to the target object determine the complete target part corresponding to each predicted target object and the the distance between the edges of the preview image;
- the center point to be zoomed and/or the focal length to be zoomed is determined according to the distance between the predicted complete target part corresponding to each target object and the edge of the preview image.
- the complete target part corresponding to each predicted target object is determined and The distance between the edges of the preview image, and then the zoom parameters are determined, such as the center to be zoomed, the focal length to be zoomed, etc., so that the target part of the subject in the preview image can be completely presented, and the overall composition is more harmonious.
- the detecting whether the target part of the shooting object is complete, and processing the shooting object according to a preset rule to make the shooting object in the preview image complete includes:
- the zoom of the photographing device is controlled to adjust the reference distance between the target part and the edge of the preview image.
- the zoom of the shooting device is controlled so that the distance between the target part and the edge of the preview image can be Increase to make the composition of the preview image balanced and harmonious.
- controlling the zoom of the photographing device according to the determined reference distances to adjust the reference distance between the target part and the edge of the preview image includes:
- all the target parts are in the preview image, but when there is a target part whose distance from the edge of the preview image is less than or equal to the first numerical distance, the zoom of the photographing device is controlled to make each target The distance between the part and the edge of the preview image is greater than or equal to the first value, so that the presentation effect of the preview image is better.
- the detecting whether the target part of the shooting object is complete, and processing the shooting object according to a preset rule to make the target part of the shooting object complete in the preview image includes:
- the zoom of the photographing device is controlled to adjust the proportion of the image area in the preview image.
- the composition of the preview image is not good, that is to say, the total image area of all target parts in the preview image occupies the proportion of the preview image. If the ratio is too small, the focus in the preview image is not prominent enough. In this case, the ratio of the image area is adjusted by controlling the zoom of the shooting device, so that the composition of the preview image is more harmonious.
- the zooming of the photographing device is controlled according to the proportion of the image area in the preview image, so as to adjust the proportion of the image area in the preview image ,include:
- a second value may be preset, and when the proportion of the image area in the preview image is less than or equal to the second value, the zoom of the photographing device is directly triggered, so that the proportion of the image area in the preview image is greater than or equal to or equal to the second value.
- the method includes:
- the preview image collected after processing according to the preset rules can also be obtained, the initial image area of all target parts in the preview image can be determined, and then the reference size information in the shooting device can be compared and adjusted, for example, the The initial image area is adjusted to the middle of the entire preview image, so that the focus of the preview image is more prominent and the presentation effect is better.
- the method further includes:
- the shooting mode of the shooting device is adjusted according to the detection result.
- whether to adjust the shooting mode of the shooting device is determined by the number of shooting objects in the preview image, so as to automatically and intelligently control the zoom of the shooting device, improve the zooming efficiency of the shooting device, and improve the presentation effect of the preview image.
- the adjusting the shooting mode of the shooting device according to the detection result includes:
- the photographing device is controlled to enter the first photographing mode.
- the shooting device detects that the number of shooting objects is greater than or equal to the third value, and automatically controls the shooting device to enter the first shooting mode, thereby avoiding the problems of inconvenient operation and low efficiency caused by manual adjustment, and improving the shooting performance. efficiency and quality.
- the shooting device when the number of shooting objects in the preview image changes from greater than or equal to the third numerical value to less than the third numerical value, the shooting device is controlled to change the shooting mode from The first shooting mode is adjusted to the second shooting mode.
- the photographing device monitors the photographed objects in the preview image in real time. If the number of photographed objects changes from greater than or equal to the third numerical value to less than the third numerical value, the photographing equipment is intelligently and automatically controlled to change the photographing mode from the first numerical value to less than the third numerical value. The shooting mode is adjusted to the second shooting mode, so that the composition effect of the preview image is better.
- the number of the photographing objects in the preview image changes from greater than or equal to the third numerical value to less than the third numerical value, acquire the number of photographing objects in the preview image. the duration for which the number is less than the third numerical value;
- the shooting mode of the shooting device is adjusted according to the duration.
- the adjusting the shooting mode of the shooting device according to the duration includes:
- the photographing device is controlled to adjust the photographing mode from the first photographing mode to the second photographing mode.
- the duration is less than the third numerical value, if the duration is greater than or equal to the third numerical value.
- the adjusting the shooting mode of the shooting device according to the detection result includes:
- the photographing device is controlled to enter the second photographing mode.
- the method further includes:
- the shooting mode of the shooting device is adjusted.
- the reference distance between the target part of each shooting object and the edge of the preview image is calculated, each reference distance is determined, and then the shooting mode is adjusted according to each reference distance, so that the target part is in the preview image.
- the presentation position is suitable for the composition of the entire preview image, which improves the presentation effect of the preview image.
- the adjusting the shooting mode of the shooting device according to the determined reference distances includes:
- the photographing device When a distance less than or equal to the fourth numerical value exists in each of the determined reference distances, the photographing device is controlled to enter the first photographing mode.
- the shooting mode of the shooting device is automatically adjusted to be the first shooting mode, so as to improve the presentation effect of the image and improve the efficiency and quality of shooting.
- the adjusting the shooting mode of the shooting device according to the determined reference distances includes:
- the shooting device When each of the determined reference distances is greater than or equal to the fourth value, the shooting device is controlled to enter the second shooting mode.
- each reference distance is greater than or equal to the fourth value, it means that all the target parts are in the preview image.
- the shooting device is automatically adjusted to enter the second shooting mode to improve the presentation effect of the preview image. .
- the detecting whether the target part of the photographed object is complete includes:
- the result of whether the target part is complete is used to indicate whether the preview image includes all the target parts of each photographed object
- the target part recognition model is obtained by training using a sample data set, and the sample data set It includes a first sample image and a second sample image, the first sample image includes complete target parts of each photographed object, and the second sample image includes incomplete target parts of each photographed object.
- the embodiment of the present application by pre-training the target part recognition model, and then using the trained target part recognition model to process the preview image, the result of whether the target part is complete is obtained, so that the embodiment of the present application can automatically identify the target part of the shooting object. Whether the detection is complete or not, it is convenient for the shooting device to perform corresponding processing according to the preset rules, and the overall presentation effect of the preview image is improved.
- an embodiment of the present application provides a photographing control device, including:
- an acquisition unit used for acquiring the preview image collected by the photographing device
- the processing unit is used to identify the shooting object in the preview image; and is used to detect whether the target part of the shooting object is complete, and process the shooting object according to a preset rule to make the shooting object in the preview image.
- the target site is complete.
- the shooting device can intelligently detect whether the target part of the shooting object in the preview image is complete, and then automatically process the shooting object accordingly, so that the target part of the shooting object in the preview image is complete and the size of the shooting object is suitable. , which improves the rendering of the preview image as a whole.
- an embodiment of the present application provides a smart device, characterized in that it includes a processor and a memory, wherein the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to for invoking the program instructions to execute the method described in the first aspect.
- an embodiment of the present application provides a computer-readable storage medium, characterized by comprising: the computer-readable storage medium stores one or more instructions, and the one or more instructions are suitable for processing by The browser loads and executes the method as described in the first aspect.
- FIG. 1 is a schematic flowchart of a first shooting control method provided by an embodiment of the present application
- Fig. 2a is a schematic diagram of a part of a target part in a preview image provided by an embodiment of the present application
- 2b is a schematic diagram of a complete target part in a preview image provided by an embodiment of the present application.
- Fig. 2c is a schematic diagram of a part of another part in the preview image provided by the embodiment of the present application.
- FIG. 2d is a schematic diagram of another complete target part in the preview image provided by the embodiment of the present application.
- Fig. 3a is a schematic diagram of all the target parts of the shooting objects in the preview image provided by the embodiment of the present application;
- Fig. 3b is another schematic diagram of all the target parts of the shooting objects in the preview image provided by the embodiment of the present application.
- FIG. 4 is a flowchart of a second shooting control method provided by an embodiment of the present application.
- 5a is a schematic diagram of incomplete faces a and b in a preview image provided by an embodiment of the present application
- 5b is a schematic diagram of determining the shooting parameters to be switched according to incomplete faces a and b according to an embodiment of the present application;
- FIG. 6 is a flowchart of a third shooting control method provided by an embodiment of the present application.
- FIG. 7a is a schematic diagram of a target object provided by an embodiment of the present application.
- 7b is a schematic diagram of a calculation point of a complete target part corresponding to a predicted target object provided by an embodiment of the present application;
- FIG. 7c is a schematic diagram of another complete target part in the preview image provided by an embodiment of the present application.
- 7d is a schematic diagram of a complete target part near the edge of the preview image provided by an embodiment of the present application.
- FIG. 7e is a schematic diagram of still another complete target part in the preview image provided by the embodiment of the present application.
- 7f is a schematic diagram of an image region in a preview image provided by an embodiment of the present application.
- 7g is a schematic diagram of another image region in a preview image provided by an embodiment of the present application.
- FIG. 8 is a flowchart of a fourth shooting control method provided by an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a shooting control device provided by an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of a smart device provided by an embodiment of the present application.
- FIG. 1 is a flowchart of a first shooting control method provided by an embodiment of the present application.
- the method in the embodiment of the present application may be performed by a photographing device or a server, and the method may specifically include the following steps:
- a preview image on which the shooting image is displayed is obtained by collecting the shooting image by the shooting device, and subsequent calculation processing is performed based on the preview image.
- the embodiments of the present application may be performed based on a scenario in which the photographing device is in an intelligent photographing mode, and of course may also be performed in other scenarios, which are not limited in the embodiments of the present application.
- the shooting device in the embodiment of the present application may be various devices including a camera function, for example, may be an image acquisition device such as a video camera and a video recorder, or may be a smart phone, a handheld processing device, a tablet computer, a mobile notebook, Virtual reality devices, integrated handhelds, etc., can also be wearable devices. Wearable devices can also be called wearable smart devices. Wearable technology is a general term for intelligently designing daily wear and developing wearable devices. , such as glasses, gloves, watches, clothing and shoes.
- the preview image presents various shooting objects in the shooting screen, such as people or objects
- the shooting device based on the automatic detection function can use the preview image to perform face detection algorithms, object detection algorithms, and animal detection algorithms.
- Algorithms and the like identify whether the shooting object in the preview image is a person, an object, an animal, or the like. Further, after identifying whether it is a person, an object or an animal, it can also be specifically detected whether it is the entire photographed object, or a certain part of the photographed object, or a part of a certain part of the photographed object.
- a certain part of the photographed object may be a face, an arm, a pair of legs, etc., and a part of a certain part of the photographed object may be half a face, half a palm, and so on.
- the trained target part recognition model can be used to identify the object.
- the detection of the shooting Whether the target part of the object is complete may include: inputting the preview image into the target part recognition model for processing, and the result of whether the target part is complete; wherein, the result of whether the target part is complete is used to indicate whether the preview image includes each photographed object.
- the object recognition model is obtained by training the sample data set, the sample data set includes the first sample image and the second sample image, the first sample image includes the complete target part of each shooting object, the second sample image The image includes incomplete target parts for each subject.
- the first sample image in the sample data set may be an image of a human face, a pair of hands, a leg, etc.
- the second sample image may be only a part of a human face (left face, right face, forehead, chin, etc.), images of parts of hands (half palm, 4 fingers, etc.), etc.
- the detecting whether the target part of the photographed object is complete may include: inputting the preview image into the target part recognition model for processing to obtain a result of whether the target part is complete; wherein, the target part is The complete result is used to indicate whether the preview image includes the target part of each photographed object.
- the object recognition model is trained by using the sample data set.
- the sample data set includes the first sample image and the second sample image. This image includes the complete target part of each photographed object, and the second sample image includes other parts of each photographed object except the target part, or includes other parts of each photographed object in a certain area except the target part.
- the first sample image in the sample data set for training the object recognition model can be an image including a human face
- the second sample image can be an image of a human body without a face or an image with only one pair of legs Wait.
- the detection of whether the target part of the photographed object is complete may be to detect whether the preview image includes all the target parts of each photographed object, and it may be to detect whether the preview image includes the target part of each photographed object, and then The photographed objects are processed according to preset rules according to the detection results, so that the preview image includes all the target parts of each photographed object.
- the preview image includes a person's forehead as an example. At this time, the photographing device recognizes the forehead, but the forehead is only a part of the face.
- Make the preview image include the complete face corresponding to the forehead (as shown in Figure 2b); take the target part as the face, and the preview image includes part of the arm as an example, and it is recognized that the preview image includes part of the arm (as shown in Figure 2c) shown), but there is no human face, then control the zoom of the shooting device, so that the preview image includes the human face corresponding to the part of the arm (as shown in Figure 2d), of course, it can be set that there is no target part in the preview image
- the shooting device is controlled to process the shooting object according to the preset rules, so that the complete target part corresponding to the other parts is displayed in the preview image.
- the processing of the photographed object according to the preset rules according to the detection result may be to process the photographed object by switching the photographing mode of the photographing device, or to process the photographed object by controlling the zoom of the photographing device.
- preset parameter thresholds can be set for each shooting mode in the shooting device; the zoom control of the shooting device can be optical zoom realized by one camera or multiple cameras. Taking two cameras as an example, it can be One camera is set as a telephoto camera, and one camera is set as a wide-angle camera.
- the number of cameras and the setting of the focal length of specific cameras are not limited in the embodiments of the present application.
- the photographing object in the preview image is identified, the identification result is obtained, and the focusing of the photographing device is controlled according to the identification result.
- the shooting device after recognizing the shooting object in the preview image, the shooting device focuses on the shooting object, so that the shooting object can be presented more clearly, and other display contents in the preview image are blurred by a certain program processing, or make other content the same/lower the definition, etc.
- controlling the focusing of the photographing device according to the recognition result may include: controlling the photographing device to focus on the target portion of each photographing object in the preview image according to the object recognition result.
- the photographing device recognizes the target part of the shooting object in the preview image, and then focuses on the target part, so that the clarity of the target part in the preview image is increased, so as to facilitate the better presentation of the preview image .
- the method after processing the shooting object according to a preset rule to make the target part of the shooting object complete in the preview image, the method includes:
- a preview image collected after zooming is obtained, and it is determined that the target parts of all photographed objects are in the initial image area of the zoomed preview image, as shown in Figure 3a, although all photographing objects
- the target parts are all in the preview image, but all the initial image areas are too small in the preview image and do not reach the obtained reference size information
- the display content of the preview image is adjusted so that the adjusted initial image area is at a specified position in the preview image.
- the display content of the preview image is adjusted so that the initial image area can be displayed at a designated position, and the designated position in the embodiment of the present application may be the preview image.
- the middle part, as shown in Figure 3b, can of course be other positions, which can be set according to the actual situation.
- a preview image collected by a photographing device is acquired, the photographing object of the preview image is identified, whether the target part of the photographing object is complete is detected, and the photographing object is processed according to a preset rule so that the photographing object in the preview image is The target part is complete; it can be seen that the embodiment of the present application can intelligently detect whether the target part of the shooting object in the preview image is complete, and then automatically perform corresponding processing on the shooting object, so that the target part of the shooting object in the preview image is complete, and the preview image is improved. presentation effect.
- FIG. 4 is a flowchart of a second shooting control method provided by an embodiment of the present application.
- the method in the embodiment of the present application may be executed by a shooting device or a server. Specifically, the method may be executed by a server. It includes the following steps:
- steps S401-S402 in this embodiment of the present application reference may be made to steps S101-S102 in the foregoing embodiment, and details are not repeated in this embodiment of the present application.
- control the photographing device to adjust the photographing mode to the first photographing mode, so that the target part of the photographing object in the preview image is complete.
- detecting that the target part of the photographing object is incomplete may be detecting that the target part of at least one photographing object is incomplete in the preview image.
- the first shooting mode may be a wide-angle shooting mode, a short-focus shooting mode, or the like, which can make the target part of the subject in the preview image complete. Taking the photographing object as a person and the target part as a face as an example, if the photographing device detects in the collected preview image that there is at least one person's face image in the preview image that is incomplete, the photographing device is controlled to adjust the photographing mode to enable the preview.
- the first shooting mode in which all face images in the image are complete. It can be understood that a preset parameter threshold is set in the first shooting mode, and the specific preset parameter threshold can be set according to the actual situation, which is not limited in the embodiment of the present application.
- controlling the photographing device to enter the first photographing mode, so that the target part of the photographing object in the preview image is complete may include: according to the incompleteness of the photographing object The distance between the target part and the edge of the preview image, and/or the predicted complete size corresponding to the incomplete target part, determine the shooting parameters to be switched, and the shooting parameters to be switched include the angle of view and/or the angle of view direction; control the shooting device to enter the first shooting mode, and adjust the shooting parameters of the shooting device to the to-be-switched shooting parameters in the first shooting mode, so as to make the target of the shooting object in the preview image The part is complete.
- the distances between all the incomplete target parts in the preview image and the edge of the preview image are calculated, and the sizes of the corresponding complete target parts are predicted according to the sizes of all the incomplete target parts.
- the distance from the edge of the image and the predicted size of the complete target portion determine the shooting parameters to be switched including the angle of view and/or the direction of the angle of view, and then control the shooting device to enter the first shooting mode, and in the first shooting mode, shoot the shooting device.
- the parameters are adjusted to the shooting parameters to be switched (such as adjusting the degree of the viewing angle, the moving distance and direction at the center of the viewing angle, etc.), so that the target part of the shooting object in the preview image is complete.
- the subject is a person
- the target part is a face
- the angle of view refers to the degree of wide-angle shooting
- the viewing angle direction refers to the center of the angle of view for wide-angle shooting, as shown in Figure 5a. If it is detected that the face of the person in the preview image is incomplete, calculate the distance between the edge of the preview image and the incomplete face a and the incomplete face b, and predict the incomplete face a and the incomplete face b respectively.
- the corresponding complete face size it can be determined that the distance between the predicted complete face A corresponding to the incomplete face a and the edge of the preview image is greater than the distance between the predicted complete face B corresponding to the incomplete face b and the edge of the preview image.
- the distance to determine the shooting parameters to be switched (as shown in Figure 5b, the center of the shooting angle is shifted to the left compared to the center of the angle of view in the wide-angle shooting mode, and the number of viewing angles on the left increases more than the increase on the right), and control the shooting at this time.
- the shooting is performed in the wide-angle shooting mode, and the preset parameter thresholds in the wide-angle shooting mode are adjusted to the currently determined shooting parameters to be switched, so that the human face can be completely presented in the preview image.
- the camera in the shooting device can be adjusted. After entering the wide-angle shooting mode, the camera position can be fine-tuned, or the shooting device can be automatically fine-tuned, so that the center of the wide-angle shooting can be adjusted according to the actual situation and improve the preview. rendering of the image.
- the preview image collected by the photographing device is acquired, the photographing object in the preview image is identified, and then it is detected whether the target part of the photographing object is complete, and if the target part is incomplete, the photographing device is controlled to enter the first photographing mode, thereby The target part of the shooting object can be completely presented in the preview image; it can be seen that the embodiment of the present application can intelligently detect whether the target part of the shooting object in the preview image is complete, and then automatically perform corresponding processing on the shooting object, so that the preview image can The target part of the shooting object is complete, which improves the presentation effect of the preview image.
- FIG. 6 is a flowchart of a third shooting control method provided by an embodiment of the present application.
- the method in the embodiment of the present application may be executed by a shooting device or a server. Specifically, the method may be executed by a server. It includes the following steps:
- steps S601-S603 in this embodiment of the present application reference may be made to steps S101-S103 in the foregoing embodiment, and details are not repeated in this embodiment of the present application.
- the obtained detection result may be that the preview image includes all the target parts of each photographing object, or the preview image does not include all the target parts of each photographing object. The whole of the target part of a subject is photographed.
- the zooming of the shooting device is controlled to make the preview image Include all of the target parts of each subject. It should be noted that if the detection result is that the target part of the shooting object is incomplete, that is, the preview image does not include all the target parts of each shooting object, then perform steps S604-S606, if the detection result is that the target part of the shooting object is complete. , that is, the preview image includes all of the target parts of each shooting object, then execute steps S607-S608, or execute steps S609-S610.
- the target object may be a part of the target part, or may be other parts of the photographing object except the target part.
- the target part can be the left half of the face, the right half of the face, the forehead, etc.; taking the target part as an example of a face, the target object can be the whole hand, some fingers, a leg, etc., as shown in Figure 7a As shown, the dashed frame part is the target object.
- the image parameters of the target object may include the proportion of the target object in the entire preview image, the horizontal and vertical distances of the target object from the edge of the preview image, and the clarity and focal length of the target object image.
- obtaining the image parameters of the target object may include at least one of the following: obtaining the distance between the target object and the edge of the preview image; obtaining the predicted size of the complete target part corresponding to the target object.
- the target object may be a part of the target part, the distance between the target object and each edge of the preview image is obtained, and the predicted size of the complete target part corresponding to the target object is predicted, and the target part is a face, For example, the target object is the forehead.
- the distance between point a of target object 1 (forehead) and the left edge of the preview image is 0.1cm
- the distance between point b of the target object and the right edge of the preview image is 2.1cm
- the distance between point c of the target object and the upper edge of the preview image is 7.5cm
- the distance between point c of the target object and the lower edge of the preview image is 0.7cm
- the distance between point a and point b is 1cm.
- the zoom parameters can be adjusted according to the target object with the largest distance from the edge of the preview image according to the part of the complete target part corresponding to the predicted target object that is not in the preview image , the zoom parameter can also be adjusted according to the part of the complete target part corresponding to the predicted target object that is not in the preview image, and the target object that accounts for the largest proportion of the predicted complete target part, so that the preview image includes each Capture the entirety of the target part of the subject.
- the distance between the lowest point of the chin of the target object 1 and the lower edge of the preview image after the prediction by the shooting device is 2.8cm
- the distance between the edge of the right face of the target object 2 and the left edge of the preview image is 1.2cm
- the zoom parameters are adjusted with the complete face corresponding to the predicted target object 1, so that the complete face corresponding to the target object 1 and the target object 2 is adjusted. All faces are in the preview image, as shown in Figure 7c.
- the zooming of the photographing device is controlled according to the image parameters of the target object, so that the preview image includes all the target parts of each photographing object, including: according to the edge of the target object and the preview image The distance between them and the predicted size of the complete target part corresponding to the target object are used to determine the zoom parameters; the zooming of the shooting device is controlled according to the zoom parameters, so that the preview image includes all the target parts of each shooting object.
- the distance between the part of the predicted complete target part that is not in the preview image and the edge of the preview image can be obtained, or The proportion of the predicted complete target part that is not in the preview image in the complete target part is obtained, and then the zoom parameter is determined according to the target object corresponding to the maximum distance or the largest proportion, and the zoom parameter of the shooting device is controlled according to the zoom parameter.
- the preview image includes all the target parts of each shooting object, and the presentation effect of the preview image is improved.
- the zoom parameter includes a center point to be zoomed and/or a focal length to be zoomed, the distance between the target object and the edge of the preview image, and/or the
- the predicted size of the complete target part corresponding to the target object, and determining the zoom parameter may include: according to the distance between the target object and the edge of the preview image, and/or the size of the complete target part corresponding to the target object.
- the predicted size determines the distance between the complete target part corresponding to each predicted target object and the edge of the preview image; according to the distance between the complete target part corresponding to each predicted target object and the edge of the preview image; The distance between them determines the center point to be zoomed and/or the focal length to be zoomed.
- the distance between the target object and the edge of the preview image is calculated, the size of the complete target part corresponding to the target object is predicted according to the target object, and then the distance between the target object and the edge of the preview image, and/or the predicted size of the complete target part corresponding to the target object, determine the distance between the complete target part corresponding to each predicted target object and the edge of the preview image, according to the predicted complete target part corresponding to each target object.
- the distance between the target part and the edge of the preview image determines the center point to be zoomed and/or the focal length to be zoomed.
- the distance value of the complete face corresponding to the target object 1 from the edge of the preview image is greater than the distance value of the complete face corresponding to the target object 2 from the edge of the preview image (for example, the distance value corresponding to the target object 1
- the distance value of the lowest point of the chin of the predicted complete face from the lower edge of the preview image is greater than the distance value of the part of the face not in the preview image corresponding to the predicted complete face corresponding to the target object 2 from the left edge of the preview image)
- the center to be zoomed and the focal length to be zoomed can be determined (for example, the center to be zoomed is moved down, the focal length to be zoomed is reduced, etc.), so that the target parts corresponding to all target objects are completely displayed in the preview image to improve the preview image. presentation effect.
- S607 Determine the reference distance between the target part of each photographed object and the edge of the preview image.
- the target parts of all the shooting objects are in the preview image, but some target parts are in the vicinity of the preview image, so that the presentation effect of the entire preview image is not good enough.
- the distance between the target part of the object and each edge of the preview image is calculated, and each reference distance is determined, which provides a basis for controlling the zooming of the photographing device.
- S608 Control the zoom of the photographing device according to the determined reference distances to adjust the reference distance between the target part and the edge of the preview image.
- the zooming of the photographing device is controlled directly according to each reference distance.
- the zooming of the photographing device is controlled according to each determined reference distance, which may include: when each determined reference distance is When there is a distance less than or equal to the first value in the image, the zoom of the photographing device is controlled so that the distance between the target part of each photographing object and the edge of the preview image is greater than the first value.
- the distance between point d of the target part of object a and the right edge of the preview image is 0.7cm.
- the set first value is 1cm, 0.7cm If the cm is less than 1 cm, the camera is controlled to zoom so that the distance between the target part of each object and the edge of the preview image is greater than the first value, as shown in Figure 7e. It should be noted that, the first value may be specifically set according to the actual situation, which is not limited in this embodiment of the present application.
- S609 Determine the image areas of the target parts of all the shooting objects in the preview image.
- the target parts of all the shooting objects are in the preview image, but the position of the image area of the target part in the preview image is too small or too large, which affects the presentation effect of the overall preview image.
- S610 Control the zoom of the photographing device according to the proportion of the image area in the preview image, so as to adjust the proportion of the image area in the preview image.
- the image areas of all target parts are determined, the proportion of the total image areas of all target parts in the preview image is calculated, and the camera is zoomed.
- the proportion of the area in the preview image, and controlling the zoom of the photographing device may include: when the proportion of the image area in the preview image is less than or equal to the second value, controlling the zoom of the photographing device so that the image area is in the preview image is greater than the second value.
- controlling the zoom of the photographing device according to the proportion of the image area in the preview image may include: when the proportion of the image area in the preview image is greater than or equal to a numerical value, controlling the photographing device zoom, so that the proportion of the image area in the preview image is less than a value.
- the target part Take the target part as a face, and there is only one example of the target part. For example, the image area of the target part accounts for more than 90% of the preview image. At this time, control the shooting device to zoom so that the image area of the target part is in the preview image. accounted for less than 90%.
- the photographing object in the preview image is identified, and whether the target part of the photographing object in the preview image is complete is detected.
- the zooming of the shooting device enables the target part of each shooting object to be better presented in the preview image; it can be seen that in the embodiment of the present application, it is possible to automatically and intelligently detect whether the target part of the shooting object in the preview image is complete, Then, the shooting object is automatically processed accordingly, so that the target part of the shooting object in the preview image is complete, and the presentation effect of the preview image is improved.
- FIG. 8 is a flowchart of a fourth shooting control method provided by an embodiment of the present application.
- the method in the embodiment of the present application may be executed by a shooting device or a server. Specifically, the method may be executed by a server. It includes the following steps:
- the number of shooting objects in the preview image is determined.
- the number of subjects can be obtained by determining the number of faces. It can be understood that the faces here can include complete faces and incomplete faces. .
- the detection result may include that the number of photographed objects is greater than or equal to the third numerical value, and the number of photographed objects is less than the third numerical value.
- step S803 is performed, and when the number of photographed objects is less than the third numerical value, step S804 is performed.
- a reference distance between the target part of each photographing object and the edge of the preview image is determined; and the photographing mode of the photographing device is adjusted according to each determined reference distance.
- the reference distance between the target part of each photographing object and each edge of the preview image is calculated, and the photographing mode of the photographing device is adjusted according to each reference distance.
- the adjusting the shooting mode of the shooting device according to the determined reference distances may include: when there is a distance less than or equal to the fourth value in each of the determined reference distances, then The photographing device is controlled to enter a first photographing mode. It can be understood that the first shooting mode can be set to the wide-angle shooting mode. When there is a distance less than or equal to the fourth value in each reference distance, the shooting mode of the current shooting device is adjusted to the wide-angle shooting model. Of course, the first shooting mode is also It can be a short-focus shot, etc.
- the adjusting the shooting mode of the shooting device according to the determined reference distances may include: when each of the determined reference distances is greater than the fourth value, controlling the shooting device to enter the first Two shooting modes.
- the current shooting mode is adjusted to the second shooting mode.
- the second shooting mode can be a telephoto shooting mode, a normal shooting mode, etc. The application examples are not limited.
- the current shooting mode of the shooting device is adjusted to be the first shooting mode.
- special effect processing is performed on the preview image; and the preview image after special effect processing is displayed.
- special effects options are set on the display interface, for example, for the target part of the shooting object: natural, beauty, big eyes, microdermabrasion, face reduction, etc., or for the entire preview image. : Texture, oil painting, sketch, etc. Users can make personalized choices and personalized equipment for each special effect.
- the shooting equipment can also preset various parameters of special effect processing, and directly display the preview image after special effect processing after special effect processing.
- the current shooting mode of the shooting device is adjusted so that the current shooting mode is the second shooting mode.
- the shooting device when the number of shooting objects in the preview image changes from greater than or equal to a third numerical value to less than the third numerical value, the shooting device is controlled to adjust the shooting mode from the first shooting mode to the second shooting mode shooting mode.
- the first shooting mode may be a wide-angle shooting mode, a short-focus shooting mode, etc.
- the second shooting mode may be a telephoto shooting mode, a normal shooting mode, etc., which are not limited in detail. It can be understood that when the preview image is When the number of the photographing objects in the apparatus changes from greater than or equal to the third numerical value to less than the third numerical value, the current photographing mode is automatically adjusted to be converted from the first photographing mode to the second photographing mode.
- the number of photographing objects in the preview image when the number of photographing objects in the preview image changes from greater than or equal to the third numerical value to less than the third numerical value, the number of photographing objects in the acquired preview image is less than the third numerical value.
- Duration adjust the capture mode of the camera based on the duration.
- the number of photographed objects in the preview image when the number of photographed objects in the preview image changes from greater than or equal to the third numerical value to less than the third numerical value, obtain the number of photographed objects less than the third numerical value.
- Duration according to the duration to adjust the shooting device's dual shooting mode.
- the adjusting the shooting mode of the shooting device according to the duration may include: detecting whether the duration is greater than or equal to a preset duration; if the duration is greater than or equal to the preset duration, Then, the photographing device is controlled to adjust the photographing mode from the first photographing mode to the second photographing mode.
- the preset duration may be determined according to actual conditions, for example, it may be 2s, 5s, or the like.
- the method may further include: detecting a user's shooting mode adjustment operation; and adjusting the shooting mode of the shooting device according to the user's shooting mode adjustment operation.
- the user in any shooting mode, the user can manually adjust the shooting mode, so that the current shooting mode is more in line with the user's personalized needs.
- the photographing device by determining the number of photographed objects in the preview image, it is detected whether the number of photographed objects is greater than or equal to the third numerical value, and when the number of photographed objects is greater than or equal to the third numerical value, the photographing device is controlled to enter the first In the shooting mode, when the number of shooting objects is less than the third value, the shooting device is controlled to enter the second shooting mode, so that the shooting mode of the shooting device is automatically adjusted according to the number of shooting objects, which improves the efficiency of shooting mode adjustment and improves the quality of preview images. Presenting the effect, avoiding the inefficiency caused by manually adjusting the shooting mode.
- FIG. 9 is a schematic structural diagram of a shooting control apparatus provided by an exemplary embodiment of the present application.
- the apparatus may be mounted on the smart device in the above method embodiment, and the smart device may specifically be a server. Of course, in some embodiments, it can also be mounted on a terminal device.
- the photographing control apparatus shown in FIG. 9 may be used to perform some or all of the functions in the method embodiments described in the above-mentioned FIG. 1 , FIG. 4 , FIG. 6 and FIG. 8 .
- the detailed description of each unit is as follows:
- an obtaining unit 901 configured to obtain a preview image collected by a photographing device
- the processing unit 902 is configured to identify the photographed object in the preview image; and to process the photographed object according to a preset rule to make the target part of the photographed object in the preview image complete.
- the processing unit 902 is specifically configured to control the shooting device to adjust the shooting mode to the first shooting mode if it is detected that the target part of the shooting object is incomplete, so that the preview The target part of the subject in the image is intact.
- the processing unit 902 controls and controls the shooting device to enter the first shooting mode, so that the target part of the shooting object in the preview image is complete, which may include: according to the shooting object The distance between the incomplete target part and the edge of the preview image, and/or the predicted complete size corresponding to the incomplete target part, determine the shooting parameters to be switched, and the shooting parameters to be switched include the size of the angle of view and/or the viewing angle direction; control the shooting device to adjust the shooting mode to the first shooting mode, and adjust the shooting parameters of the shooting device to the to-be-switched shooting parameters in the first shooting mode, so that all The target part of the subject in the preview image is complete.
- the processing unit 902 is further configured to control the zoom of the photographing device if it is detected that the target part of the photographing object is incomplete, so that the target of the photographing object in the preview image is The part is complete.
- the processing unit 902 controls the zoom of the photographing device to make the target part of the photographed object complete in the preview image, which may include: determining a target object, where the target object is the preview the target part of the part included in the image; obtain the image parameters of the target object; control the zoom of the shooting device according to the image parameters of the target object, so that the target part of the shooting object in the preview image is complete.
- obtaining the image parameters of the target object by the processing unit 902 may include at least one of the following: obtaining the distance between the target object and the edge of the preview image; obtaining the target The predicted size of the complete target part corresponding to the object.
- the processing unit 902 controls the zooming of the photographing device according to the image parameters of the target object, so that the target part of the photographing object in the preview image is complete, which may include: according to the target The distance between the object and the edge of the preview image, and/or the predicted size of the complete target part corresponding to the target object, determine the zoom parameter; control the zoom of the shooting device according to the zoom parameter, so that all The preview image includes all the target parts of each photographed object.
- the processing unit 902 determines the zoom parameter according to the distance between the target object and the edge of the preview image, and/or the predicted size of the complete target part corresponding to the target object may include: determining the complete target corresponding to each predicted target object according to the distance between the target object and the edge of the preview image and/or the predicted size of the complete target part corresponding to the target object The distance between the part and the edge of the preview image; the zoom parameter is determined according to the distance between the complete target part corresponding to each predicted target object and the edge of the preview image.
- the processing unit 902 is further configured to detect that the target part of the shooting object is complete, and then determine the reference distance between the target part of each shooting object and the edge of the preview image; According to each determined reference distance, the zoom of the photographing device is controlled to adjust the reference distance between the target part and the edge of the preview image.
- the processing unit 902 controls the zoom of the photographing device according to the determined reference distances to adjust the reference distance between the target part and the edge of the preview image, which may include : when there is a distance less than or equal to the first value in each of the determined reference distances, control the zoom of the shooting device to make the distance between the target part of each shooting object and the edge of the preview image are greater than the first value.
- the processing unit 902 is further configured to, if it is detected that the target parts of the shooting objects are complete, determine the image areas of the target parts of all the shooting objects in the preview image; The proportion of the area in the preview image is controlled, and the zoom of the photographing device is controlled to adjust the proportion of the image area in the preview image.
- the processing unit 902 controls the zoom of the photographing device according to the proportion of the image area in the preview image, so as to adjust the proportion of the image area in the preview image
- the ratio may include: when the proportion of the image area in the preview image is less than or equal to a second value, controlling the zoom of the photographing device so that the proportion of the image area in the preview image greater than the second value.
- the processing unit 902 may include: acquiring a preview collected by the photographing device after the processing image; determine the initial image area where the target parts of all the shooting objects in the preview image are located; obtain reference size information, and adjust the size of the initial image area according to the reference size information.
- the processing unit 902 is further configured to determine the number of photographed objects in the preview image; detect whether the number of photographed objects is greater than or equal to a third value, and obtain a detection result; according to the The detection result adjusts the shooting mode of the shooting device.
- the processing unit 902 adjusts the shooting mode of the shooting device according to the detection result, which may include: if the detection result is that the number of the shooting objects is greater than or equal to the third numerical value , the shooting device is controlled to enter the first shooting mode.
- the processing unit 902 may be further configured to control the number of objects in the preview image to change from greater than or equal to the third numerical value to less than the third numerical value
- the photographing device adjusts the photographing mode from the first photographing mode to the second photographing mode.
- the processing unit 902 may be further configured to acquire the preview when the number of objects in the preview image changes from greater than or equal to the third numerical value to less than the third numerical value
- the number of photographed objects in the image is less than the duration of the third numerical value; the photographing mode of the photographing device is adjusted according to the duration.
- the processing unit 902 adjusts the shooting mode of the shooting device according to the duration, which may include: detecting whether the duration is greater than or equal to a preset duration; if the duration is greater than or equal to is equal to the preset duration, controlling the photographing device to adjust the photographing mode from the first photographing mode to the second photographing mode.
- the processing unit 902 adjusts the shooting mode of the shooting device according to the detection result, which may include: if the detection result is that the number of the shooting objects is less than the third value, then The photographing device is controlled to enter a second photographing mode.
- the processing unit 902 may be further configured to determine a reference distance between the target part of each photographed object and the edge of the preview image; adjust the photographing device according to the determined reference distances shooting mode.
- the processing unit 902 adjusts the shooting mode of the shooting device according to each determined reference distance, which may include: when there is a distance less than or equal to a fourth value in each of the determined reference distances is controlled, the photographing device is controlled to enter the first photographing mode.
- the processing unit 902 adjusts the shooting mode of the shooting device according to each of the determined reference distances, which may include: when each of the determined reference distances is greater than a fourth value, controlling the The shooting device enters the second shooting mode.
- the processing unit 902 detects whether the target part of the photographed object is complete, which may include: inputting the preview image into a target part recognition model for processing to obtain a result of whether the target part is complete; wherein , the result of whether the target part is complete is used to indicate whether the preview image includes all the target parts of each photographed object, and the target part recognition model is obtained by training a sample data set, and the sample data set includes A first sample image and a second sample image, the first sample image includes complete target parts of each photographed object, and the second sample image includes incomplete target parts of each photographed object.
- some of the steps involved in the image processing methods shown in FIG. 1 , FIG. 4 , FIG. 6 , and FIG. 8 may be performed by each unit in the photographing control device shown in FIG. 9 .
- Each unit in the photographing control device shown in FIG. 9 may be combined into one or several other units, respectively or all, or some unit(s) may be further divided into multiple units with smaller functions. The same operation can be achieved without affecting the realization of the technical effects of the embodiments of the present application.
- the above-mentioned units are divided based on logical functions. In practical applications, the function of one unit may also be implemented by multiple units, or the functions of multiple units may be implemented by one unit. In other embodiments of the present application, the photographing control device may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of multiple units.
- a general-purpose computing device such as a computer including processing elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and other processing elements and storage elements.
- processing elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and other processing elements and storage elements.
- Running a computer program (including program code) capable of executing the steps involved in the respective methods as shown in FIGS. 1 , 4 , 6 and 8 to construct a photographing control device as shown in FIG. 9 , and The shooting control method of the embodiment of the present application is realized.
- the computer program can be recorded on, for example, a computer-readable recording medium, loaded in the above-mentioned computing apparatus via the computer-readable recording medium, and executed therein.
- FIG. 10 shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application, where the computer device at least includes a processor 1001 , a communication interface 1002 , and a memory 1003 .
- the processor 1001, the communication interface 1002 and the memory 1003 may be connected through a bus or other means.
- the processor 1001 (or Central Processing Unit (CPU)) is the computing core and control core of the terminal, which can parse various instructions in the terminal and process various data of the terminal.
- CPU Central Processing Unit
- the CPU can use It is used to parse the power-on/off command sent by the user to the terminal, and control the terminal to perform power-on/off operation; another example: the CPU can transmit various interactive data between the internal structures of the terminal, and so on.
- the communication interface 1002 may include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), which can be used to send and receive data under the control of the processor 1001; transmission and interaction.
- the memory 1003 (Memory) is a memory device in the terminal for storing programs and data. It can be understood that, the memory 1003 here can include both the built-in memory of the terminal, and certainly also the extended memory supported by the terminal.
- the memory 1003 provides storage space, and the storage space stores the operating system of the terminal, which may include but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in this application.
- the processor 1001 performs the following operations by running the executable program code in the memory 1003:
- the zoom of the photographing device is controlled according to the object recognition result.
- the processor 1001 is specifically configured to control the shooting device to adjust the shooting mode to the first shooting mode if it is detected that the target part of the shooting object is incomplete, so that the preview The target part of the subject in the image is intact.
- the processor 1001 controls and controls the shooting device to enter a first shooting mode, so that the target part of the shooting object in the preview image is complete, which may include: according to the shooting object The distance between the incomplete target part and the edge of the preview image, and/or the predicted complete size corresponding to the incomplete target part, determine the shooting parameters to be switched, and the shooting parameters to be switched include the size of the angle of view and/or the viewing angle direction; control the shooting device to adjust the shooting mode to the first shooting mode, and adjust the shooting parameters of the shooting device to the to-be-switched shooting parameters in the first shooting mode, so that all The target part of the subject in the preview image is complete.
- the processor 1001 is further configured to control the zoom of the photographing device if it is detected that the target part of the photographing object is incomplete, so that the target of the photographing object in the preview image is The part is complete.
- the processor 1001 controls the zoom of the photographing device to make the target part of the photographed object complete in the preview image, which may include: determining a target object, where the target object is the preview the target part of the part included in the image; obtain the image parameters of the target object; control the zoom of the shooting device according to the image parameters of the target object, so that the target part of the shooting object in the preview image is complete.
- the processor 1001 obtains the image parameters of the target object, which may include at least one of the following: obtaining the distance between the target object and the edge of the preview image; obtaining the target The predicted size of the complete target part corresponding to the object.
- the processor 1001 controls the zoom of the photographing device according to the image parameters of the target object, so that the target part of the photographed object in the preview image is complete, which may include: according to the target The distance between the object and the edge of the preview image, and/or the predicted size of the complete target part corresponding to the target object, determine the zoom parameter; control the zoom of the shooting device according to the zoom parameter, so that all The preview image includes all of the target parts of each photographed object.
- the processor 1001 determines the zoom parameter according to the distance between the target object and the edge of the preview image and/or the predicted size of the complete target part corresponding to the target object may include: determining the complete target corresponding to each predicted target object according to the distance between the target object and the edge of the preview image and/or the predicted size of the complete target part corresponding to the target object The distance between the part and the edge of the preview image; the zoom parameter is determined according to the distance between the complete target part corresponding to each predicted target object and the edge of the preview image.
- the processor 1001 is further configured to detect that the target part of the shooting object is complete, and then determine the reference distance between the target part of each shooting object and the edge of the preview image; According to each determined reference distance, the zoom of the photographing device is controlled to adjust the reference distance between the target part and the edge of the preview image.
- the processor 1001 controls the zoom of the photographing device according to the determined reference distances to adjust the reference distance between the target part and the edge of the preview image, which may include : when there is a distance less than or equal to the first value in each of the determined reference distances, control the zoom of the shooting device to make the distance between the target part of each shooting object and the edge of the preview image are greater than the first value.
- the processor 1001 is further configured to, if it is detected that the target parts of the shooting objects are complete, determine the image areas of the target parts of all the shooting objects in the preview image; The proportion of the area in the preview image is controlled, and the zoom of the photographing device is controlled to adjust the proportion of the image area in the preview image.
- the processor 1001 controls the zoom of the photographing device according to the proportion of the image area in the preview image, so as to adjust the proportion of the image area in the preview image
- the ratio may include: when the proportion of the image area in the preview image is less than or equal to a second value, controlling the zoom of the photographing device so that the proportion of the image area in the preview image greater than the second value.
- the processor 1001 may include: acquiring a preview collected by the photographing device after the processing image; determine the initial image area where the target parts of all the shooting objects in the preview image are located; obtain reference size information, and adjust the size of the initial image area according to the reference size information.
- the processor 1001 is further configured to determine the number of photographed objects in the preview image; detect whether the number of photographed objects is greater than or equal to a third value, and obtain a detection result; according to the The detection result adjusts the shooting mode of the shooting device.
- the processor 1001 adjusts the shooting mode of the shooting device according to the detection result, which may include: if the detection result is that the number of the shooting objects is greater than or equal to the third numerical value , the shooting device is controlled to enter the first shooting mode.
- the processor 1001 may be further configured to control the number of objects in the preview image to change from greater than or equal to the third numerical value to less than the third numerical value
- the photographing device adjusts the photographing mode from the first photographing mode to the second photographing mode.
- the processor 1001 may be further configured to acquire the preview when the number of objects in the preview image changes from greater than or equal to the third numerical value to less than the third numerical value
- the number of photographed objects in the image is less than the duration of the third numerical value; the photographing mode of the photographing device is adjusted according to the duration.
- the processor 1001 adjusts the shooting mode of the shooting device according to the duration, which may include: detecting whether the duration is greater than or equal to a preset duration; if the duration is greater than or equal to a preset duration is equal to the preset duration, controlling the photographing device to adjust the photographing mode from the first photographing mode to the second photographing mode.
- the processor 1001 adjusts the shooting mode of the shooting device according to the detection result, which may include: if the detection result is that the number of the shooting objects is less than the third value, then The photographing device is controlled to enter a second photographing mode.
- the processor 1001 is further configured to determine a reference distance between the target part of each photographed object and the edge of the preview image; adjust the photographing device according to the determined reference distances shooting mode.
- the processor 1001 adjusts the shooting mode of the shooting device according to the determined reference distances, which may include: when there is a distance less than or equal to a fourth value among the determined reference distances is controlled, the photographing device is controlled to enter the first photographing mode.
- the processor 1001 adjusts the shooting mode of the shooting device according to the determined reference distances, which may include: when each of the determined reference distances is greater than a fourth value, controlling the shooting mode of the shooting device.
- the shooting device enters the second shooting mode.
- the processor 1001 detects whether the target part of the photographed object is complete, which may include: inputting the preview image into a target part recognition model for processing to obtain a result of whether the target part is complete; wherein , the result of whether the target part is complete is used to indicate whether the preview image includes all the target parts of each photographed object, and the target part recognition model is obtained by training a sample data set, and the sample data set includes A first sample image and a second sample image, the first sample image includes complete target parts of each photographed object, and the second sample image includes incomplete target parts of each photographed object.
- the principles and beneficial effects of the terminal device for solving problems provided in the embodiments of the present application are similar to the principles and beneficial effects for solving problems of the shooting control method in the method embodiments of the present application, and you can refer to the principles and beneficial effects of the implementation of the method. , for the sake of brevity, it will not be repeated here.
- Embodiments of the present application further provide a computer-readable storage medium, where one or more instructions are stored in the computer-readable storage medium, and the one or more instructions are suitable for being loaded by a processor and executing the above method embodiments.
- the modules in the apparatus of the embodiment of the present application may be combined, divided and deleted according to actual needs.
- the embodiments of the present application further provide a computer program product, the computer program product includes computer program code, when the computer program code is run on a computer, the computer is made to execute the method described in the various possible implementation manners above.
- An embodiment of the present application further provides a chip, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a chip installed with the chip is
- the apparatus performs the method as described in the various possible embodiments above.
- first, second, third, etc. may be used herein to describe various information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other.
- first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of this document.
- the word “if” as used herein can be interpreted as “at the time of” or “when” or “in response to determining”, depending on the context.
- the singular forms "a,” “an,” and “the” are intended to include the plural forms as well, unless the context dictates otherwise.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
本申请实施例公开了一种拍摄控制方法、装置、智能设备及计算机可读存储介质,所述方法包括:获取拍摄设备采集的预览图像;识别所述预览图像中的拍摄对象;检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中所述拍摄对象的目标部位完整。本申请实施例能够智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整、拍摄对象的大小适宜,整体上提高预览图像的呈现效果。
Description
本申请涉及终端技术领域,尤其涉及一种拍摄控制方法、装置、智能设备及计算机可读存储介质。
随着科学技术的发展,人们对于拍摄设备的要求越来越高。目前市场上的大多拍摄设备中的摄像头是固定视场角或者多个固定视场角摄像头组合,无法支持用户在实际生活中的灵活构图,在拍摄过程中只能通过手动切换不同视场角摄像头或者手动变焦去控制拍摄对象的大小和完整度,达到智能构图的目的。因此,如何智能化地控制拍摄设备对拍摄对象的大小和/或完整度进行调整是当前研究的一个热点。
以上内容只是用于说明本申请所要解决的技术问题,并不代表上述内容为现有技术。
发明内容
本申请实施例提供了一种拍摄控制方法、装置、智能设备及计算机可读存储介质,可以智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整、拍摄对象的大小适宜,整体上提高预览图像的呈现效果。
第一方面,本申请实施例提供了一种拍摄控制方法,包括:
获取拍摄设备采集的预览图像;
识别所述预览图像中的拍摄对象;
检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中所述拍摄对象的目标部位完整。
本申请实施例中,拍摄设备能够智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整、拍摄对象的大小适宜,整体上提高预览图像的呈现效果。
在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整,包括:
若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备将拍摄模式调整为第一拍摄模式,以使所述预览图像中拍摄对象的目标部位完整。
本申请实施例中,若检测出目标部位不完整,则控制拍摄设备按照预设规则自动将拍摄模式调整为第一拍摄模式,以增大拍摄视角,进而不仅使得预览图像中拍摄对象的目标部位能够完整呈现,还避免用户手动操作不便、效率低下的情况发生。
在一种可选的实施例中,所述控制所述拍摄设备进入第一拍摄模式,以使所述预览图像中的所述拍摄对象的目标部位完整,包括:
根据所述拍摄对象的不完整的目标部位与所述预览图像的边缘之间的距离、和/或所述不完整的目标部位所对应的预测完整大小,确定待切换拍摄参数,所述待切换拍摄参数包括视角大小和/或视角方向;
控制所述拍摄设备将拍摄模式调整为第一拍摄模式,并在所述第一拍摄模式下将所述拍摄设备的拍摄参数调整为所述待切换拍摄参数,以使所述预览图像中拍摄对象的目标部位完整。
在本申请实施例中,在检测到拍摄对象的目标部位不完整时,会对拍摄对象的不完整的目标部位与预览图像的边缘之间距离,以及不完整目标部位所对应的预测完整大小进行综合判断,确定出包括视角大小和/或视角方向的待切换拍摄参数,将第一拍摄模式中预设 参数调整为待切换拍摄参数,进而不仅使得预览图像中拍摄对象的目标部位完整,还能使得预览图像的整体构图更加和谐。
在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整,包括:
若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在本申请实施例中,在检测到拍摄对象的目标部位不完整后,自动控制拍摄设备的变焦,使得拍摄对象的目标部位在摄像头焦距的变化下,在预览图像中全部呈现,即能够自动化、智能化地控制拍摄设备的变焦,提高拍摄设备变焦的效率,提高预览图像的呈现效果。
在一种可选的实施例中,所述控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,包括:
确定目标对象,所述目标对象为所述预览图像中包括的部分部位的目标部位;
获取所述目标对象的图像参数;
根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在本申请实施例中,先确定预览图像中部分部位的目标部位为目标对象,再确定其图像参数,进而直接根据该图像参数确定拍摄设备的变焦信息,拍摄设备就根据该变焦信息进行预览图像的采集,实现自动化、智能化地控制拍摄设备的变焦,提高拍摄设备变焦的效率,提高预览图像的呈现效果。
在一种可选的实施例中,所述获取所述目标对象的图像参数,包括以下至少一种:
获取所述目标对象与所述预览图像的边缘之间的距离;
获取所述目标对象所对应的完整目标部位的预测大小。
在一种可选的实施例中,所述根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,包括:
根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数;
根据所述变焦参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,所述变焦参数包括待变焦中心点和待变焦焦距,所述根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数,包括:
根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离;
根据所述预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离,确定待变焦中心点和/或待变焦焦距。
在本申请实施例中,具体根据目标对象与预览图像的边缘之间的距离、和/或目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与预览图像的边缘之间的距离,进而对变焦参数进行确定,如待变焦中心、待变焦焦距等,进而使得预览图像中拍摄对象的目标部位能够完整呈现,且整体上构图更为和谐。
在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中拍摄对象完整,包括:
若检测到所述拍摄对象的目标部位完整,则确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;
根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述 预览图像的边缘之间的参考距离。
本申请实施例中,如果检测到拍摄对象的目标部位完整,则判断目标部位是否距离预览图像的边缘过近,进而通过控制拍摄设备的变焦,使得目标部位与预览图像的边缘之间的距离能增大,以使预览图像的构图平衡、和谐。
在一种可选的实施例中,所述根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离,包括:
当确定出的各个参考距离中存在小于或等于第一数值的距离时,控制所述拍摄设备的变焦,以使所述每一个拍摄对象的目标部位与所述预览图像的边缘之间的距离均大于或等于所述第一数值。
在本申请实施例中,目标部位全部都在预览图像中,但存在与预览图像的边缘之间的距离小于或等于第一数值距离的目标部位时,控制拍摄设备的变焦,以使每个目标部位与预览图像的边缘之间距离都大于或等于第一数值,使得预览图像的呈现效果更好。
在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使所述预览图像中拍摄对象的目标部位完整,包括:
若检测到所述拍摄对象的目标部位完整,确定所有拍摄对象的目标部位在所述预览图像中的图像区域;
根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比。
在本申请实施例中,若检测到所有目标部位都在预览图像中完整呈现,但是预览图像的构图并不好,也就是说所有目标部位在预览图像中的总图像区域在预览图像中的占比太小,进而导致预览图像中的重点不够突出,此时则通过控制拍摄设备的变焦,以调整图像区域的占比,使得预览图像的构图更加和谐。
在一种可选的实施例中,所述根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比,包括:
当所述图像区域在所述预览图像中的占比小于或等于第二数值时,控制所述拍摄设备的变焦,以使所述图像区域在所述预览图像中的占比大于或等于所述第二数值。
在本申请实施例中,可预设一个第二数值,当图像区域在预览图像中占比小于或等于第二数值时,直接触发拍摄设备的变焦,使得图像区域在预览图像中的占比大于或等于第二数值。
在一种可选的实施例中,所述根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整之后,包括:
获取处理后所述拍摄设备采集的预览图像;
确定预览图像中所有拍摄对象的目标部位所在的初始图像区域;
获取参考尺寸信息,并根据所述参考尺寸信息调整所述初始图像区域的尺寸。
在本申请实施例中,还可获取根据预设规则处理后采集的预览图像,确定所有目标部位在预览图像中的初始图像区域,进而与拍摄设备中的参考尺寸信息进行对比、调整,例如将初始图像区域调整至整个预览图像的中间位置,从而使得预览图像的重点更加突出,呈现效果更佳。
在一种可选的实施例中,所述方法还包括:
确定所述预览图像中的拍摄对象的数目;
检测所述拍摄对象的数目是否大于或等于第三数值,得到检测结果;
根据所述检测结果调整所述拍摄设备的拍摄模式。
在本申请实施例中,通过预览图像中拍摄对象的数目来判断是否调整拍摄设备的拍摄模式,进而自动化、智能化地控制拍摄设备的变焦,提高拍摄设备变焦的效率,提高预览图像的呈现效果。
在一种可选的实施例中,所述根据所述检测结果调整所述拍摄设备的拍摄模式,包括:
若所述检测结果为所述拍摄对象的数目大于或等于所述第三数值,则控制所述拍摄设备进入所述第一拍摄模式。
在本申请实施例中,拍摄设备检测到拍摄对象的数目大于或等于第三数值,自动控制拍摄设备进入第一拍摄模式,从而避免手动调整带来的操作不便、效率不高的问题,提高拍摄的效率和质量。
在一种可选的实施例中,当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
在本申请实施中,拍摄设备实时监测预览图像中拍摄对象,若拍摄对象的数目由大于或等于第三数值变化为小于第三数值时,智能化、自动化地控制拍摄设备将拍摄模式由第一拍摄模式调整成第二拍摄模式,使得预览图像的构图效果更好。
在一种可选的实施例中,当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,获取所述预览图像中的拍摄对象的数目小于所述第三数值的持续时长;
根据所述持续时长调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,所述根据所述持续时长调整所述拍摄设备的拍摄模式,包括:
检测所述持续时长是否大于或等于预设时长;
若所述持续时长大于或等于所述预设时长,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
在本申请实施例中,通过检测预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,小于第三数值的持续时长,如果持续时长大于或等于预设时长则自动调整第一拍摄模式为第二拍摄模式,提高预览图像的呈现效果,进而提高拍摄的效率和质量。
在一种可选的实施例中,所述根据所述检测结果调整所述拍摄设备的拍摄模式,包括:
若所述检测结果为所述拍摄对象的数目小于所述第三数值,则控制所述拍摄设备进入第二拍摄模式。
在一种可选的实施例中,所述方法还包括:
确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;
根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式。
在本申请实施例中,对每一个拍摄对象的目标部位与预览图像的边缘之间的参考距离进行计算,确定各个参考距离,进而根据各个参考距离调整拍摄模式,使得目标部位在预览图像中的呈现位置适合整个预览图像的构图,提高预览图像的呈现效果。
在一种可选的实施例中,所述根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,包括:
当确定出的各个参考距离中存在小于或等于第四数值的距离时,则控制所述拍摄设备进入第一拍摄模式。
在本申请实施例中,若各个参考距离中存在小于或等于第四数值的距离时,说明存在目标部位距离预览图像的边缘太近,或者仅有目标部位的部分在预览图像的边缘处,则自动调整拍摄设备的拍摄模式为第一拍摄模式,提高图像的呈现效果,提高拍摄的效率和质量。
在一种可选的实施例中,所述根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,包括:
当确定出的各个参考距离均大于或等于第四数值时,则控制所述拍摄设备进入第二拍摄模式。
在本申请实施例中,若各个参考距离都大于或等于第四数值,则说明全部的目标部位都在预览图像中,此时自动调整拍摄设备进如第二拍摄模式,提高预览图像的呈现效果。
在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,包括:
将所述预览图像输入目标部位识别模型中进行处理,得到目标部位是否完整的结果;
其中,所述目标部位是否完整的结果用于指示所述预览图像中是否包括每一个拍摄对象的目标部位的全部,所述目标部位识别模型是利用样本数据集训练得到的,所述样本数据集中包括第一样本图像和第二样本图像,所述第一样本图像中包括各个拍摄对象的完整目标部位,所述第二样本图像中包括所述各个拍摄对象的不完整目标部位。
本申请实施例中,通过预先训练目标部位识别模型,进而利用训练好的目标部位识别模型对预览图像进行处理,得到目标部位是否完整的结果,使得本申请实施例可自动对拍摄对象的目标部位是否完整进行检测,进而便于拍摄设备按照预设规则进行相应处理,提高预览图像的整体呈现效果。
第二方面,本申请实施例提供了一种拍摄控制装置,包括:
获取单元,用于获取拍摄设备采集的预览图像;
处理单元,用于识别所述预览图像中的拍摄对象;以及用于检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中所述拍摄对象的目标部位完整。
本申请实施例中,拍摄设备能够智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整、拍摄对象的大小适宜,整体上提高预览图像的呈现效果。
第三方面,本申请实施例提供了一种智能设备,其特征在于,包括处理器、存储器,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行第一方面所述的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其特征在于,包括:所述计算机可读存储介质存储有一条或多条指令,所述一条或多条指令适于由处理器加载并执行如第一方面所述的方法。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的第一种拍摄控制方法的流程示意图;
图2a是本申请实施例提供的一种目标部位的部分在预览图像中的示意图;
图2b是本申请实施例提供的一种完整的目标部位在预览图像中的示意图;
图2c是本申请实施例提供的一种其他部位的部分在预览图像中的示意图;
图2d是本申请实施例提供的另一种完整的目标部位在预览图像中的示意图;
图3a是本申请实施例提供的一种所有拍摄对象的目标部位都在预览图像中的示意图;
图3b是本申请实施例提供的另一种所有拍摄对象的目标部位都在预览图像中的示意图;
图4是本申请实施例提供的第二种拍摄控制方法的流程图;
图5a是本申请实施例提供的一种不完整人脸a和b在预览图像中的示意图;
图5b是本申请实施例提供的一种根据不完整人脸a和b确定待切换拍摄参数的示意图;
图6是本申请实施例提供的第三种拍摄控制方法的流程图;
图7a是本申请实施例提供的一种目标对象的示意图;
图7b是本申请实施例提供的一种预测目标对象对应的完整目标部位的计算点的示意图;
图7c是本申请实施例提供的又一种完整的目标部位在预览图像中的示意图;
图7d是本申请实施例提供的一种完整的目标部位在预览图像边缘附近的示意图;
图7e是本申请实施例提供的再一种完整的目标部位在预览图像中的示意图;
图7f是本申请实施例提供的一种图像区域在预览图像中的示意图;
图7g是本申请实施例提供的另一种图像区域在预览图像中的示意图;
图8是本申请实施例提供的第四种拍摄控制方法的流程图;
图9是本申请实施例提供的一种拍摄控制装置的结构示意图;
图10是本申请实施例提供的一种智能设备的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参见图1,图1是本申请实施例提供的第一种拍摄控制方法的流程图。本申请实施例的所述方法可以由拍摄设备来执行,可以由服务器来执行,所述方法具体可包括如下步骤:
S101、获取拍摄设备采集的预览图像。
本申请实施例中,通过拍摄设备对拍摄画面的采集,得到显示有拍摄画面的预览图像,基于该预览图像进行后续的计算处理。需要注意的是,本申请实施例可基于拍摄设备处于一种智能拍摄模式的场景下进行的,当然也可在其他场景下进行,本申请实施例不作限定。可以理解的是,本申请实施例中的拍摄设备可以是包括摄像功能的各种设备,例如可以是摄像机、录像机等图像采集设备,还可以是智能手机、掌上处理设备、平板电脑、移动笔记本、虚拟现实设备、一体化掌机等,还可以是可穿戴设备,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。
S102、识别预览图像中的拍摄对象。
本申请实施例中,预览图像中呈现着拍摄画面中的各种拍摄对象,例如可以是人或物,基于自动侦查功能的拍摄设备能够通过预览图像进行人脸检测算法、物品检测算法、动物检测算法等识别出预览图像中的拍摄对象具体是人、是物品还是动物等。进一步地,识别出是人、物品还是动物之后,还可以具体检测出是否是整个拍摄对象,或者拍摄对象中的某个部位,或者拍摄对象中的某个部位的一部分。以拍摄对象是人为例,拍摄对象中的某个部位可以是人脸、手臂、一双腿等,拍摄对象中的某个部位的一部分可以是半张人脸、半张手掌等。
可以理解的是,为了对拍摄对象的某个部位是否完整进行准确的检测,可利用训练好的目标部位识别模型进行对象的识别,在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,可以包括:将预览图像输入目标部位识别模型中进行处理,目标部位是否完整的结果;其中,目标部位是否完整的结果用于指示预览图像中是否包括每一个拍摄对象的目标部位的全部,对象识别模型是利用样本数据集训练得到的,样本数据集中包括第一样本图像和第二样本图像,第一样本图像中包括各个拍摄对象的完整目标部位,第二样本图像中包括各个拍摄对象的不完整目标部位。以拍摄对象为人举例,在进行对象识别模型的训练时,样本数据集中的第一样本图像可以是人脸、一双手、一只腿的图像等,第二样本图像可以是仅有部分人脸(左脸、右脸、额头、下巴等)、部分手(半个手掌、4个手指等)的图像等。
在一种可选的实施例中,所述检测所述拍摄对象的目标部位是否完整,可以包括:将 预览图像输入目标部位识别模型中进行处理,得到目标部位是否完整的结果;其中,目标部位是否完整的结果用于指示预览图像中是否包括每一个拍摄对象的目标部位,对象识别模型是利用样本数据集训练得到的,样本数据集中包括第一样本图像和第二样本图像,第一样本图像中包括各个拍摄对象的完整目标部位,第二样本图像中包括各个拍摄对象的除目标部位之外的其他部位,或者包括各个拍摄对象的除目标部位之外的一定区域的其他部位。以目标部位为人脸举例,此时训练对象识别模型的样本数据集中的第一样本图像可以为包括人脸的图像,第二样本图像可以为没有人脸的人体图像、仅有一双腿的图像等。
S103、检测拍摄对象的目标部位是否完整,根据预设规则对拍摄对象进行处理以使预览图像中拍摄对象的目标部位完整。
在本申请实施例中,检测拍摄对象的目标部位是否完整可以是检测预览图像中是否包括每一个拍摄对象的目标部位的全部,可以是检测预览图像中是否包括每一拍摄对象的目标部位,进而根据检测结果按照预设规则对拍摄对象进行处理,以使预览图像中包括各个拍摄对象的目标部位的全部。以目标部位为人脸,如图2a所示,预览图像中包括一个人的额头为例,此时拍摄设备识别出额头,但是额头仅是人脸的一部分,则按照预设规则控制拍摄设备,以使预览图像中包括所述额头对应的完整人脸(如图2b所示);以目标部位为人脸,预览图像中包括部分手臂举例,此时识别出预览图像中包括部分手臂(如图2c所示),但是并没有人脸,则控制拍摄设备的变焦,以使预览图像中包括所述部分手臂对应的人体的人脸(如图2d所示),当然可以设置在预览图像中没有目标部位时,当其他部位的图像区域在预览图像中的占比大于一个数值时控制拍摄设备按照预设规则对拍摄对象进行处理,使得所述其他部位所对应的完整的目标部位显示在预览图像中。可以理解的是,根据检测结果按照预设规则对拍摄对象进行处理可以是通过切换拍摄设备的拍摄模式来对拍摄对象进行处理,可以是通过控制拍摄设备的变焦来对拍摄对象进行处理。还可以理解的是,拍摄设备中的每个拍摄模式都可以设置预设参数阈值;控制拍摄设备的变焦可以是通过一个摄像头或者多个摄像头来实现的光学变焦,以两个摄像头为例,可设置一个摄像为长焦摄像头,一个摄像头为广角摄像头,当然对于摄像头的个数以及具体摄像头的焦距的设置等,本申请实施例不作限定。
在一种可选的实施例中,识别预览图像中的拍摄对象,得到识别结果,根据识别结果控制拍摄设备的对焦。本申请实施例中,拍摄设备识别出预览图像中的拍摄对象之后,对所述拍摄对象进行对焦,使得拍摄对象能够更加清晰的呈现,而在预览图像中的其他显示内容则进行一定程序虚化处理,或者使其他内容的清晰度不变/变低等。
在一种可选的实施例中,根据识别结果控制拍摄设备的对焦,可以包括:根据对象识别结果控制拍摄设备针对预览图像中的每一个拍摄对象的目标部位进行对焦。在本申请实施例中,拍摄设备在预览图像中识别出拍摄对象的目标部位,则对该目标部位进行对焦,使得该目标部位在预览图像中的清晰度增加,从而便于预览图像的更好呈现。
在一种可选的实施例中,所述根据预设规则对拍摄对象进行处理以使预览图像中所述拍摄对象的目标部位完整之后,包括:
获取变焦后拍摄设备采集的预览图像;确定预览图像中所有拍摄对象的目标部位所在的初始图像区域;获取参考尺寸信息,并根据参考尺寸信息调整初始图像区域的尺寸。
本申请实施例中,在控制拍摄设备变焦之后,得到变焦后采集的预览图像,确定出所有拍摄对象的目标部位在变焦后的预览图像中初始图像区域,如图3a所示,虽然所有拍摄对象的目标部位都在预览图像中,但整体上所有的初始图像区域在预览图像中尺寸过小,没有达到获取到的参考尺寸信息,则调整初始图像区域的尺寸,以使初始图像区域的尺寸符合参考尺寸信息的要求。在一种可选的实施例中,调整预览图像的显示内容,以使调整后的初始图像区域在预览图像中的指定位置。可以理解的是,在初始图像区域的尺寸已符合参考尺寸信息要求时,调整预览图像的显示内容,使得初始图像区域能够在指定位置进行显示,本申请实施例中的指定位置可以是预览图像的中间部位,如图3b所示,当然也可 以是其他位置,可根据实际情况设定。
在本申请实施例中,获取拍摄设备采集的预览图像,识别预览图像的拍摄对象,检测拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中拍摄对象的目标部位完整;可见,本申请实施例能够智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整,提高预览图像的呈现效果。
请参见图4,图4是本申请实施例提供的第二种拍摄控制方法的流程图,本申请实施例的所述方法可以由拍摄设备来执行,可以由服务器来执行,所述方法具体可包括如下步骤:
S401、获取拍摄设备采集的预览图像。
S402、识别预览图像中的拍摄对象。
需要说明的是,本申请实施例中的步骤S401-S402具体可参见上述实施例中步骤S101-S102,本申请实施例不再赘述。
S403、若检测出拍摄对象的目标部位不完整,则控制拍摄设备将拍摄模式调整为第一拍摄模式,以使预览图像中拍摄对象的目标部位完整。
本申请实施例中,检测出拍摄对象的目标部位不完整可以是检测出预览图像中至少存在一个拍摄对象的目标部位不完整。第一拍摄模式可以是广角拍摄模式,可以是短焦拍摄模式等能够使预览图像中拍摄对象的目标部位完整的拍摄模式。以拍摄对象为人,目标部位为人脸举例,若拍摄设备在采集的预览图像中检测出预览图像中存在至少有一个人的人脸图像是不完整的,则控制拍摄设备将拍摄模式调整到能够使预览图像中的所有人脸图像完整的第一拍摄模式。可以理解的是,第一拍摄模式中设置有预设参数阈值,具体的预设参数阈值可按实际情况进行设置,本申请实施例不作限定。
在一种可选的实施例中,控制所述拍摄设备进入第一拍摄模式,以使所述预览图像中的所述拍摄对象的目标部位完整,可包括:根据所述拍摄对象的不完整的目标部位与所述预览图像的边缘之间的距离、和/或所述不完整的目标部位所对应的预测完整大小,确定待切换拍摄参数,所述待切换拍摄参数包括视角大小和/或视角方向;控制所述拍摄设备进入第一拍摄模式,并在所述第一拍摄模式下将所述拍摄设备的拍摄参数调整为所述待切换拍摄参数,以使所述预览图像中拍摄对象的目标部位完整。
本申请实施例中,计算预览图像中所有的不完整目标部位与预览图像边缘的距离,根据所有的不完整目标部位的大小预测所对应的完整的目标部位的大小,根据不完整目标部位与预览图像边缘的距离和预测的完整目标部位的大小确定出包括视角大小和/或视角方向的待切换拍摄参数,进而控制拍摄设备进入第一拍摄模式,并在第一拍摄模式下将拍摄设备的拍摄参数调整为待切换拍摄参数(如调整视角的度数、视角中心处移动的距离和方向等),以使预览图像中拍摄对象的目标部位完整。以第一拍摄模式为广角拍摄模式,拍摄对象为人,目标部位为人脸为例,视角大小指的是广角拍摄的度数大小,视角方向指的就是广角拍摄的视角中心处,如图5a所示,若检测到预览图像中人的人脸并不完整,通过分别计算预览图像的边缘与不完整人脸a和不完整人脸b的距离,以及分别预测不完整人脸a和不完整人脸b所对应的完整人脸大小,可以确定出不完整人脸a所对应的预测完整人脸A距离预览图像边缘的距离,大于不完整人脸b所对应的预测完整人脸B距离预览图像边缘的距离,由此确定待切换拍摄参数(如图5b所示,拍摄的视角中心处相较于广角拍摄模式下的视角中心处左移,视角度数左边增加的大于右边增加的),此时控制拍摄拍摄进行广角拍摄模式,并将广角拍摄模式中预设参数阈值调整为当前确定出的待切换拍摄参数,使得人脸能够完整呈现在预览图像中。可以理解的是,拍摄设备中的摄像头是可调整的,在进入广角拍摄模式之后,可进行摄像头位置的微调,或者拍摄设备自动微调,从而使得广角拍摄的中心处根据实际情况进行调整,提高预览图像的呈现效果。
在本申请实施例中,获取拍摄设备采集的预览图像,识别出预览图像中拍摄对象,进 而检测拍摄对象的目标部位是否完整,若目标部位不完整,则控制拍摄设备进入第一拍摄模式,从而使得拍摄对象的目标部位能够在预览图像中完整呈现;可见,本申请实施例能够智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整,提高预览图像的呈现效果。
请参见图6,图6是本申请实施例提供的第三种拍摄控制方法的流程图,本申请实施例的所述方法可以由拍摄设备来执行,可以由服务器来执行,所述方法具体可包括如下步骤:
S601、获取拍摄设备采集的预览图像。
S602、识别预览图像中的拍摄对象。
S603、检测拍摄对象的目标部位是否完整,根据预设规则对拍摄对象进行处理以使预览图像中拍摄对象的目标部位完整。
需要说明的是,本申请实施例中的步骤S601-S603具体可参见上述实施例中步骤S101-S103,本申请实施例不再赘述。本申请实施例中,检测预览图像中是否包括每一个拍摄对象的目标部位的全部,得到的检测结果可以是预览图像中包括每一拍摄对象的目标部位的全部,可以是预览图像中不包括每一拍摄对象的目标部位的全部。在一种可选的实施例中,若检测结果为拍摄对象的目标部位不完整,即预览图像中不包括每一个拍摄对象的目标部位的全部,则控制拍摄设备的变焦,以使预览图像中包括每一个拍摄对象的目标部位的全部。需要注意的是,若检测结果为拍摄对象的目标部位不完整,即预览图像中不包括每一个拍摄对象的目标部位的全部,则执行步骤S604-S606,若检测结果为拍摄对象的目标部位完整,即预览图像中包括所述每一个拍摄对象的目标部位的全部,则执行步骤S607-S608,或者执行步骤S609-S610。
S604、确定目标对象。
本申请实施例中,目标对象可以是目标部位的部分部位,可以是拍摄对象的除目标部位之外的其他部位。以目标部位为人脸举例,目标对象可以是人脸的左半边脸、右半边脸、额头等;以目标部位为人脸举例,目标对象可以是整只手、部分手指、一条腿等,如图7a所示,虚线框部分则为目标对象。
S605、获取目标对象的图像参数。
在本申请实施例中,目标对象的图像参数可以包括目标对象在整个预览图像中的占比,目标对象在横向、纵向上距离预览图像边缘的距离,目标对象图像的清晰度、焦距等。在一种可选的实施例中,获取目标对象的图像参数,可以包括以下至少一种:获取目标对象与预览图像的边缘之间的距离;获取目标对象所对应的完整目标部位的预测大小。在本申请实施例中,目标对象可以是目标部位的部分部位,对目标对象与预览图像的各个边缘的距离进行获取,预测目标对象所对应的完整目标部位的预测大小,以目标部位为人脸,目标对象为额头举例,如图7b所示,目标对象1(额头)的a点距离预览图像的左边缘的距离为0.1cm,目标对象的b点距离预览图像的右边缘的距离为2.1cm,目标对象的c点距离预览图像的上边缘的距离是7.5cm,目标对象的c点距离预览图像的下边缘的距离是0.7cm,a点与b点之间的距离是1cm,由此预测该目标对象对应的完整目标部位的预测大小。
S606、根据目标对象的图像参数控制拍摄设备的变焦,以使预览图像中拍摄对象的目标部位完整。
本申请实施例中,获取各个目标对象的图像参数之后,可以根据预测的目标对象对应的完整目标部位中未在预览图像中的部位,距离预览图像的边缘距离最大的目标对象进行变焦参数的调整,也可以根据预测出来的目标对象对应的完整目标部位中未在预览图像中的部位,在预测的完整目标部位中的占比最大的目标对象进行变焦参数调整,以使预览图像中包括每一个拍摄对象的目标部位的全部。以目标部位为人脸,目标对象1为额头,目标对象2为半边脸举例,如图7b所示,拍摄设备经过预测后目标对象1的下巴最低点距离预览图像的下边缘的距离为2.8cm,目标对象2的右边脸的边缘距离预览图像的左边缘的 距离为1.2cm,以预测的目标对象1对应的完整的人脸进行变焦参数调整,使得目标对象1和目标对象2所对应的完整的人脸都能在预览图像中,如图7c所示。
在一种可选的实施例中,所述根据目标对象的图像参数控制拍摄设备的变焦,以使预览图像中包括每一个拍摄对象的目标部位的全部,包括:根据目标对象与预览图像的边缘之间的距离、以及目标对象所对应的完整目标部位的预测大小,确定变焦参数;根据变焦参数控制拍摄设备的变焦,以使预览图像中包括每一个拍摄对象的目标部位的全部。本申请实施例中,根据各个目标对象与预览图像边缘的距离,以及预测的完整目标部位的大小,可以得出预测的完整目标部位中未在预览图像中的部位与预览图像边缘的距离,或者得出预测的完整目标部位中未在预览图像中的部位,在完整目标部位的占比,进而根据最大距离或者最大占比所对应的目标对象确定出变焦参数,根据该变焦参数控制拍摄设备的变焦,使得预览图像中包括每一拍摄对象的目标部位的全部,提高预览图像的呈现效果。
在一种可选的实施例中,所述变焦参数包括待变焦中心点和/或待变焦焦距,所述根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数,可包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离;根据所述预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离,确定待变焦中心点和/或待变焦焦距。
在本申请实施例中,计算目标对象与预览图像的边缘之间的距离,根据目标对象预测目标对象所对应的完整的目标部位的大小,进而根据目标对象与预览图像的边缘之间的距离、和/或目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离,根据预测的各个目标对象所对应的完整目标部位与预览图像的边缘之间的距离,确定待变焦中心点和/或待变焦焦距。如图7b所示,预测出目标对象1所对应的完整人脸距离预览图像边缘的距离值,大于目标对象2所对应的完整人脸距离预览图像边缘的距离值(例如目标对象1所对应的预测完整人脸的下巴的最低点距离预览图像下边缘的距离值,大于目标对象2所对应的预测完整人脸中未在预览图像中的部分人脸距离预览图像左边缘的距离值),则可进行待变焦中心和待变焦焦距的确定(例如待变焦中心下移,待变焦焦距变小等),进而使得所有的目标对象所对应的目标部位都完整显示在预览图像中,以提高预览图像的呈现效果。
S607、确定每一个拍摄对象的目标部位与预览图像的边缘之间的参考距离。
本申请实施例中,所有的拍摄对象的目标部位都在预览图像中,但是有的目标部位处于预览图图像的附近,导致整个预览图像的呈现效果不够好,此时则可通过对每一个拍摄对象的目标部位与预览图像的各个边缘进行距离的计算,确定所述各个参考距离,为控制拍摄设备变焦提供依据。
S608、根据确定出的各个参考距离,控制拍摄设备的变焦,以调整目标部位与预览图像的边缘之间的参考距离。
本申请实施例中,直接根据各个参考距离控制拍摄设备变焦,在一种可选的实施例中,根据确定出的各个参考距离,控制拍摄设备的变焦,可以包括:当确定出的各个参考距离中存在小于或等于第一数值的距离时,控制拍摄设备的变焦,以使每一个拍摄对象的目标部位与预览图像的边缘之间的距离均大于所述第一数值。本申请实施例中,如图7d所示,以目标部位为人脸举例,拍摄对象a的目标部位的点d距离预览图像的右边缘的距离为0.7cm,由于设置的第一数值为1cm,0.7cm小于1cm,则控制拍摄设备变焦,使得每一个拍摄对象的目标部位与预览图像的边缘之间的距离均大于第一数值,如图7e所示。需要说明的是,第一数值可以根据实际情况具体设置,本申请实施例不作限定。
S609、确定所有拍摄对象的目标部位在预览图像中的图像区域。
在本申请实施例中,所有拍摄对象的目标部位都在预览图像中,但是目标部位的图像 区域在预览图像中的位置太小或者太大,影响整体预览图像的呈现效果,则可通过具体确定出所有的目标部位在预览图像中图像区域,如图7f所示,虚线框框住的区域即为该目标部位的图像区域,进而进行适应性地调整得到如图7g所示的预览图像。
S610、根据图像区域在预览图像中的占比,控制拍摄设备的变焦,以调整图像区域在预览图像中的占比。
本申请实施例中,确定出所有目标部位的图像区域,计算出所有目标部位的总图像区域在预览图像中的占比,进行拍摄设备的变焦,在一种可选的实施例中,根据图像区域在预览图像中的占比,控制拍摄设备的变焦,可包括:当图像区域在预览图像中的占比小于或等于第二数值时,控制拍摄设备的变焦,以使图像区域在预览图像中的占比大于第二数值。本申请实施例中,以目标部位为人脸举例,如图7f所示,所有目标部位的总图像区域在预览图像中的占比小于或等于40%,则控制拍摄设备变焦,以使总图像区域在预览图像中的占比大于40%。在一种可选的实施例中,根据图像区域在预览图像中的占比,控制拍摄设备的变焦,可以包括:当图像区域在预览图像中的占比大于或等于一个数值时,控制拍摄设备的变焦,以使图像区域在预览图像中的占比小于一个数值。以目标部位为人脸,且目标部位只有一个举例,如目标部位的图像区域在预览图像中的占比大于了90%,此时控制拍摄设备进行变焦,使得该目标部位的图像区域在预览图像中的占比小于90%。
在本申请实施例中,通过获取拍摄设备采集的预览图像,识别预览图像中的拍摄对象,检测预览图像中拍摄对象的目标部位是否完整,在拍摄对象的目标部位不完整时,可通过确定目标对象并获取该目标对象的图像参数,根据目标对象的图像参数控制拍摄设备的变焦,以使预览图像中拍摄对象的目标部位完整;在预览图像中拍摄对象的目标部位完整时,可通过确定每一个拍摄对象的目标部位与预览图像的边缘之间的参考距离,确定所有拍摄对象的目标部位在预览图像中的图像区域,进而分别根据各个参考距离、图像区域在预览图像中的占比,控制拍摄设备的变焦,使得每一拍摄对象的目标部位在预览图像中能够得到较好的呈现效果;可见本申请实施例中,能够自动化、智能化地检测预览图像中拍摄对象的目标部位是否完整,进而自动化地对拍摄对象进行相应处理,使得预览图像中拍摄对象的目标部位完整,提高预览图像的呈现效果。
请参见图8,图8是本申请实施例提供的第四种拍摄控制方法的流程图,本申请实施例的所述方法可以由拍摄设备来执行,可以由服务器来执行,所述方法具体可包括如下步骤:
S801、确定预览图像中的拍摄对象的数目。
本申请实施例中,在相机模式下,基于拍摄设备的自动侦查功能,识别出当前的拍摄对象是人、动物还是物,进而确定预览图像中的拍摄对象的数目。以拍摄对象为人举例,在进行拍摄对象的数目的确定时,可通过人脸数目确定来获得拍摄对象数目,可以理解的是,此处的人脸可包括完整的人脸和不完整的人脸。
S802、检测拍摄对象的数目是否大于或等于第三数值,得到检测结果。
本申请实施例中,检测结果可包括拍摄对象的数目大于或等于第三数值,和拍摄对象的数目小于第三数值。当拍摄对象的数目大于或等于第三数值时,执行步骤S803,当拍摄对象的数目小于第三数值时,执行步骤S804。
在一种可选的实施例中,确定每一个拍摄对象的目标部位与预览图像的边缘之间的参考距离;根据确定出的各个参考距离,调整拍摄设备的拍摄模式。本申请实施例中,计算每一个拍摄对象的目标部位与预览图像的各个边缘的参考距离,根据所述各个参考距离对拍摄设备的拍摄模式进行调整。
在一种可选的实施例中,所述根据确定出的各个参考距离,调整拍摄设备的拍摄模式,可以包括:当确定出的各个参考距离中存在小于或等于第四数值的距离时,则控制所述拍摄设备进入第一拍摄模式。可以理解的是,第一拍摄模式可设置为广角拍摄模式,当各个参考距离中存在小于或等于第四数值的距离时,调整当前拍摄设备的拍摄模式为广角拍摄 模型,当然第一拍摄模式还可以是短焦拍摄等。
在一种可选的实施例中,所述根据确定出的各个参考距离,调整拍摄设备的拍摄模式,可以包括:当确定出的各个参考距离均大于第四数值时,则控制拍摄设备进入第二拍摄模式。本申请实施例中,当各个参考距离均大于第四数值时,调整当前的拍摄模式为第二拍摄模式,可以理解的是,第二拍摄模式可以是长焦拍摄模式、普通拍摄模式等,本申请实施例不作限定。
S803、控制拍摄设备进入第一拍摄模式。
本申请实施例中,当拍摄对象的数目大于或等于第三数值时,调整拍摄设备的当前拍摄模式为第一拍摄模式。在一种可选的实施方式中,针对预览图像进行特效处理;显示特效处理后的预览图像。可以理解的是,在进入第一拍摄模式之后,在显示界面上设置有特效选项,例如针对拍摄对象的目标部位:自然、美颜、大眼、磨皮、瘦脸等,或者是针对整个预览图像:质感、油画、素描等,用户可进行个性化选择以及每项特效的个性化设备,当然拍摄设备也可预先设置特效处理的各项参数,经过特效处理后直接显示特效处理后的预览图像。
S804、控制拍摄设备进入第二拍摄模式。
本申请实施例中,当拍摄对象的数目小于第三数值时,对拍摄设备的当前拍摄模式进行调整,使得当前的拍摄模式为第二拍摄模式。
在一种可选的实施例中,当预览图像中的拍摄对象的数目由大于或等于第三数值变化为小于第三数值时,则控制拍摄设备将拍摄模式由第一拍摄模式调整为第二拍摄模式。本申请实施例中,第一拍摄模式可以是广角拍摄模式、短焦拍摄模式等,第二拍摄模式可以是长焦拍摄模式、普通拍摄模式等,具体不限定,可以理解的是,当预览图像中的拍摄对象的数目由大于或等于第三数值变化为小于第三数值时,自动调整当前的拍摄模式由第一拍摄模式转换为第二拍摄模式。
在一种可选的实施方式中,当预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于第三数值时,获取预览图像中的拍摄对象的数目小于第三数值的持续时长;根据持续时长调整拍摄设备的拍摄模式。本申请实施例中,为更加准确地确定预览图像中拍摄对象数目,在预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于第三数值时,获取小于第三数值的持续时长,根据该持续时长调整拍摄设备的拍双摄模式。在一种可选的实施方式中,所述根据所述持续时长调整所述拍摄设备的拍摄模式,可包括:检测持续时长是否大于或等于预设时长;若持续时长大于或等于预设时长,则控制拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。可以理解的是,预设时长可根据实际情况确定,例如可以是2s、5s等。
在一种可选的实施例中,所述方法还可以包括:检测用户的拍摄模式调整操作;根据所述用户的拍摄模式调整操作对所述拍摄设备的拍摄模式进行调整。本申请实施例中,在任意拍摄模式下,用户都可手动进行拍摄模式的调整,使得当前拍摄模式更加符合用户的个性化需求。
在本申请实施例中,通过确定预览图像中的拍摄对象的数目,检测拍摄对象的数目是否大于或等于第三数值,当拍摄对象的数目大于或等于第三数值时,控制拍摄设备进入第一拍摄模式,当拍摄对象的数目小于第三数值时,控制拍摄设备进入第二拍摄模式,使得拍摄设备的拍摄模式根据拍摄对象的数目自动调整,提高了拍摄模式调整的效率,提高了预览图像的呈现效果,避免了手动调整拍摄模式带来的效率低下的情况发生。
请参见图9,图9为本申请一个示例性实施例提供的一种拍摄控制装置的结构示意图,该装置可搭载在上述方法实施例中的智能设备上,该智能设备具体可以是服务器。当然,在一些实施例中,也可搭载在终端设备上。图9所示的拍摄控制装置可以用于执行上述图1、图4、图6和图8所描述的方法实施例中的部分或全部功能。其中,各个单元的详细描述如下:
获取单元901,用于获取拍摄设备采集的预览图像;
处理单元902,用于识别所述预览图像中的拍摄对象;以及用于根据预设规则对所述拍摄对象进行处理以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理单元902具体用于若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备将拍摄模式调整为第一拍摄模式,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理单元902控制控制所述拍摄设备进入第一拍摄模式,以使所述预览图像中的所述拍摄对象的目标部位完整,可包括:根据所述拍摄对象的不完整的目标部位与所述预览图像的边缘之间的距离、和/或所述不完整的目标部位所对应的预测完整大小,确定待切换拍摄参数,所述待切换拍摄参数包括视角大小和/或视角方向;控制所述拍摄设备将拍摄模式调整为第一拍摄模式,并在所述第一拍摄模式下将所述拍摄设备的拍摄参数调整为所述待切换拍摄参数,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理单元902具体还用于若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理单元902控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,可包括:确定目标对象,所述目标对象为所述预览图像中包括的部分部位的目标部位;获取所述目标对象的图像参数;根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理单元902获取所述目标对象的图像参数,可以包括以下至少一种:获取所述目标对象与所述预览图像的边缘之间的距离;获取所述目标对象所对应的完整目标部位的预测大小。
在一种可选的实施例中,处理单元902根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,可包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数;根据所述变焦参数控制所述拍摄设备的变焦,以使所述预览图像中包括所述每一个拍摄对象的目标部位的全部。
在一种可选的实施例中,处理单元902根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数,可包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离;根据所述预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离,确定变焦参数。
在一种可选的实施例中,处理单元902具体还用于检测到所述拍摄对象的目标部位完整,则确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离。
在一种可选的实施例中,处理单元902根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离,可包括:当确定出的各个参考距离中存在小于或等于第一数值的距离时,控制所述拍摄设备的变焦,以使所述每一个拍摄对象的目标部位与所述预览图像的边缘之间的距离均大于所述第一数值。
在一种可选的实施例中,处理单元902具体还用于若检测到所述拍摄对象的目标部位完整,确定所有拍摄对象的目标部位在所述预览图像中的图像区域;根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比。
在一种可选的实施例中,处理单元902根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比,可包括:当所 述图像区域在所述预览图像中的占比小于或等于第二数值时,控制所述拍摄设备的变焦,以使所述图像区域在所述预览图像中的占比大于所述第二数值。
在一种可选的实施例中,处理单元902根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整之后,可包括:获取处理后所述拍摄设备采集的预览图像;确定预览图像中所有拍摄对象的目标部位所在的初始图像区域;获取参考尺寸信息,并根据所述参考尺寸信息调整所述初始图像区域的尺寸。
在一种可选的实施例中,处理单元902还可用于确定所述预览图像中的拍摄对象的数目;检测所述拍摄对象的数目是否大于或等于第三数值,得到检测结果;根据所述检测结果调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,处理单元902根据所述检测结果调整所述拍摄设备的拍摄模式,可包括:若所述检测结果为所述拍摄对象的数目大于或等于所述第三数值,则控制所述拍摄设备进入第一拍摄模式。
在一种可选的实施例中,处理单元902还可用于当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
在一种可选的实施例中,处理单元902还可用于当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,获取所述预览图像中的拍摄对象的数目小于所述第三数值的持续时长;根据所述持续时长调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,处理单元902根据所述持续时长调整所述拍摄设备的拍摄模式,可包括:检测所述持续时长是否大于或等于预设时长;若所述持续时长大于或等于所述预设时长,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
在一种可选的实施例中,处理单元902根据所述检测结果调整所述拍摄设备的拍摄模式,可包括:若所述检测结果为所述拍摄对象的数目小于所述第三数值,则控制所述拍摄设备进入第二拍摄模式。
在一种可选的实施例中,处理单元902还可用于确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,处理单元902根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,可包括:当确定出的各个参考距离中存在小于或等于第四数值的距离时,则控制所述拍摄设备进入第一拍摄模式。
在一种可选的实施例中,处理单元902根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,可包括:当确定出的各个参考距离均大于第四数值时,则控制所述拍摄设备进入第二拍摄模式。
在一种可选的实施例中,处理单元902检测所述拍摄对象的目标部位是否完整,可包括:将所述预览图像输入目标部位识别模型中进行处理,得到目标部位是否完整的结果;其中,所述目标部位是否完整的结果用于指示所述预览图像中是否包括每一个拍摄对象的目标部位的全部,所述目标部位识别模型是利用样本数据集训练得到的,所述样本数据集中包括第一样本图像和第二样本图像,所述第一样本图像中包括各个拍摄对象的完整目标部位,所述第二样本图像中包括所述各个拍摄对象的不完整目标部位。
根据本申请的一个实施例,图1、图4、图6和图8所示的图像处理方法所涉及的部分步骤可由图9所示的拍摄控制装置中的各个单元来执行。图9所示的拍摄控制装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其 它实施例中,拍摄控制装置也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。
根据本申请的另一个实施例,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的例如计算机的通用计算装置上运行能够执行如图1、图4、图6和图8中所示的相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造如图9中所示的拍摄控制装置,以及来实现本申请实施例的拍摄控制方法。所述计算机程序可以记载于例如计算机可读记录介质上,并通过计算机可读记录介质装载于上述计算装置中,并在其中运行。
基于同一发明构思,本申请实施例中提供的拍摄控制装置解决问题的原理与有益效果与本申请方法实施例中拍摄控制方法解决问题的原理和有益效果相似,可以参见方法的实施的原理和有益效果,为简洁描述,在这里不再赘述。
请参阅图10,图10示出了本申请一个示例性实施例提供的一种计算机设备的结构示意图,所述计算机设备至少包括处理器1001、通信接口1002和存储器1003。其中,处理器1001、通信接口1002和存储器1003可通过总线或其他方式连接。其中,处理器1001(或称中央处理器(Central Processing Unit,CPU))是终端的计算核心以及控制核心,其可以解析终端内的各类指令以及处理终端的各类数据,例如:CPU可以用于解析用户向终端所发送的开关机指令,并控制终端进行开关机操作;再如:CPU可以在终端内部结构之间传输各类交互数据,等等。通信接口1002可选的可以包括标准的有线接口、无线接口(如WI-FI、移动通信接口等),受处理器1001的控制可以用于收发数据;通信接口1002还可以用于终端内部数据的传输以及交互。存储器1003(Memory)是终端中的记忆设备,用于存放程序和数据。可以理解的是,此处的存储器1003既可以包括终端的内置存储器,当然也可以包括终端所支持的扩展存储器。存储器1003提供存储空间,该存储空间存储了终端的操作系统,可包括但不限于:Android系统、iOS系统、Windows Phone系统等等,本申请对此并不作限定。
在本申请实施例中,处理器1001通过运行存储器1003中的可执行程序代码,执行如下操作:
通过通信接口1002获取拍摄设备采集的预览图像;
针对所述预览图像进行对象识别;
根据对象识别结果控制所述拍摄设备的变焦。
在一种可选的实施例中,处理器1001具体用于若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备将拍摄模式调整为第一拍摄模式,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理器1001控制控制所述拍摄设备进入第一拍摄模式,以使所述预览图像中的所述拍摄对象的目标部位完整,可包括:根据所述拍摄对象的不完整的目标部位与所述预览图像的边缘之间的距离、和/或所述不完整的目标部位所对应的预测完整大小,确定待切换拍摄参数,所述待切换拍摄参数包括视角大小和/或视角方向;控制所述拍摄设备将拍摄模式调整为第一拍摄模式,并在所述第一拍摄模式下将所述拍摄设备的拍摄参数调整为所述待切换拍摄参数,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理器1001具体还用于若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理器1001控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,可以包括:确定目标对象,所述目标对象为所述预览图像中包括的部分部位的目标部位;获取所述目标对象的图像参数;根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
在一种可选的实施例中,处理器1001获取所述目标对象的图像参数,可以包括以下至少一种:获取所述目标对象与所述预览图像的边缘之间的距离;获取所述目标对象所对应 的完整目标部位的预测大小。
在一种可选的实施例中,处理器1001根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,可包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数;根据所述变焦参数控制所述拍摄设备的变焦,以使所述预览图像中包括所述每一个拍摄对象的目标部位的全部。
在一种可选的实施例中,处理器1001根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数,可包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离;根据所述预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离,确定变焦参数。
在一种可选的实施例中,处理器1001具体还用于检测到所述拍摄对象的目标部位完整,则确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离。
在一种可选的实施例中,处理器1001根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离,可包括:当确定出的各个参考距离中存在小于或等于第一数值的距离时,控制所述拍摄设备的变焦,以使所述每一个拍摄对象的目标部位与所述预览图像的边缘之间的距离均大于所述第一数值。
在一种可选的实施例中,处理器1001具体还用于若检测到所述拍摄对象的目标部位完整,确定所有拍摄对象的目标部位在所述预览图像中的图像区域;根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比。
在一种可选的实施例中,处理器1001根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比,可包括:当所述图像区域在所述预览图像中的占比小于或等于第二数值时,控制所述拍摄设备的变焦,以使所述图像区域在所述预览图像中的占比大于所述第二数值。
在一种可选的实施例中,处理器1001根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整之后,可包括:获取处理后所述拍摄设备采集的预览图像;确定预览图像中所有拍摄对象的目标部位所在的初始图像区域;获取参考尺寸信息,并根据所述参考尺寸信息调整所述初始图像区域的尺寸。
在一种可选的实施例中,处理器1001还可用于确定所述预览图像中的拍摄对象的数目;检测所述拍摄对象的数目是否大于或等于第三数值,得到检测结果;根据所述检测结果调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,处理器1001根据所述检测结果调整所述拍摄设备的拍摄模式,可包括:若所述检测结果为所述拍摄对象的数目大于或等于所述第三数值,则控制所述拍摄设备进入第一拍摄模式。
在一种可选的实施例中,处理器1001还可用于当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
在一种可选的实施例中,处理器1001还可用于当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,获取所述预览图像中的拍摄对象的数目小于所述第三数值的持续时长;根据所述持续时长调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,处理器1001根据所述持续时长调整所述拍摄设备的拍摄模式,可包括:检测所述持续时长是否大于或等于预设时长;若所述持续时长大于或等于所 述预设时长,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
在一种可选的实施例中,处理器1001根据所述检测结果调整所述拍摄设备的拍摄模式,可包括:若所述检测结果为所述拍摄对象的数目小于所述第三数值,则控制所述拍摄设备进入第二拍摄模式。
在一种可选的实施例中,处理器1001还可用于确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式。
在一种可选的实施例中,处理器1001根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,可包括:当确定出的各个参考距离中存在小于或等于第四数值的距离时,则控制所述拍摄设备进入第一拍摄模式。
在一种可选的实施例中,处理器1001根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,可包括:当确定出的各个参考距离均大于第四数值时,则控制所述拍摄设备进入第二拍摄模式。
在一种可选的实施例中,处理器1001检测所述拍摄对象的目标部位是否完整,可包括:将所述预览图像输入目标部位识别模型中进行处理,得到目标部位是否完整的结果;其中,所述目标部位是否完整的结果用于指示所述预览图像中是否包括每一个拍摄对象的目标部位的全部,所述目标部位识别模型是利用样本数据集训练得到的,所述样本数据集中包括第一样本图像和第二样本图像,所述第一样本图像中包括各个拍摄对象的完整目标部位,所述第二样本图像中包括所述各个拍摄对象的不完整目标部位。
基于同一发明构思,本申请实施例中提供的终端设备解决问题的原理与有益效果与本申请方法实施例中拍摄控制方法解决问题的原理和有益效果相似,可以参见方法的实施的原理和有益效果,为简洁描述,在这里不再赘述。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有一条或多条指令,所述一条或多条指令适于由处理器加载并执行上述方法实施例所述的拍摄控制方法。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,可读存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如上各种可能的实施方式中所述的方法。
本申请实施例还提供一种芯片,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于从所述存储器中调用并运行所述计算机程序,使得安装有所述芯片的设备执行如上各种可能的实施方式中所述的方法。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所 固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素,此外,本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。
应当理解,尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语"如果"可以被解释成为"在……时"或"当……时"或"响应于确定"。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。此处使用的术语“或”和“和/或”被解释为包括性的,或意味着任一个或任何组合。因此,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A、B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。
应该理解的是,虽然本申请实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
以上所揭露的仅为本申请一种较佳实施例而已,当然不能以此来限定本申请之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本申请权利要求所作的等同变化,仍属于发明所涵盖的范围。
Claims (25)
- 一种拍摄控制方法,其特征在于,所述方法包括:获取拍摄设备采集的预览图像;识别所述预览图像中的拍摄对象;检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使所述预览图像中拍摄对象的目标部位完整。
- 根据权利要求1所述的方法,其特征在于,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整,包括:若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备将拍摄模式调整为第一拍摄模式,以使所述预览图像中拍摄对象的目标部位完整。
- 根据权利要求2所述的方法,其特征在于,所述控制所述拍摄设备进入第一拍摄模式,以使所述预览图像中的所述拍摄对象的目标部位完整,包括:根据所述拍摄对象的不完整的目标部位与所述预览图像的边缘之间的距离、和/或所述不完整的目标部位所对应的预测完整大小,确定待切换拍摄参数,所述待切换拍摄参数包括视角大小和/或视角方向;控制所述拍摄设备将拍摄模式调整为第一拍摄模式,并在所述第一拍摄模式下将所述拍摄设备的拍摄参数调整为所述待切换拍摄参数,以使所述预览图像中拍摄对象的目标部位完整。
- 根据权利要求1所述的方法,其特征在于,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整,包括:若检测出所述拍摄对象的目标部位不完整,则控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
- 根据权利要求4所述的方法,其特征在于,所述控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,包括:确定目标对象,所述目标对象为所述预览图像中包括的部分部位的目标部位;获取所述目标对象的图像参数;根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
- 根据权利要求5所述的方法,其特征在于,所述获取所述目标对象的图像参数,包括以下至少一种:获取所述目标对象与所述预览图像的边缘之间的距离;获取所述目标对象所对应的完整目标部位的预测大小。
- 根据权利要求6所述的方法,其特征在于,所述根据所述目标对象的图像参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整,包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数;根据所述变焦参数控制所述拍摄设备的变焦,以使所述预览图像中拍摄对象的目标部位完整。
- 根据权利要求7所述的方法,其特征在于,所述变焦参数包括待变焦中心点和待变焦焦距,所述根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定变焦参数,包括:根据所述目标对象与所述预览图像的边缘之间的距离、和/或所述目标对象所对应的完整目标部位的预测大小,确定出预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离;根据所述预测的各个目标对象所对应的完整目标部位与所述预览图像的边缘之间的距离,确定待变焦中心点和/或待变焦焦距。
- 根据权利要求1所述的方法,其特征在于,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使预览图像中拍摄对象完整,包括:若检测到所述拍摄对象的目标部位完整,则确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离。
- 根据权利要求9所述的方法,其特征在于,所述根据确定出的各个参考距离,控制所述拍摄设备的变焦,以调整所述目标部位与所述预览图像的边缘之间的参考距离,包括:当确定出的各个参考距离中存在小于或等于第一数值的距离时,控制所述拍摄设备的变焦,以使所述每一个拍摄对象的目标部位与所述预览图像的边缘之间的距离均大于或等于所述第一数值。
- 根据权利要求1所述的方法,其特征在于,所述检测所述拍摄对象的目标部位是否完整,根据预设规则对所述拍摄对象进行处理以使所述预览图像中拍摄对象的目标部位完整,包括:若检测到所述拍摄对象的目标部位完整,确定所有拍摄对象的目标部位在所述预览图像中的图像区域;根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比。
- 根据权利要求11所述的方法,其特征在于,所述根据所述图像区域在所述预览图像中的占比,控制所述拍摄设备的变焦,以调整所述图像区域在所述预览图像中的占比,包括:当所述图像区域在所述预览图像中的占比小于或等于第二数值时,控制所述拍摄设备的变焦,以使所述图像区域在所述预览图像中的占比大于或等于所述第二数值。
- 根据权利要求1-12中任一项所述的方法,其特征在于,所述根据预设规则对所述拍摄对象进行处理以使预览图像中的所述拍摄对象完整之后,包括:获取处理后所述拍摄设备采集的预览图像;确定预览图像中所有拍摄对象的目标部位所在的初始图像区域;获取参考尺寸信息,并根据所述参考尺寸信息调整所述初始图像区域的尺寸。
- 根据权利要求1-12中任一项所述的方法,其特征在于,所述方法还包括:确定所述预览图像中的拍摄对象的数目;检测所述拍摄对象的数目是否大于或等于第三数值,得到检测结果;根据所述检测结果调整所述拍摄设备的拍摄模式。
- 根据权利要求14所述的方法,其特征在于,所述根据所述检测结果调整所述拍摄设备的拍摄模式,包括:若所述检测结果为所述拍摄对象的数目大于或等于所述第三数值,则控制所述拍摄设备进入所述第一拍摄模式。
- 根据权利要求15所述的方法,其特征在于,所述方法还包括:当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
- 根据权利要求15所述的方法,其特征在于,所述方法还包括:当所述预览图像中的拍摄对象的数目由大于或等于所述第三数值变化为小于所述第三数值时,获取所述预览图像中的拍摄对象的数目小于所述第三数值的持续时长;根据所述持续时长调整所述拍摄设备的拍摄模式。
- 根据权利要求17所述的方法,其特征在于,所述根据所述持续时长调整所述拍摄设备的拍摄模式,包括:检测所述持续时长是否大于或等于预设时长;若所述持续时长大于或等于所述预设时长,则控制所述拍摄设备将拍摄模式由所述第一拍摄模式调整为所述第二拍摄模式。
- 根据权利要求14所述的方法,其特征在于,所述根据所述检测结果调整所述拍摄设备的拍摄模式,包括:若所述检测结果为所述拍摄对象的数目小于所述第三数值,则控制所述拍摄设备进入第二拍摄模式。
- 根据权利要求1-12中任一项所述的方法,其特征在于,所述方法还包括:确定每一个拍摄对象的目标部位与所述预览图像的边缘之间的参考距离;根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式。
- 根据权利要求20所述的方法,其特征在于,所述根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,包括:当确定出的各个参考距离中存在小于或等于第四数值的距离时,则控制所述拍摄设备进入第一拍摄模式。
- 根据权利要求20所述的方法,其特征在于,所述根据确定出的各个参考距离,调整所述拍摄设备的拍摄模式,包括:当确定出的各个参考距离均大于或等于第四数值时,则控制所述拍摄设备进入第二拍摄模式。
- 根据权利要求1所述的方法,其特征在于,所述检测所述拍摄对象的目标部位是否完整,包括:将所述预览图像输入目标部位识别模型中进行处理,得到目标部位是否完整的结果;其中,所述目标部位是否完整的结果用于指示所述预览图像中是否包括每一个拍摄对象的目标部位的全部,所述目标部位识别模型是利用样本数据集训练得到的,所述样本数据集中包括第一样本图像和第二样本图像,所述第一样本图像中包括各个拍摄对象的完整目标部位,所述第二样本图像中包括所述各个拍摄对象的不完整目标部位。
- 一种智能设备,其特征在于,包括处理器、存储器,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行如权利要求1-23中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括:所述计算机可读存储介质存储有一条或多条指令,所述一条或多条指令适于由处理器加载并执行如权利要求1-23中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/101792 WO2022011534A1 (zh) | 2020-07-14 | 2020-07-14 | 拍摄控制方法、装置、智能设备及计算机可读存储介质 |
| CN202080102674.6A CN115812308B (zh) | 2020-07-14 | 2020-07-14 | 拍摄控制方法、装置、智能设备及计算机可读存储介质 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/101792 WO2022011534A1 (zh) | 2020-07-14 | 2020-07-14 | 拍摄控制方法、装置、智能设备及计算机可读存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022011534A1 true WO2022011534A1 (zh) | 2022-01-20 |
Family
ID=79554403
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/101792 Ceased WO2022011534A1 (zh) | 2020-07-14 | 2020-07-14 | 拍摄控制方法、装置、智能设备及计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115812308B (zh) |
| WO (1) | WO2022011534A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114245022A (zh) * | 2022-02-23 | 2022-03-25 | 浙江宇视系统技术有限公司 | 一种场景自适应拍摄方法、电子设备和存储介质 |
| CN119316702A (zh) * | 2024-10-11 | 2025-01-14 | 珠海奔图电子有限公司 | 一种显示方法、装置、设备及存储介质 |
| WO2025072379A1 (en) * | 2023-09-30 | 2025-04-03 | Ferrix Industrial Llc | User interfaces and techniques for managing content |
| EP4541036A4 (en) * | 2022-09-29 | 2025-09-10 | Samsung Electronics Co Ltd | APPARATUS AND METHOD FOR CONTROLLING A PHOTOGRAPHING ROBOT WITH SEMANTIC INTELLIGENCE |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105049711A (zh) * | 2015-06-30 | 2015-11-11 | 广东欧珀移动通信有限公司 | 一种拍照方法及用户终端 |
| CN106775238A (zh) * | 2016-12-14 | 2017-05-31 | 深圳市金立通信设备有限公司 | 一种拍照方法及终端 |
| WO2019033411A1 (zh) * | 2017-08-18 | 2019-02-21 | 华为技术有限公司 | 一种全景拍摄方法及装置 |
| CN110506416A (zh) * | 2018-07-27 | 2019-11-26 | 华为技术有限公司 | 一种终端切换摄像头的方法及终端 |
| CN110519416A (zh) * | 2018-05-21 | 2019-11-29 | 深圳富泰宏精密工业有限公司 | 便携式电子装置及拍照方法 |
| CN111263063A (zh) * | 2020-02-17 | 2020-06-09 | 深圳传音控股股份有限公司 | 拍摄图像的方法、装置及设备 |
| CN111263066A (zh) * | 2020-02-18 | 2020-06-09 | Oppo广东移动通信有限公司 | 构图指导方法、装置、电子设备及存储介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105652560B (zh) * | 2016-01-25 | 2018-08-14 | 广东小天才科技有限公司 | 一种自动调节焦距的拍照方法及系统 |
| WO2018159864A1 (ko) * | 2017-02-28 | 2018-09-07 | 엘지전자 주식회사 | 이동 단말기 및 그 이동 단말기의 제어 방법 |
| CN107241552B (zh) * | 2017-06-30 | 2020-01-14 | Oppo广东移动通信有限公司 | 一种图像获取方法、装置、存储介质和终端 |
| CN108777767A (zh) * | 2018-08-22 | 2018-11-09 | Oppo广东移动通信有限公司 | 拍照方法、装置、终端及计算机可读存储介质 |
-
2020
- 2020-07-14 WO PCT/CN2020/101792 patent/WO2022011534A1/zh not_active Ceased
- 2020-07-14 CN CN202080102674.6A patent/CN115812308B/zh active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105049711A (zh) * | 2015-06-30 | 2015-11-11 | 广东欧珀移动通信有限公司 | 一种拍照方法及用户终端 |
| CN106775238A (zh) * | 2016-12-14 | 2017-05-31 | 深圳市金立通信设备有限公司 | 一种拍照方法及终端 |
| WO2019033411A1 (zh) * | 2017-08-18 | 2019-02-21 | 华为技术有限公司 | 一种全景拍摄方法及装置 |
| CN110519416A (zh) * | 2018-05-21 | 2019-11-29 | 深圳富泰宏精密工业有限公司 | 便携式电子装置及拍照方法 |
| CN110506416A (zh) * | 2018-07-27 | 2019-11-26 | 华为技术有限公司 | 一种终端切换摄像头的方法及终端 |
| CN111263063A (zh) * | 2020-02-17 | 2020-06-09 | 深圳传音控股股份有限公司 | 拍摄图像的方法、装置及设备 |
| CN111263066A (zh) * | 2020-02-18 | 2020-06-09 | Oppo广东移动通信有限公司 | 构图指导方法、装置、电子设备及存储介质 |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114245022A (zh) * | 2022-02-23 | 2022-03-25 | 浙江宇视系统技术有限公司 | 一种场景自适应拍摄方法、电子设备和存储介质 |
| EP4541036A4 (en) * | 2022-09-29 | 2025-09-10 | Samsung Electronics Co Ltd | APPARATUS AND METHOD FOR CONTROLLING A PHOTOGRAPHING ROBOT WITH SEMANTIC INTELLIGENCE |
| US12452531B2 (en) | 2022-09-29 | 2025-10-21 | Samsung Electronics Co., Ltd. | Apparatus and method for controlling a robot photographer with semantic intelligence |
| WO2025072379A1 (en) * | 2023-09-30 | 2025-04-03 | Ferrix Industrial Llc | User interfaces and techniques for managing content |
| CN119316702A (zh) * | 2024-10-11 | 2025-01-14 | 珠海奔图电子有限公司 | 一种显示方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115812308B (zh) | 2024-08-20 |
| CN115812308A (zh) | 2023-03-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022011534A1 (zh) | 拍摄控制方法、装置、智能设备及计算机可读存储介质 | |
| US11081137B2 (en) | Method and device for processing multimedia information | |
| US20210264133A1 (en) | Face location tracking method, apparatus, and electronic device | |
| EP3326360B1 (en) | Image capturing apparatus and method of operating the same | |
| CN105915782A (zh) | 一种基于人脸识别的照片获取方法和移动终端 | |
| US20160191819A1 (en) | Image displaying apparatus and image displaying method | |
| CN104917959A (zh) | 一种拍照方法及终端 | |
| CN107395957B (zh) | 拍照方法、装置、存储介质及电子设备 | |
| CN106815803B (zh) | 图片的处理方法及装置 | |
| CN108668086A (zh) | 自动对焦方法、装置、存储介质及终端 | |
| CN113840070A (zh) | 拍摄方法、装置、电子设备及介质 | |
| CN111970437B (zh) | 文本拍摄方法、可穿戴设备和存储介质 | |
| CN105068646A (zh) | 终端的控制方法和系统 | |
| CN108156376A (zh) | 图像采集方法、装置、终端及存储介质 | |
| CN110516579A (zh) | 手持眼底相机拍照方法和装置、设备及存储介质 | |
| CN114641983A (zh) | 用于获得智能全景图像的系统及方法 | |
| CN114079729B (zh) | 拍摄控制方法、装置、电子设备及存储介质 | |
| CN113873166A (zh) | 视频拍摄方法、装置、电子设备和可读存储介质 | |
| CN110427108A (zh) | 基于眼球追踪的拍照方法及相关产品 | |
| WO2019084756A1 (zh) | 一种图像处理方法、装置及飞行器 | |
| CN109451234A (zh) | 优化拍照功能的方法、设备及存储介质 | |
| CN113037999A (zh) | 拍摄方法、装置、移动终端及存储介质 | |
| JP2019186791A (ja) | 撮像装置、撮像装置の制御方法、および制御プログラム | |
| CN116347221A (zh) | 自动变焦方法及装置、存储介质、电子装置 | |
| CN108769538A (zh) | 自动对焦方法、装置、存储介质及终端 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20945074 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23.05.2023) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20945074 Country of ref document: EP Kind code of ref document: A1 |