WO2022161250A1 - 摄像控制方法、装置、计算机设备和存储介质 - Google Patents
摄像控制方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2022161250A1 WO2022161250A1 PCT/CN2022/073007 CN2022073007W WO2022161250A1 WO 2022161250 A1 WO2022161250 A1 WO 2022161250A1 CN 2022073007 W CN2022073007 W CN 2022073007W WO 2022161250 A1 WO2022161250 A1 WO 2022161250A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- area
- ratio
- value
- frame image
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 113
- 230000003287 optical effect Effects 0.000 claims abstract description 98
- 230000008859 change Effects 0.000 claims description 114
- 238000003384 imaging method Methods 0.000 claims description 108
- 230000015654 memory Effects 0.000 claims description 27
- 238000001514 detection method Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 18
- 238000012545 processing Methods 0.000 claims description 13
- 238000009432 framing Methods 0.000 claims description 2
- 230000001815 facial effect Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 16
- 238000005516 engineering process Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 13
- 230000003044 adaptive effect Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 210000000746 body region Anatomy 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000009194 climbing Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
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
- H04N23/69—Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- 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
-
- 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
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- 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
- H04N23/695—Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Definitions
- the present application relates to the technical field of image communication, and in particular, to a camera control method, apparatus, computer device and storage medium.
- the zoom function which can be zoomed through digital zoom and optical zoom to achieve appropriate image quality output.
- the pictures in the real scene may have some complex situations, such as multiple depths of field, multiple faces, etc. If manual debugging is used, it is obviously difficult; and the zoom method cannot be determined accurately and quickly, resulting in image clarity. It cannot be balanced with face capture, and the problem that it is difficult to quickly roll back after the face disappears is also particularly prominent.
- the embodiments of the present application provide a camera control method, apparatus, computer device, and storage medium to solve at least one problem existing in the background art.
- an embodiment of the present application provides a camera control method, the method comprising:
- the first ratio is the ratio of the current optical zoom ratio of the target imaging device to the maximum optical zoom ratio of the target imaging device
- the second ratio is the proportion of the area of the face area currently captured by the target imaging device in the entire captured image
- control the target imaging device to perform optical zooming If yes, control the target imaging device to perform optical zooming; if not, control the target imaging device to perform digital zooming.
- the second ratio is the proportion of the area of the single-person face in the entire photographed picture
- the second ratio is the proportion of the combined face area area in the entire shooting picture
- the combined face area area is the multi-person face area The sum of the area corresponding to each face in .
- the value range of the first ratio threshold is 0.45-0.55.
- the value range of the second ratio threshold is 0.15-0.25.
- the target imaging device is controlled to move and/or rotate according to the central position of the character area and the central position of the entire shot, so that the central position of the character area coincides with the central position of the entire shot.
- the determining the center position of the character area based on the picture information currently captured by the target camera device specifically includes:
- the area center position of the single-person face is determined as the person area center position
- the central position of the merged human body area is determined as the central position of the character area, and the merged human body area is based on the corresponding faces of each of the multi-person faces.
- a closed area determined by the image boundary of the human body, and the closed area covers each of the human body images.
- controlling the movement and/or rotation of the target camera device according to the center position of the character area and the center position of the entire shooting picture specifically includes:
- the object distance is the distance between the actual position of the currently photographed face and the actual position of the target imaging device.
- the object distance is determined according to the optical zoom ratio where the target imaging device is currently located and the second ratio.
- the area of the character area on the display screen of the target imaging device is the same as that of all the objects.
- the range of the ratio of the total area of the display screen is 0.7-0.8; wherein,
- the area of the character area is the area of the human body image area corresponding to the single-person face;
- the area of the person area is the area of the combined human body area, and the combined human body area is based on the image boundary of the human body corresponding to each of the multi-person faces.
- a determined closed area the closed area covers each of the human body images.
- the area of the human image area is determined based on the area of the corresponding single-person face and a preset multiple, and the preset multiple is a preset area representing the human image area and the face area. area ratio.
- the method further includes:
- the target imaging device is controlled to perform the optical zooming back and back to the wide-angle end.
- the method further includes:
- controlling the target imaging device to perform optical zooming includes:
- the target of the focus motor of the target imaging device is determined based on the coordinate values of the coordinate points corresponding to the first target frame image, the second target frame image, the third target frame image and the fourth target frame image included in the consecutive frame images Adjusting the step size, wherein the fourth target frame image is the frame image before the third target frame image, and the third target frame image, the second target frame image and the first target frame image are successively adjacent frame images, and the first target frame image is the last frame image of the consecutive frame images.
- determining the coordinate value of the coordinate points corresponding to the first target frame image, the second target frame image, the third target frame image, and the fourth target frame image included in the consecutive frame images include:
- the first angle change value and the first residual change rate of the first coordinate point are determined based on the first coordinate value, the second coordinate value and the fourth coordinate value, wherein the first coordinate value is the first target frame image
- the corresponding coordinate value of the first coordinate point, the second coordinate value is the coordinate value of the second coordinate point corresponding to the second target frame image
- the fourth coordinate value is the fourth target frame image
- the coordinate value of the corresponding fourth coordinate point, the first angle change value is the amount of change between the first average sharpness value per step and the second average sharpness value per step, the first average sharpness per step
- the degree value is the average resolution value per step between the first target frame image and the fourth target frame image
- the second average resolution value per step is the first target frame image and the fourth target frame image.
- the average sharpness value per step between the second target frame images, and the first residual change rate is used to indicate that the sharpness of the first target frame image and the second target frame image changes per step Rate;
- the second angle change value and the second residual change rate of the second coordinate point are determined based on the second coordinate value, the third coordinate value and the fourth coordinate value, wherein the third coordinate value is the third target frame image
- the coordinate value of the corresponding third coordinate point, the second angle change value is the amount of change between the third average sharpness value per step and the fourth average sharpness value per step, the third average sharpness per step
- the degree value is the average resolution value per step between the second target frame image and the fourth target frame image
- the fourth average resolution value per step is the second target frame image and the fourth target frame image.
- the average sharpness value per step between the third target frame images, and the second residual change rate is used to indicate that the sharpness of the second target frame image and the third target frame image changes per step Rate;
- a target adjustment step size of the focus motor of the target imaging apparatus is determined based on the first angle change value, the first residual change rate, the second angle change value, and the second residual change rate.
- the focus of the target imaging device is determined based on the first angle change value, the first residual change rate, the second angle change value and the second residual change rate
- the target adjustment step size of the motor includes:
- a target adjustment step size of the focus motor of the target imaging apparatus is determined based on the first difference value and the second difference value.
- determining the target adjustment step size of the focus motor of the target imaging device based on the first difference value and the second difference value includes:
- the target adjustment step size is determined according to the target convergence value.
- determining the target adjustment step size according to the target convergence value includes:
- the target adjustment step size is a preset step size value
- the target adjustment step size is determined as an initial step size, wherein the initial step size is a predetermined number of consecutive The step size to use when framing the image.
- the method further includes:
- Focus processing is performed on the target imaging device according to the target adjustment step size.
- an embodiment of the present application further provides a camera control device, the device comprising:
- a first determination module configured to determine a first ratio, where the first ratio is the ratio of the optical zoom ratio of the target imaging device currently located to the maximum optical zoom ratio of the target imaging device;
- a second determination module configured to determine a second ratio, where the second ratio is the proportion of the area of the face area currently captured by the target imaging device in the entire captured image
- a judgment module for judging whether the first ratio is less than or equal to a first ratio threshold and the second ratio is less than or equal to a second ratio threshold
- control module configured to control the target imaging device to perform optical zooming when the result of the determination is yes; and control the target imaging device to perform digital zooming when the determination result is no.
- an embodiment of the present application further provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, any one of the foregoing method embodiments is implemented steps in .
- an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in any one of the foregoing method embodiments.
- the above-mentioned camera control method, device, computer device and computer-readable storage medium by determining a first ratio, the first ratio is the current optical zoom ratio of the target camera device and the maximum optical zoom ratio of the target camera device magnification ratio; determine a second ratio, the second ratio is the proportion of the area of the face area currently captured by the target imaging device in the entire shooting picture; determine whether the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold; if yes, control the target imaging device to perform optical zooming; if not, control the target imaging device to perform digital zooming; And the proportion of the face area realizes the adaptive selection of optical zoom and digital zoom, which not only meets the needs of accurate and rapid use of zoom technology for close-up, but also can obtain better image quality, which is beneficial to the face area. Closeup and capture.
- the above-mentioned method, device, computer equipment and computer-readable storage medium for determining the focus step size can make the imaging device focus quickly because the step size adjustment is performed according to the coordinate values of the coordinate points in the continuous frame images, thereby reducing the time of the focus process. consumption to achieve the effect of improving focusing efficiency.
- FIG. 1 is a schematic flowchart of a camera control method in one embodiment.
- FIG. 2 is a schematic structural diagram of a pan-tilt camera in an embodiment.
- FIG. 3 is a schematic flowchart of a camera control method in another embodiment.
- 4 to 7 are schematic diagrams of zooming images in various embodiments.
- FIG. 8 is a schematic diagram of the relationship between the object distance, the optical zoom ratio, and the proportion of the face area.
- FIG. 9 is a schematic diagram of a human body image area and a human face area in one embodiment.
- FIG. 10 is a schematic diagram of a screen area of digital zoom in one embodiment.
- FIG. 11 is a schematic flowchart of an optical zooming and retracting method in an embodiment.
- FIG. 12 is a schematic flowchart of a camera control method in a specific embodiment.
- FIG. 13 is a flowchart of a method for determining a focus step size according to an embodiment of the present application.
- FIG. 14 is a schematic diagram of a hill-climbing focusing curve according to an embodiment of the present application.
- FIG. 15 is a schematic diagram of a camera control apparatus according to an embodiment of the present application.
- FIG. 16 is a structural block diagram of an apparatus for determining a focus step size according to an embodiment of the present application.
- FIG. 17 is a block diagram of a hardware structure of a mobile terminal according to a method for determining a focus step size according to an embodiment of the present application.
- FIG. 18 is a schematic structural diagram of an apparatus for determining a focus step size according to a specific embodiment of the present application.
- Words like "connected,” “connected,” “coupled,” and the like referred to in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
- the “plurality” referred to in this application means greater than or equal to two.
- “And/or” describes the association relationship between associated objects, indicating that there can be three kinds of relationships. For example, “A and/or B” can mean that A exists alone, A and B exist at the same time, and B exists alone.
- the terms “first”, “second”, “third”, etc. involved in this application are only to distinguish similar objects, and do not represent a specific order for the objects.
- Optical zoom and digital zoom are the main zoom technologies used in current camera equipment.
- the optical zoom mainly realizes the zooming of the image through the movement of the focusing lens group, and the image quality is not lost; while the digital zoom mainly realizes the enlargement of the image by cropping the image, and the larger the magnification, the image will be "interpolated". lead to more loss of image quality.
- the image enlargement is obtained by digital zoom, then because the panoramic image can be obtained in real time in the digital zoom technology, when the face suddenly disappears, The panorama image that can be analyzed by the lens can be wider, and the slice of the next scene image will be faster.
- optical zoom and digital zoom each have their preferred points, which need to be reasonably selected according to the actual situation and needs.
- FIG. 1 is a schematic flowchart of the camera control method. As shown in the figure, the above method includes:
- Step 101 determining a first ratio, where the first ratio is the ratio of the current optical zoom ratio of the target imaging device to the maximum optical zoom ratio of the target imaging device;
- Step 102 determining a second ratio, where the second ratio is the proportion of the area of the face area currently captured by the target imaging device in the entire captured image;
- Step 103 judging whether the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold;
- Step 104 if the determination result in step 103 is yes, control the target imaging device to perform optical zoom; if the determination result in step 103 is no, control the target camera device to perform digital zoom.
- the embodiment of the present application can realize the adaptive selection of optical zoom and digital zoom according to the current zoom ratio and the proportion of the face area, which not only meets the needs of using the zoom technology for close-up accurately and quickly, but also can A better image quality is obtained, which is beneficial to the close-up and capture of the face area.
- the camera control method provided by the embodiment of the present application is, for example, applied to the application environment shown in FIG. 2 .
- the target imaging device in FIG. 2 is specifically a PTZ camera, including a rotatable PTZ and a camera installed on the PTZ.
- the camera When the camera is tracking and photographing a face, it analyzes and calculates the face area and the center position of the camera to drive the gimbal to move to the appropriate center position. At the same time, it analyzes the size of the face and the entire image to analyze the appropriate adjustment magnification of the camera.
- the method provided by the embodiment of the present application can well solve the problem of focusing on a face area by a single pan-tilt camera, and realize fast frame selection and focusing of the face area.
- the camera may be, but not limited to, a gun camera, a spherical camera, and a dome camera.
- the camera may be located above or below the PTZ, and the relative orientation of the camera and the PTZ is not limited herein. It should be understood that although the above only describes driving the camera through the rotation of the PTZ, the application environment of the embodiments of the present application is not limited to this; specifically, in other embodiments, the target camera device can be controlled to move and/or move or turn.
- the camera control method provided by the embodiment of the present application can be applied to a single camera, that is, the camera control device executing the camera control method can execute the steps in the above method by controlling one camera.
- determining the first ratio may specifically include: determining the optical zoom ratio Xoz where the camera is currently located, calculating the ratio between Xoz and the maximum optical zoom ratio Xz of the camera, and determining the ratio as the first ratio, that is, Xoz/Xz.
- the current optical zoom ratio of the camera may specifically refer to the current optical zoom ratio of the lens of the camera; similarly, the maximum optical zoom ratio of the camera may specifically refer to the maximum optical zoom ratio of the lens of the camera.
- the maximum optical zoom ratio of the camera is determined according to the function of the camera and is usually fixed.
- the area of the detected face area can be calculated by performing face area detection on the image captured by the camera, and according to an existing algorithm.
- the area of the entire shot is usually known and can be determined according to the settings.
- the second ratio is the proportion of the area of the single-person face in the entire captured image.
- the second ratio is the proportion of the combined face area area in the entire shooting picture, wherein the combined face area area is the ratio of the multiple faces The sum of the area corresponding to each face.
- the proportion of the face is obtained by analyzing the proportion of the area of the face area and the area of the entire picture.
- a single face for example, by analyzing the area ratio of a single face;
- a multi-person face for example, by merging the face regions, the combined face regions are counted to calculate the face ratio of the entire picture.
- the determination of the second ratio corresponding to when the camera currently captures a single face and the determination of the second ratio corresponding to the current multi-person face captured by the camera may be used in the same embodiment, or may be used in the same embodiment. It is adopted in different embodiments; that is, when the second ratio corresponding to the single-person face currently captured by the camera is determined by the proportion of the area of the single-person face in the entire shooting picture, it corresponds to the camera's current
- the method for determining the second ratio when multiple faces are photographed may be the above-mentioned method of merging the proportion of the area of the face area in the entire photographed picture, or other methods, and the two are not necessarily related, and vice versa .
- step 103 it is determined whether the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold; here, set the first ratio threshold as N and the second ratio threshold as M, step 103 is to determine whether Xoz/Xz ⁇ N and Facepro ⁇ M.
- the value range of N is 0.45-0.55; specifically, for example, N is 0.5, that is, 1/2.
- the value range of M is 0.15-0.25; for example, M is 0.2, that is, 1/5.
- step 104 if Xoz/Xz ⁇ N and Facepro ⁇ M, control the camera to perform optical zoom (indicated by "Soz”); if it is other than this, control the camera to perform digital zoom (indicated by "Soz”) Sdz" means).
- the scaling strategy S adopted for the image zooming function is set as follows:
- the optical zoom is used for zooming; when the proportion of the face exceeds a certain face threshold (ie the second ratio threshold), the digital Zooming by changing the magnification; it not only satisfies the function of enlarging the face, but also can obtain better image quality, and at the same time is conducive to the rapid detection of the face in the panoramic screen after the face disappears.
- a certain face threshold ie the second ratio threshold
- the embodiment of the present application achieves fast zooming by analyzing the zoom ratio relationship between the proportion of the human face and the magnification.
- the above method further includes:
- Step 001 determining the center position of the character area based on the picture information currently captured by the target camera device
- Step 002 Control the target camera device to move and/or rotate according to the center position of the character area and the center position of the entire shooting image, so that the center position of the character area coincides with the center position of the entire shooting image.
- the step of controlling the movement and/or rotation of the target camera device so that the center position of the character area coincides with the center position of the entire captured picture is performed before the step of determining the first ratio.
- steps 001 to 002 are performed, steps 101 to 104 are performed.
- steps 101 to 104 are performed.
- steps 001 to 002 and steps 101 to 104 may be performed separately.
- the image is zoomed by the zoom function, and the face is zoomed to an appropriate size, while ensuring that the person area is in the center of the screen after zooming.
- the picture currently captured by the target camera device may have a single person's face, or there may be multiple people's faces.
- moving the area center of the single face to the center of the entire shot can generally ensure the focus on the face; however, for the case of multiple faces, if only based on multiple How to display the picture may be determined by the regional center position of each face in the human face, which may result in incomplete display of the portrait in the picture due to the complex relationship such as the front and rear positions of each face.
- determining the center position of the person area based on the picture information currently captured by the target camera device includes: corresponding to the single person face currently captured by the target camera device, the area center position of the single person face Determined as the center of the character area.
- determining the center position of the human body region based on the picture information currently captured by the target camera device includes: corresponding to the multiple human faces currently captured by the target camera device, determining the center position of the combined human body region as the human body region The center position, the merged human body area is a closed area determined based on the image boundary of the human body corresponding to each of the multiple human faces, wherein the closed area covers each human body image.
- the center position of the character area can be determined in different ways in the case of a single face and multiple faces; in the case of a single face, it can be determined according to the face area; in the case of multiple faces Next, it can be determined according to the image boundary of the human body.
- the determination of the center position of the character area when the target camera device currently captures a single face, and the determination of the center position of the character area when the target camera device currently captures multiple faces can be performed in the It is adopted in the same embodiment, and can also be adopted in different embodiments; that is, when the regional center position of a single person's face is determined as the central position of the character region, it corresponds to the person when the target camera device currently captures the faces of multiple people.
- the method for determining the center position of the area may adopt the above-mentioned method for determining the center position of the merged human body area, or other determining methods, and the two are not necessarily related, and vice versa.
- the image boundary of the human body can be determined by the image processing module set inside or outside the target camera device.
- the image processing module can directly determine the image boundary of the human body according to the currently captured image information, or can be calculated according to the face area combined with the algorithm.
- the image boundary of the human body is not limited here.
- Control the movement and/or rotation of the target camera device according to the center position of the character area and the center position of the entire shot including:
- the object distance is the distance between the actual position of the currently photographed face and the actual position of the target imaging device.
- the horizontal position offset angle is determined according to the horizontal offset between the central position of the character area and the central position of the entire shooting picture and the object distance. Specifically, it includes: calculating both according to the central position of the character area and the central position of the entire shooting picture.
- the tangent function value arctan(Xoff/Sd) of the horizontal position offset angle is calculated according to the ratio between Xoff and the object distance Sd, and the horizontal position offset angle is calculated according to arctan(Xoff/Sd).
- the vertical position offset angle is determined according to the vertical offset between the central position of the character area and the central position of the entire shooting picture and the object distance.
- the vertical offset Yoff between the two is calculated according to the ratio between Yoff and the object distance Sd to calculate the tangent function value of the vertical position offset angle arctan(Yoff/Sd), and the vertical Position offset angle.
- the horizontal position offset angle and the vertical position offset angle include not only the numerical value of the corresponding angle, but also the direction of the angle (for example, the direction of the angle is represented by positive and negative).
- Controlling the rotation of the target camera device can be specifically realized by controlling the rotation of the PTZ to drive the target camera device to rotate.
- the object distance is determined according to the current optical zoom ratio of the target imaging device and the second ratio.
- A represents the center position of the screen
- B represents the center position of the face area. Therefore, it is necessary to adjust the face to the center position of the screen and perform zooming, in order to ensure a good face focus effect.
- the distance differences between the upper, lower, left, and right of the merged human body area and the corresponding boundaries of the shooting screen are Yup, Ydown, Xleft, and Xright, respectively; then after the adjustment to A' and A overlap, the upper, lower, left, and right of the merged body area are compared with the shooting.
- the distance differences between the corresponding boundaries of the pictures become Y'up, Y'down, X'left, and X'right, respectively.
- the pan/tilt movement is further performed according to the horizontal position offset angle and the vertical position offset angle, combined with the deviation of the central position of the character area relative to the central position of the entire shot.
- the object distance Sd is calculated and obtained by calculating the proportion of the face area (ie, the second ratio), the current magnification of the motor Zoom, and the position of the focus motor.
- the above method further includes: pre-establishing a correspondence between the object distance Sd and different optical zoom ratios and different second ratios where the target imaging device is located, and determining the object distance according to the correspondence.
- FIG. 8 is a schematic diagram of the relationship between the object distance and the optical zoom ratio and the proportion of the face area. In the figure, the position of the Zoom motor corresponds to the object distance.
- the ratio of the area of the character area in the display screen of the target camera device to the total area of the display screen is 0.7-0.8;
- the area of the person area is the area of the human body image area corresponding to the single-person face;
- the area of the person area is the area of the combined human body area
- the combined human body area is a closed area determined based on the image boundary of the human body corresponding to each face in the multi-person face, and the closed area is Overlay each body image.
- the ratio of the area of the character area in the display screen of the target camera device to the total area of the display screen is 0.75.
- the lens of the target imaging device can perform adaptive focus zooming.
- the area of the human body image area is determined based on the area area of the corresponding single-person face and a preset multiple, and the preset multiple is a preset ratio of the area representing the human body image area to the area of the human face area.
- the width of the human body is set to be twice the width w of the human face, that is, the width of the human body is 2*w; the height of the part of the human body other than the head is 3 times the height h of the human face , that is, the height of the human body is 4*h; thus, the area of the human image area is determined.
- the preset multiple is equal to 8, that is, the area of the human body image area is calculated by multiplying the area of the corresponding single-person face by 8 times.
- the above method may further include:
- control the target camera device to perform optical zoom back, and back to half of the current optical zoom ratio of the target camera device;
- the target imaging device is controlled to perform the optical zooming back and back to the wide-angle end.
- step 103 after controlling the target imaging device to perform digital zooming, the above method further includes:
- area a is the area where the digital zoom zoomed image is cropped in the center; the outer border of area b is the image before digital zoom zoom (original image)
- the inner boundary of the b area is the outer boundary of the a area, and the b area is the area that is cut out and not displayed in the digital zoom.
- the position of the face area can be quickly locked by detecting area b, avoiding large magnification.
- the back-and-forth zooming and vibration phenomenon of the screen caused by the rollback also accelerates the close-up locking of the face area again; when no face is detected in the b area, the digital zoom rollback is immediately performed, and the optical zoom rollback is performed according to the optical zoom.
- the double fallback method is used to re-lock the face area.
- the current optical zoom is Z; when the face area disappears, the present embodiment performs the following steps to roll back: the optical zoom is changed from Z to fast Return to the Z/2 position, and then perform the fast detection of the face area; when the face is still not detected, the optical zoom ratio will quickly return to the widest angle end, that is, to the minimum, and then perform the detection; if detected
- the face area is adaptively scaled and scaled to an appropriate magnification according to the method provided in the above-mentioned embodiments of the present application; when the face area disappears, the step of returning the optical variable magnification to Z/2 is performed again. Also, do stills/close-ups. In this way, not only can the face zoom transition caused by the transition rollback be avoided, but also the time consumed by the camera movement is reduced, and the problem that the camera movement takes too long is avoided.
- the camera control method provided by the embodiment of the present application can not only realize adaptive zooming and focusing according to the detection of the face area, but also can use a fast rollback mechanism to achieve precise rollback when the face disappears.
- the face detection technology is used to detect the face area; when a face is detected, that is, there is a face, then through the PTZ auxiliary mechanism, Adjust the center position of the character area to coincide with the center position of the entire shooting image. Calculate the proportion of the face area according to the different situations of single face or multiple faces, and calculate the proportion of the face area according to the difference between the center of the character area and the center of the entire shooting image.
- the appropriate optical zoom and digital zoom are used for adaptive zooming; real-time detection of the face area image, if When the face disappears, according to the fallback mechanism, that is, select the corresponding fallback method according to the optical zoom/digital zoom to perform the fallback to ensure that the face disappears and the face image can be quickly tracked to achieve accurate fallback; the camera is adaptive Zoom to an appropriate position, that is, the magnification stays at the valid position.
- this embodiment provides an adaptive zooming technology based on a single camera.
- the camera By analyzing regional faces, the camera performs adaptive zooming, and quickly changes the magnification to an appropriate magnification; , to fine-tune the position, and place a single face or a multi-person face area in the center of the screen; in order to ensure the image quality as much as possible and ensure adaptive zooming, digital zoom or digital zoom is determined according to the magnification of the camera and the proportion of the face area.
- Optical zoom in addition, an efficient rollback mechanism is proposed in this embodiment to solve the problem of the rollback of the magnification of a single camera after the face disappears.
- the efficient self-adaptive zooming technology for a single camera proposed in this embodiment realizes a fast close-up of the face area.
- the optical zoom mainly realizes the zooming of the image through the movement of the focusing lens group, and the image quality is not lost.
- the movement of the focusing lens group involves autofocus technology.
- autofocus technology has been widely used in digital cameras, security monitoring, mobile phones, video conferencing and other fields.
- autofocus technology in the security field mainly realizes focusing through image analysis: get the current frame , analyze the image sharpness value, calculate the next focus position and focus sharpness value, and continuously drive the focus motor until the sharpest sharpness value is found.
- the focusing process usually in the focusing method, the focusing process always focuses back and forth near the peak point, resulting in slow focusing speed and reducing focusing efficiency.
- FIG. 13 is a flow chart of a method for determining a focusing step according to an embodiment of the present application. Figure, as shown in Figure 13, the process includes the following steps:
- Step 301 acquiring the focus motor position and the clarity of the frame image when the target imaging device collects a predetermined number of consecutive frame images respectively;
- the target imaging device collects frame images
- the corresponding focus motor position and definition when each frame image is collected are respectively recorded, so as to facilitate subsequent calculation.
- the focus motor position includes information such as the focus step length, brightness, etc. when the target camera device collects a certain frame of image; the focus motor position and the clarity of the frame image can be obtained by comparing the focus motor position and the clarity of the frame image.
- the degrees are stored in the target area and then retrieved from the target area; the predetermined number may be at least 4 frames of images.
- the step of acquiring the focus motor position and the clarity of the frame images when the target imaging device separately collects a predetermined number of consecutive frame images is an operation before the target imaging device is photographed to form an image, that is, the focus is completed. The image is then photographed to obtain an image with higher definition, wherein the image includes pictures and/or images.
- Step 302 Determine the coordinate point corresponding to each frame of image based on the respectively acquired multiple focus motor points and multiple resolutions, wherein the coordinate value of the coordinate point corresponding to each frame image includes the focus motor point when each frame image is collected. bits and the sharpness of each frame;
- the determination of the coordinate points is to facilitate the positioning of the focus motor point of each frame of images when the hill-climbing focusing algorithm is used for focusing, thereby facilitating the determination of the curve of the hill-climbing focusing algorithm.
- one-to-one correspondence between the focusing motor points and the sharpness is formed to form a two-dimensional coordinate system, and the focusing motor positioning points are connected through a curve to determine the curve of the mountain-climbing focusing algorithm.
- Step 303 Determine the target adjustment of the focus motor of the target imaging device based on the coordinate values of the coordinate points corresponding to the first target frame image, the second target frame image, the third target frame image and the fourth target frame image included in the consecutive frame images Step length, wherein, the fourth target frame image is the frame image before the third target frame image, the third target frame image, the second target frame image and the first target frame image are successively adjacent frame images, and the first target frame image A frame image is the last frame image of consecutive frame images.
- the target adjustment step size of the focus motor of the target imaging device is determined according to the coordinate values of the coordinate points of the target frame images of at least four frames, which reduces the repeated debugging process of the target adjustment step size, thereby reducing the need for the focusing process. It takes time to improve focusing efficiency.
- the target adjustment step size can be adjusted according to actual needs, for example, it can be set to 1, or it can be set to other values;
- the fourth target frame image can be a frame image adjacent to the third target frame, or a frame image not adjacent to the third target frame The image adjacent to the target frame image.
- the step size adjustment is performed according to the coordinate values of the coordinate points in the consecutive frame images, so that the imaging device can be quickly focused, thereby reducing the time consumption of the focusing process, solving the problem of low focusing efficiency in the related art, and improving the focusing performance. efficiency.
- the target imaging device is determined based on the coordinate values of the coordinate points corresponding to the first target frame image, the second target frame image, the third target frame image, and the fourth target frame image included in the consecutive frame images
- the target adjustment steps of the focus motor include:
- Step 3031 Determine the first angle change value and the first residual change rate of the first coordinate point based on the first coordinate value, the second coordinate value and the fourth coordinate value, wherein the first coordinate value corresponds to the first target frame image.
- the coordinate value of the first coordinate point, the second coordinate value is the coordinate value of the second coordinate point corresponding to the second target frame image
- the fourth coordinate value is the coordinate value of the fourth coordinate point corresponding to the fourth target frame image
- the An angle change value is the amount of change between the first average resolution value per step and the second average resolution value per step
- the first average resolution value per step is the difference between the first target frame image and the fourth target frame image
- the average sharpness value per step between the two average sharpness values per step, the second average sharpness value per step is the average sharpness value per step between the first target frame image and the second target frame image
- the first residual change rate is used for Indicates the rate of change per step of the sharpness of the first target frame image and the second target frame image;
- Step 3032 Determine the second angle change value and the second residual change rate of the second coordinate point based on the second coordinate value, the third coordinate value and the fourth coordinate value, wherein the third coordinate value corresponds to the third target frame image.
- the coordinate value of the third coordinate point of the The average resolution per step between the target frame image and the fourth target frame image, and the fourth average resolution value per step is the average resolution per step between the second target frame image and the third target frame image value, the second residual rate of change is used to indicate the rate of change per step of the clarity of the second target frame image and the third target frame image;
- Step 3033 Determine the target adjustment step size of the focus motor of the target imaging device based on the first angle change value, the first residual change rate, the second angle change value, and the second residual change rate.
- determining the first angle change value and the second angle change value is to determine the angle change of the coordinate point between the frame images of two adjacent frames collected, so as to determine whether the sharpness exceeds or is about to reach the focus peak value, When the sharpness exceeds the focus peak value, the second angle change value may be greater than the first angle change value. At this time, it can be determined that the focus peak value is located on the left side of the focus motor point corresponding to the first target frame image, so that a quick prediction can be made.
- the position of the focus peak, and so on; similarly, the determination of the first residual change rate and the second residual change rate is also to determine the transformation of the definition between two adjacent frames, so as to quickly determine the position of the focus peak.
- the first target frame image is the frame image with the focus motor at point B
- the second target frame image is the frame image with the focus motor at point C
- the third target frame image is the focus motor
- the fourth target frame image is the frame image with the focus motor point at point A
- the first angle change value and the second angle change value can be calculated by the following formulas:
- Fv_cur represents the resolution of the current frame image (ie the first target frame image)
- Fv_init represents the resolution of the initial frame image (ie the fourth target frame image)
- Fv_bef represents the previous frame image (ie the second target frame image).
- Pos_cur represents the focus step size of the current frame image (ie the first target frame image)
- Pos_init represents the focus step size of the initial frame image (ie the fourth target frame image)
- Pos_bef represents the previous frame image (that is, the focus step size of the second target frame image)
- f_radio1 is the relative change rate of the first target frame image and the second target frame image with respect to the fourth target frame image, that is, the first average resolution per step value
- f_radio2 is the relative change rate of the second target frame image and the third target frame image with respect to the fourth target frame image respectively, that is, the second average resolution value per step; in the normal hill-climbing focusing algorithm, It is usually used to measure whether the sharpness has reached the focus peak.
- the first residual change rate and the second residual change rate can be calculated by the following formulas:
- fv_radio1 is the first residual change rate
- fv_radio2 is the second residual change rate
- Fv_cur represents the sharpness value of the current frame
- Fv_bef represents the sharpness value of the previous frame
- Fv_bef' represents the previous The sharpness value of one frame
- Step_cur represents the walking step of the current frame relative to the previous frame
- Step_bef represents the focus step of the previous frame
- fv_radio represents the change rate of the sharpness value of the previous and previous frames per step to calculate the residual change Rate.
- determining the target adjustment step size of the focus motor of the target imaging device based on the first angle change value, the first residual change rate, the second angle change value and the second residual change rate includes:
- Step 30331 determining the first difference between the first angle change value and the second angle change value
- Step 30332 Determine the second difference between the first residual change rate and the second residual change rate
- Step 30333 Determine the target adjustment step size of the focus motor of the target imaging device based on the first difference value and the second difference value.
- the determination of the first difference is to determine the change between the angle change values of the adjacent frame images
- the determination of the second difference is to determine the change of the definition of the adjacent frame images
- the second difference is the fv_radio value in the aforementioned formula (3), and:
- the first difference value f_radio_diff can be calculated by the following formula:
- f_radio_B and f_radio_C respectively represent the focus motor angle of the two frames of images B and C, and the sharpness values of the three points B, C and D represent f b , f c , f d , B, C,
- the position differences between the three points of D and the initial point are p b , p c , and p d .
- f c 2 ⁇ [f b ⁇ (p c -p d )-f d ⁇ p b ] will affect the focus value f_radio_diff value, so that the convergence point verification can be performed in advance judgment, namely:
- f_radio_diff When B has not reached the peak point, f_radio_diff ⁇ 0; when B is close to the peak point, f_radio_diff ⁇ 0.
- step 30331 and step 30332 may be reversed, that is, step 30332 may be executed first, and then step 30331 may be executed.
- determining the target adjustment step size of the focus motor of the target imaging device based on the first difference value and the second difference value includes:
- Step 30333 determine the target convergence value based on the first difference and the second difference
- Step 303332 Determine the target adjustment step size according to the target convergence value.
- the purpose of determining the target convergence value is to determine whether the sharpness of the frame image exceeds the focus peak value or is near the focus peak value, and then determines the target adjustment step size so that the subsequent focus process can quickly reach the focus peak value.
- the target convergence value can be determined by the following formula:
- condition A is: fv_radio0&&f_radio_diff>default_radio1;
- Condition B is: f_radio_diff ⁇ &&f_radio_C>0;
- Condition C is: f_radio2 ⁇ default_radio2;
- default_radio1 default_radio2 are limited to 5 and -25 respectively.
- determining the target adjustment step size according to the target convergence value includes:
- Step 3033321 when it is determined that the target convergence value satisfies the first condition, determine that the target adjustment step is a preset step value;
- Step 3033322 If the target convergence value does not meet the first condition, determine the target adjustment step size as the initial step size, where the initial step size is the step size used by the target camera device when collecting a predetermined number of consecutive frame images.
- the first condition can be (but not limited to) the following formula:
- the focus step is set to walk according to the original setting; otherwise, the focus step is set to 1.
- the method further includes:
- Step 304 Perform focusing processing on the target imaging device according to the target adjustment step size.
- the focusing process may (but is not limited to) reciprocate frame image acquisition and sharpness recording according to the target adjustment step size, and make the sharpness reach a focus peak value.
- an embodiment of the present application further provides a camera control device 400 , the device includes: a first determination module 410 , a second determination module 420 , a determination module 430 and a control module 440 , wherein :
- a first determination module 410 configured to determine a first ratio, where the first ratio is the ratio of the optical zoom ratio where the camera is currently located to the maximum optical zoom ratio of the camera;
- the second determination module 420 is configured to determine a second ratio, where the second ratio is the proportion of the area of the face area currently captured by the camera in the entire captured image;
- a judgment module 430 configured to judge whether the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold;
- the control module 440 is configured to control the camera to perform optical zooming when the result of the determination is yes; and control the camera to perform digital zooming when the result of the determination is no.
- the second ratio is the proportion of the area of the single-person face in the entire shooting picture; corresponding to the camera currently capturing multiple human faces , the second ratio is the proportion of the combined face area area in the entire shooting picture, and the combined face area area is the sum of the areas corresponding to each face in the multiple faces.
- the value range of the first ratio threshold is 0.45-0.55.
- the value range of the second ratio threshold is 0.15-0.25.
- the apparatus further includes:
- a third determining module configured to determine the center position of the character area based on the picture information currently captured by the camera
- the control module 440 is further configured to control the movement and/or rotation of the camera according to the center position of the character area and the center position of the entire shot, so that the center position of the character area coincides with the center position of the entire shot.
- control module 440 is configured to control the camera to move and/or rotate so that the center position of the character area coincides with the center position of the entire shot before the first determination module 410 determines the first ratio.
- the third determining module is specifically used for:
- the area center position of the single-person face is determined as the person area center position
- the center position of the combined human body region is determined as the central position of the human body region, and the combined human body region is a closed region determined based on the image boundary of the human body corresponding to each face in the multi-person face. , the closed area covers each human body image.
- control module 440 is specifically configured to:
- the object distance is the distance between the actual position of the currently photographed face and the actual position of the camera.
- the object distance is determined according to the optical zoom ratio at which the camera is currently located and the second ratio.
- the ratio of the area of the character area to the total area of the displayed image in the display screen of the camera is in the range of 0.7-0.8. ;in,
- the area of the person area is the area of the human image area corresponding to the single-person face;
- the area of the person area is the area of the combined human body area
- the combined human body area is a closed area determined based on the image boundary of the human body corresponding to each face in the multi-person face, and the closed area covers Each body image.
- the area of the human body image area is determined based on the area area of the corresponding single-person face and a preset multiple, and the preset multiple is a preset ratio of the area representing the human body image area to the area of the human face area.
- the above-mentioned apparatus further includes:
- the fallback module is used to detect the face area on the display screen of the camera after controlling the camera to perform optical zooming;
- control the camera to perform optical zoom back, and back to half of the current optical zoom ratio of the camera;
- the camera is controlled to perform the optical zooming back and back to the wide-angle end.
- the apparatus further includes:
- the fallback module is used to detect the face area on the display screen of the camera after controlling the camera to perform digital zooming;
- control module 440 includes:
- the parameter acquisition module 441 is used to acquire the focus motor position and the definition of the frame image when the target camera device collects a predetermined number of consecutive frame images respectively;
- the coordinate determination module 442 is configured to determine the coordinate point corresponding to each frame of image based on the plurality of the focus motor points and the plurality of the sharpness obtained respectively, wherein the coordinate value of the coordinate point corresponding to each frame of image includes the collected The focus motor position of each frame of image and the sharpness of each frame of image;
- the step size determination module 443 is used to determine the target camera based on the coordinate values of the coordinate points corresponding to the first target frame image, the second target frame image, the third target frame image and the fourth target frame image included in the consecutive frame images.
- the target adjustment step size of the focusing motor of the device wherein the fourth target frame image is the frame image before the third target frame image, and the third target frame image, the second target frame image and the first target frame image are adjacent in sequence frame images, and the first target frame image is the last frame image of the consecutive frame images.
- the step size determination module 443 includes:
- the first parameter determination unit 4431 is configured to determine the first angle change value and the first residual change rate of the first coordinate point based on the first coordinate value, the second coordinate value and the fourth coordinate value, wherein the first coordinate The value is the coordinate value of the first coordinate point corresponding to the first target frame image, the second coordinate value is the coordinate value of the second coordinate point corresponding to the second target frame image, and the fourth coordinate value The value is the coordinate value of the fourth coordinate point corresponding to the fourth target frame image, and the first angle change value is the amount of change between the first average resolution value per step and the second average resolution value per step,
- the first average sharpness value per step is the average sharpness value per step between the first target frame image and the fourth target frame image
- the second average sharpness value per step is the average resolution value per step between the first target frame image and the second target frame image
- the first residual change rate is used to indicate the first target frame image and the second target frame image The rate of change of the resolution of the frame image per step;
- the second parameter determination unit 4432 is configured to determine the second angle change value and the second residual change rate of the second coordinate point based on the second coordinate value, the third coordinate value and the fourth coordinate value, wherein the third coordinate The value is the coordinate value of the third coordinate point corresponding to the third target frame image, and the second angle change value is the amount of change between the third average resolution value per step and the fourth average resolution value per step,
- the third average resolution value per step is the average resolution value per step between the second target frame image and the fourth target frame image
- the fourth average resolution value per step is the average resolution value per step between the second target frame image and the third target frame image
- the second residual change rate is used to indicate the second target frame image and the third target frame image The rate of change of the resolution of the frame image per step;
- Step size determination unit 4433 configured to determine the focus of the target imaging device based on the first angle change value, the first residual change rate, the second angle change value and the second residual change rate The target adjustment step size of the motor.
- the step size determining unit 4433 includes:
- the first difference determination subunit 44331 is used to determine the first difference between the first angle change value and the second angle change value
- the second difference determination subunit 44332 is configured to determine the second difference between the first residual change rate and the second residual change rate
- the step size determination subunit 44333 determines the target adjustment step size of the focus motor of the target imaging device based on the first difference value and the second difference value.
- the step size determination subunit 44333 includes:
- the convergence determination subunit 443331 is used to determine the target convergence value based on the first difference value and the second difference value;
- the target step size subunit 443332 is configured to determine the target adjustment step size according to the target convergence value.
- the target step size subunit 443332 includes:
- the first step length subunit 4433321 is used to determine that the target adjustment step is a preset step value when the target convergence value satisfies the first condition;
- the second step size subunit 4433322 is configured to determine the target adjustment step size as the initial step size when the target convergence value does not meet the first condition, wherein the initial step size is when the target camera device collects a predetermined number of consecutive frame images The step size used.
- control module 440 further includes:
- the focus processing module 444 is configured to perform focus processing on the target camera device according to the target adjustment step size after determining the target adjustment step size of the focus motor of the target camera device.
- Each module in the above-mentioned camera control device can be implemented in whole or in part by software, hardware and combinations thereof.
- the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
- the above modules are all located in the same processor; or, the above modules are located in different processors in any combination.
- the method for determining the focus step size may not only be implemented in the process of controlling the target imaging device to perform optical zooming in the imaging control method, but may also be implemented independently.
- the parameter acquisition module 441 , the coordinate determination module 442 and the step size determination module 443 can also be implemented as a whole (eg, a focusing step size determination device), as shown in FIG. 16 .
- FIG. 17 is a block diagram of a hardware structure of a mobile terminal according to a method for determining a focus step according to an embodiment of the present application.
- the mobile terminal may include one or more (only one is shown in FIG.
- processor 501 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 502 for storing data, wherein the above-mentioned mobile terminal may further include a transmission device 503 and an input and output device 504 for communication functions.
- a processing device such as a microprocessor MCU or a programmable logic device FPGA
- a memory 502 for storing data
- the above-mentioned mobile terminal may further include a transmission device 503 and an input and output device 504 for communication functions.
- FIG. 17 is only for illustration, which does not limit the structure of the above-mentioned mobile terminal.
- the mobile terminal may further include more or less components than those shown in FIG. 17 , or have a different configuration than that shown in FIG. 17 .
- the memory 502 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for determining a focus step size in an embodiment of the present invention.
- the processor 501 runs the computer program stored in the memory 502 , so as to perform various functional applications and data processing, that is, to implement the above method.
- Memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
- the memory 502 may further include memory located remotely relative to the processor 501, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
- Transmission device 503 is used to receive or transmit data via a network.
- the specific example of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal.
- the transmission device 503 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
- the transmission device 503 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet in a wireless manner.
- RF Radio Frequency
- the present application also relates to a specific device structure including:
- Focus trigger module used to trigger focus processing
- an angle change rate determination unit for performing angle change rate calculation
- a relative change rate determination unit for performing a relative change rate calculation
- a residual change rate determination unit for performing residual change rate calculation for performing residual change rate calculation
- a step size adjustment unit (corresponding to the aforementioned target step size sub-unit 443332), for performing focus step size adjustment processing;
- the focus climbing module (corresponding to the aforementioned focus processing module 444 ) is configured to perform focus processing according to the adjusted focus step size.
- An embodiment of the present application further provides a computer device, including a processor and a memory, where the memory stores a computer program, and the processor implements the steps in any one of the foregoing method embodiments when the processor executes the computer program.
- Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in any one of the foregoing method embodiments.
- Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous chain Road (Synchlink) DRAM
- SLDRAM synchronous chain Road (Synchlink) DRAM
- Rambus direct RAM
- DRAM direct memory bus dynamic RAM
- RDRAM memory bus dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
Description
Claims (22)
- 一种摄像控制方法,其特征在于,所述方法包括:确定第一比值,所述第一比值为目标摄像设备当前所处的光学变倍倍率与所述目标摄像设备的最大光学变倍倍率的比值;确定第二比值,所述第二比值为所述目标摄像设备当前拍摄到的人脸区域面积在整幅拍摄画面中的占比;判断是否所述第一比值小于等于第一比值阈值且所述第二比值小于等于第二比值阈值;若是,控制所述目标摄像设备进行光学变倍;若否,控制所述目标摄像设备进行数字变倍。
- 根据权利要求1所述的摄像控制方法,其特征在于,对应于所述目标摄像设备当前拍摄到单人人脸,所述第二比值为所述单人人脸的区域面积在整幅拍摄画面中的占比;对应于所述目标摄像设备当前拍摄到多人人脸,所述第二比值为合并人脸区域面积在整幅拍摄画面中的占比,所述合并人脸区域面积为所述多人人脸中各人脸对应的区域面积的加和。
- 根据权利要求1所述的摄像控制方法,其特征在于,所述第一比值阈值的取值范围为0.45-0.55。
- 根据权利要求1所述的摄像控制方法,其特征在于,所述第二比值阈值的取值范围为0.15-0.25。
- 根据权利要求1所述的摄像控制方法,其特征在于,所述方法还包括:基于所述目标摄像设备当前拍摄到的画面信息确定人物区域中心位置;根据所述人物区域中心位置和整幅拍摄画面的中心位置,控制所述目标摄像设备移动和/或转动,以使所述人物区域中心位置与所述整幅拍摄画面的中心位置重合。
- 根据权利要求5所述的摄像控制方法,其特征在于,所述控制所述目标摄像设备移动和/或转动以使所述人物区域中心位置与所述整幅拍摄画面的中心位置重合的步骤,在所述确定第一比值的步骤之前执行。
- 根据权利要求5所述的摄像控制方法,其特征在于,所述基于所述目标摄像设备当前拍摄到的画面信息确定人物区域中心位置,具体包括:对应于所述目标摄像设备当前拍摄到单人人脸,将所述单人人脸的区域中心位置确定为所述人物区域中心位置;对应于所述目标摄像设备当前拍摄到多人人脸,将合并人体区域的中心位置确定为所述人物区域中心位置,所述合并人体区域为基于所述多人人脸中各人脸对应的人体的图像边界而确定的一个闭合区域,所述闭合区域覆盖各所述人体图像。
- 根据权利要求5所述的摄像控制方法,其特征在于,所述根据所述人物区域中心位置和整幅拍摄画面的中心位置,控制所述目标摄像设备移动和/或转动,具体包括:根据所述人物区域中心位置和整幅拍摄画面的中心位置之间的水平偏移量以及物距确定水平位置偏移角度;根据所述人物区域中心位置和整幅拍摄画面的中心位置之间的竖直偏移量以及物距确定竖直位置偏移角度;根据所述水平位置偏移角度和所述竖直位置偏移角度控制所述目标摄像设备转动;其中,所述物距为当前拍摄到的人脸的实际位置和所述目标摄像设备的实际位置之间的距离。
- 根据权利要求8所述的摄像控制方法,其特征在于,所述物距根据所述目标摄像设备当前所处的光学变倍倍率以及所述第二比值确定。
- 根据权利要求1所述的摄像控制方法,其特征在于,在控制所述目标摄像设备进行光学变倍之后,或在控制所述目标摄像设备进行数字变倍之后,在所述目标摄像设备的显示画面中人物区域面积与所述显示画面的总面积的比值的范围为0.7-0.8;其中,对应于所述目标摄像设备当前拍摄到单人人脸,所述人物区域面积为所述单人人脸对应的人体图像区域面积;对应于所述目标摄像设备当前拍摄到多人人脸,所述人物区域面积为合并人体区域面积,所述合并人体区域为基于所述多人人脸中各人脸对应的人体的图像边界而确定的一个闭合区域,所述闭合区域覆 盖各所述人体图像。
- 根据权利要求10所述的摄像控制方法,其特征在于,所述人体图像区域面积基于对应的所述单人人脸的区域面积和预设倍数确定,所述预设倍数为预设的表征人体图像区域面积与人脸区域面积的比值。
- 根据权利要求1所述的摄像控制方法,其特征在于,在控制所述目标摄像设备进行光学变倍之后,所述方法还包括:对所述目标摄像设备的显示画面进行人脸区域检测;对应于在所述显示画面中没有检测到人脸区域,控制所述目标摄像设备进行光学变倍回退,并回退至所述目标摄像设备当前所处的光学变倍倍率的一半;对进行光学变倍回退后所述目标摄像设备的显示画面进行人脸区域检测;对应于在所述进行光学变倍回退后所述目标摄像设备的显示画面中没有检测到人脸区域,控制所述目标摄像设备进行光学变倍回退,并回退至广角端。
- 根据权利要求1所述的摄像控制方法,其特征在于,在控制所述目标摄像设备进行数字变倍之后,所述方法还包括:对所述目标摄像设备的显示画面进行人脸区域检测;对应于在所述显示画面中没有检测到人脸区域,判断所述整幅拍摄画面中是否具有人脸区域;若是,调整显示画面以显示所述人脸区域;若否,控制所述目标摄像设备进行数字变倍回退和光学变倍回退。
- 根据权利要求1所述的摄像控制方法,其特征在于,所述控制所述目标摄像设备进行光学变倍包括:获取所述目标摄像设备在分别采集预定数量的连续帧图像时的聚焦马达点位以及帧图像的清晰度;基于分别获取的多个所述聚焦马达点位以及多个所述清晰度,确定每帧图像对应的坐标点,其中,每帧图像对应的坐标点的坐标值包括采集每帧图像时的聚焦马达点位以及每帧图像的清晰度;基于所述连续帧图像中包括的第一目标帧图像、第二目标帧图像、第三目标帧图像以及第四目标帧图像对应的坐标点的坐标值确定所述目标摄像设备的聚焦马达的目标调整步长,其中,所述第四目标帧图像为所述第三目标帧图像之前的帧图像,所述第三目标帧图像、所述第二目标帧图像以及所述第一目标帧图像为依次相邻的帧图像,且所述第一目标帧图像为所述连续帧图像的最后一帧图像。
- 根据权利要求14所述的摄像控制方法,其特征在于,基于所述连续帧图像中包括的第一目标帧图像、第二目标帧图像、第三目标帧图像以及第四目标帧图像对应的坐标点的坐标值确定所述目标摄像设备的聚焦马达的目标调整步长包括:基于第一坐标值、第二坐标值和第四坐标值确定第一坐标点的第一角度变化值和第一残差变化率,其中,所述第一坐标值为所述第一目标帧图像对应的所述第一坐标点的坐标值,所述第二坐标值为所述第二目标帧图像对应的第二坐标点的坐标值,所述第四坐标值为所述第四目标帧图像对应的第四坐标点的坐标值,所述第一角度变化值是第一平均每步长清晰度值与第二平均每步长清晰度值的变化量,所述第一平均每步长清晰度值为所述第一目标帧图像和所述第四目标帧图像之间的平均每步长清晰度值,所述第二平均每步长清晰度值为所述第一目标帧图像和所述第二目标帧图像之间的平均每步长清晰度值,所述第一残差变化率用于指示所述第一目标帧图像和所述第二目标帧图像的清晰度每步长变化率;基于第二坐标值、第三坐标值和第四坐标值确定第二坐标点的第二角度变化值和第二残差变化率,其中,所述第三坐标值为所述第三目标帧图像对应的第三坐标点的坐标值,所述第二角度变化值是第三平均每步长清晰度值与第四平均每步长清晰度值的变化量,所述第三平均每步长清晰度值为所述第二目标帧图像和所述第四目标帧图像之间的平均每步长清晰度值,所述第四平均每步长清晰度值为所述第二目标帧图像和所述第三目标帧图像之间的平均每步长清晰度值,所述第二残差变化率用于指示所述第二目标帧图像和所述第三目标帧图像的清晰度每步长变化率;基于所述第一角度变化值、所述第一残差变化率、所述第二角度变化值和所述第二残差变化率确定所述目标摄像设备的聚焦马达的目标调整步长。
- 根据权利要求15所述的摄像控制方法,其特征在于,基于所述第一角度变化值、所述第一残 差变化率、所述第二角度变化值和所述第二残差变化率确定所述目标摄像设备的聚焦马达的目标调整步长包括:确定所述第一角度变化值与所述第二角度变化值之间的第一差值;确定所述第一残差变化率与所述第二残差变化率之间的第二差值;基于所述第一差值和所述第二差值确定所述目标摄像设备的聚焦马达的目标调整步长。
- 根据权利要求16所述的摄像控制方法,其特征在于,基于所述第一差值和所述第二差值确定所述目标摄像设备的聚焦马达的目标调整步长包括:基于所述第一差值和所述第二差值确定目标收敛值;根据所述目标收敛值确定所述目标调整步长。
- 根据权利要求17所述的摄像控制方法,其特征在于,根据所述目标收敛值确定所述目标调整步长包括:在确定所述目标收敛值满足第一条件的情况下,确定所述目标调整步长为预设步长值;在所述目标收敛值不满足所述第一条件的情况下,确定所述目标调整步长为初始步长,其中,所述初始步长为所述目标摄像设备在采集预定数量的所述连续帧图像时所使用的步长。
- 根据权利要求14所述的摄像控制方法,其特征在于,在确定所述目标摄像设备的聚焦马达的目标调整步长之后,所述方法还包括:按照所述目标调整步长对所述目标摄像设备进行聚焦处理。
- 一种摄像控制装置,其特征在于,所述装置包括:第一确定模块,用于确定第一比值,所述第一比值为目标摄像设备当前所处的光学变倍倍率与所述目标摄像设备的最大光学变倍倍率的比值;第二确定模块,用于确定第二比值,所述第二比值为所述目标摄像设备当前拍摄到的人脸区域面积在整幅拍摄画面中的占比;判断模块,用于判断是否所述第一比值小于等于第一比值阈值且所述第二比值小于等于第二比值阈值;控制模块,用于在判断的结果为是时,控制所述目标摄像设备进行光学变倍;以及,在判断的结果为否时,控制所述目标摄像设备进行数字变倍。
- 一种计算机设备,包括处理器和存储器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至19中任意一项所述的摄像控制方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至19中任意一项所述的摄像控制方法的步骤。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/274,742 US20240114246A1 (en) | 2021-01-28 | 2022-01-20 | Photographing control method and apparatus, computer device and storage medium |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110114788.9 | 2021-01-28 | ||
CN202110114788.9A CN112449117B (zh) | 2021-01-28 | 2021-01-28 | 一种聚焦步长确定方法、装置、存储介质及电子装置 |
CN202110230319.3 | 2021-03-02 | ||
CN202110230319.3A CN112601028B (zh) | 2021-03-02 | 2021-03-02 | 摄像控制方法、装置、计算机设备和存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022161250A1 true WO2022161250A1 (zh) | 2022-08-04 |
Family
ID=82654166
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/073007 WO2022161250A1 (zh) | 2021-01-28 | 2022-01-20 | 摄像控制方法、装置、计算机设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
US (1) | US20240114246A1 (zh) |
WO (1) | WO2022161250A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115171200A (zh) * | 2022-09-08 | 2022-10-11 | 深圳市维海德技术股份有限公司 | 基于变倍的目标跟踪特写方法、装置、电子设备及介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101185322A (zh) * | 2005-05-31 | 2008-05-21 | 诺基亚公司 | 用于成像设备的光学变焦以及数字变焦 |
JP2018106034A (ja) * | 2016-12-27 | 2018-07-05 | キヤノン株式会社 | 撮像装置及び撮像方法 |
CN109495681A (zh) * | 2017-09-12 | 2019-03-19 | 天津三星通信技术研究有限公司 | 获取图像的方法和设备 |
CN111405185A (zh) * | 2020-03-31 | 2020-07-10 | 浙江大华技术股份有限公司 | 一种摄像机变倍控制方法、装置、电子设备及存储介质 |
CN112449117A (zh) * | 2021-01-28 | 2021-03-05 | 浙江华创视讯科技有限公司 | 一种聚焦步长确定方法、装置、存储介质及电子装置 |
CN112601028A (zh) * | 2021-03-02 | 2021-04-02 | 浙江华创视讯科技有限公司 | 摄像控制方法、装置、计算机设备和存储介质 |
-
2022
- 2022-01-20 US US18/274,742 patent/US20240114246A1/en active Pending
- 2022-01-20 WO PCT/CN2022/073007 patent/WO2022161250A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101185322A (zh) * | 2005-05-31 | 2008-05-21 | 诺基亚公司 | 用于成像设备的光学变焦以及数字变焦 |
JP2018106034A (ja) * | 2016-12-27 | 2018-07-05 | キヤノン株式会社 | 撮像装置及び撮像方法 |
CN109495681A (zh) * | 2017-09-12 | 2019-03-19 | 天津三星通信技术研究有限公司 | 获取图像的方法和设备 |
CN111405185A (zh) * | 2020-03-31 | 2020-07-10 | 浙江大华技术股份有限公司 | 一种摄像机变倍控制方法、装置、电子设备及存储介质 |
CN112449117A (zh) * | 2021-01-28 | 2021-03-05 | 浙江华创视讯科技有限公司 | 一种聚焦步长确定方法、装置、存储介质及电子装置 |
CN112601028A (zh) * | 2021-03-02 | 2021-04-02 | 浙江华创视讯科技有限公司 | 摄像控制方法、装置、计算机设备和存储介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115171200A (zh) * | 2022-09-08 | 2022-10-11 | 深圳市维海德技术股份有限公司 | 基于变倍的目标跟踪特写方法、装置、电子设备及介质 |
CN115171200B (zh) * | 2022-09-08 | 2023-01-31 | 深圳市维海德技术股份有限公司 | 基于变倍的目标跟踪特写方法、装置、电子设备及介质 |
Also Published As
Publication number | Publication date |
---|---|
US20240114246A1 (en) | 2024-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021208371A1 (zh) | 多摄变焦控制方法、装置、电子系统及存储介质 | |
CN110493525B (zh) | 变焦图像确定方法及装置、存储介质、终端 | |
CN112261387B (zh) | 用于多摄像头模组的图像融合方法及装置、存储介质、移动终端 | |
US8797381B2 (en) | Image processing apparatus and image processing method | |
US8306360B2 (en) | Device and method for obtaining clear image | |
WO2019061079A1 (zh) | 一种对焦处理方法及设备 | |
US7957633B2 (en) | Focus adjusting apparatus and focus adjusting method | |
JP2012151848A (ja) | 関心領域の動的検知に基づいたシーン状態切換システム及び方法 | |
WO2018094648A1 (zh) | 拍摄构图引导方法及装置 | |
US10491804B2 (en) | Focus window determining method, apparatus, and device | |
WO2022007840A1 (zh) | 图像融合方法及装置 | |
WO2022161250A1 (zh) | 摄像控制方法、装置、计算机设备和存储介质 | |
TW201410016A (zh) | 連動式攝影系統及其多攝影機的控制方法 | |
CN112601028B (zh) | 摄像控制方法、装置、计算机设备和存储介质 | |
CN112887610A (zh) | 拍摄方法、装置、电子设备及存储介质 | |
CN111491105B (zh) | 移动终端的对焦方法、移动终端及计算机存储介质 | |
WO2023231869A1 (zh) | 拍摄方法和装置 | |
CN111726512B (zh) | 一种区域对焦方法、装置、设备及存储介质 | |
WO2020187197A1 (zh) | 成像设备的变焦方法、图像处理方法及成像设备 | |
CN112261281B (zh) | 视野调整方法及电子设备、存储装置 | |
WO2021184326A1 (zh) | 电子装置的控制方法、装置、设备及系统 | |
WO2020015754A1 (zh) | 图像采集方法及图像采集设备 | |
TWI768630B (zh) | 可移動攝影系統和攝影構圖控制方法 | |
CN114554095B (zh) | 一种4k摄像机的目标对象确定方法以及相关装置 | |
WO2023213161A1 (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: 22745125 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 18274742 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22745125 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22745125 Country of ref document: EP Kind code of ref document: A1 |