WO2022126378A1 - 相机的控制方法及装置 - Google Patents
相机的控制方法及装置 Download PDFInfo
- Publication number
- WO2022126378A1 WO2022126378A1 PCT/CN2020/136544 CN2020136544W WO2022126378A1 WO 2022126378 A1 WO2022126378 A1 WO 2022126378A1 CN 2020136544 W CN2020136544 W CN 2020136544W WO 2022126378 A1 WO2022126378 A1 WO 2022126378A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- parameter
- camera
- change
- lock state
- brightness
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000005259 measurement Methods 0.000 claims description 18
- 230000001133 acceleration Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 7
- 238000001514 detection method Methods 0.000 abstract description 3
- 230000000694 effects Effects 0.000 abstract description 3
- 241000023320 Luma <angiosperm> Species 0.000 description 12
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 description 12
- 230000035945 sensitivity Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000009432 framing Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 241001494479 Pecora Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000003068 static effect Effects 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
-
- 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/70—Circuitry for compensating brightness variation in the scene
Definitions
- the present application relates to the field of photography technology, and in particular, to a camera control method and device.
- the present application provides a camera control method and device.
- a method for controlling a camera comprising:
- determining a distance change parameter used to characterize the change of the distance between the photographed object and the camera When it is detected that the camera is in the exposure lock state and/or the focus lock state, determining a distance change parameter used to characterize the change of the distance between the photographed object and the camera;
- Whether to release the exposure lock state and/or the focus lock state is determined according to the distance change parameter.
- a camera control device includes a processor, a memory, and a computer program stored in the memory for execution by the processor, and the processor executes
- the computer program executes
- the following steps are implemented:
- determining a distance change parameter used to characterize the change of the distance between the photographed object and the camera When it is detected that the camera is in the exposure lock state and/or the focus lock state, determining a distance change parameter used to characterize the change of the distance between the photographed object and the camera;
- Whether to release the exposure lock state and/or the focus lock state is determined according to the distance change parameter.
- a computer-readable storage medium on which computer program instructions are stored, and when the instructions are executed by a processor, the camera control method mentioned in the first aspect can be implemented.
- a distance change parameter used to characterize the change of the distance between the photographed target and the camera can be determined, and then it is determined whether to release the locked state according to the distance change parameter.
- the change of the shooting scene can be determined by the change of the distance between the photographed target and the camera, so that the timing of unlocking the locked state can be more accurately determined, and the shooting effect of the camera on the changed scene can be ensured.
- FIG. 1 is a flowchart of a camera control method according to an embodiment of the present application.
- FIG. 2 is a schematic diagram of an application scenario of an embodiment of the present application.
- FIG. 3 is a schematic diagram of determining whether to release a camera lock state according to an embodiment of the present application.
- FIG. 4 is a schematic diagram of a logical structure of a camera control device according to an embodiment of the present application.
- the camera When the camera is in the auto exposure state and auto focus state, the camera will determine the brightness of the current environment according to the preview image collected in real time, and determine the exposure parameters according to the brightness of the current environment. Changes in contrast automatically determine where the focus is. After receiving the photographing instruction input by the user, the image is collected according to the exposure parameter and focus position determined the last time.
- the exposure lock state When the camera enters the exposure lock state, the exposure parameters will remain unchanged from the previously determined exposure parameters. When the camera enters the focus lock state, the focus position will remain the same as the previously determined focus position.
- the exposure lock state and focus lock state can be automatically released, so that the user can shoot the next time.
- the timing of automatically releasing the exposure lock state and focus lock state is very critical. If it is released too early, the camera may not have completed the current shooting. If it is released too late, even if the scene in the camera's framing range changes, it cannot be carried out in a timely and effective manner. Actions such as focusing and metering affect the user's subsequent shooting.
- the user wants to release the lock state in time, so as to focus and meter the changed scene.
- some are unlocked after the locking time reaches a certain value; some are unlocked when the brightness change degree of the preview screen reaches a certain threshold; Unlock the camera after detecting that the motion state of the camera meets certain conditions.
- the above determination method is relatively rough and one-sided, and cannot cover the detection of changes in the shooting scene under different scenes, and unlock the locked state in time. For example, take the camera fixed at a certain position to shoot an object moving towards the camera. Maybe the camera is not moving, and the brightness of the preview image changes slightly, but the composition image keeps changing. At this time, because the camera is locked. It is impossible to perform focusing and metering according to the current changing shooting scene in time to determine the focus position and exposure parameters.
- an embodiment of the present application provides a camera control method. After the camera enters the focus lock state and/or the exposure lock state, a distance change parameter used to characterize the change of the distance between the photographed target and the camera is determined, and then according to the distance change The parameter determines whether to release the focus lock state and/or the exposure lock state.
- a distance change parameter used to characterize the change of the distance between the photographed target and the camera is determined, and then according to the distance change The parameter determines whether to release the focus lock state and/or the exposure lock state.
- the change in the distance between the target and the camera can more realistically and comprehensively reflect the changes in the scene within the camera's viewing range.
- the distance detection is also more accurate and accurate. Refinement, so that the timing of unlocking the exposure lock state and focus lock state can be more accurately determined, and changing scenes can be shot in time to improve the user experience.
- the camera control method provided by the embodiments of the present application may be executed by a camera, or may be executed by other devices such as a pan/tilt, a drone, and an intelligent robot equipped with a camera.
- the distance change between the photographed target and the camera can be determined by the ranging device on the drone, and according to the distance change, it can be determined whether the current focus lock state can be released and/or not. or exposure lock status, and then send corresponding control commands to the camera.
- the camera control method provided by the embodiment of the present application includes the following steps:
- S104 Determine whether to release the exposure lock state and/or the focus lock state according to the distance change parameter.
- buttons or controls for triggering the exposure lock state and/or focus lock state are set on the camera, and the user can control the camera to enter the exposure lock state by triggering the corresponding buttons and controls.
- the camera can also automatically enter the exposure lock and focus lock states. For example, when it detects that the user taps an image area on the screen, it automatically enters the exposure lock and focus lock states.
- the distance between the photographed object and the camera can be determined in real time, and then the distance change parameters that characterize the change of the distance between the photographed object and the camera are determined according to the distances corresponding to different times.
- the photographed target may be any target in the image, or may be the target clicked by the user through the interactive interface, which may be specifically set according to actual needs.
- the distance change parameter can be any parameter that characterizes the change of the distance between the photographed target and the camera. For example, it can be the difference between the distance at the current moment and the distance when it just entered the locked state, or it can be detected at regular intervals.
- the distance between the photographed target and the camera is detected once per second, then the average value of the distances detected each time is counted, and the difference between the average value of the current statistic and the average value of the previous statistic is calculated as the distance change parameter , of course, the distance change parameter may also be determined in other ways, and may be specifically set according to actual needs, which is not limited in this embodiment of the present application.
- the distance change parameter After the distance change parameter is determined, it can be determined whether to release the focus lock state and/or the exposure lock state of the camera according to the distance change parameter. For example, when the distance change parameter is greater than a preset threshold, the focus lock state and/or the exposure lock state of the camera are unlocked, otherwise, the exposure lock state and/or the focus lock state are maintained.
- the distance between the target and the camera can more accurately reflect the changes in the scene within the camera's viewing range, and the distance is more finely determined than parameters such as locking time and screen brightness, the distance between the target and the camera can be determined more precisely.
- the change of the distance can more accurately determine the timing of releasing the exposure lock state and/or the focus lock state, so as to bring a better experience to the user.
- the determination is mostly based on only one parameter. For example, the lock time is counted by a timer. Obviously, if the scene within the camera's viewing range changes before the preset time period expires, it is impossible to focus and meter in time to capture the changed scene. Some also use the motion state of the camera to determine whether to release the lock. This method is obviously not suitable for the situation where the camera does not move and the scene changes. Other technologies use the brightness of the screen to determine whether to release the locked state.
- the unlocking timing can be jointly determined by combining various parameters.
- At least one other parameter used to characterize the change of the scene captured by the camera can also be determined, and then, in combination with the distance change parameter and other parameters, it is determined whether to release the exposure lock state and / or focus lock status.
- other parameters may include one or more of the following: lock duration of the focus lock state and/or exposure lock state, motion state change parameters representing changes in the motion state of the camera, and multi-frame previews representing camera acquisitions
- lock duration of the focus lock state and/or exposure lock state motion state change parameters representing changes in the motion state of the camera
- motion state change parameters representing changes in the motion state of the camera
- multi-frame previews representing camera acquisitions
- other parameters may be the lock duration of the focus lock state and/or the exposure lock state.
- the timer is started to count the locking duration.
- motion state change parameters that characterize the change of the motion state of the camera.
- changes in the position, posture, and motion speed of the camera can be detected.
- the motion state of the camera changes to a certain extent, that is, the shooting scene of the camera can be considered. has also changed.
- Other parameters can also be brightness change parameters that characterize the brightness changes of the multi-frame preview images collected by the camera.
- the brightness of the preview images collected by the camera changes to a certain extent, indicating that the current environment brightness has also changed, so the camera shooting scene is very likely. has also changed.
- Other parameters may also be sharpness change parameters that represent changes in the sharpness of the multi-frame preview images collected by the camera. Generally, if the sharpness of the preview images collected by the camera changes, it means that the shooting target has moved, resulting in failure to focus.
- the distance change parameter may be determined from data collected by the depth sensor.
- the depth sensor may be a binocular vision sensor, a lidar, an infrared ranging device, or the like.
- cameras are mounted on UAVs, and UAVs are usually equipped with depth sensors such as binocular vision sensors and lidars. Therefore, the distance change parameters can be determined from the data collected by the depth sensors on UAVs.
- the camera itself may also be equipped with an infrared ranging device or a depth camera. Therefore, the distance change parameter can also be determined by the infrared ranging device and the depth camera equipped on the camera itself.
- the motion state change parameters of the camera may be determined according to the data collected by the attitude measurement unit.
- the attitude measurement unit may be an acceleration sensor, a gyroscope, an inertial measurement unit (IMU), or the like.
- the camera is mounted on a UAV or a handheld gimbal.
- the UAV or handheld gimbal is usually equipped with an inertial measurement unit. Therefore, the motion state of the UAV can be detected by the inertial measurement unit to determine the motion state of the camera. .
- the data collected by the attitude measurement unit includes the acceleration of the camera in the three axes
- the motion state change parameter is determined based on the variation of the acceleration of the camera in the three axes.
- the acceleration of the camera in the three axes of x, y, and z can be detected by the acceleration sensor. It is assumed that the accelerations on the three axes at time t0 are x0, y0, and z0, respectively, and the accelerations on the three axes at time t1 are respectively x1, y1, and z1. Therefore, the motion change parameter S of the camera can be determined based on the following formula (1):
- the camera may be mounted on the drone, and the depth sensor or attitude measurement unit may be a sensor provided on the drone.
- the depth sensor is the binocular vision sensor or lidar on the drone
- the attitude measurement unit is the inertial measurement unit on the drone.
- the brightness change parameter of the camera may be the difference between the brightness of the preview image captured by the camera at the current moment and the brightness of the preview image captured when the camera enters the focus lock state and/or the exposure lock state.
- the brightness change parameter in order to more accurately reflect the overall change of the brightness of the preview images collected by the camera over a period of time, the brightness change parameter may also be based on the average value of the brightness of all preview images collected by the camera at the current moment and a certain past The difference between the average values of the brightness of all the preview images collected by the camera at the moment is determined.
- the average value of the brightness of all the preview images collected by the current camera can be determined to obtain the first brightness value, and then the other frames except the latest frame of preview image can be determined.
- the average value of the brightness of all the preview images is obtained to obtain the second brightness value, and then the brightness change parameter is determined according to the difference between the first brightness value and the second brightness value.
- the brightness of each frame of preview image can be counted, denoted as: Luma.
- the brightness of the N frames of preview images are: Luma(N), Luma(N-1), Luma(N-2), Luma(N-3)..., Luma(1) ;
- the average brightness of the first N frames of preview images captured by the camera can be determined, denoted as: AvgL(N)
- the average brightness of the first N-1 frames of preview images captured by the camera can be determined, denoted as AvgL(N-1)
- the change of the shooting scene can be more accurately determined.
- the brightness of the preview image can be the global brightness, that is, the brightness of the preview image is the average value of the brightness values of all pixels in the entire image, and the global brightness can well reflect the overall brightness of the scene within the camera's viewing range. Changes.
- the brightness of the preview image may be a local brightness, that is, the brightness of the preview image may only be the average brightness of a local image area in the image, and the local area may be an area of interest to the user.
- the user usually pays attention to the focus position of the region of interest and whether the light metering changes. Therefore, only the average value of the brightness values of each pixel in the region of interest can be calculated as the brightness of the preview image.
- the local brightness has higher sensitivity, which can better reflect the brightness change of the object of interest to the user within the camera's viewing range, so as to determine a more accurate timing for unlocking the state.
- the brightness of each frame of the preview image may also be a weighted average of the brightness values of each pixel in the preview image.
- semantic segmentation can be performed on the preview image, and different weights can be set for different image regions obtained by segmentation.
- the weight corresponding to each pixel in the preview image may be determined according to one or more of the type of the scene corresponding to each pixel and the type of the camera. For example, for the camera on the UAV, the images collected can be used for obstacle avoidance. Therefore, the moving objects in the image are more concerned. Therefore, the moving objects tend to have the largest weight. For cameras such as a user's mobile phone and a handheld gimbal, the user usually pays more attention to shooting of people. Therefore, the weight of the pixels corresponding to the people can be set to be larger.
- the photographed object is often the area of most interest to the user.
- the pixels corresponding to the photographed object occupy the The weights are usually larger than the weights of other pixels.
- contrast focusing When the camera performs autofocus, it can focus by means of contrast focusing.
- the principle of contrast focusing is that when the image is clearest, its contrast value (ie, contrast) is also the largest. Therefore, in the process of driving the lens to move and adjust the focus position, the camera can count the contrast value of the entire image collected. Usually, the contrast value will increase first and then decrease, and then take the position of the lens when the contrast value is the largest as the focus position . Therefore, in some embodiments, the contrast value corresponding to the preview image when the camera collects the preview image by auto-focusing can be counted, and then the sharpness change parameter used to characterize the change of the sharpness of the preview image is determined according to the contrast value.
- the sharpness change parameter may be the difference between the contrast value corresponding to the preview image captured by the camera at the current moment and the contrast value corresponding to the preview image captured by the camera entering the focus lock state and/or the exposure lock state.
- the sharpness change parameter in order to more accurately reflect the overall change in the sharpness of the preview images collected by the camera over a period of time, the sharpness change parameter may also be based on the average of the contrast values of all the preview images collected by the camera at the current moment It is determined by the difference from the average of the contrast values of all preview images collected by the camera at a certain moment in the past.
- the average value of the contrast values of all preview images collected by the current camera can be determined to obtain the first contrast value, and then determine the contrast value of all preview images except the latest frame of preview image.
- the average value of the contrast values of all other preview images is obtained to obtain the second contrast value, and then the sharpness change parameter is determined according to the difference between the first contrast value and the second contrast value.
- the contrast value of the preview image can be counted, which is recorded as: FV.
- the contrast values of the captured N frames of preview images are respectively recorded as: FV(N), FV(N-1), FV(N-2), FV(N-3)....
- the average value of the contrast value of the previous N frame preview images can be determined, which is recorded as: AvgFv(N)
- the average value of the contrast values of the preview images of the previous N-1 frames can be determined, which is recorded as AvgFv(N-1).
- the sharpness change parameter can be determined by formula (3):
- a change threshold may be set for each parameter.
- the distance change parameter corresponds to a distance change threshold
- the brightness change parameter corresponds to a brightness change threshold. If the parameter value of the distance change parameter or other parameters If the parameter value of any parameter is greater than its corresponding change threshold, the focus lock state and/or the exposure lock state are released.
- a target parameter may be selected from the distance change parameter and other parameters in combination with the sensitivity of the distance change parameter and the sensitivity of other parameters. If the parameter value of the target parameter exceeds its corresponding change threshold, the focus lock will be released. status and/or exposure lock status.
- the sensitivity may be various parameters representing the relationship between the current parameter value of each parameter and the change threshold. For example, the sensitivity may be the ratio of the parameter value of each parameter to its corresponding change threshold. For example, assuming that the parameter value of the distance change parameter is 0.2m, and the corresponding change threshold is 0.1m, the sensitivity is 2.
- the target parameter may be the parameter with the greatest sensitivity, that is, the parameter with the greatest degree of change is used as the discrimination condition, and the change of the shooting scene can be accurately identified.
- FIG. 2 is a schematic diagram of an application scenario of this embodiment.
- a camera 211 is mounted on the drone 21 for image acquisition.
- the drone is also provided with an IMU (not shown in the figure), which can detect The motion state of the drone 21
- the drone 21 is also provided with a binocular vision sensor 212 , which can detect the distance between the external object and the drone 21 .
- the camera 211 enters the focus lock state and/or the exposure lock state, when to release the lock state is critical.
- the determination of the timing for releasing the locked state in the related art often fails to cover various scenes, and the locking state cannot be released in time, which affects the shooting of subsequent images.
- the present embodiment provides a method for releasing the focus lock state and/or exposure lock state of the camera 211, as follows:
- Condition 1 The lock duration is longer than the preset duration.
- the timer is started to record the lock time.
- Condition 2 The motion state change parameter is greater than the preset threshold.
- the acceleration of the camera in the three axes of x, y, and z can be detected through the IMU. It is assumed that the accelerations on the three axes at time t0 are x0, y0, and z0, respectively, and the accelerations on the three axes at time t1 are respectively x1, y1, and z1. Therefore, the motion change parameter S of the camera can be determined based on the following formula (1):
- Condition 3 The brightness change parameter of the preview image is greater than the preset threshold.
- the camera Every time the camera collects a frame of preview image, it can count the brightness of each frame of preview image, denoted as: Luma. Assuming that N frames of preview images are collected at the current moment, the brightness of the N frames of preview images are: Luma(N), Luma(N-1), Luma(N-2), Luma(N-3)..., Luma(1) ;
- the average brightness of the first N frames of preview images captured by the camera can be determined, denoted as: AvgL(N)
- the average brightness of the first N-1 frames of preview images captured by the camera can be determined, denoted as AvgL(N-1)
- Condition 4 The sharpness change parameter of the preview image is greater than the preset threshold.
- the contrast value of the preview image can be counted, which is recorded as: FV.
- the contrast values of the captured N frames of preview images are respectively recorded as: FV(N), FV(N-1), FV(N-2), FV(N-3) . . .
- the average value of the contrast value of the N frame preview images in the history can be determined, which is recorded as: AvgFv(N)
- the average value of the contrast values of the preview images of the previous N-1 frames can be determined, which is recorded as AvgFv(N-1).
- Condition 5 The distance variation parameter between the object to be photographed and the camera is greater than the preset threshold.
- the distance between the object to be photographed and the camera can be counted when collecting each frame of preview image, denoted as: d.
- the brightness of the N frames of preview images are: d(N), d(N-1), d(N-2), d(N-3)..., d(1) ;
- the average brightness of the first N frames of preview images captured by the camera can be determined, denoted as: Avgd(N)
- the average brightness of the first N-1 frame preview images collected by the camera can be determined, denoted as Avgd(N-1)
- Condition 1 Condition 2, Condition 3, Condition 4, and Condition 5 meets the requirements, the focus lock state and/or the exposure lock state are released.
- Multiple parameters are used to determine whether the shooting scene of the current camera has changed, so that various scenes can be covered, the changes of the shooting scene can be more accurately determined, and the locked state can be released in time, which can ensure that high-quality images can be collected in time after the scene changes. images to enhance the user experience.
- an embodiment of the present application further provides a camera control device.
- the device 40 includes a processor 41 , a memory 42 , and a computer stored in the memory 42 for execution by the processor 41 .
- Program when the processor 41 executes the computer program, the following steps are implemented:
- determining a distance change parameter used to characterize the change of the distance between the photographed object and the camera When it is detected that the camera is in the exposure lock state and/or the focus lock state, determining a distance change parameter used to characterize the change of the distance between the photographed object and the camera;
- Whether to release the exposure lock state and/or the focus lock state is determined according to the distance change parameter.
- the processor is further configured to:
- Determining whether to release the exposure lock state and/or the focus lock state according to the distance change parameter includes:
- Whether to release the exposure lock state and/or the focus lock state is determined according to the distance change parameter and the other parameters.
- the distance change parameter and the other parameters each correspond to a change threshold
- the processor is configured to determine whether to release the exposure lock state and/or focus according to the distance change parameter and the other parameters When locked, it is used for:
- the parameter value of the distance change parameter is greater than the change threshold corresponding to the distance change parameter, or the parameter value of any one of the other parameters is greater than the change threshold corresponding to the other parameters, then cancel the exposure lock state and/or the focus lock state; or
- a target parameter is determined among the parameters and the other parameters, and the target parameter is the parameter with the largest ratio
- the exposure lock state and/or the focus lock state are released.
- the other parameters include one or more of the following: locking duration of the focus lock state and/or exposure lock state, motion state change parameters representing changes in the motion state of the camera, The brightness change parameters of the brightness changes of the multi-frame preview images collected by the camera, and the sharpness change parameters that represent the sharpness changes of the multi-frame preview images collected by the camera.
- the distance change parameter is determined based on data collected by the depth sensor.
- the motion state change parameter is determined based on data collected by the attitude measurement unit.
- the data collected by the attitude measurement unit includes the acceleration of the camera in three axes, and the motion state change parameter is determined based on the change amount of the acceleration.
- the camera is mounted on the drone, and the depth sensor or the attitude measurement unit is mounted on the drone.
- the brightness change parameter is determined based on:
- the brightness change parameter is determined according to the difference between the first brightness value and the second brightness value.
- the brightness of the preview image is a weighted average of the brightness of each pixel in the preview image.
- the weight corresponding to each pixel in the preview image is determined based on the type of the scene corresponding to each pixel and/or the type of the camera.
- the weight of the pixel corresponding to the photographed object is greater than the weight of other pixels.
- the clarity change parameter is determined based on:
- the sharpness change parameter is determined according to the difference between the first contrast value and the second contrast value.
- an embodiment of the present specification further provides a computer storage medium, where a program is stored in the storage medium, and when the program is executed by a processor, the camera control method in any of the foregoing embodiments is implemented.
- Embodiments of the present specification may take the form of a computer program product embodied on one or more storage media having program code embodied therein, including but not limited to disk storage, CD-ROM, optical storage, and the like.
- Computer-usable storage media includes permanent and non-permanent, removable and non-removable media, and storage of information can be accomplished by any method or technology.
- Information may be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
- PRAM phase-change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read only memory
- EEPROM Electrically Erasable Programmable Read Only Memory
- Flash Memory or other memory technology
- CD-ROM Compact Disc Read Only Memory
- CD-ROM Compact Disc Read Only Memory
- DVD Digital Versatile Disc
- Magnetic tape cartridges magnetic tape magnetic disk storage or other magnetic storage devices or any other non-
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
一种相机控制方法及装置。所述方法包括:当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数,根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。由于拍摄目标与所述相机的距离变化情况可以更真实和全面地反应拍摄场景的变化情况,并且距离变化的检测也更加精准,因此,通过距离变化参数可以更加准确地判定解除锁定状态的时机,保证相机对变化后的场景的拍摄效果。
Description
本申请涉及摄影技术领域,具体而言,涉及一种相机的控制方法及装置。
很多相机都具有曝光锁定和/或对焦锁定的功能,当相机进入曝光锁定状态或者对焦锁定状态后,相机的曝光参数或焦点位置固定,不会再随着拍摄场景的变化而变化,这样用户就可以在曝光参数或焦点位置不变的情况下重新构图。但是,当拍摄场景变化后,用户通常希望相机可以自动地解除曝光锁定状态或对焦锁定状态,以便及时地对变化后的拍摄场景进行对焦或曝光参数的确定,以保证变化后的场景的拍摄效果。因此,准确确定出解除曝光锁定状态或对焦锁定状态的时机非常关键。
发明内容
有鉴于此,本申请提供一种相机的控制方法及装置。
根据本申请的第一方面,提供一种相机的控制方法,所述方法包括:
当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数;
根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
根据本申请的第二方面,提供一种相机的控制装置,其特征在于,所述装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数;
根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
根据本申请的第三方面,提供一种计算机可读存储介质,其上存储有计算机程序指令,当该指令被处理器执行时,可实现上述第一方面提及的相机的控制方法。
应用本申请提供的方案,由于被拍摄目标和相机之间的距离变化情况可以更加真实和精准的反应相机取景范围内的场景是否发生变化,因而,在检测到相机进入对焦锁定状态和/或曝光锁定状态后,可以确定用于表征被拍摄目标和相机之间的距离变化情况的距离变化参数,然后根据距离变化参数确定是否解除锁定状态。通过被拍摄目标和相机之间的距离变化情况判定拍摄场景的变化,可以更加准确地判定解除锁定状态的时机,保证相机对变化后的场景的拍摄效果。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例的一种相机控制方法的流程图。
图2是本申请一个实施例的一种应用场景示意图。
图3是本申请一个实施例的一种确定是否解除相机锁定状态的示意图。
图4是本申请一个实施例的一种相机的控制装置的逻辑结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例, 而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在相机处于自动曝光状态以及自动对焦状态时,相机会根据实时采集的预览图像确定当前环境的亮度,并且根据当前环境的亮度确定曝光参数,同时相机也会根据当前采集的预览图像中图像区域的对比度的变化情况自动确定焦点的位置。当接收到用户输入的拍照指令后,则根据最新一次确定的曝光参数和焦点位置采集图像。
在一些场景中,用户确定需要的曝光参数和焦点位置后,想保持当前的曝光参数和焦点位置不变,并重新调整构图,为了实现调整构图后,曝光参数和焦点位置不变,很多相机都具备曝光锁定和对焦锁定的功能。当相机进入曝光锁定状态后,曝光参数会保持当前一次确定的曝光参数不变,当相机进入对焦锁定状态后,焦点的位置会保持当前一次确定的焦点位置不变。当然,当用户采集完图像后,则可以自动解除曝光锁定状态和对焦锁定状态,以便用户进行下一次拍摄。自动解除曝光锁定状态和对焦锁定状态的时机非常关键,如果太早解除,可能相机还没完成当前一次的拍摄,如果太晚解除,即便相机取景范围的场景发生了变化,也不能及时有效的进行对焦、测光等动作,影响用户后续的拍摄。
通常相机的取景范围内场景发生变化后,用户希望及时解除锁定状态,以便对变化的场景进行对焦和测光。目前的自动解除曝光锁定状态和/或对焦锁定状态的技术中,有的在锁定时长达到一定值后,则解除锁定;有的在预览画面的亮度变化程度达到一定阈值则解除锁定;也有的在检测相机运动状态符合一定条件后则解除锁定。但是上述判定方式比较粗略和片面,不能覆盖不同场景下拍摄场景的变化的检测,以及时地解锁锁定状态。举个例子,以相机固定在某个位置拍摄朝相机方向运动的物体为例,可能相机没有运动,预览画面的亮度变化程度也较小,但是构图画面一直在变化,此时,由于相机处于锁定状态,而无法及时根据当前变化的拍摄场景去进 行对焦和测光,以确定焦点位置和曝光参数。
基于此,本申请实施例提供了一种相机控制方法,在相机进入对焦锁定状态和/或曝光锁定状态后,确定用于表征被拍摄目标和相机距离变化情况的距离变化参数,然后根据距离变化参数决定是否解除对焦锁定状态和/或曝光锁定状态。相比于锁定时长、亮度等参数,被拍摄目标与相机的距离变化情况可以更加真实和全面地反应相机取景范围内场景的变化情况,并且相比于亮度等参数,距离的检测也更加精准和精细化,从而可以更加准确地确定对曝光锁定状态和对焦锁定状态进行解锁的时机,及时拍摄变化的场景,以提升用户的体验。
本申请实施例提供的相机控制方法可以由相机执行,也可以由搭载相机的云台、无人机、智能机器人等其他设备执行。以相机搭载在无人机上的场景为例,可以通过无人机上的测距装置确定被拍摄目标与相机的距离的变化情况,并根据该距离变化情况确定是否可以解除当前的对焦锁定状态和/或曝光锁定状态,然后再向相机发送相应的控制指令。
具体的,如图1所示,本申请实施例提供的相机控制方法包括以下步骤:
S102、当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数;
S104、根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
在一些场景,相机上会设置用于触发进入曝光锁定状态和/或对焦锁定状态的按钮或者控件,用户可以通过触发相应的按钮和控件控制相机进入曝光锁定状态。在一些场景,相机也可以自动进入曝光锁定和对焦锁定状态,比如,当检测到用户点击屏幕上的某个图像区域时,则自动进入曝光锁定和对焦锁定状态。
在检测到相机进入曝光锁定状态或对焦锁定状态后,可以实时地确定被拍摄目标与相机的距离,然后根据不同时间对应的距离确定表征被拍摄 目标与相机距离变化情况的距离变化参数。其中,被拍摄目标可以是图像中的任一目标,也可以是用户通过交互界面点击的目标,具体可以根据实际需求设置。距离变化参数可以是任一表征被拍摄目标与相机距离变化情况的参数,比如,可以是当前时刻下的距离和刚进入锁定状态时刻下的距离的差值,或者也可以是每隔一段时间检测一次被拍摄目标与相机的距离,比如,每秒检测一次,然后统计各次检测的距离的平均值,计算当前一次统计的平均值与上一次统计的平均值的差值作为所述距离变化参数,当然,距离变化参数也可以采用其他的方式确定,具体可以根据实际需求设置,本申请实施例不做限制。
在确定距离变化参数后,即可以根据距离变化参数确定是否解除相机的对焦锁定状态和/或曝光锁定状态。比如,当距离变化参数大于预设的阈值后,则解锁相机的对焦锁定状态和/或曝光锁定状态,否则,则继续保持曝光锁定状状态和/或对焦锁定状态。
由于被拍摄目标与相机的距离变化情况可以更加准确地反映相机取景范围内场景的变化情况,并且相比于锁定时长、画面亮度等参数,距离的确定也更加精细,因而通过被拍摄目标与相机的距离变化情况可以更加准确地确定解除曝光锁定状态和/或对焦锁定状态的时机,以便给用户带来更好的体验。
相关的技术中,在确定解除曝光锁定状态和/或对焦锁定状态的时机时,大都仅根据一种参数进行判定,比如,通过计时器统计锁定时长,时长大于预设时长,则解除锁定状态。很明显,如果在超过预设时长之前,相机取景范围内的场景发生变化,则无法及时地对焦和测光,以对变化的场景进行拍摄。也有的通过相机的运动状态去判定是否解除锁定,这种方式明显不适用于相机不动,场景变化的情况。还有的技术通过画面亮度去判定是否解除锁定状态,但是,对于背景较大且颜色一致的场景,即便拍摄目标运动,亮度变化也很小(比如,拍摄草原中运动的羊群的场景),因而,很难准确地判定出取景范围内的场景变化。因此,为了覆盖各种拍摄场景, 更加准确地判定相机取景范围内场景是否发生变化,可以结合多种参数共同确定解锁时机。
所以,在一些实施例中,除了确定距离变化参数,还可以确定至少一种用于表征相机拍摄场景变化情况的其他参数,然后结合距离变化参数和其他参数共同确定是否解除所述曝光锁定状态和/或对焦锁定状态。通过结合多种参数共同确定解锁时机,可以弥补使用单独一种参数确定解锁时机时无法覆盖各种拍摄场景,导致确定的时机不准确的问题。
在一些实施例中,其他参数可以包括以下一种或多种:对焦锁定状态和/或曝光锁定状态的锁定时长、表征相机的运动状态变化情况的运动状态变化参数、表征相机采集的多帧预览图像的亮度变化情况的亮度变化参数、表征相机采集的多帧预览图像的清晰度变化情况的清晰度变化参数。
比如,其他参数可以是对焦锁定状态和/或曝光锁定状态的锁定时长,在进入对焦锁定状态和/或曝光锁定状态时,则开启计时器计时,统计锁定时长,通常锁定时长达到一定值后,可以认为完成当前一次拍摄,即可以解除锁定。其他参数也可以是表征相机的运动状态变化情况的运动状态变化参数,比如,可以检测相机的位置、姿态、运动速度的变化,通常相机的运动状态发生一定的变化,即可以认为相机的拍摄场景也发生了变化。其他参数也可以是表征相机采集的多帧预览图像的亮度变化情况的亮度变化参数,通常相机采集的预览图像亮度发生一定的变化,说明当前环境亮度也发生了变化,那么相机拍摄场景很大可能也发生了变化。其他参数还可以是表征相机采集的多帧预览图像的清晰度变化情况的清晰度变化参数,通常,如果相机采集的预览图像的清晰度发生变化,说明拍摄目标发生了移动,从而导致无法对焦。
在一些实施例中,距离变化参数可以通过深度传感器采集的数据确定。其中,深度传感器可以是双目视觉传感器、激光雷达、红外测距装置等。比如,在一些场景,相机搭载于无人机,无人机通常会设有双目视觉传感器、激光雷达等深度传感器,因而,可以通过无人机上的深度传感器采集 的数据确定距离变化参数。在一些场景,相机本身也可以配备红外测距装置或者深度相机,因而,也可以通过相机本身配备的红外测距装置和深度相机确定距离变化参数。
在一些实施例中,相机的运动状态变化参数可以根据姿态测量单元采集的数据确定。其中,姿态测量单元可以是加速度传感器、陀螺仪、惯性测量单元(IMU)等。在一些场景,相机搭载于无人机或者手持云台,无人机或者手持云台通常会设有惯性测量单元,因而,可以通过惯性测量单元检测无人机的运动状态从而确定相机的运动状态。
在一些实施例中,姿态测量单元采集的数据包括相机在三个轴向上的加速度,该运动状态变化参数基于相机在三个轴向上的加速度的变化量确定。举个例子,可以通过加速度传感器检测相机在x、y、z三个轴向上的加速度。假设t0时刻三个轴向上的加速度分别为x0、y0、z0,t1时刻三个轴向上的加速度分别为x1、y1、z1。因而,相机的运动变化参数S可以基于以下公式(1)确定:
S=|x1–x0|+|y1–y0|+|z1–z0| 公式(1)
在一些实施例中,相机可以搭载于无人机上,深度传感器或姿态测量单元可以是设置在无人机上的传感器。比如,深度传感器为无人机上的双目视觉传感器或激光雷达,姿态测量单元为无人机上的惯性测量单元。通过复用无人机上的传感器采集的数据来判定是否解除锁定状态,可以得到更加准确的判定结果。
在一些实施例中,相机的亮度变化参数可以是当前时刻相机采集的预览图像的亮度与相机进入对焦锁定状态和/或曝光锁定状态时所采集的预览图像亮度的差值。在一些实施例中,为了更准确的体现相机在一段时间内采集的预览图像的亮度的整体变化情况,亮度变化参数也可基于当前时刻相机采集的所有预览图像的亮度的平均值和过去某个时刻相机采集的所有预览图像的亮度的平均值的差值确定。比如,当获取到相机采集的最新的一帧预览图像后,可以确定当前相机采集的所有预览图像的亮度的平均 值,得到第一亮度值,然后确定除最新的一帧预览图像之外的其他所有预览图像的亮度的平均值,得到第二亮度值,然后根据第一亮度值和第二亮度值的差异确定亮度变化参数。
举个例子,相机每采集一帧预览图像,可以统计每一帧预览图像的亮度,记作:Luma。假设当前时刻采集了N帧预览图像,N帧预览图像的亮度分别为:Luma(N),Luma(N-1),Luma(N-2),Luma(N-3)…,Luma(1);
可以确定相机采集的前N帧预览图像的平均亮度,记作:AvgL(N)
可以确定相机采集的前N-1帧预览图像的平均亮度,记作AvgL(N-1)
然后可以计算相机的亮度变化参数DetlaL(N),具体如公式(2):
DetlaL(N)=ABS(AvgL(N)–AvgL(N-1)) 公式(2)
通过确定相机在一段时间采集的多帧预览图像的平均亮度的变化情况作为表征拍摄场景变化情况的亮度变化参数,可以更加准确地判定拍摄场景的变化情况。
在一些场景中,预览图像的亮度可以是全局亮度,即预览图像的亮度为整张图像中所有像素点的亮度值的平均值,全局亮度可以很好的体现相机取景范围内的场景的整体亮度变化情况。在一些场景中,预览图像的亮度可以是局部亮度,即预览图像的亮度可以只是图像中局部图像区域的平均亮度,局部区域可以是用户感兴趣区域。举个例子,用户通常指关注感兴趣区域的对焦位置、测光是否发生变化,因而,可以仅计算感兴趣区域的各像素点的亮度值的平均值,作为所述预览图像的亮度。局部亮度具有更高的灵敏度,可以更好地体现相机取景范围内用户感兴趣的对象的亮度变化情况,以便确定出更加准确的解除锁定状态的时机。
在一些实施例中,每一帧预览图像的亮度也可以是预览图像中各像素点的亮度值的加权平均值。比如,可以对预览图像进行语义分割处理,针对分割得到的不同的图像区域,可以设定不同的权重。
在一些实施例中,预览图像中各像素点对应的权重可以根据各像素点对应的场景的类型以及相机的类型中的一种或多种确定。举个例子,针对 无人机上的相机,其采集的图像可以用于避障,因而,图像中运动的物体比较受关注,因此,运动的物体所占的权重往往最大。针对用户的手机、手持云台等相机,通常用户比较关注的是人物拍摄,因而,人物对应的像素点的权重可以设置得大一些。
此外,被拍摄物体往往是用户最感兴趣的区域,为了保证被拍摄物体变动后,依然可以采集到清晰的图像,所以,在确定预览图像的亮度时,被拍摄物体对应的像素点所占的权重通常大于其他像素点的权重。
相机在进行自动对焦时,可以采用反差对焦的方式进行对焦,反差对焦的原理是图像最清晰的时候,其反差值(即对比度)也最大。因此,相机在驱动镜头移动调整焦点位置的过程中,可以统计采集的整张图像的反差值,通常其反差值会先增大后减小,然后取反差值最大时镜头的位置作为合焦位置。所以,在一些实施例中,可以统计相机通过自动对焦的方式采集预览图像时预览图像对应的反差值,然后根据反差值确定用于表征预览图像清晰度的变化情况的清晰度变化参数。
在一些实施例中,清晰度变化参数可以是当前时刻相机采集的预览图像对应的反差值与相机进入对焦锁定状态和/或曝光锁定状态所采集的预览图像对应的反差值的差值。在一些实施例中,为了更准确的体现相机在一段时间内的采集的预览图像的清晰度的整体变化情况,清晰度变化参数也可基于当前时刻相机采集的所有预览图像的反差值的平均值和过去某个时刻相机采集的所有预览图像的反差值的平均值的差值确定。比如,当获取到相机采集的最新的一帧预览图像后,可以确定当前相机采集的所有预览图像的反差值的平均值,得到第一反差值,然后确定除最新的一帧预览图像之外的其他所有预览图像的反差值的平均值,得到第二反差值,然后根据第一反差值和第二反差值的差异确定清晰度变化参数。
举个例子,相机通过自动对焦的方式每采集一帧预览图像后,可以统计预览图像的反差值,记作:FV。其中,采集的N帧预览图像的反差值分别记作:FV(N)、FV(N-1)、FV(N-2)、FV(N-3)….
当采集到第N帧预览图像后,可以确定前N帧预览图像的反差值的平均值,记作:AvgFv(N)
同时可以确定前N-1帧预览图像的反差值的平均值,记作AvgFv(N-1)。
清晰度变化参数为可以通过公式(3)确定:
DetlaFv(N)=ABS(AvgFv(N)–AvgFv(N-1)) 公式(3)
在确定距离变化参数以其他参数后,可以结合距离变化参数和其他参数确定是否要解除对焦锁定状态和/或曝光锁定状态。在一些实施例中,可以为每一种参数设定一个变化阈值,比如,距离变化参数对应一个距离变化阈值、亮度变化参数对应一个亮度变化阈值,如果距离变化参数的参数值或其他参数中的任一参数的参数值大于其对应的变化阈值,则解除对焦锁定状态和/或曝光锁定状态。
在一些实施例中,也可以结合距离变化参数的灵敏度以及其他参数的灵敏度从距离变化参数和其他参数中选出一个目标参数,如果目标参数的参数值超出其对应的变化阈值,则解除对焦锁定状态和/或曝光锁定状态。其中,灵敏度可以是表征各参数当前的参数值与变化阈值的大小关系的各种参数,比如,灵敏度可以是各参数的参数值与其对应的变化阈值的比值。举个例子,假设距离变化参数的参数值为0.2m,其对应的变化阈值为0.1m,则其灵敏度为2。其中,目标参数可以是灵敏度最大的参数,即以变化程度最大的参数作为判别条件,可以准确地识别出拍摄场景的变化。
为了进一步解释本申请实施例的相机控制方法,以下结合一个具体的实施例加以解释。
如图2,为本实施例的一种应用场景的示意图,通常会在无人机21上搭载相机211,以进行图像采集,无人机上还设有IMU(图中未示出),可以检测无人机21的运动状态,同时无人机21上还设有双目视觉传感器212,可以检测外界物体与无人机21的距离。在相机211进入对焦锁定状态和/或曝光锁定状态后,何时解除锁定状态非常关键。相关技术中解除锁定状态时机的判定往往无法覆盖各种场景,不能及时地解除锁定状态,影响后 续图像的拍摄。
本实施例提供了一种解除相机211对焦锁定状态和/或曝光锁定状态的方法,具体如下:
在相机211进入对焦锁定状态和/或曝光锁定状态后,如图3所示,分别判定是否满足以下条件:
条件1:锁定时长大于预设时长。
在相机进入对焦锁定状态和/或曝光锁定状态后,则开启计时器计时,记录锁定时长。
条件2:运动状态变化参数大于预设阈值。
可以通过IMU检测相机在x、y、z三个轴向上的加速度。假设t0时刻三个轴向上的加速度分别为x0、y0、z0,t1时刻三个轴向上的加速度分别为x1、y1、z1。因而,相机的运动变化参数S可以基于以下公式(1)确定:
S=|x1–x0|+|y1–y0|+|z1–z0| 公式(1)
条件3:预览图像的亮度变化参数大于预设阈值。
相机每采集一帧预览图像,可以统计每一帧预览图像的亮度,记作:Luma。假设当前时刻采集了N帧预览图像,N帧预览图像的亮度分别为:Luma(N),Luma(N-1),Luma(N-2),Luma(N-3)…,Luma(1);
可以确定相机采集的前N帧预览图像的平均亮度,记作:AvgL(N)
可以确定相机采集的前N-1帧预览图像的平均亮度,记作AvgL(N-1)
然后可以计算相机的亮度变化参数DetlaL(N),具体如公式(2):
DetlaL(N)=ABS(AvgL(N)–AvgL(N-1)) 公式(2)
条件4:预览图像的清晰度变化参数大于预设阈值。
相机通过自动对焦的方式每采集一帧预览图像后,可以统计预览图像的反差值,记作:FV。其中,采集的N帧预览图像的反差值分别记作:FV(N),FV(N-1),FV(N-2),FV(N-3)…。
当采集到第N帧预览图像后,可以确定历史的N帧预览图像的反差值 的平均值,记作:AvgFv(N)
同时可以确定前N-1帧预览图像的反差值的平均值,记作AvgFv(N-1)。
则清晰度变化参数为可以通过公式(3)确定:
DetlaFv(N)=ABS(AvgFv(N)–AvgFv(N-1)) 公式(3)
条件5:被拍摄物体与相机的距离变化参数大于预设阈值。
相机每采集一帧预览图像,可以统计采集每一帧预览图像时被拍摄物体与相机的距离,记作:d。假设当前时刻采集了N帧预览图像,N帧预览图像的亮度分别为:d(N),d(N-1),d(N-2),d(N-3)…,d(1);
可以确定相机采集的前N帧预览图像的平均亮度,记作:Avgd(N)
可以确定相机采集的前N-1帧预览图像的平均亮度,记作Avgd(N-1)
然后可以计算相机的亮度变化参数DetlaL(N),具体如公式(4):
Detlad(N)=ABS(Avgd(N)–Avgd(N-1)) 公式(4)
若条件1、条件2、条件3、条件4、条件5中任一项符合要求,则解除对焦锁定状态和/或曝光锁定状态。
通过多个参数确定当前相机的拍摄场景是否变化,从而可以覆盖各种场景,可以更加准确地判定出拍摄场景的变化情况,并及时解除锁定状态,可以保证对在场景变化后及时采集到高质量的图像,提升用户体验。
相应地,本申请实施例还提供一种相机的控制装置,如图4所示,所述装置40包括处理器41、存储器42、存储于所述存储器42可供所述处理器41执行的计算机程序,所述处理器41执行所述计算机程序时,实现以下步骤:
当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数;
根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
在一些实施例中,所述处理器还用于:
确定用于表征所述相机拍摄场景变化情况的除所述距离变化参数以外 的至少一种其他参数;
根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态,包括:
根据所述距离变化参数和所述其他参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
在一些实施例中,所述距离变化参数和所述其他参数各对应一个变化阈值,所述处理器用于根据所述距离变化参数和所述其他参数确定是否解除所述曝光锁定状态和/或对焦锁定状态时,具体用于:
若所述距离变化参数的参数值大于所述距离变化参数对应的所述变化阈值,或所述其他参数中的任一项参数的参数值大于所述其他参数对应的所述变化阈值,则解除所述曝光锁定状态和/或所述对焦锁定状态;或
根据所述距离变化参数的参数值与所述距离变化参数对应的所述变化阈值的比值,以及所述其他参数的参数值与所述其他参数对应的所述变化阈值的比值从所述距离变化参数和所述其他参数中确定目标参数,所述目标参数为所述比值最大的参数;
若所述目标参数的参数值大于所述目标参数对应的所述变化阈值,则解除所述曝光锁定状态和/或所述对焦锁定状态。
在一些实施例中,所述其他参数包括以下一种或多种:所述对焦锁定状态和/或曝光锁定状态的锁定时长、表征所述相机的运动状态变化情况的运动状态变化参数、表征所述相机采集的多帧预览图像的亮度变化情况的亮度变化参数、表征所述相机采集的多帧预览图像的清晰度变化情况的清晰度变化参数。
在一些实施例中,所述距离变化参数基于深度传感器采集的数据确定。
在一些实施例中,所述运动状态变化参数基于姿态测量单元采集的数据确定。
在一些实施例中,所述姿态测量单元采集的数据包括所述相机在三个轴向上的加速度,所述运动状态变化参数基于所述加速度的变化量确定。
在一些实施例中,所述相机设于无人机上,所述深度传感器或所述姿态测量单元设于所述无人机上。
在一些实施例中,所述亮度变化参数基于以下方式确定:
当获取到所述相机采集的最新的一帧预览图像后,确定当前所述相机采集的所有预览图像的亮度的平均值,得到第一亮度值;
确定除所述最新的一帧预览图像之外的其他所有预览图像的亮度的平均值,得到第二亮度值;
根据所述第一亮度值和所述第二亮度值的差异确定所述亮度变化参数。
在一些实施例中,所述预览图像的亮度为所述预览图像中各像素点的亮度的加权平均值。
在一些实施例中,所述预览图像中各像素点对应的权重基于所述各像素点对应的场景的类型和/或所述相机的类型确定。
在一些实施例中,所述被拍摄目标对应的像素点的权重大于其他像素点的权重。
在一些实施例中,所述清晰度变化参数基于以下方式确定:
当获取到所述相机采集的最新的一帧预览图像后,确定当前所述相机采集的所有预览图像对应的反差值的平均值,得到第一反差值,其中,所述反差值为所述相机采用自动对焦方式采集所述预览图像时所述预览图像对应的反差值;
确定除所述最新的一帧预览图像之外的其他所有预览图像的所述反差值的平均值,得到第二反差值;
根据所述第一反差值和所述第二反差值的差异确定所述清晰度变化参数。
相应地,本说明书实施例还提供一种计算机存储介质,所述存储介质中存储有程序,所述程序被处理器执行时实现上述任一实施例中相机的控制方法。
本说明书实施例可采用在一个或多个其中包含有程序代码的存储介质 (包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机可用存储介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括但不限于:相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本发明实施例所提供的方法和装置进行了详细介绍,本文中应 用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。
Claims (26)
- 一种相机的控制方法,其特征在于,所述方法包括:当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数;根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:确定用于表征所述相机拍摄场景变化情况的除所述距离变化参数以外的至少一种其他参数;根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态,包括:根据所述距离变化参数和所述其他参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
- 根据权利要求2所述的方法,其特征在于,所述距离变化参数和所述其他参数各对应一个变化阈值,根据所述距离变化参数和所述其他参数确定是否解除所述曝光锁定状态和/或对焦锁定状态,包括:若所述距离变化参数的参数值大于所述距离变化参数对应的所述变化阈值,或所述其他参数中的任一项参数的参数值大于所述其他参数对应的所述变化阈值,则解除所述曝光锁定状态和/或所述对焦锁定状态;或根据所述距离变化参数的参数值与所述距离变化参数对应的所述变化阈值的比值,以及所述其他参数的参数值与所述其他参数对应的所述变化阈值的比值从所述距离变化参数和所述其他参数中确定目标参数,所述目标参数为所述比值最大的参数;若所述目标参数的参数值大于所述目标参数对应的所述变化阈值,则解除所述曝光锁定状态和/或所述对焦锁定状态。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述其他参数包 括以下一种或多种:所述对焦锁定状态和/或曝光锁定状态的锁定时长、表征所述相机的运动状态变化情况的运动状态变化参数、表征所述相机采集的多帧预览图像的亮度变化情况的亮度变化参数、表征所述相机采集的多帧预览图像的清晰度变化情况的清晰度变化参数。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述距离变化参数基于深度传感器采集的数据确定。
- 根据权利要求4所述的方法,其特征在于,所述运动状态变化参数基于姿态测量单元采集的数据确定。
- 根据权利要求6所述的方法,其特征在于,所述姿态测量单元采集的数据包括所述相机在三个轴向上的加速度,所述运动状态变化参数基于所述加速度的变化量确定。
- 根据权利要求5-7任一项所述的方法,其特征在于,所述相机设于无人机上,所述深度传感器或所述姿态测量单元设于所述无人机上。
- 根据权利要求4所述的方法,其特征在于,所述亮度变化参数基于以下方式确定:当获取到所述相机采集的最新的一帧预览图像后,确定当前所述相机采集的所有预览图像的亮度的平均值,得到第一亮度值;确定除所述最新的一帧预览图像之外的其他所有预览图像的亮度的平均值,得到第二亮度值;根据所述第一亮度值和所述第二亮度值的差异确定所述亮度变化参数。
- 根据权利要求9所述的方法,其特征在于,所述预览图像的亮度为所述预览图像中各像素点的亮度的加权平均值。
- 根据权利要求10所述的方法,其特征在于,所述预览图像中各像素点对应的权重基于所述各像素点对应的场景的类型和/或所述相机的类型确定。
- 根据权利要求10所述的方法,其特征在于,所述被拍摄目标对应的像素点的权重大于其他像素点的权重。
- 根据权利要求4所述的方法,其特征在于,所述清晰度变化参数基 于以下方式确定:当获取到所述相机采集的最新的一帧预览图像后,确定当前所述相机采集的所有预览图像对应的反差值的平均值,得到第一反差值,其中,所述反差值为所述相机采用自动对焦方式采集所述预览图像时所述预览图像对应的反差值;确定除所述最新的一帧预览图像之外的其他所有预览图像的所述反差值的平均值,得到第二反差值;根据所述第一反差值和所述第二反差值的差异确定所述清晰度变化参数。
- 一种相机的控制装置,其特征在于,所述装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:当检测到相机处于曝光锁定状态和/或对焦锁定状态时,确定用于表征被拍摄目标与所述相机的距离变化情况的距离变化参数;根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
- 根据权利要求14所述的装置,其特征在于,所述处理器还用于:确定用于表征所述相机拍摄场景变化情况的除所述距离变化参数以外的至少一种其他参数;根据所述距离变化参数确定是否解除所述曝光锁定状态和/或对焦锁定状态,包括:根据所述距离变化参数和所述其他参数确定是否解除所述曝光锁定状态和/或对焦锁定状态。
- 根据权利要求15所述的装置,其特征在于,所述距离变化参数和所述其他参数各对应一个变化阈值,所述处理器用于根据所述距离变化参数和所述其他参数确定是否解除所述曝光锁定状态和/或对焦锁定状态时,具体用于:若所述距离变化参数的参数值大于所述距离变化参数对应的所述变化阈 值,或所述其他参数中的任一项参数的参数值大于所述其他参数对应的所述变化阈值,则解除所述曝光锁定状态和/或所述对焦锁定状态;或根据所述距离变化参数的参数值与所述距离变化参数对应的所述变化阈值的比值,以及所述其他参数的参数值与所述其他参数对应的所述变化阈值的比值从所述距离变化参数和所述其他参数中确定目标参数,所述目标参数为所述比值最大的参数;若所述目标参数的参数值大于所述目标参数对应的所述变化阈值,则解除所述曝光锁定状态和/或所述对焦锁定状态。
- 根据权利要求14-16任一项所述的装置,其特征在于,所述其他参数包括以下一种或多种:所述对焦锁定状态和/或曝光锁定状态的锁定时长、表征所述相机的运动状态变化情况的运动状态变化参数、表征所述相机采集的多帧预览图像的亮度变化情况的亮度变化参数、表征所述相机采集的多帧预览图像的清晰度变化情况的清晰度变化参数。
- 根据权利要求14-17任一项所述的装置,其特征在于,所述距离变化参数基于深度传感器采集的数据确定。
- 根据权利要求17所述的装置,其特征在于,所述运动状态变化参数基于姿态测量单元采集的数据确定。
- 根据权利要求19所述的装置,其特征在于,所述姿态测量单元采集的数据包括所述相机在三个轴向上的加速度,所述运动状态变化参数基于所述加速度的变化量确定。
- 根据权利要求18-20任一项所述的装置,其特征在于,所述相机设于无人机上,所述深度传感器或所述姿态测量单元设于所述无人机上。
- 根据权利要求17所述的装置,其特征在于,所述亮度变化参数基于以下方式确定:当获取到所述相机采集的最新的一帧预览图像后,确定当前所述相机采集的所有预览图像的亮度的平均值,得到第一亮度值;确定除所述最新的一帧预览图像之外的其他所有预览图像的亮度的平均 值,得到第二亮度值;根据所述第一亮度值和所述第二亮度值的差异确定所述亮度变化参数。
- 根据权利要求22所述的装置,其特征在于,所述预览图像的亮度为所述预览图像中各像素点的亮度的加权平均值。
- 根据权利要求23所述的装置,其特征在于,所述预览图像中各像素点对应的权重基于所述各像素点对应的场景的类型和/或所述相机的类型确定。
- 根据权利要求23所述的装置,其特征在于,所述被拍摄目标对应的像素点的权重大于其他像素点的权重。
- 根据权利要求17所述的装置,其特征在于,所述清晰度变化参数基于以下方式确定:当获取到所述相机采集的最新的一帧预览图像后,确定当前所述相机采集的所有预览图像对应的反差值的平均值,得到第一反差值,其中,所述反差值为所述相机采用自动对焦方式采集所述预览图像时所述预览图像对应的反差值;确定除所述最新的一帧预览图像之外的其他所有预览图像的所述反差值的平均值,得到第二反差值;根据所述第一反差值和所述第二反差值的差异确定所述清晰度变化参数。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/136544 WO2022126378A1 (zh) | 2020-12-15 | 2020-12-15 | 相机的控制方法及装置 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/136544 WO2022126378A1 (zh) | 2020-12-15 | 2020-12-15 | 相机的控制方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022126378A1 true WO2022126378A1 (zh) | 2022-06-23 |
Family
ID=82059841
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/136544 WO2022126378A1 (zh) | 2020-12-15 | 2020-12-15 | 相机的控制方法及装置 |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2022126378A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117528246A (zh) * | 2024-01-04 | 2024-02-06 | 杭州星犀科技有限公司 | 自动对焦触发方法、系统、终端及介质 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4908651A (en) * | 1985-08-09 | 1990-03-13 | Minolta Camera Kabushiki Kaisha | Exposure control device for a camera |
CN102186018A (zh) * | 2011-04-29 | 2011-09-14 | 信源通科技(深圳)有限公司 | 摄像头对焦方法及装置 |
CN104917976A (zh) * | 2015-06-05 | 2015-09-16 | 北京大恒图像视觉有限公司 | 一种相机自动曝光和自动增益调节方法 |
US20180059509A1 (en) * | 2016-08-26 | 2018-03-01 | Canon Kabushiki Kaisha | Image capturing apparatus and method of controlling the same |
CN108521860A (zh) * | 2017-06-22 | 2018-09-11 | 深圳市大疆创新科技有限公司 | 拍摄设备的控制方法、拍摄设备及系统 |
CN110493524A (zh) * | 2019-08-28 | 2019-11-22 | 深圳市道通智能航空技术有限公司 | 一种测光调整方法、装置、设备和存储介质 |
CN111434108A (zh) * | 2017-12-20 | 2020-07-17 | 德州仪器公司 | 多相机图像处理 |
-
2020
- 2020-12-15 WO PCT/CN2020/136544 patent/WO2022126378A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4908651A (en) * | 1985-08-09 | 1990-03-13 | Minolta Camera Kabushiki Kaisha | Exposure control device for a camera |
CN102186018A (zh) * | 2011-04-29 | 2011-09-14 | 信源通科技(深圳)有限公司 | 摄像头对焦方法及装置 |
CN104917976A (zh) * | 2015-06-05 | 2015-09-16 | 北京大恒图像视觉有限公司 | 一种相机自动曝光和自动增益调节方法 |
US20180059509A1 (en) * | 2016-08-26 | 2018-03-01 | Canon Kabushiki Kaisha | Image capturing apparatus and method of controlling the same |
CN108521860A (zh) * | 2017-06-22 | 2018-09-11 | 深圳市大疆创新科技有限公司 | 拍摄设备的控制方法、拍摄设备及系统 |
CN111434108A (zh) * | 2017-12-20 | 2020-07-17 | 德州仪器公司 | 多相机图像处理 |
CN110493524A (zh) * | 2019-08-28 | 2019-11-22 | 深圳市道通智能航空技术有限公司 | 一种测光调整方法、装置、设备和存储介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117528246A (zh) * | 2024-01-04 | 2024-02-06 | 杭州星犀科技有限公司 | 自动对焦触发方法、系统、终端及介质 |
CN117528246B (zh) * | 2024-01-04 | 2024-04-16 | 杭州星犀科技有限公司 | 自动对焦触发方法、系统、终端及介质 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109922251B (zh) | 快速抓拍的方法、装置及系统 | |
KR100215586B1 (ko) | 다이제스트 화상 자동생성 장치 및 다이제스트 화상 자동생성 방법 | |
EP2622840B1 (en) | Continuous autofocus based on face detection and tracking | |
EP2037320B1 (en) | Imaging apparatus, imaging apparatus control method, and computer program | |
CN101854484B (zh) | 图像选择装置、图像选择方法 | |
CN112514368B (zh) | 图像采集方法、控制装置及可移动平台 | |
US9025859B2 (en) | Inertial sensor aided instant autofocus | |
CN101221341A (zh) | 景深构图设定方法 | |
US10516823B2 (en) | Camera with movement detection | |
US8913150B2 (en) | Dynamic image capture utilizing prior capture settings and user behaviors | |
US10277888B2 (en) | Depth triggered event feature | |
WO2022160294A1 (zh) | 曝光控制方法、装置及计算机可读存储介质 | |
CN107615744B (zh) | 一种图像拍摄参数的确定方法及摄像装置 | |
CN107135349A (zh) | 摄像设备、镜头单元、摄像系统及其控制方法 | |
DE102014207703A1 (de) | Bildaufnahmevorrichtung, verfahren zu deren steuerung, und speichermedium | |
WO2022193288A1 (zh) | 图像处理方法、装置及计算机可读存储介质 | |
WO2023072030A1 (zh) | 镜头自动对焦方法及装置、电子设备和计算机可读存储介质 | |
WO2022126378A1 (zh) | 相机的控制方法及装置 | |
JP2017192114A5 (zh) | ||
WO2022147703A1 (zh) | 跟焦方法、装置、拍摄设备及计算机可读存储介质 | |
KR20150104012A (ko) | 지능형 동적 이미지 캡쳐 시스템 | |
US20190244377A1 (en) | Image processing method, electronic device, and non-transitory computer readable storage medium | |
CN113994657B (zh) | 轨迹延时拍摄方法、装置、云台相机、无人机及手持云台 | |
WO2016009199A2 (en) | Minimisation of blur in still image capture | |
US20090297135A1 (en) | System and method for motion detection assisted photography |
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: 20965396 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20965396 Country of ref document: EP Kind code of ref document: A1 |