CN116017158B - Calibration method and equipment for optical anti-shake - Google Patents
Calibration method and equipment for optical anti-shake Download PDFInfo
- Publication number
- CN116017158B CN116017158B CN202310047676.5A CN202310047676A CN116017158B CN 116017158 B CN116017158 B CN 116017158B CN 202310047676 A CN202310047676 A CN 202310047676A CN 116017158 B CN116017158 B CN 116017158B
- Authority
- CN
- China
- Prior art keywords
- image
- camera module
- jitter
- center
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 113
- 230000003287 optical effect Effects 0.000 title claims abstract description 71
- 230000006870 function Effects 0.000 claims description 58
- 230000006835 compression Effects 0.000 claims description 38
- 238000007906 compression Methods 0.000 claims description 38
- 230000008569 process Effects 0.000 claims description 34
- 238000012545 processing Methods 0.000 claims description 23
- 230000033001 locomotion Effects 0.000 claims description 16
- 238000003860 storage Methods 0.000 claims description 14
- 230000007423 decrease Effects 0.000 claims description 13
- 230000003247 decreasing effect Effects 0.000 claims description 11
- 238000001914 filtration Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 230000006641 stabilisation Effects 0.000 claims description 3
- 238000011105 stabilization Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 description 37
- 230000000694 effects Effects 0.000 description 32
- 238000010586 diagram Methods 0.000 description 17
- 230000004044 response Effects 0.000 description 17
- 230000008859 change Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000011156 evaluation Methods 0.000 description 5
- 238000006073 displacement reaction Methods 0.000 description 4
- 230000002093 peripheral effect Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 230000035939 shock Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 239000003381 stabilizer Substances 0.000 description 2
- 238000010521 absorption reaction Methods 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Studio Devices (AREA)
Abstract
Description
技术领域Technical field
本申请涉及光学电子器件技术领域,尤其涉及一种光学防抖动的标定方法及设备。The present application relates to the technical field of optical electronic devices, and in particular to an optical anti-shake calibration method and equipment.
背景技术Background technique
光学图像稳定器(Optical Image Stabilizer,OIS)是通过移动镜片组或感光芯片的位置来补偿拍摄时相机的晃动造成的成像模糊,从而达到减震防抖动的功能,使拍摄画面清晰、稳定。对于带有OIS防抖动功能的摄像模组而言,为了保证OIS防抖动效果,在投入使用前需对OIS功能进行标定。Optical Image Stabilizer (OIS) moves the position of the lens group or photosensitive chip to compensate for image blur caused by camera shake during shooting, thereby achieving the function of shock reduction and anti-shake, making the shooting image clear and stable. For camera modules with OIS anti-shake function, in order to ensure the OIS anti-shake effect, the OIS function needs to be calibrated before being put into use.
相关技术中常用的一种标定方式是使用单一的特征点的标定板对摄像模组进行OIS标定,将单一特征点设置在标定板中心,使用待标定的摄像模组对标定板拍摄图像之后,基于拍摄的图像中单一特征点的信息对待标定的摄像模组进行OIS标定。A commonly used calibration method in related technologies is to use a calibration plate with a single feature point to perform OIS calibration on a camera module, set a single feature point in the center of the calibration plate, and use the camera module to be calibrated to capture an image of the calibration plate. OIS calibration is performed on the camera module to be calibrated based on the information of a single feature point in the captured image.
潜望式实现模组(Periscope lens),别称“内变焦”镜头,是指光学变焦是在机身内部完成。部分潜望式摄像模组是在棱镜上做防抖动处理,在使用上述方法对这类潜望式摄像模组进行OIS标定时,标定板位置固定之后,不同的潜望式摄像模组对标定板进行拍摄时,单一特征在图像中的位置并不一定是在图像中心。在这种情况下对潜望式摄像模组进行OIS标定,容易出现图像评估的中心离镜头画面中心较远,OIS标定的精确度较低的问题。Periscope lens, also known as "internal zoom" lens, means that optical zoom is completed inside the fuselage. Some periscope camera modules perform anti-shake processing on the prism. When using the above method to perform OIS calibration on this type of periscope camera module, after the calibration plate position is fixed, different periscope camera modules When photographing a calibration plate, the position of a single feature in the image is not necessarily in the center of the image. In this case, when performing OIS calibration on a periscope camera module, it is easy to cause the problem that the center of image evaluation is far from the center of the lens screen, and the accuracy of OIS calibration is low.
发明内容Contents of the invention
本申请实施例提供一种光学防抖动的标定方法及设备,用于解决对潜望式摄像模组进行OIS标定,容易出现图像评估的中心离镜头画面中心较远,OIS标定的精确度较低的问题。为达到上述目的,本申请的实施例采用如下技术方案:Embodiments of the present application provide an optical anti-shake calibration method and equipment, which are used to solve the problem of OIS calibration of periscope camera modules. It is easy for the center of image evaluation to be far away from the center of the lens screen, and the accuracy of OIS calibration is relatively low. low question. In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种光学防抖动的标定方法,该方法包括:In the first aspect, an optical anti-shake calibration method is provided, which method includes:
获取摄像模组在第一拍摄状态下,对第一预设标定板采集的N张图像。其中,第一预设标定板包括至少一个特征点,N为大于2的正整数;N张图像是分别在摄像模组的马达设置为不同的增益时采集的。第一拍摄状态包括:摄像模组振动且摄像模组的光学防抖动功能开启;摄像模组的光学防抖动功能开启的状态下,在摄像模组进行图像采集时,马达驱动摄像模组的镜头移动,以补偿摄像模组的振动造成的模糊。然后,获取N张图像的每张图像中特征点的抖动情况,并根据N张图像的每张图像中特征点的抖动情况,确定每张图像的抖动中心;该抖动中心用于指示图像中抖动最小的位置。再然后,在N张图像中,查找抖动中心与图像中心之间的距离满足预设条件的目标图像;预设条件用于指示图像的抖动中心与图像中心之间的距离最小,且距离小于第一预设阈值。最后,获取采集目标图像时马达对应的目标增益,并将目标增益确定为马达的标定增益值。Obtain N images collected by the camera module on the first preset calibration plate in the first shooting state. The first preset calibration plate includes at least one feature point, and N is a positive integer greater than 2; the N images are collected when the motor of the camera module is set to different gains. The first shooting state includes: the camera module vibrates and the optical anti-shake function of the camera module is turned on; when the optical anti-shake function of the camera module is turned on, when the camera module collects images, the motor drives the camera module The lens moves to compensate for the blur caused by the vibration of the camera module. Then, obtain the jitter of the feature points in each of the N images, and determine the jitter center of each image based on the jitter of the feature points in each of the N images; the jitter center is used to indicate the jitter in the image Minimal location. Then, among the N images, find the target image whose distance between the jitter center and the image center satisfies the preset condition; the preset condition is used to indicate that the distance between the jitter center of the image and the image center is the smallest, and the distance is smaller than the a preset threshold. Finally, the target gain corresponding to the motor when collecting the target image is obtained, and the target gain is determined as the calibrated gain value of the motor.
在该方案中,通过对摄像模组在不同的马达增益时采集的图像进行分析,在每张图像中查找抖动中心所在的位置,并且根据抖动中心与图像中心之间的距离是否小于一定值且距离在N张图像中距离最小,来查找目标图像。然后,将采集目标图像所使用的马达的增益值确定为马达的标定增益值。这样,能够尽可能确保OIS标定针对的位置是图像中心或距离图像中心较近的位置,也就是摄像模组的画面中心所在的位置,以尽可能使OIS标定的位置离图像中心近,从而提高OIS标定精确度。同时,只需要查找不同图像的抖动中心,并在确定抖动中心距离图像中心较近时即可完成OIS标定,可以帮助快速完成OIS标定过程,减少OIS标定所需的时间,提高OIS标定的效率。In this solution, by analyzing the images collected by the camera module at different motor gains, the location of the jitter center is found in each image, and based on whether the distance between the jitter center and the image center is less than a certain value and The distance is the smallest among N images to find the target image. Then, the gain value of the motor used to collect the target image is determined as the calibrated gain value of the motor. In this way, it is possible to ensure that the position targeted by the OIS calibration is the center of the image or a position closer to the center of the image, that is, where the center of the camera module is located, so that the position of the OIS calibration is as close as possible to the center of the image, thereby improving OIS calibration accuracy. At the same time, you only need to find the jitter centers of different images, and complete the OIS calibration when the jitter center is determined to be close to the image center. This can help quickly complete the OIS calibration process, reduce the time required for OIS calibration, and improve the efficiency of OIS calibration.
在一种可能的实施方式中,获取N张图像中各特征点的抖动情况,并根据N张图像中各特征点的抖动情况,确定各图像的抖动中心,具体可以包括:先对N张图像进行滤波处理,得到N张滤波后图像;其中,滤波后图像包括与至少一个特征点对应的至少一个特征对象,每个特征点以及相应特征点对应的模糊部分。由于一个特征对象对应包括了一个特征点及其模糊部分,也就是说该特征对象反映了对应特征点的模糊量的大小。因此可以基于N张滤波后图像的每张滤波后图像中的至少一个特征对象的大小,确定每张滤波后图像对应的图像中抖动中心所在的位置。In a possible implementation, obtaining the jitter of each feature point in the N images, and determining the jitter center of each image based on the jitter of each feature point in the N images, may specifically include: first Filtering is performed to obtain N filtered images; wherein the filtered images include at least one feature object corresponding to at least one feature point, each feature point and a blurred portion corresponding to the corresponding feature point. Since a feature object corresponds to a feature point and its fuzzy part, that is to say, the feature object reflects the fuzzy amount of the corresponding feature point. Therefore, the location of the jitter center in the image corresponding to each filtered image can be determined based on the size of at least one feature object in each filtered image of the N filtered images.
在一种可能的实施方式中,上述基于N张滤波后图像的每张滤波后图像中的至少一个特征对象的大小,确定每张滤波后图像对应的图像中抖动中心所在的位置,具体可以包括:分别在N张滤波后图像的每张滤波后图像中查找最小特征对象。然后,基于每张滤波后图像中的最小特征对象,确定每张滤波后图像对应的图像中抖动中心所在的位置。在该方案中,在滤波处理之后的图像中查找最小特征对象,然后基于最小特征对象确定抖动中心的位置,可以帮助快速有效的查找到抖动中心的位置。In a possible implementation, the above-mentioned method determines the location of the jitter center in the image corresponding to each filtered image based on the size of at least one feature object in each filtered image of the N filtered images, which may specifically include : Find the smallest feature object in each filtered image of N filtered images respectively. Then, based on the smallest feature object in each filtered image, the location of the jitter center in the image corresponding to each filtered image is determined. In this solution, the smallest feature object is found in the filtered image, and then the location of the jitter center is determined based on the minimum feature object, which can help quickly and effectively find the location of the jitter center.
在一种可能的实施方式中,基于每张滤波后图像中的最小特征对象,确定每张滤波后图像对应的图像中抖动中心所在的位置,具体可以包括:若最小特征对象处于滤波后图像的边缘,且最小特征对象的大小超出第二预设阈值,则确定抖动中心在目标滤波后图像对应的图像以外。如果最小特征对象未处于滤波后图像的边缘,或者,最小特征对象的大小未超出第二预设阈值,则基于最小特征对象在目标滤波后图像中的位置确定抖动中心所在的位置。设置第二预设阈值来区分抖动中心是否处于图像以内,当确定抖动中心处于图像以外时,需继续调整马达的增益使抖动中心移动至图像以内。在确定抖动中心处于图像以内之后,再对马达增益进行调整,使图像的抖动中心可以移动到图像中心。这样,可以便于确定马达的最佳增益值。由于对摄像模组采集的原始图像进行了滤波处理,因此可以直接通过比较特征对象的大小来确定抖动中心位置。不需要计算特征点的模糊量,可以减少标定过程中的计算量,提高OIS标定的效率。In a possible implementation, based on the smallest characteristic object in each filtered image, determining the location of the jitter center in the image corresponding to each filtered image may specifically include: if the smallest characteristic object is located at the center of the filtered image edge, and the size of the smallest feature object exceeds the second preset threshold, it is determined that the jitter center is outside the image corresponding to the target filtered image. If the minimum feature object is not at the edge of the filtered image, or the size of the minimum feature object does not exceed the second preset threshold, then the location of the jitter center is determined based on the position of the minimum feature object in the target filtered image. A second preset threshold is set to distinguish whether the jitter center is within the image. When it is determined that the jitter center is outside the image, it is necessary to continue to adjust the gain of the motor to move the jitter center within the image. After confirming that the jitter center is within the image, adjust the motor gain so that the jitter center of the image can move to the center of the image. In this way, the optimal gain value of the motor can be easily determined. Since the original image collected by the camera module is filtered, the shaking center position can be determined directly by comparing the size of the characteristic object. There is no need to calculate the fuzzy amount of feature points, which can reduce the calculation amount during the calibration process and improve the efficiency of OIS calibration.
在一种可能的实施方式中,基于最小特征对象在目标滤波后图像中的位置确定抖动中心所在的位置,具体可以包括:若最小特征对象包括一个特征对象,则将最小特征对象的中心所在位置确定为抖动中心所在位置。若最小特征对象包括两个以上特征对象,则基于最小特征对象所在的位置,拟合抖动中心所在的位置。由于第一预设标定板中包括多个特征点,因此在所采集图像的图像中心可能没有特征点,因此在基于特征对象查找抖动中心时,可以结合最小特征对象来拟合抖动中心的位置,从而获得更准确的抖动中心的位置。In a possible implementation, determining the location of the jitter center based on the position of the minimum feature object in the target filtered image may specifically include: if the minimum feature object includes a feature object, then the location of the center of the minimum feature object is Determine the location of the jitter center. If the minimum feature object includes more than two feature objects, the location of the jitter center is fitted based on the location of the minimum feature object. Since the first preset calibration plate includes multiple feature points, there may be no feature points in the image center of the collected image. Therefore, when finding the jitter center based on the feature object, the minimum feature object can be combined to fit the location of the jitter center. This results in a more accurate location of the jitter center.
在一种可能的实施方式中,获取摄像模组在第一拍摄状态下,对第一预设标定板采集的N张图像,具体可以包括:马达的增益从初始值开始递增或递减,并在马达设置为不同的增益时,对应获取摄像模组在第一拍摄状态下对第一预设标定板采集的图像。在该方案中,在光学防抖动的标定过程中,控制马达的增益依次递增或递减,可以使抖动中心在不同图像中的位置朝一个方向变化,这样便于快速的找到抖动中心与图像中心接近的图像。从而可以提高OIS标定的速度。In a possible implementation, obtaining N images collected by the camera module on the first preset calibration plate in the first shooting state may specifically include: increasing or decreasing the gain of the motor from the initial value, and When the motor is set to different gains, the image captured by the camera module on the first preset calibration plate in the first shooting state is correspondingly obtained. In this solution, during the calibration process of optical anti-shake, the gain of the control motor is increased or decreased in sequence, which can make the position of the jitter center in different images change in one direction, which makes it easy to quickly find the jitter center close to the image center. Image. This can improve the speed of OIS calibration.
在一种可能的实施方式中,获取所述N张图像的每张图像中特征点的抖动情况,并根据所述N张图像的每张图像中特征点的抖动情况,确定所述每张图像的抖动中心,具体可以包括:在获取到摄像模组在马达设置为当前增益时采集的当前图像之后,获取当前图像中特征点的抖动情况,并根据当前图像中特征点的抖动情况,确定当前图像的抖动中心。在该实施方式中,上述方法还包括:在确定当前图像的抖动中心与当前图像的图像中心之间的距离满足预设条件时,停止获取摄像模组在第一拍摄状态下对第一预设标定板采集的图像。In a possible implementation, the jitter of the feature points in each of the N images is obtained, and based on the jitter of the feature points in each of the N images, the jitter of each image is determined. The jitter center may specifically include: after obtaining the current image collected by the camera module when the motor is set to the current gain, obtain the jitter of the feature points in the current image, and determine the current jitter based on the jitter of the feature points in the current image. The jitter center of the image. In this embodiment, the above method further includes: when it is determined that the distance between the jitter center of the current image and the image center of the current image meets the preset condition, stopping the acquisition of the first preset image by the camera module in the first shooting state. Images collected from the calibration plate.
在该方案中,在摄像模组在每次调整为一个马达增益值并采集图像之后,先分析该图像的抖动中心与图像中心是否满足预设条件。如果满足预设条件则摄像模组可以不再调整马达的增益值,也可以不用再采集新的图像。如果不满足预设条件,则表示该图像对应的马达增益值不是马达的最佳增益值。此时摄像模组可以继续调整马达的增益值,并采集新的图像进行分析。这样,可以避免摄像模组采集多余的图像,也不需要对这部分多余的图像进行分析,可以减少标定所需的时间,提高OIS标定的速度。In this solution, after the camera module is adjusted to a motor gain value each time and an image is collected, it is first analyzed whether the jitter center and the image center of the image meet the preset conditions. If the preset conditions are met, the camera module no longer needs to adjust the gain value of the motor or collect new images. If the preset conditions are not met, it means that the motor gain value corresponding to the image is not the optimal gain value of the motor. At this time, the camera module can continue to adjust the gain value of the motor and collect new images for analysis. In this way, the camera module can avoid collecting redundant images, and there is no need to analyze these redundant images, which can reduce the time required for calibration and increase the speed of OIS calibration.
在一种可能的实施方式中,马达的增益从初始值开始递增或递减,具体可以包括:马达的增益从初始值开始递增或递减的过程中,若第一增益对应的第一图像的抖动中心处于第一图像以外,则以第一预设步长在第一增益的基础上进行递增或递减。In a possible implementation, the gain of the motor increases or decreases from the initial value, which may specifically include: during the process of increasing or decreasing the gain of the motor from the initial value, if the first gain corresponds to the jitter center of the first image Outside the first image, the first gain is increased or decreased based on the first preset step size.
在一种可能的实施方式中,马达的增益从初始值开始递增或递减,并在马达设置为不同的增益时,对应获取摄像模组在第一拍摄状态下对第一预设标定板采集的图像,具体可以包括:在马达的增益从初始值开始递增或递减的过程中,获取摄像模组在马达的增益设置为第二增益时采集的第二图像;若第二图像的抖动中心处于第二图像以内,则在第二增益的基础上增加或减少第二预设步长得到第三增益,获取摄像模组采集的第三图像;基于第二图像的抖动中心和第三图像的抖动中心的移动距离,以及第二预设步长,确定目标步长;在第三增益的基础上增加或减少目标步长,获取摄像模组在马达设置为目标步长时采集的第四图像。In a possible implementation, the gain of the motor increases or decreases from the initial value, and when the motor is set to a different gain, the corresponding acquisition data of the first preset calibration plate collected by the camera module in the first shooting state is obtained. The image may specifically include: while the gain of the motor is increasing or decreasing from the initial value, obtaining the second image collected by the camera module when the gain of the motor is set to the second gain; if the jitter center of the second image is at the Within two images, increase or decrease the second preset step size on the basis of the second gain to obtain the third gain, and obtain the third image collected by the camera module; based on the jitter center of the second image and the jitter center of the third image The moving distance and the second preset step size determine the target step size; increase or decrease the target step size based on the third gain to obtain the fourth image collected by the camera module when the motor is set to the target step size.
在该方案中,由于马达的增益是按照大小顺序变化的,因此,在检测到图像的抖动中心移动到图像以内之后,可以通过两张图像的抖动中心的变化,与该两张图像对应的马达增益的变化,确定抖动中心与增益变化的关联关系。然后基于该变化的关联关系,可以确定使图像的抖动中心移动到图像中心所需要调整的马达的增益值,即目标步长。这样,在确定抖动中心进入图像以内之后,可以快速的将抖动中心移动到图像中心,减少采集和分析图像的次数,提高OIS标定的速度。In this solution, since the gain of the motor changes in order of size, after it is detected that the jitter center of the image moves within the image, the changes in the jitter center of the two images can be used to determine the motor corresponding to the two images. Gain changes determine the relationship between the jitter center and gain changes. Then based on the correlation of the changes, the gain value of the motor that needs to be adjusted to move the jitter center of the image to the center of the image, that is, the target step size, can be determined. In this way, after it is determined that the jitter center is within the image, the jitter center can be quickly moved to the image center, reducing the number of image acquisition and analysis times and increasing the speed of OIS calibration.
在一些可能的实施方式中,第一预设标定板包括周期性排列且大小相同的多个圆形特征点。周期性排列的多个大小相同的圆形特征点可以提高OIS标定的精准度。In some possible implementations, the first preset calibration plate includes a plurality of circular feature points that are periodically arranged and have the same size. Periodically arranged multiple circular feature points of the same size can improve the accuracy of OIS calibration.
在一些可能的实施方式中,至少一个特征点包括两个以上特征点。In some possible implementations, at least one feature point includes more than two feature points.
在一些可能的实施方式中,在N张图像中,查找抖动中心与图像中心之间的距离满足预设条件的目标图像之后,上述方法还包括:获取摄像模组在第二拍摄状态下,对第一预设标定板采集的第五图像;第二拍摄状态下,摄像模组振动且摄像模组的光学防抖动功能关闭;获取摄像模组在第三拍摄状态下,对第一预设标定板采集的第六图像;第三拍摄状态下,摄像模组保持稳定;基于目标图像、第五图像以及第六图像中特征点的模糊量,确定压缩比。其中,压缩比用于指示马达的性能。In some possible implementations, after searching for the target image whose distance between the jitter center and the image center satisfies the preset condition among the N images, the above method further includes: obtaining the image of the camera module in the second shooting state. The fifth image collected by the first preset calibration plate; in the second shooting state, the camera module vibrates and the optical anti-shake function of the camera module is turned off; in the third shooting state, the camera module acquires the first preset image The sixth image collected by the calibration board; in the third shooting state, the camera module remains stable; the compression ratio is determined based on the blur amount of the feature points in the target image, the fifth image, and the sixth image. Among them, the compression ratio is used to indicate the performance of the motor.
在该方案中,在找到抖动中心与图像中心之间的距离满足预设条件的目标图像之后,结合该目标图像中抖动最小的特征点的模糊量,以及摄像模组的光学防抖动功能关闭时同一特征点的模糊量,可以计算压缩比。由于目标图像中马达对外界抖动的补偿已经达到较好的水平,使用此时摄像模组采集的图像的模糊量计算压缩比,可以压缩比计算的提高精度。同时,为了避免其他因素的影响,在计算压缩比时,还结合了摄像模组在稳定状态下采集的图像中同一特征点的模糊量。也可以提高压缩比计算的精度。In this solution, after finding the target image whose distance between the jitter center and the image center meets the preset conditions, the blur amount of the feature point with the smallest jitter in the target image is combined with the optical anti-shake function of the camera module being turned off. When the blur amount of the same feature point is calculated, the compression ratio can be calculated. Since the motor's compensation for external jitter in the target image has reached a good level, using the blur amount of the image collected by the camera module at this time to calculate the compression ratio can improve the accuracy of the compression ratio calculation. At the same time, in order to avoid the influence of other factors, when calculating the compression ratio, the blur amount of the same feature point in the image collected by the camera module in a stable state is also combined. It can also improve the accuracy of compression ratio calculation.
在一些可能的实施方式中,基于目标图像、第五图像以及第六图像中特征点的模糊量,确定压缩比,可以包括:获取第一预设标定板中的目标特征点分别在目标图像、第五图像以及第六图像中对应的模糊量;基于目标特征点在目标图像、第五图像以及第六图像中对应的模糊量,计算压缩比。In some possible implementations, determining the compression ratio based on the blur amount of the feature points in the target image, the fifth image, and the sixth image may include: obtaining the target feature points in the first preset calibration plate respectively in the target image, the fifth image, and the sixth image. The corresponding blur amounts in the fifth image and the sixth image; the compression ratio is calculated based on the corresponding blur amounts of the target feature points in the target image, the fifth image and the sixth image.
在一些可能的实施方式中,基于目标特征点在目标图像、第五图像以及第六图像中对应的模糊量,计算压缩比,具体可以通过以下公式计算压缩比:CR=-20Log10((OIS on-Still)/(OIS off- Still));其中,CR表示压缩比,OIS on表示目标特征点在目标图像中对应的模糊量,OIS off表示目标特征点在第五图像中对应的模糊量,Still表示目标特征点在第六图像中对应的模糊量。In some possible implementations, the compression ratio is calculated based on the blur amount corresponding to the target feature point in the target image, the fifth image, and the sixth image. Specifically, the compression ratio can be calculated by the following formula: CR=-20Log10 ((OIS on -Still)/(OIS off- Still)); where CR represents the compression ratio, OIS on represents the blur amount corresponding to the target feature point in the target image, and OIS off represents the blur amount corresponding to the target feature point in the fifth image, Still represents the blur amount corresponding to the target feature point in the sixth image.
第二方面,本申请提供一种光学防抖动的标定方法,该方法包括:In a second aspect, this application provides an optical anti-shake calibration method, which method includes:
获取摄像模组对第二预设标定板采集的标定图像;第二预设标定板包括至少一个特征点;获取第二预设标定板中的预设特征点在标定图像中的第一位置,以及第一位置与标定图像的图像中心之间的距离;基于第一位置与标定图像的图像中心之间的距离,调整摄像模组的马达的行程,使预设特征点处于图像中心;获取摄像模组在第三拍摄状态下,对第二预设标定板采集的M张图像;第三拍摄状态包括摄像模组振动且摄像模组的光学防抖动功能开启;摄像模组的光学防抖动功能开启的状态下,在摄像模组进行图像采集时,马达驱动摄像模组的镜头移动,以补偿摄像模组的振动造成的模糊;M为大于或等于2的正整数;获取M张图像中预设特征点的抖动情况;基于预设特征点的抖动情况,确定马达的标定增益值。Obtain the calibration image collected by the camera module on the second preset calibration plate; the second preset calibration plate includes at least one feature point; acquire the first position of the preset feature point in the second preset calibration plate in the calibration image, and the distance between the first position and the image center of the calibration image; based on the distance between the first position and the image center of the calibration image, adjust the stroke of the motor of the camera module so that the preset feature point is in the center of the image; obtain the camera M images collected by the module on the second preset calibration plate in the third shooting state; the third shooting state includes vibration of the camera module and the optical anti-shake function of the camera module is turned on; the optical anti-shake of the camera module When the camera module is collecting images when the dynamic function is turned on, the motor drives the lens of the camera module to move to compensate for the blur caused by the vibration of the camera module; M is a positive integer greater than or equal to 2; acquire M images The jitter condition of the preset feature points in the motor is determined; based on the jitter condition of the preset feature points, the calibration gain value of the motor is determined.
在该方案中,使用包括至少一个特征点的标定板对在棱镜的X方向和Y方向进行光学防抖动处理的摄像模组进行光学防抖动标定。在采集一张图像之后,确定预设特征点距离图像中心之间的距离。然后基于该距离改变马达的行程,将预设特征点调整到图像中心,即摄像模组的画面中心。从而可以避免因预设特征点没有处在摄像模组的画面中心时导致的光学防抖动标定精准度不高的问题。In this solution, a calibration plate including at least one feature point is used to perform optical anti-shake calibration on a camera module that performs optical anti-shake processing in the X and Y directions of the prism. After collecting an image, determine the distance between the preset feature points and the center of the image. Then the stroke of the motor is changed based on this distance, and the preset feature point is adjusted to the center of the image, that is, the center of the camera module's screen. This can avoid the problem of low optical anti-shake calibration accuracy caused by the preset feature point not being in the center of the camera module's screen.
第三方面,提供了一种电子设备,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该电子设备运行时,该处理器执行该存储器存储的该计算机执行指令,以使该电子设备执行如上述第一方面中任一项的光学防抖动的标定方法。In a third aspect, an electronic device is provided, including: a processor and a memory; the memory is used to store computer execution instructions; when the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the The electronic device performs the optical anti-shake calibration method according to any one of the above first aspects.
第四方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的光学防抖动的标定方法。In a fourth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is run on a computer, the computer can perform the optical anti-shake of any one of the above-mentioned first aspects. calibration method.
第五方面,提供了一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备可以执行上述第一方面中任一项的光学防抖动的标定方法。A fifth aspect provides a computer program product containing instructions that, when run on an electronic device, enables the electronic device to perform any one of the optical anti-shake calibration methods of the first aspect.
第六方面,提供了一种装置(例如,该装置可以是芯片系统),该装置包括处理器,用于支持电子设备实现上述第一方面中所涉及的功能。在一种可能的设计中,该装置还包括存储器,该存储器,用于保存电子设备必要的程序指令和数据。该装置是芯片系统时,可以由芯片构成,也可以包含芯片和其他分立器件。A sixth aspect provides a device (for example, the device may be a chip system). The device includes a processor and is used to support an electronic device to implement the functions involved in the above-mentioned first aspect. In a possible design, the device further includes a memory, which is used to store necessary program instructions and data of the electronic device. When the device is a chip system, it may be composed of a chip or may include a chip and other discrete components.
其中,第三方面至第六方面中任一种设计方式所带来的技术效果可参见第一方面和第二方面中不同设计方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought by any one of the design methods in the third to sixth aspects can be found in the technical effects brought by the different design methods in the first and second aspects, and will not be described again here.
附图说明Description of the drawings
图1为本申请实施例提供的一种摄像模组对标定板采集的图像示意图;Figure 1 is a schematic diagram of images captured by a camera module provided by an embodiment of the present application on a calibration plate;
图2为本申请实施例提供的一种个人计算机的结构示意图;Figure 2 is a schematic structural diagram of a personal computer provided by an embodiment of the present application;
图3为本申请实施例提供的一种光学防抖动的标定方法的应用场景示意图;Figure 3 is a schematic diagram of an application scenario of an optical anti-shake calibration method provided by an embodiment of the present application;
图4为本申请实施例提供的一种光学防抖动的标定方法的流程示意图;Figure 4 is a schematic flow chart of an optical anti-shake calibration method provided by an embodiment of the present application;
图5为本申请实施例提供的第一预设标定板的示意图;Figure 5 is a schematic diagram of the first preset calibration plate provided by the embodiment of the present application;
图6为本申请实施例提供的第一预设标定板的示意图;Figure 6 is a schematic diagram of the first preset calibration plate provided by the embodiment of the present application;
图7为本申请实施例提供的一种光学防抖动的标定方法的流程示意图;Figure 7 is a schematic flow chart of an optical anti-shake calibration method provided by an embodiment of the present application;
图8为本申请实施例提供的滤波后图像的示意图;Figure 8 is a schematic diagram of a filtered image provided by an embodiment of the present application;
图9为本申请实施例提供的一种光学防抖动的标定方法的流程示意图;Figure 9 is a schematic flow chart of an optical anti-shake calibration method provided by an embodiment of the present application;
图10为本申请实施例提供的一种光学防抖动的标定方法的流程示意图;Figure 10 is a schematic flow chart of an optical anti-shake calibration method provided by an embodiment of the present application;
图11为本申请实施例提供的一种光学防抖动的标定方法的流程示意图;Figure 11 is a schematic flow chart of an optical anti-shake calibration method provided by an embodiment of the present application;
图12为本申请实施例提供的一种摄像模组对第二预设标定板采集的图像的示意图;Figure 12 is a schematic diagram of an image collected by a camera module provided by an embodiment of the present application on a second preset calibration plate;
图13为本申请实施例提供的一种芯片系统的结构示意图。Figure 13 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
具体实施方式Detailed ways
OIS是通过移动镜片组或感光芯片的位置来补偿拍摄时相机的晃动造成的成像模糊,从而达到减震防抖动的功能,使拍摄画面清晰、稳定。对于带有OIS防抖动功能的摄像模组而言,为了保证OIS防抖动效果,在投入使用前需对OIS功能进行标定。OIS compensates for image blur caused by camera shake during shooting by moving the position of the lens group or photosensitive chip, thereby achieving the function of shock absorption and anti-shake, making the shooting picture clear and stable. For camera modules with OIS anti-shake function, in order to ensure the OIS anti-shake effect, the OIS function needs to be calibrated before being put into use.
在一些实施例中,在OIS防抖动系统中,使用马达带动摄像模组中的镜头在光轴垂直平面上移动,尽可能大的抵消拍摄时外部振动(例如手的抖动)对画面清晰度的影响。具体的,拍摄时根据获取的抖动数据,马达可以产生反方向的作用力,从而平衡抖动所影响的光线路径,使得抖动后的光线仍能够落在原本的位置,从而获得更稳定和清晰的成像效果。In some embodiments, in the OIS anti-shake system, a motor is used to drive the lens in the camera module to move on a plane vertical to the optical axis, so as to offset as much as possible the impact of external vibrations (such as hand shake) on picture clarity during shooting. Impact. Specifically, based on the jitter data obtained during shooting, the motor can generate force in the opposite direction to balance the light path affected by the jitter, so that the jittered light can still fall in its original position, thereby obtaining a more stable and clear image. Effect.
由于马达的生产差异,不同的马达对相同的抖动数据的敏感度可能不同。马达控制镜头移动的偏移量与外界抖动的大小满足一定的关系,这个关系可以用马达的增益来表示。在拍摄时的抖动数据相同的情况下,如果马达的增益设置为不同数值,那么马达控制镜头移动的偏移量是不相同的。在一些实施例中,为了获得更好的防抖动效果,需要马达将镜头尽可能的推动到能够使光线落在原本的位置的地方。因此,可以通过调整马达的增益来找到这一位置,即找到能够获得好的防抖动效果的马达的增益,可以称为马达的最佳增益。OIS标定的过程,即包括找到马达的最佳增益值的过程。Due to motor production differences, different motors may have different sensitivities to the same jitter data. The offset amount of the motor-controlled lens movement has a certain relationship with the size of the external jitter. This relationship can be expressed by the gain of the motor. When the shake data during shooting is the same, if the gain of the motor is set to a different value, the offset amount of the motor controlling the movement of the lens will be different. In some embodiments, in order to obtain a better anti-shake effect, a motor is required to push the lens as far as possible to a place where the light can fall at its original position. Therefore, this position can be found by adjusting the gain of the motor, that is, finding the gain of the motor that can obtain a good anti-shake effect, which can be called the best gain of the motor. The process of OIS calibration includes the process of finding the optimal gain value of the motor.
相关技术中常用的一种标定方式是使用单一的特征标定板对摄像模组进行OIS标定,将单一特征设置在标定板中心,使用待标定的摄像模组对标定板拍摄的图像之后,基于拍摄的图像对待标定的摄像模组进行OIS标定。A commonly used calibration method in related technologies is to use a single feature calibration board to perform OIS calibration on a camera module. A single feature is set in the center of the calibration board, and the camera module to be calibrated is used to capture the image captured by the calibration board. The image is used for OIS calibration of the camera module to be calibrated.
部分摄像模组设置有棱镜,并且开启光学防抖动(OIS)功能之后,是在棱镜上进行X方向和Y方向做防抖动处理,如潜望式摄像模组。也即是说,如果开启OIS功能,摄像模组的马达将会根据抖动情况在棱镜的X方向和Y方向上进行抖动补偿。由于潜望式摄像模组采集图像时,光的路径需要经过棱镜折射才会到达成像器件,因此如果在棱镜的X方向和Y方向做防抖动处理,那么呈现在图像的不同位置的补偿效果不一致。也就是说,在采集的图像的不同位置的防抖效果也可能不一致。经过测试可知,上述摄像模组在外界存在抖动且开启OIS功能的情况下,采集的图像可能产生像旋现象。像旋现象表示图像以一个中心为原点发生旋转的现象。Some camera modules are equipped with prisms, and after the optical anti-shake (OIS) function is turned on, anti-shake processing is performed on the prism in the X and Y directions, such as periscope camera modules. That is to say, if the OIS function is turned on, the motor of the camera module will perform shake compensation in the X and Y directions of the prism according to the shake situation. Since the periscope camera module collects images, the light path needs to be refracted by the prism before reaching the imaging device. Therefore, if anti-shake processing is performed in the X and Y directions of the prism, the compensation effect will appear at different positions in the image. Inconsistent. In other words, the anti-shake effect may be inconsistent at different locations in the captured image. After testing, it was found that when the above-mentioned camera module has external jitter and the OIS function is turned on, the images collected may produce image rotation. The phenomenon of image rotation refers to the phenomenon of image rotation with a center as the origin.
如果对于在棱镜上进行X方向和Y方向做防抖动处理的摄像模组使用上述方法进行OIS标定,标定板位置固定之后,使用不同的摄像模组对标定板进行拍摄时,由于组装的问题,单一特征在图像中的位置并不一定都是出现在图像中心的。如图1所示,使用标定板10进行OIS标定,标定板10的中心设置有单一的十字特征(十字chart),不同的摄像模组拍摄时,摄像模组所采集到的图像11中十字chart所在的位置可能是12、13、14或者15,并不一定是在图像中心。应理解,在其他实施例中,进行OIS标定时使用的标定板中的特征也可以是单一的十字chart以外的特征点,如单一的圆形特征点、单一的方形特征点或者单一的三角形特征点等等。If the above method is used for OIS calibration for a camera module that performs anti-shake processing in the X and Y directions on the prism, after the position of the calibration plate is fixed, when using different camera modules to shoot the calibration plate, due to assembly problems , the position of a single feature in the image does not necessarily appear in the center of the image. As shown in Figure 1, the calibration plate 10 is used for OIS calibration. A single cross feature (cross chart) is set in the center of the calibration plate 10. When shooting with different camera modules, the cross chart in the image 11 collected by the camera module The position may be 12, 13, 14 or 15, and is not necessarily in the center of the image. It should be understood that in other embodiments, the features in the calibration plate used for OIS calibration can also be feature points other than a single cross chart, such as a single circular feature point, a single square feature point or a single triangular feature. Wait.
而OIS标定时通常需结合摄像模组采集的图像中特征点的抖动量来确定防抖动的效果,在这种情况下,OIS标定过程中所针对的位置是图像中采集到的单一的特征点所在的位置。对于潜望式摄像模组而言,由于采集图像时单一特征点所在的位置不一定是摄像模组的镜头画面中心(图像中心),那么OIS标定评估的位置也不一定是镜头画面中心。When OIS calibration, it is usually necessary to combine the jitter amount of the feature points in the image collected by the camera module to determine the anti-shake effect. In this case, the position targeted during the OIS calibration process is a single feature collected in the image. The location of the point. For periscope camera modules, since the location of a single feature point when collecting images is not necessarily the center of the lens screen (image center) of the camera module, the position for OIS calibration evaluation is not necessarily the center of the lens screen.
然而,由于用户使用摄像模组拍摄图像时,通常会将拍摄的重点放在图像中心的位置。因此,对摄像模组进行光学防抖动标定时,通常是需要对摄像模组的镜头画面中心位置的防抖动效果进行评估。如果使用上述方法对这一类型的镜头进行OIS标定,容易出现图像评估的中心离镜头画面中心“0”视场较远,OIS标定的精确度较低的问题。However, when users use the camera module to capture images, they usually focus on the center of the image. Therefore, when performing optical anti-shake calibration on a camera module, it is usually necessary to evaluate the anti-shake effect at the center of the lens frame of the camera module. If you use the above method to perform OIS calibration on this type of lens, it is easy to have the problem that the center of image evaluation is far away from the "0" field of view in the center of the lens frame, and the accuracy of OIS calibration is low.
基于此,本申请提出一种光学防抖动的标定方法。在本申请实施例提供的方法中,进行OIS标定时采用的第一预设标定板包括至少一个特征点。获取摄像模组在第一拍摄状态下对第一预设标定板采集的N张图像;其中,不同的图像分别是在摄像模组的马达设置为不同的增益时采集的。之后,可以分别基于摄像模组采集的每张图像中特征点的抖动情况,来确定每张图像的抖动中心。然后可以在N张图像中查找到抖动中心与图像中心之间的距离满足预设条件的目标图像,将摄像模组采集目标图像时马达对应设置的目标增益,确定为摄像模组的马达的标定增益值。其中,预设条件用于指示图像的抖动中心与图像中心之间的距离最小,且距离小于第一预设阈值。Based on this, this application proposes an optical anti-shake calibration method. In the method provided by the embodiment of the present application, the first preset calibration plate used for OIS calibration includes at least one feature point. Obtain N images collected by the camera module on the first preset calibration plate in the first shooting state; wherein, different images are collected when the motor of the camera module is set to different gains. Afterwards, the jitter center of each image can be determined based on the jitter of the feature points in each image collected by the camera module. Then, the target image whose distance between the jitter center and the image center meets the preset conditions can be found in the N images, and the target gain corresponding to the motor setting when the camera module collects the target image is determined as the calibration of the camera module's motor. gain value. The preset condition is used to indicate that the distance between the jitter center of the image and the center of the image is the smallest, and the distance is smaller than the first preset threshold.
上述方法,在进行OIS标定时,找到抖动中心与图像中心距离满足预设条件的目标图像,基于目标图像来确定马达的增益值,确保OIS标定针对的位置是图像中心或距离图像中心较近的位置,也就是摄像模组的画面中心所在的位置。即便在开启OIS功能的情况下采集的图像存在像旋,马达的标定增益值是能够使图像中心(即摄像模组的画面中心)位置的OIS效果达到最佳。从而提高OIS标定的精确度。The above method, when performing OIS calibration, finds the target image whose distance between the jitter center and the image center meets the preset conditions, determines the gain value of the motor based on the target image, and ensures that the position targeted by the OIS calibration is the image center or is closer to the image center. The position is where the center of the camera module’s screen is. Even if the image collected with the OIS function turned on has image rotation, the calibrated gain value of the motor is able to achieve the best OIS effect at the center of the image (that is, the center of the camera module). Thereby improving the accuracy of OIS calibration.
在一些实施例中,第一预设标定板可以包括两个以上特征点,这样,在OIS标定时可以根据实际情况选择任意一个或多个特征点,并基于该一个或多个特征点的抖动情况来评估OIS效果。在存在像旋问题的图像中,图像的抖动中心可能抖动量最小或者没有抖动,而抖动中心以外的其他位置的抖动量较大。因此,可以基于分析图像中不同特征点的抖动情况来找到图像的抖动中心。然后,在摄像模组采集的N张图像中查找图像的抖动中心与图像中心最接近的目标图像,再以目标图像对应的马达的目标增益作为马达的标定增益值。目标图像的图像中心是接近整个图像中抖动量最小的位置,也是目标图像中防抖动效果最好的位置。目标图像对应的马达增益,是能够使镜头画面中心(图像中心)的防抖动效果达到最佳的马达增益值,也就是OIS标定所需要确定的马达的标定增益值。In some embodiments, the first preset calibration plate can include more than two feature points. In this way, during OIS calibration, any one or more feature points can be selected according to the actual situation, and the jitter based on the one or more feature points can be situation to evaluate the OIS effect. In an image with image rotation problems, the jitter center of the image may have minimal or no jitter, while other locations outside the jitter center may have larger jitter amounts. Therefore, the jitter center of the image can be found based on analyzing the jitter of different feature points in the image. Then, among the N images collected by the camera module, find the target image whose jitter center is closest to the image center, and then use the target gain of the motor corresponding to the target image as the calibration gain value of the motor. The image center of the target image is close to the position with the smallest amount of jitter in the entire image, and is also the position with the best anti-shake effect in the target image. The motor gain corresponding to the target image is the motor gain value that can achieve the best anti-shake effect at the center of the lens screen (image center), which is the calibration gain value of the motor that needs to be determined for OIS calibration.
这样,可以保证标定所针对的位置是镜头画面中心(即图像中心)对应的位置,从而提高标定的精确度。并且,查找不同图像的抖动中心即可完成OIS标定,可以帮助快速完成OIS标定过程,减少OIS标定所需的时间,提高OIS标定的效率。In this way, it can be ensured that the position targeted by the calibration is the position corresponding to the center of the lens frame (i.e., the center of the image), thereby improving the accuracy of the calibration. Moreover, OIS calibration can be completed by finding the jitter centers of different images, which can help quickly complete the OIS calibration process, reduce the time required for OIS calibration, and improve the efficiency of OIS calibration.
由上述说明可知,摄像模组如果在棱镜的X方向和Y方向上进行光学防抖动处理,摄像模组所采集的图像仍可能存在像旋问题。在一些实施例中,在产生像旋问题的图像中,上述抖动中心,也可以称为像旋中心。From the above description, it can be seen that if the camera module performs optical anti-shake processing in the X and Y directions of the prism, the images collected by the camera module may still have image rotation problems. In some embodiments, in an image causing an image rotation problem, the above-mentioned jitter center may also be called an image rotation center.
需要说明的是,本申请实施例提供的光学防抖动的标定方法可以应用于单独的测试设备,也可以应用于集成于一个测试模块,或者,还可以应用于与测试设备连接的电子设备。It should be noted that the optical anti-shake calibration method provided by the embodiments of the present application can be applied to a separate test device, can be integrated into a test module, or can also be applied to an electronic device connected to the test device.
示例性的,在一些实施例中,上述电子设备可以是手机、平板电脑、桌面型、膝上型、手持计算机、个人计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personalcomputer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、穿戴设备、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、媒体播放器、电视机等设备,本申请实施例对该设备的具体形态不作特殊限制。For example, in some embodiments, the above-mentioned electronic device may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a personal computer, a notebook computer, an ultra-mobile personal computer (UMPC), or a netbook. , as well as cellular phones, personal digital assistants (PDAs), wearable devices, augmented reality (AR)/virtual reality (VR) devices, media players, televisions and other equipment, this application is implemented There are no special restrictions on the specific form of the equipment.
以上述电子设备可以是个人计算机20为例,请参照图2,为本申请一实施例提供的个人计算机20的结构示意图。如图2所示,该个人计算机20可以包括:处理器21、存储器22、显示屏23、Wi-Fi装置24、蓝牙装置25、音频电路26、麦克风26A、扬声器26B、电源系统27、外设接口28、传感器模块29、数据转换模块30等部件。这些部件可通过一根或多根通信总线或信号线(图2中未示出)进行通信。本领域技术人员可以理解,图2中示出的硬件结构并不构成对个人计算机20的限定,个人计算机20可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Taking the above-mentioned electronic device as an example, the personal computer 20 may be used. Please refer to FIG. 2 , which is a schematic structural diagram of the personal computer 20 provided by an embodiment of the present application. As shown in Figure 2, the personal computer 20 may include: a processor 21, a memory 22, a display screen 23, a Wi-Fi device 24, a Bluetooth device 25, an audio circuit 26, a microphone 26A, a speaker 26B, a power system 27, and peripherals. Interface 28, sensor module 29, data conversion module 30 and other components. These components may communicate via one or more communication buses or signal lines (not shown in Figure 2). Those skilled in the art can understand that the hardware structure shown in FIG. 2 does not constitute a limitation on the personal computer 20. The personal computer 20 may include more or fewer components than shown, or some components may be combined, or different components may be used. Component placement.
其中,处理器21是个人计算机20的控制中心,利用各种接口和线路连接个人计算机20的各个部分,通过运行或执行存储在存储器22内的应用程序,以及调用存储在存储器22内的数据和指令,执行个人计算机20的各种功能和处理数据。在一些实施例中,处理器21可包括一个或多个处理单元;处理器21还可以集成应用处理器和调制解调处理器;其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器21中。Among them, the processor 21 is the control center of the personal computer 20, using various interfaces and lines to connect various parts of the personal computer 20, by running or executing application programs stored in the memory 22, and calling data and data stored in the memory 22. instructions to perform various functions of the personal computer 20 and process data. In some embodiments, the processor 21 may include one or more processing units; the processor 21 may also integrate an application processor and a modem processor; where the application processor mainly processes operating systems, user interfaces, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 21 .
在本申请其他一些实施例中,上述处理器21还可以包括AI芯片。AI芯片的学习和处理能力包括图像理解能力、自然语言理解能力和语音识别能力等。AI芯片可以使得个人计算机20具有更好的性能、更长的续航时间以及更好的安全性和隐私性。例如,若个人计算机20通过云端处理数据则需要数据上传处理后再返回结果,在现有技术条件下效率很低。若个人计算机20本地端具有较强的AI学习能力,那么个人计算机20就不需要把数据上传到云端,直接在本地端处理即可,因而可以在提高处理效率的同时,提高数据的安全性和隐私性。In some other embodiments of the present application, the above-mentioned processor 21 may also include an AI chip. The learning and processing capabilities of AI chips include image understanding capabilities, natural language understanding capabilities, and speech recognition capabilities. AI chips can enable the personal computer 20 to have better performance, longer battery life, and better security and privacy. For example, if the personal computer 20 processes data through the cloud, the data needs to be uploaded and processed before returning the results, which is very inefficient under the current technical conditions. If the local side of the personal computer 20 has strong AI learning capabilities, then the personal computer 20 does not need to upload the data to the cloud and can process it directly on the local side. Therefore, the security and safety of the data can be improved while improving the processing efficiency. Privacy.
存储器22用于存储应用程序以及数据,处理器21通过运行存储在存储器22的应用程序以及数据,执行个人计算机20的各种功能以及数据处理。存储器22主要包括存储程序区以及存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等);存储数据区可以存储根据使用个人计算机20时所创建的数据(比如音频数据、视频数据等)。此外,存储器22可以包括高速随机存取存储器,还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他非易失性固态存储器件等。The memory 22 is used to store application programs and data, and the processor 21 executes various functions and data processing of the personal computer 20 by running the application programs and data stored in the memory 22 . The memory 22 mainly includes a storage program area and a storage data area. The storage program area can store the operating system and at least one application program required for the function (such as a sound playback function, an image playback function, etc.); the storage data area can store personal data according to the use of the program. Data created by the computer 20 (such as audio data, video data, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as a magnetic disk storage device, a flash memory device or other non-volatile solid-state storage devices.
存储器22可以存储各种操作系统。示例性地,存储器22中还可以存储与本申请实施例与标定相关的数据,例如采集的图像、马达的增益等等数据。Memory 22 may store various operating systems. For example, the memory 22 may also store data related to the calibration of the embodiment of the present application, such as collected images, motor gain, and other data.
显示屏23用于显示图像,视频等。该显示屏可以是触摸屏。在一些实施例中,个人计算机20可以包括1个或N个显示屏23,N为大于1的正整数。个人计算机20通过GPU,显示屏23,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏23和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器21可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The display screen 23 is used to display images, videos, etc. The display screen may be a touch screen. In some embodiments, the personal computer 20 may include 1 or N display screens 23, where N is a positive integer greater than 1. The personal computer 20 implements display functions through a GPU, a display screen 23, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 23 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 21 may include one or more GPUs that execute program instructions to generate or alter display information.
Wi-Fi装置24,用于为个人计算机20提供遵循Wi-Fi相关标准协议的网络接入。个人计算机20可以通过Wi-Fi装置24接入到Wi-Fi接入点,进而帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。个人计算机20还可以通过Wi-Fi装置和Wi-Fi接入点与连接到该Wi-Fi接入点的终端设备建立Wi-Fi连接,用于相互传输数据。在其他一些实施例中,该Wi-Fi装置24也可以作为Wi-Fi无线接入点,可以为其他计算机设备提供Wi-Fi网络接入。The Wi-Fi device 24 is used to provide the personal computer 20 with network access that complies with Wi-Fi related standard protocols. The personal computer 20 can access the Wi-Fi access point through the Wi-Fi device 24, thereby helping the user to send and receive emails, browse web pages, access streaming media, etc., which provides users with wireless broadband Internet access. The personal computer 20 can also establish a Wi-Fi connection with a terminal device connected to the Wi-Fi access point through a Wi-Fi device and a Wi-Fi access point for mutual transmission of data. In some other embodiments, the Wi-Fi device 24 can also serve as a Wi-Fi wireless access point and can provide Wi-Fi network access for other computer devices.
蓝牙装置25,用于实现个人计算机20与其他短距离的电子设备(例如终端、智能手表等)之间的数据交换。本申请实施例中的蓝牙装置可以是集成电路或者蓝牙芯片等。The Bluetooth device 25 is used to realize data exchange between the personal computer 20 and other short-distance electronic devices (such as terminals, smart watches, etc.). The Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip, etc.
音频电路26、麦克风26A、扬声器26B可提供用户与个人计算机20之间的音频接口。音频电路26可将接收到的音频数据转换后的电信号,传输到扬声器26B,由扬声器26B换为声音信号输出;另一方面,麦克风26A将收集的声音信号转换为电信号,由音频电路26接收后转换为音频数据,再通过互联网或者Wi-Fi网络或者蓝牙将音频数据发送给终端,或者将音频数据输出至存储器22以便进一步处理。Audio circuit 26, microphone 26A, and speaker 26B may provide an audio interface between the user and personal computer 20. The audio circuit 26 can transmit the electrical signal converted from the received audio data to the speaker 26B, and the speaker 26B converts it into a sound signal for output; on the other hand, the microphone 26A converts the collected sound signal into an electrical signal, and the audio circuit 26 After receiving, it is converted into audio data, and then the audio data is sent to the terminal through the Internet or Wi-Fi network or Bluetooth, or the audio data is output to the memory 22 for further processing.
电源系统27用于给个人计算机20的各个部件充电。电源系统27可以包括有电池和电源管理模块,电池可以通过电源管理芯片与处理器21逻辑相连,从而通过电源系统27实现管理充电、放电、以及功耗管理等功能。Power supply system 27 is used to charge various components of personal computer 20. The power supply system 27 may include a battery and a power management module. The battery may be logically connected to the processor 21 through a power management chip, so that functions such as charging, discharging, and power consumption management can be implemented through the power supply system 27 .
外设接口28,用于为外部的输入/输出设备(例如键盘、鼠标、外接显示器、外部存储器、用户识别模块卡等)提供各种接口。例如通过通用串行总线接口与鼠标连接,实现接收用户通过鼠标实施的相关操作的目的。又例如,通过外部存储器接口与外部存储器连接,例如Micro SD卡,实现扩展个人计算机20的存储能力。外设接口28可以被用来将上述外部的输入/输出外围设备耦接到处理器21和存储器22。The peripheral interface 28 is used to provide various interfaces for external input/output devices (such as keyboard, mouse, external monitor, external memory, user identification module card, etc.). For example, it is connected to a mouse through a universal serial bus interface to achieve the purpose of receiving relevant operations performed by the user through the mouse. For another example, the storage capacity of the personal computer 20 can be expanded by connecting to an external memory, such as a Micro SD card, through an external memory interface. Peripheral interface 28 may be used to couple the external input/output peripherals described above to processor 21 and memory 22 .
传感器模块29可以包括至少一种传感器。例如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器。其中,环境光传感器可根据环境光线的明暗来调节显示屏23的亮度。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别个人计算机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。当然,根据实际需求,传感器模块还可以包括其他任意可行的传感器。Sensor module 29 may include at least one sensor. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor. Among them, the ambient light sensor can adjust the brightness of the display screen 23 according to the brightness of the ambient light. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes). It can detect the magnitude and direction of gravity when stationary. It can be used to identify applications of personal computer posture (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc. Of course, according to actual needs, the sensor module can also include any other feasible sensors.
数据转换模块30可以包括有数模转换器30A和模数转换器30B。其中,数模转换器(digital to analog converter,DAC),又称D/A转换器。数模转换器是把数字信号转变成模拟信号的器件。模数转换器(analog to digitalconverter,ADC),又称为A/D转换器。模数转换器是把模拟信号转换成数字信号的器件。The data conversion module 30 may include a digital-to-analog converter 30A and an analog-to-digital converter 30B. Among them, digital to analog converter (DAC), also known as D/A converter. A digital-to-analog converter is a device that converts digital signals into analog signals. Analog to digital converter (ADC), also known as A/D converter. An analog-to-digital converter is a device that converts analog signals into digital signals.
在一些实施例中,以下实施例中的光学防抖动的标定方法,均可以在具备上述硬件结构的个人计算机20中执行。In some embodiments, the optical image stabilization calibration methods in the following embodiments can be executed in the personal computer 20 having the above hardware structure.
以下对本申请实施例中可能涉及的技术名词进行说明。The technical terms that may be involved in the embodiments of this application are described below.
潜望式镜头又称“内变焦”镜头,是指光学变焦是在机身内部完成。A periscope lens, also known as an "internal zoom" lens, means that the optical zoom is completed inside the fuselage.
光学图像稳定器的工作原理是基于陀螺仪检测抖动量并进行位移补偿。即通过镜头内的陀螺仪侦测摄像模组抖动产生的微小移动,然后将信号传至中央处理器(centralprocessing unit,CPU)处理,CPU会计算待补偿的位移量。然后再控制马达根据待补偿的位移量移动摄像模组中的悬浮镜片,以抵消抖动产生的微小位移,从而有效克服因摄像模组振动产生的影像模糊(blur)。The working principle of the optical image stabilizer is based on the gyroscope detecting the amount of shake and performing displacement compensation. That is, the gyroscope in the lens detects the slight movement caused by the shake of the camera module, and then transmits the signal to the central processing unit (CPU) for processing, and the CPU calculates the amount of displacement to be compensated. Then the motor is controlled to move the suspended lens in the camera module according to the displacement to be compensated to offset the tiny displacement caused by the shake, thereby effectively overcoming the image blur caused by the vibration of the camera module.
OIS on表示光学防抖动功能开启,OIS off表示光学防抖动功能关闭。OIS on means that the optical anti-shake function is on, and OIS off means that the optical anti-shake function is off.
马达的增益gain,马达控制镜头移动的偏移量与外界抖动的大小满足一定的关系,这个关系可以用马达的增益gain来表示。The gain of the motor, the offset amount of the motor controlled lens movement, and the size of the external jitter satisfy a certain relationship. This relationship can be represented by the gain of the motor.
OIS标定的过程,即光学防抖动的标定过程。在该过程中,可以确定能够获得较好的防抖动效果时马达的增益,即马达的最佳增益值。The process of OIS calibration is the calibration process of optical image stabilization. In this process, the gain of the motor that can obtain better anti-shake effect can be determined, that is, the optimal gain value of the motor.
在一些实施例中,对待标定的摄像模组进行OIS标定的过程可以包括:打开摄像模组的光学防抖动功能,给摄像模组增加振动。调整摄像模组的马达的增益,获取马达设置为每一个增益时由摄像模组对第一预设标定板采集的图像。然后对不同马达的增益对应的图像进行分析,以确定马达的标定增益值。其中,振动可以是恒定的振动,例如6赫兹(Hz)、3度(°)、5Hz、1°的振动。第一预设标定板包括至少一个特征点,且第一预设标定板处于待标定的摄像模组的拍摄范围内。In some embodiments, the process of OIS calibration of the camera module to be calibrated may include: turning on the optical anti-shake function of the camera module and adding vibration to the camera module. Adjust the gain of the motor of the camera module, and obtain images captured by the camera module on the first preset calibration plate when the motor is set to each gain. Then the images corresponding to the gains of different motors are analyzed to determine the calibrated gain value of the motor. The vibration may be constant vibration, such as vibration of 6 Hertz (Hz), 3 degrees (°), 5 Hz, and 1°. The first preset calibration plate includes at least one feature point, and the first preset calibration plate is within the shooting range of the camera module to be calibrated.
为了对摄像模组的OIS进行标定,需要对摄像模组在开启OIS功能时的防抖动效果进行评估。因此在OIS标定的过程中,需要模拟外界抖动(如手的抖动)。在本申请实施例中,通过振动台带动摄像模组振动的方式模拟外界抖动。In order to calibrate the OIS of the camera module, it is necessary to evaluate the anti-shake effect of the camera module when the OIS function is turned on. Therefore, during the OIS calibration process, it is necessary to simulate external jitter (such as hand jitter). In the embodiment of the present application, external jitter is simulated by using a vibrating table to drive the camera module to vibrate.
如图3所示,为本申请一实施例提供的光学防抖动的标定方法的应用场景示意图。在该实施例中,以上述方法应用于与测试设备连接的个人计算机30为例。如图3所示,个人计算机30与测试设备31和摄像模组32连接,个人计算机30可以向测试设备31发送指令,以使测试设备31基于指令执行相应操作。个人计算机30还可以向摄像模组32发送指令,以控制调整摄像模组32中器件的参数。其中,摄像模组32可以设置在测试设备31上。应理解,振动台311在振动时,将会带动摄像模组32振动。As shown in FIG. 3 , it is a schematic diagram of an application scenario of the optical anti-shake calibration method provided by an embodiment of the present application. In this embodiment, the above method is applied to the personal computer 30 connected to the test device as an example. As shown in Figure 3, the personal computer 30 is connected to the test device 31 and the camera module 32. The personal computer 30 can send instructions to the test device 31, so that the test device 31 performs corresponding operations based on the instructions. The personal computer 30 can also send instructions to the camera module 32 to control and adjust parameters of the devices in the camera module 32 . Among them, the camera module 32 can be installed on the testing device 31 . It should be understood that when the vibrating table 311 vibrates, it will drive the camera module 32 to vibrate.
示例性的,测试设备31包括振动台311,测试设备31可以接收来自个人计算机30的第一指令,响应于第一指令,控制振动台311按照预设振动参数进行振动。其中,预设振动参数具体可以包括振动角度和振动频率。应理解,在个人计算机30没有向测试设备31发送第一指令时,测试设备31的振动台311可以保持静止不动的状态。Exemplarily, the test equipment 31 includes a vibration table 311. The test equipment 31 can receive a first instruction from the personal computer 30, and in response to the first instruction, control the vibration table 311 to vibrate according to preset vibration parameters. The preset vibration parameters may specifically include vibration angle and vibration frequency. It should be understood that when the personal computer 30 does not send the first instruction to the test device 31, the vibration table 311 of the test device 31 can remain stationary.
示例性的,摄像模组32包括马达321和镜头322。摄像模组32可以接收来自个人计算机30的第二指令,响应于第二指令控制马达321的增益调整为指定数值。在摄像模组32的光学防抖动功能开启之后,在摄像模组32的镜头322采集图像时,如果检测到外界抖动,马达321将会按照当前设置的增益值进行移动,以推动镜头322向抖动的反方向移动,尽可能抵消外界抖动。从而获得较为稳定和清晰的图像。Exemplarily, the camera module 32 includes a motor 321 and a lens 322. The camera module 32 may receive a second instruction from the personal computer 30 and control the gain of the motor 321 to adjust to a specified value in response to the second instruction. After the optical anti-shake function of the camera module 32 is turned on, if external shake is detected when the lens 322 of the camera module 32 collects images, the motor 321 will move according to the currently set gain value to push the lens 322 toward Move in the opposite direction of the jitter to offset external jitter as much as possible. This results in a more stable and clear image.
需要说明的是,图3所示的个人计算机30分别与测试设备31和摄像模组32连接,可以分别控制测试设备31和摄像模组32执行相应操作。在另一些实施例中,测试设备31和摄像模组32可以分别连接不同的个人计算机,由各自对应的个人计算机分别对其进行控制。其中,与测试设备31连接的个人计算机,以及与摄像模组32连接的个人计算机之间可以建立连接并通信。It should be noted that the personal computer 30 shown in FIG. 3 is connected to the test equipment 31 and the camera module 32 respectively, and can respectively control the test equipment 31 and the camera module 32 to perform corresponding operations. In other embodiments, the test equipment 31 and the camera module 32 can be connected to different personal computers respectively, and the corresponding personal computers can control them respectively. Among them, a connection and communication can be established between the personal computer connected to the test device 31 and the personal computer connected to the camera module 32 .
在另一些实施例中,在进行标定的过程中,也可以直接对完整的电子设备(如手机)进行标定,该电子设备设置有摄像模组和马达。示例性的,手机设置在测试设备上,测试设备中的振动台振动时,带动手机振动。可以理解的,手机振动时,手机中的摄像模组也会随之振动。在该实施例中,同样可以通过个人计算机向手机发送指令,以控制手机调整摄像模组32中器件的参数。In other embodiments, during the calibration process, a complete electronic device (such as a mobile phone) can also be calibrated directly. The electronic device is equipped with a camera module and a motor. For example, the mobile phone is set on the test equipment, and when the vibration table in the test equipment vibrates, the mobile phone vibrates. It is understandable that when the phone vibrates, the camera module in the phone will also vibrate. In this embodiment, instructions can also be sent to the mobile phone through a personal computer to control the mobile phone to adjust parameters of the devices in the camera module 32 .
本申请提供一种光学防抖动的标定方法,可以应用于对部分摄像模组的光学防抖动功能进行标定的场景,可以对在棱镜的X方向和Y方向上进行防抖动处理的摄像模组进行标定,避免因像旋问题导致的OIS标定的精确度较低的问题。This application provides an optical anti-shake calibration method, which can be applied to the scenario of calibrating the optical anti-shake function of some camera modules, and can be used to perform anti-shake processing on cameras in the X and Y directions of the prism. The module is calibrated to avoid the problem of low accuracy of OIS calibration caused by image rotation problems.
以下将结合实施例和附图对本申请实施例提供的光学防抖动的标定方法进行详细说明。示例性的,如图4所示为本申请一实施例提供的光学防抖动的标定方法的流程示意图。在该实施例中,以该光学防抖动的标定方法应用于与测试设备连接的个人计算机为例。上述方法包括S401-S410,其中:The optical anti-shake calibration method provided by the embodiments of the present application will be described in detail below with reference to the embodiments and drawings. For example, FIG. 4 is a schematic flowchart of an optical anti-shake calibration method provided by an embodiment of the present application. In this embodiment, the optical anti-shake calibration method is applied to a personal computer connected to the test equipment as an example. The above method includes S401-S410, where:
S401.个人计算机向测试设备发送第一指令。S401. The personal computer sends the first instruction to the test device.
其中,第一指令用于指示测试设备执行相应操作。The first instruction is used to instruct the test equipment to perform corresponding operations.
在一些实施例中,测试设备包括振动台。示例性的,第一指令可以用于指示振动台以预设振动参数进行振动;其中,第一指令携带预设振动参数。测试设备在接收到第一指令之后,可以对第一指令进行解析,以获得预设振动参数。In some embodiments, the testing equipment includes a vibration table. For example, the first instruction can be used to instruct the vibrating table to vibrate with preset vibration parameters; wherein the first instruction carries the preset vibration parameters. After receiving the first instruction, the test equipment can analyze the first instruction to obtain the preset vibration parameters.
在一些实施例中,预设振动参数可以包括振动角度和振动频率。示例性的,振动角度为3°,振动频率为6Hz。测试设备在获得预设振动参数之后,基于其中的振动角度和振动频率控制振动台进行振动。在其他实施例中,预设振动参数中的振动角度和振动频率也可以设置为其他数值,在本申请实施例中对此不予限定。In some embodiments, the preset vibration parameters may include vibration angle and vibration frequency. For example, the vibration angle is 3° and the vibration frequency is 6Hz. After the test equipment obtains the preset vibration parameters, it controls the vibration table to vibrate based on the vibration angle and vibration frequency. In other embodiments, the vibration angle and vibration frequency in the preset vibration parameters can also be set to other values, which are not limited in the embodiments of the present application.
在另一些实施例中,预设振动参数还可以包括用于指示振动台的振动时间。其中,振动时间可以包括振动的开始时间和结束时间;或者振动时间也可以包括振动的持续时长;或者,振动时间还可以用于指示振动的周期等等。测试设备在获得预设振动参数之后,基于其中的振动时间控制振动台进行振动。In other embodiments, the preset vibration parameters may also include a vibration time for indicating the vibration table. The vibration time may include the start time and end time of the vibration; or the vibration time may also include the duration of the vibration; or the vibration time may also be used to indicate the period of the vibration, and so on. After the test equipment obtains the preset vibration parameters, it controls the vibration table to vibrate based on the vibration time.
第一指令除了用于指示上述与振动相关的参数,在其他实施例中,第一指令还可以用于指示测试设备调整其他参数。示例性的,第一指令可以用于指示测试设备设置的位置、高度等等参数。In addition to instructing the above vibration-related parameters, the first instruction may also be used in other embodiments to instruct the testing equipment to adjust other parameters. For example, the first instruction may be used to indicate parameters such as position, height, etc. set by the test equipment.
应理解,S401也可以表示为测试设备接收来自个人计算机的第一指令。It should be understood that S401 can also represent the test device receiving the first instruction from the personal computer.
S402.测试设备响应于第一指令,以预设振动参数控制振动台进行振动。S402. The test equipment responds to the first instruction and controls the vibration table to vibrate with preset vibration parameters.
在一些实施例中,测试设备响应于第一指令控制振动台以预设振动参数进行振动。由上述针对图3的说明可知,振动台在振动的状态下,会带动设置在振动台上的摄像模组一起振动。In some embodiments, the testing equipment controls the vibration table to vibrate with preset vibration parameters in response to the first instruction. It can be seen from the above description of FIG. 3 that when the vibrating table vibrates, it will drive the camera module installed on the vibrating table to vibrate together.
S403.个人计算机向摄像模组发送第二指令。S403. The personal computer sends the second command to the camera module.
其中,摄像模组具有光学防抖动(OIS)功能。在本申请实施例中,摄像模组包括马达和棱镜,在开启光学防抖动功能之后,摄像模组可以通过马达推动棱镜在X方向和Y方向的移动来补偿外界抖动造成的模糊。示例性的,摄像模组具体可以是潜望式摄像模组。应理解,上述摄像模组仅为举例,在其他实施例中,摄像模组也可以是其他通过棱镜实现光学防抖动处理的摄像模组。Among them, the camera module has optical anti-shake (OIS) function. In this embodiment of the present application, the camera module includes a motor and a prism. After the optical anti-shake function is turned on, the camera module can use the motor to push the prism to move in the X and Y directions to compensate for blur caused by external shake. For example, the camera module may be a periscope camera module. It should be understood that the above-mentioned camera module is only an example. In other embodiments, the camera module can also be other camera modules that implement optical anti-shake processing through prisms.
由上述针对图3的说明可知,摄像模组在标定过程中可以被设置在振动台上。其中,振动台在控制下可以进行振动或保持静止。振动台在振动状态下,摄像模组会受到振动台振动的影响而振动。振动台在保持静止状态下,视为摄像模组也保持静止,即摄像模组没有受到外界抖动的影响。It can be seen from the above description of Figure 3 that the camera module can be placed on the vibration table during the calibration process. Among them, the vibration table can vibrate or remain stationary under control. When the vibrating table is in a vibrating state, the camera module will be affected by the vibration of the vibrating table and vibrate. When the vibrating table remains stationary, it is deemed that the camera module also remains stationary, that is, the camera module is not affected by external jitter.
在一些实施例中,第二指令可以包括预设数值,该预设数值用于指示将摄像模组的马达的增益调整为预设数值。其中,预设数值可以包括一个或多个。In some embodiments, the second instruction may include a preset value, which is used to instruct the gain of the motor of the camera module to be adjusted to the preset value. The preset value may include one or more.
当第二指令包括携带一个预设数值时,个人计算机可以向摄像模组多次发送第二指令,不同的第二指令包括不同的预设数值,以使摄像模组将马达的增益调整为不同数值。在一些实施例中,个人计算机发送的相邻两个第二指令对应的预设数值之间的间隔可以是相同的。When the second command includes carrying a preset value, the personal computer can send the second command to the camera module multiple times. Different second commands include different preset values, so that the camera module adjusts the gain of the motor to different values. numerical value. In some embodiments, the interval between the preset values corresponding to two adjacent second instructions sent by the personal computer may be the same.
在一些实施例中,个人计算机按照时间顺序向摄像模组发送的第二指令中携带的预设数值可以是按照大小顺序排列的。示例性的,个人计算机首次向摄像模组发送的第二指令时,第二指令携带的预设数值为0。个人计算机第二次向摄像模组发送第二指令时,第二指令携带的预设数值可以是0.2。个人计算机第三次向摄像模组发送第二指令时,第二指令携带的预设数值可以是0.5;以此类推。In some embodiments, the preset values carried in the second instruction sent by the personal computer to the camera module in chronological order may be arranged in order of size. For example, when the personal computer sends the second command to the camera module for the first time, the preset value carried by the second command is 0. When the personal computer sends the second command to the camera module for the second time, the preset value carried by the second command may be 0.2. When the personal computer sends the second command to the camera module for the third time, the preset value carried by the second command may be 0.5; and so on.
进一步的,个人计算机按照时间顺序向摄像模组发送的第二指令中携带的预设数值可以是从初始值开始按照预设步长递增或递减。以预设步长为0.1为例,个人计算机向摄像模组发送第二指令时,依次以预设步长对上一次第二指令中携带的预设数值进行递增(或递减),得到本次第二指令对应的预设数值。其中,初始值和预设步长均可以根据实际情况进行设置。在一些实施例中,初始值可以设置0,预设数值从0开始递增。或者,在另一些实施例中,初始值可以设置大于0的数值,预设数值从初始值开始递减。Furthermore, the preset value carried in the second instruction sent by the personal computer to the camera module in chronological order may increase or decrease in a preset step starting from the initial value. Taking the preset step size as 0.1 as an example, when the personal computer sends the second command to the camera module, it sequentially increments (or decrements) the preset value carried in the last second command with the preset step size to obtain this time. The default value corresponding to the second command. Among them, the initial value and preset step size can be set according to the actual situation. In some embodiments, the initial value can be set to 0, and the preset value starts from 0 and increases. Or, in other embodiments, the initial value can be set to a value greater than 0, and the preset value decreases from the initial value.
示例性的,个人计算机首次向摄像模组发送的第二指令时,第二指令携带的预设数值为0。个人计算机第二次向摄像模组发送第二指令时,第二指令携带的预设数值可以是0.1。个人计算机第三次向摄像模组发送第二指令时,第二指令携带的预设数值可以是0.2;以此类推。应理解,上述预设步长仅为示例,在其他实施例中,预设步长可以设置为其他数值。For example, when the personal computer sends the second command to the camera module for the first time, the preset value carried by the second command is 0. When the personal computer sends the second command to the camera module for the second time, the preset value carried by the second command may be 0.1. When the personal computer sends the second command to the camera module for the third time, the preset value carried by the second command may be 0.2; and so on. It should be understood that the above-mentioned preset step size is only an example, and in other embodiments, the preset step size can be set to other values.
在一些实施例中,预设步长可以根据实际情况进行调整。示例性的,个人计算机在一段时间内向摄像模组发送第二指令时,以预设步长为0.1依次增加预设数值。个人计算机在另一段时间内向摄像模组发送第二指令时,以预设步长为0.5依次增加预设数值。In some embodiments, the preset step size can be adjusted according to actual conditions. For example, when the personal computer sends the second command to the camera module within a period of time, it sequentially increases the preset value with a preset step size of 0.1. When the personal computer sends a second command to the camera module in another period of time, the preset value is sequentially increased with a preset step of 0.5.
当第二指令携带多个预设数值时,个人计算机向摄像模组发送一次第二指令,即可指示摄像模组基于第二指令分别控制马达的增益调整为不同的预设数值。When the second command carries multiple preset values, the personal computer sends the second command to the camera module once to instruct the camera module to respectively control the gain of the motor to adjust to different preset values based on the second command.
在另一些实施例中,第二指令也可以包括增益的调整规则。在一些实施例中,第二指令用于指示马达的增益从初始值开始以预设步长增加。其中,预设步长根据实际情况进行设置,在本申请实施例中对此不予限定。In other embodiments, the second instruction may also include gain adjustment rules. In some embodiments, the second instruction is used to instruct the gain of the motor to increase in a preset step size starting from an initial value. The preset step size is set according to actual conditions, and is not limited in the embodiments of this application.
在对待标定的摄像模组进行OIS标定之前,需要开启该摄像模组的OIS功能。在一些实施例中,摄像模组可以响应于第二指令开启OIS功能,在该实施例中,第二指令还可以用于指示摄像模组开启OIS功能。在另一些实施例中,摄像模组的OIS功能也可以手动开启;即,在上述S403之前,由相关人员手动开启待标定的摄像模组的OIS功能。Before performing OIS calibration on the camera module to be calibrated, the OIS function of the camera module needs to be turned on. In some embodiments, the camera module can enable the OIS function in response to the second instruction. In this embodiment, the second instruction can also be used to instruct the camera module to enable the OIS function. In other embodiments, the OIS function of the camera module can also be turned on manually; that is, before the above S403, the relevant personnel manually turns on the OIS function of the camera module to be calibrated.
应理解,S403也可以表示为摄像模组接收来自个人计算机的第二指令。It should be understood that S403 can also represent the camera module receiving the second instruction from the personal computer.
S404.摄像模组响应于第二指令,控制摄像模组的马达的增益调整为预设数值。S404. In response to the second command, the camera module controls the gain of the motor of the camera module to adjust to a preset value.
由上述实施例的说明可知,第二指令可以携带一个预设数值。在该实施例中,摄像模组在接收到个人计算机发送的第二指令时,控制摄像模组的马达调整为第二指令中的预设数值。在接收到个人计算机发送的新的第二指令时,控制摄像模组的马达调整为新的第二指令对应的预设数值。示例性的,摄像模组接收到第二指令之后,确定第二指令对应的预设数值为0.1,响应于该第二指令将马达调整为0.1,之后进行图像采集。摄像模组在接收到新的第二指令,新的第二指令对应的预设数值为0.2,响应于该新的第二指令将马达的增益调整为0.2,再进行图像采集;以此类推。It can be seen from the description of the above embodiments that the second command can carry a preset value. In this embodiment, when the camera module receives the second command sent by the personal computer, it controls the motor of the camera module to adjust to the preset value in the second command. When receiving a new second command sent by the personal computer, the motor of the camera module is controlled to adjust to a preset value corresponding to the new second command. For example, after receiving the second instruction, the camera module determines that the preset value corresponding to the second instruction is 0.1, adjusts the motor to 0.1 in response to the second instruction, and then performs image acquisition. After the camera module receives the new second command, the preset value corresponding to the new second command is 0.2, in response to the new second command, the gain of the motor is adjusted to 0.2, and then image acquisition is performed; and so on.
在另一些实施例中,第二指令可以携带多个预设数值。在该实施例中,摄像模组在接收到第二指令之后,解析得到第二指令对应的多个预设数值。响应于第二指令,摄像模组先将马达的增益调整为其中一个预设数值,之后进行图像采集。然后再将马达的增益调整为另一个预设数值,进行图像采集;以此类推。其中,当第二指令携带增益的调整规则时,摄像模组可以按照调整规则每次将马达的增益调整为一个数值并采集图像之后,再调整为下一个数值,再采集新的图像;以此类推。In other embodiments, the second instruction may carry multiple preset values. In this embodiment, after receiving the second command, the camera module analyzes and obtains a plurality of preset values corresponding to the second command. In response to the second instruction, the camera module first adjusts the gain of the motor to one of the preset values, and then collects images. Then adjust the gain of the motor to another preset value and perform image acquisition; and so on. Among them, when the second command carries the adjustment rule of the gain, the camera module can adjust the gain of the motor to a value each time according to the adjustment rule and collect images, then adjust it to the next value, and then collect new images; in this way, analogy.
S405.摄像模组对第一预设标定板采集对应的图像。S405. The camera module collects corresponding images of the first preset calibration plate.
在对待标定的摄像模组进行OIS标定之前,不清楚摄像模组的马达增益设置为什么数值时能够使摄像模组的光学防抖动效果达到最佳效果。因此,在本申请实施例中,可以在马达的增益设置为不同的数值时,分别对摄像模组采集的图像的光学防抖动效果进行评估。当摄像模组采集的图像的光学防抖动效果最佳时,对应的马达增益的数值即为马达的最佳增益值。在存在像旋现象的图像中,图像中不同位置的光学防抖动效果不一致,因此,为了适应用户的需求,可以将摄像模组所采集图像的图像中心的位置的光学防抖动效果最佳时,所对应的马达增益的数值,确定为马达的最佳增益值。Before OIS calibration is performed on the camera module to be calibrated, it is not clear what value should be set for the motor gain of the camera module to achieve the best optical anti-shake effect of the camera module. Therefore, in the embodiment of the present application, when the gain of the motor is set to different values, the optical anti-shake effect of the images captured by the camera module can be evaluated respectively. When the optical anti-shake effect of the image captured by the camera module is the best, the corresponding motor gain value is the optimal gain value of the motor. In images with image rotation, the optical anti-shake effect is inconsistent at different positions in the image. Therefore, in order to meet the needs of users, the optical anti-shake effect can be best at the position of the image center of the image captured by the camera module. When , the corresponding motor gain value is determined as the optimal gain value of the motor.
在一些实施例中,第一预设标定板包括至少一个特征点。示例性的,第一预设标定板可以包括一个特征点,也可以包括两个以上特征点。由上述说明可知,第一预设标定板处于摄像模组的拍摄范围内,因此,摄像模组对第一预设标定板采集的图像中,可以采集到第一预设标定板中的特征点的影像。In some embodiments, the first preset calibration plate includes at least one feature point. For example, the first preset calibration plate may include one feature point, or may include two or more feature points. It can be seen from the above description that the first preset calibration plate is within the shooting range of the camera module. Therefore, in the image collected by the camera module of the first preset calibration plate, the feature points in the first preset calibration plate can be collected. image.
进一步的,在一实施例中,第一预设标定板包括的特征点的形状可以是任意一种形状,如方形、三角形、十字形状或者圆形等等。Further, in one embodiment, the shape of the feature points included in the first preset calibration plate may be any shape, such as square, triangle, cross shape, circle, etc.
当第一预设标定板包括两个以上的特征点时,在一些实施例中,第一预设标定板中的多个特征点可以是周期性排列的,多个特征点的形状和大小均相同,并且相邻的特征点之间的间隔相同。其中,相邻特征点之间的间隔,以及单个特征点的形状、大小可以根据实际情况进行设置。When the first preset calibration plate includes more than two feature points, in some embodiments, the multiple feature points in the first preset calibration plate may be arranged periodically, and the shape and size of the multiple feature points are uniform. are the same, and the intervals between adjacent feature points are the same. Among them, the interval between adjacent feature points, as well as the shape and size of a single feature point can be set according to the actual situation.
以特征点的形状是圆形为例,如图5所示为一些实施例中第一预设标定板的示意图。其中多个大小相同的圆形特征点在第一预设标定板中是周期性排列的;相邻的圆形特征点之间的间隔相同。在另一些实施例中,第一预设标定板中特征点的颜色也可以是任意一种颜色。Taking the shape of the feature point as a circle as an example, FIG. 5 is a schematic diagram of the first preset calibration plate in some embodiments. A plurality of circular feature points of the same size are periodically arranged in the first preset calibration plate; the intervals between adjacent circular feature points are the same. In other embodiments, the color of the feature points in the first preset calibration plate can also be any color.
在一些实施例中,第一预设标定板包括多个圆形特征点。由上述说明可知,摄像模组在开启OIS功能之后,采集的图像可能存在像旋问题。如果特征点的形状是如方形、三角形等,那么在抖动中心(即像旋中心)所在的位置,其特征点的中心位置可能不会随外界抖动(振动)而移动,但是也有可能存在旋转导致的移动,从而导致模糊。如图6所示,以图中所示601对应的位置是该图像的抖动中心为例,方形特征点602仍存在以抖动中心为原点旋转产生的模糊,抖动中心以外的其他特征点(如特征点603、特征点604)以抖动中心为原点旋转产生的模糊量相对大于特征点602的模糊量。其中,特征点的模糊量用于表示特征点的模糊程度,模糊量越大,表示特征点的模糊程度越大,可以反映出该特征点的抖动较大。In some embodiments, the first preset calibration plate includes a plurality of circular feature points. From the above description, it can be seen that after the OIS function is turned on by the camera module, the images collected may have image rotation problems. If the shape of the feature point is such as a square, triangle, etc., then at the location of the jitter center (i.e., image rotation center), the center position of the feature point may not move with external jitter (vibration), but there may also be rotation caused by movement, resulting in blur. As shown in Figure 6, taking the position corresponding to 601 in the figure as the jitter center of the image as an example, the square feature point 602 still has blur caused by rotating with the jitter center as the origin, and other feature points other than the jitter center (such as feature Point 603, feature point 604) The blur amount produced by rotating with the shaking center as the origin is relatively larger than the blur amount of feature point 602. Among them, the blur amount of the feature point is used to represent the blur degree of the feature point. The larger the blur amount, the greater the blur degree of the feature point, which can reflect the greater jitter of the feature point.
而如果特征点是圆形,那么在像旋中心的位置,圆形特征点即使发生旋转,也相对容易找到画面中圆形特征点的较小点,进而便于定位抖动中心所在的位置。And if the feature point is a circle, then at the center of the image rotation, even if the circular feature point rotates, it is relatively easy to find a smaller point of the circular feature point in the picture, which makes it easier to locate the jitter center.
在一些实施例中,第一预设标定板中相邻特征点之间的间隔以及单个特征点的大小可以结合待标定的摄像模组的参数进行设置。示例性的,摄像模组的参数可以包括摄像模组的光学前焦距(Front Focal Length, EFL)、Field of View(视场角,FOV)和振动角度来确定。In some embodiments, the spacing between adjacent feature points in the first preset calibration plate and the size of a single feature point can be set in combination with the parameters of the camera module to be calibrated. For example, the parameters of the camera module can be determined including the optical front focal length (Front Focal Length, EFL), Field of View (FOV), and vibration angle of the camera module.
作为一种可能的实现方式,可以结合摄像模组的参数调整标定板中的特征点。在一些实施例中,为减少测试误差,当待标定的摄像模组的FOV增大时,在设置第一预设标定板时,其中的圆形特征点的直径相对可以增大。FOV越大,说明摄像模组采集图像时能够覆盖的面积越广,因此,圆形特征点的直径较大时,有利于对采集的图像进行分析。相反,如果FOV越小,第一预设标定板中的圆形特征点的直径可以设置为较小。As a possible implementation method, the feature points in the calibration plate can be adjusted based on the parameters of the camera module. In some embodiments, in order to reduce test errors, when the FOV of the camera module to be calibrated increases, when the first preset calibration plate is set, the diameter of the circular feature points can be relatively increased. The larger the FOV, the wider the area that the camera module can cover when collecting images. Therefore, when the diameter of the circular feature points is larger, it is beneficial to analyze the collected images. On the contrary, if the FOV is smaller, the diameter of the circular feature points in the first preset calibration plate can be set smaller.
在另一些实施例中,当摄像模组的振动角度增大时,在设置第一预设标定板时,其中的圆形特征点的直径可以相对减小;相反,振动角度越小,第一预设标定板中设置的圆形特征点的直径可以相对增大。振动角度增加,则在摄像模组采集的图像中,相邻的特征点的运动轨迹可能会重合,模糊部分可能会发生重叠。这样不利于基于图像中的圆形特征点分析抖动效果。因此,为了使摄像模组可以采集到较多圆形特征点的运动轨迹,可以减小特征点的直径,从而减少因振动角度太大导致不同特征点的运动轨迹重合的问题,提高OIS标定的精准度。In other embodiments, when the vibration angle of the camera module increases, when setting the first preset calibration plate, the diameter of the circular feature points can be relatively reduced; conversely, the smaller the vibration angle, the smaller the diameter of the first preset calibration plate. The diameter of the circular feature points set in the preset calibration plate can be relatively increased. As the vibration angle increases, in the images collected by the camera module, the motion trajectories of adjacent feature points may overlap, and the blurred parts may overlap. This is not conducive to analyzing the jitter effect based on circular feature points in the image. Therefore, in order to enable the camera module to collect the motion trajectories of more circular feature points, the diameter of the feature points can be reduced, thereby reducing the problem of overlapping motion trajectories of different feature points due to too large vibration angles, and improving the accuracy of OIS calibration. Accuracy.
在一些实施例中,将摄像模组在不同马达增益采集的图像的数量记为N。结合上述实施例的说明可知,N张图像是分别在摄像模组的马达设置为不同的增益时采集的。N的数值可以是提前设置好的,也可以是个人计算机根据摄像模组所采集的图像分析光学防抖动的效果之后确定的。In some embodiments, the number of images collected by the camera module at different motor gains is recorded as N. Based on the description of the above embodiments, it can be seen that the N images are collected when the motor of the camera module is set to different gains. The value of N can be set in advance, or it can be determined by a personal computer after analyzing the effect of optical anti-shake based on the image collected by the camera module.
由上述实施例的说明可知,第二指令可以仅携带一个预设数值。在该实施例中,摄像模组可以在接收到不同的第二指令之后,分别控制马达的增益调整为与各第二指令对应的预设数值,并在马达的增益调整之后,对第一预设标定板采集图像。It can be seen from the description of the above embodiments that the second command may only carry a preset value. In this embodiment, after receiving different second instructions, the camera module can respectively control the gain of the motor to adjust to a preset value corresponding to each second instruction, and after adjusting the gain of the motor, adjust the first preset value. Set up the calibration plate to collect images.
在另一些实施例中,第二指令可以携带多个预设数值。在该实施例中,摄像模组可以在接收到第二指令之后,分别控制马达的增益调整为不同的预设数值,并在马达设置为不同的增益时对第一预设标定板采集图像。其中,第二指令携带的预设数值包括N个。In other embodiments, the second instruction may carry multiple preset values. In this embodiment, after receiving the second instruction, the camera module can control the gain of the motor to adjust to different preset values, and collect images from the first preset calibration plate when the motor is set to different gains. The second command carries N preset values.
在另一些实施例中,第二指令可以携带增益的调整规则。在该实施例中,摄像模组可以在按照调整规则对马达的增益进行调整,并在马达设置为增益时对第一预设标定板采集图像。在一些实施例中,摄像模组累计采集N张图像。In other embodiments, the second instruction may carry a gain adjustment rule. In this embodiment, the camera module can adjust the gain of the motor according to the adjustment rules, and collect images of the first preset calibration plate when the motor is set to gain. In some embodiments, the camera module collects N images cumulatively.
应理解,上述S404和S405均是摄像模组在接收到第二指令之后执行的操作。如果第二指令携带一个预设数值,那么个人计算机向摄像模组发送一次第二指令,则摄像模组依次执行S404和S405。It should be understood that the above-mentioned S404 and S405 are operations performed by the camera module after receiving the second instruction. If the second command carries a preset value, the personal computer sends the second command to the camera module once, and the camera module executes S404 and S405 in sequence.
如果第二指令携带多个预设数值,那么个人计算机向摄像模组发送一次第二指令,则在S404中,摄像模组可以响应于第二指令将马达的增益调整为其中一个预设数值之后,执行S405,即对第一预设标定板采集图像。然后返回S404,摄像模组将马达的增益调整为另一个预设数值,再执行S405,对第一预设标定板采集新的图像。以此类推,直至遍历第二指令中的所有预设数值。If the second command carries multiple preset values, then the personal computer sends a second command to the camera module. Then in S404, the camera module can adjust the gain of the motor to one of the preset values in response to the second command. , execute S405, that is, collect images of the first preset calibration plate. Then return to S404, the camera module adjusts the gain of the motor to another preset value, and then executes S405 to collect a new image of the first preset calibration plate. And so on until all the preset values in the second command are traversed.
同理,如果第二指令携带的是马达增益的调整规则,那么在首次执行S404时,摄像模组响应于第二指令可以先将马达的增益设置为初始值,然后执行S405,对第一预设标定板采集图像。然后再返回S404,摄像模组基于第二指令中的调整规则调整马达的增益,再执行S405,对第一预设标定板采集新的图像;以此类推。Similarly, if the second instruction carries the adjustment rule of the motor gain, then when S404 is executed for the first time, the camera module can first set the gain of the motor to the initial value in response to the second instruction, and then execute S405 to adjust the first predetermined value. Set up the calibration plate to collect images. Then return to S404, the camera module adjusts the gain of the motor based on the adjustment rule in the second instruction, and then executes S405 to collect a new image of the first preset calibration plate; and so on.
其中,摄像模组对第一预设标定板采集图像,可以手动操作实现;例如相关人员手动触发摄像模组的图像采集操作。或者,摄像模组也可以是响应于第二指令,在马达的增益调整为预设数值之后,自动执行对第一预设标定板的图像采集操作。Among them, the camera module can collect images of the first preset calibration plate through manual operation; for example, relevant personnel manually trigger the image acquisition operation of the camera module. Alternatively, the camera module may also respond to the second instruction and automatically perform an image acquisition operation on the first preset calibration plate after the gain of the motor is adjusted to a preset value.
应理解,在摄像模组自动执行图像采集操作的实施例中,第二指令还用于指示摄像模组在马达的增益调整为预设数值之后对第一预设标定板采集图像。在该实施例中,摄像模组可以在响应于第二指令控制调整马达的增益为预设数值之后,再控制摄像模组对第一预设标定板采集图像。It should be understood that in the embodiment where the camera module automatically performs the image acquisition operation, the second instruction is also used to instruct the camera module to collect images of the first preset calibration plate after the gain of the motor is adjusted to a preset value. In this embodiment, the camera module may control the camera module to collect images of the first preset calibration plate after controlling the gain of the adjustment motor to a preset value in response to the second instruction.
当第二指令包括多个预设数值时,摄像模组分别在控制马达设置为不同的预设数值时,对第一预设标定板采集一次图像。同样的,在该实施例中,摄像模组对第一预设标定板采集图像,可以在马达的增益调整为不同的预设数值之后由人工手动操作或自动执行。When the second command includes multiple preset values, the camera module collects an image of the first preset calibration plate once when the control motor is set to different preset values. Similarly, in this embodiment, the camera module collects images of the first preset calibration plate, which can be manually operated or automatically performed after the gain of the motor is adjusted to different preset values.
结合上述S401-S404可知,摄像模组在执行S405采集图像时,摄像模组处于振动状态,且摄像模组的光学防抖动(OIS)功能开启。在一些实施例中,将这一拍摄状态记为第一拍摄状态。Combining the above S401-S404, it can be seen that when the camera module performs S405 to collect images, the camera module is in a vibrating state, and the optical anti-shake (OIS) function of the camera module is turned on. In some embodiments, this shooting state is noted as the first shooting state.
S406.摄像模组向个人计算机发送图像。S406. The camera module sends the image to the personal computer.
由上述实施例中的说明可知,第二指令可能携带一个预设数值。在该实施例中,摄像模组在执行上述S405之后,摄像模组可以将本次采集的一张图像发送至个人计算机。之后,如果摄像模组接收到个人计算机发送的新的第二指令,再响应于该新的第二指令依次执行S404-S406;以此类推。It can be seen from the description in the above embodiments that the second command may carry a preset value. In this embodiment, after the camera module executes the above S405, the camera module can send an image collected this time to the personal computer. Afterwards, if the camera module receives a new second command sent by the personal computer, it will sequentially execute S404-S406 in response to the new second command; and so on.
在另一些实施例中,第二指令可以携带多个预设数值,或者第二指令携带马达增益的调整规则。在一些实施例中,摄像模组在执行上述S404和S405时,先将马达的增益调整为其中一个预设数值,对第一预设标定板采集图像之后,可以先执行S406,即将采集的图像发送给个人计算机。在另一些实施例中,摄像模组在实现上述S404和S405时,可以在马达分别调整为不同的预设数值时对第一预设标定板采集图像,即在获得不同马达增益分别对应的图像之后,再执行S406。即上述S406具体包括:摄像模组将在马达设置为不同的增益值时采集的多张图像发送至个人计算机。In other embodiments, the second instruction may carry a plurality of preset values, or the second instruction may carry an adjustment rule for the motor gain. In some embodiments, when executing the above S404 and S405, the camera module first adjusts the gain of the motor to one of the preset values. After collecting the image of the first preset calibration plate, the camera module can first execute S406 to collect the image. Send to PC. In other embodiments, when implementing the above S404 and S405, the camera module can collect images of the first preset calibration plate when the motors are adjusted to different preset values, that is, images corresponding to different motor gains are obtained. After that, execute S406 again. That is, the above-mentioned S406 specifically includes: the camera module sends multiple images collected when the motor is set to different gain values to the personal computer.
在第二指令携带多个预设数值,或者第二指令携带马达增益的调整规则的另一些实施例中,上述S406还可以设置预设数量。在摄像模组采集的图像达到预设数量时,摄像模组执行S406。示例性的,摄像模组在每采集5张图像之后,向个人计算机发送该5张图像,然后继续采集新的5张图像,再向个人计算机发送新的5张图像;以此类推。In other embodiments in which the second command carries multiple preset values, or the second command carries an adjustment rule for the motor gain, the above S406 may also set a preset number. When the images collected by the camera module reach the preset number, the camera module executes S406. For example, after every five images collected, the camera module sends the five images to the personal computer, then continues to collect five new images, and then sends the new five images to the personal computer; and so on.
应理解,上述S406也表示为个人计算机接收摄像模组发送的图像。It should be understood that the above S406 also represents the personal computer receiving the image sent by the camera module.
S407.个人计算机获取图像中特征点的抖动情况。S407. The personal computer obtains the jitter of the feature points in the image.
在一些实施例中,第一预设标定板包括一个特征点。在该实施例中,上述S407具体包括获取该特征点的抖动情况。In some embodiments, the first preset calibration plate includes a feature point. In this embodiment, the above-mentioned S407 specifically includes obtaining the jitter condition of the feature point.
在另一些实施例中,第一预设标定板包括多个特征点。在该实施例中,上述S407具体包括分别获取第一预设标定板中一个或多个特征点的抖动情况。In other embodiments, the first preset calibration plate includes a plurality of feature points. In this embodiment, the above-mentioned S407 specifically includes obtaining the jitter conditions of one or more feature points in the first preset calibration plate.
S408.个人计算机根据图像中特征点的抖动情况,确定图像的抖动中心。S408. The personal computer determines the jitter center of the image based on the jitter of the feature points in the image.
其中,抖动中心用于指示图像中抖动最小的位置。由上述实施例的说明可知,在棱镜的X方向和Y方向上进行OIS处理的摄像模组的OIS功能开启之后,在外界处于抖动的情况下,摄像模组采集的图像可能存在像旋问题。像旋表示图像以一个原点为中心产生旋转。因此,按照上述S401-S405所采集的图像,可能存在像旋问题。也就是说在上述摄像模组采集的每一张图像中,都可能存在一个图像旋转的原点,在本申请实施例中将该原点记为抖动中心。可以理解的,该抖动中心所在的位置是图像中抖动最小的位置。应理解,在其他实施例中,该抖动中心也可以命名为如像旋中心等其他名称。Among them, the jitter center is used to indicate the position in the image where the jitter is minimal. It can be seen from the description of the above embodiments that after the OIS function of the camera module that performs OIS processing in the X and Y directions of the prism is turned on, the image collected by the camera module may have an image rotation problem when the outside world is shaken. Image rotation means that the image is rotated around an origin. Therefore, there may be an image rotation problem in the images collected according to the above S401-S405. That is to say, in each image collected by the above-mentioned camera module, there may be an origin of image rotation. In the embodiment of this application, the origin is recorded as the jitter center. It can be understood that the location of the jitter center is the location with the smallest jitter in the image. It should be understood that in other embodiments, the jitter center can also be named by other names such as a rotation center.
在一些实施例中,第一预设标定板包括一个特征点。在该实施例中,基于该特征点的抖动情况进行分析,确定图像的抖动中心所在的位置。In some embodiments, the first preset calibration plate includes a feature point. In this embodiment, the jitter situation of the feature point is analyzed to determine the location of the jitter center of the image.
在另一些实施例中,摄像模组是对包括多个特征点的第一预设标定板采集得到的图像,因此在本申请实施例中,可以结合图像中各特征点的抖动情况来确定抖动中心。In other embodiments, the camera module collects images from a first preset calibration plate including multiple feature points. Therefore, in the embodiment of the present application, the jitter can be determined based on the jitter of each feature point in the image. center.
在同一张图像中,抖动较大的位置附近的特征点将会出现较大的模糊量;相反,抖动较小的位置附近的特征点的模糊量较小。因此,在一些实施例中,在获取到摄像模组采集的图像之后,可以通过判断图像中模糊量最小的位置来确定图像的抖动中心。In the same image, feature points near locations with larger jitter will have a larger amount of blur; conversely, feature points near locations with smaller jitter will have a smaller amount of blur. Therefore, in some embodiments, after acquiring the image collected by the camera module, the jitter center of the image can be determined by determining the position with the smallest amount of blur in the image.
在另一些实施例中,也可以对摄像模组采集的原始的图像进行一定的处理之后,将特征点以及该特征点的模糊部分转换为特征对象,再判断特征对象的大小来分析特征点的抖动情况。由于特征对象包括特征点以及该特征点的模糊部分,那么模糊量越大的特征点对应的特征对象越大。相反,模糊量越小的特征点对应的特征对象越小。因此,上述S408具体可以包括:对图像进行处理,将图像中一个特征点以及该特征点对应的模糊量转换为特征对象;基于滤波处理后得到的图像中的特征对象的大小确定对应图像的抖动中心。In other embodiments, the original image collected by the camera module can also be processed to a certain extent, and the feature points and the fuzzy parts of the feature points can be converted into feature objects, and then the size of the feature objects can be determined to analyze the feature points. Jitter situation. Since the feature object includes a feature point and a fuzzy part of the feature point, a feature point with a larger amount of blur corresponds to a larger feature object. On the contrary, the smaller the blur amount, the smaller the corresponding feature object. Therefore, the above-mentioned S408 may specifically include: processing the image, converting a feature point in the image and the blur amount corresponding to the feature point into a feature object; determining the jitter of the corresponding image based on the size of the feature object in the image obtained after filtering. center.
在一些实施例中,如图7所示,上述S408包括S701-S703,其中:In some embodiments, as shown in Figure 7, the above-mentioned S408 includes S701-S703, wherein:
S701.对图像进行滤波处理,得到滤波后图像。S701. Perform filtering on the image to obtain the filtered image.
在一些实施例中,上述S701具体可以包括:对图像进行二值化处理,得到二值化处理后的图像,即上述滤波后图像。图像二值化(Image Binarization)就是将图像上的像素点的灰度值设置为0或255,也就是让整个图像呈现出明显的黑白效果的过程。In some embodiments, the above-mentioned S701 may specifically include: performing binarization processing on the image to obtain a binarized image, that is, the above-mentioned filtered image. Image Binarization is to set the grayscale value of the pixels on the image to 0 or 255, which is the process of making the entire image show an obvious black and white effect.
在一些实施例中,滤波后处理图像中包括与至少一个特征点对应的至少一个特征对象,且每个特征对象包括相应特征点以及相应特征点的模糊部分。通过分析每张滤波后图像中的特征对象的大小,可以确定每张滤波后图像对应的图像中抖动中心所在的位置。In some embodiments, the post-filtering image includes at least one feature object corresponding to at least one feature point, and each feature object includes a corresponding feature point and a blurred part of the corresponding feature point. By analyzing the size of the feature objects in each filtered image, the location of the jitter center in the image corresponding to each filtered image can be determined.
对摄像模组采集的原始的图像进行二值化处理之后,可以将特征点以及该特征点对应的模糊部分转换为一个整体的特征对象,进而可以根据特征对象的大小来判断特征点对应的模糊量。然后可以通过特征对象的大小查找到模糊量最小的特征点。最后可以基于模糊量最小的位置确定对应图像的抖动中心的位置。After binarizing the original image collected by the camera module, the feature points and the blurred part corresponding to the feature point can be converted into an overall feature object, and then the blur corresponding to the feature point can be judged based on the size of the feature object. quantity. Then the feature point with the smallest amount of blur can be found through the size of the feature object. Finally, the position of the jitter center of the corresponding image can be determined based on the position with the smallest amount of blur.
在其他实施例中,上述S701中也可以通过其它方式实现滤波处理,只要确保滤波处理得到的图像中,可以将原始图像中的特征点以及该特征点对应的模糊部分转换为一个整体的特征对象即可。In other embodiments, the filtering process in the above S701 can also be implemented in other ways, as long as it is ensured that in the image obtained by the filtering process, the feature points in the original image and the blurred parts corresponding to the feature points can be converted into an overall feature object. That’s it.
S702.在滤波后图像中查找至少一个特征对象中的最小特征对象。S702. Find the smallest feature object among at least one feature object in the filtered image.
由上述实施例的说明可知,滤波后图像中的特征对象表示的是特征点以及该特征点对应的模糊部分。抖动量越大,特征点的运动轨迹越大,采集的图像中的模糊部分越多,对应滤波后图像中的特征对象也就越大。相反,抖动量越小,特征点的运动轨迹越小,采集的图像中的模糊部分越少,对应滤波后图像中的特征对象也就越小。最小特征对象对应的特征点是图像中抖动量最小的特征点,也是模糊量最小的特征点。因此,从在查找到滤波后图像中查找到最小特征对象之后,可以基于最小特征对象确定对应图像的抖动中心的位置。It can be seen from the description of the above embodiments that the feature objects in the filtered image represent feature points and the blurred parts corresponding to the feature points. The larger the amount of jitter, the larger the motion trajectory of the feature points, the more blurred parts in the collected image, and the larger the corresponding feature object in the filtered image. On the contrary, the smaller the amount of jitter, the smaller the motion trajectory of the feature points, the fewer blurred parts in the collected image, and the smaller the feature object in the corresponding filtered image. The feature point corresponding to the smallest feature object is the feature point with the smallest amount of jitter in the image, and it is also the feature point with the smallest amount of blur. Therefore, after finding the minimum feature object in the filtered image, the position of the jitter center of the corresponding image can be determined based on the minimum feature object.
在一些实施例中,上述S702具体可以通过比较同一滤波后图像中各特征对象之间的大小来查找最小特征对象。例如,在滤波后图像中找到某一个特征对象A,针对该特征对象A而言,周围的其他特征对象的大小都大于或者等于特征对象A的大小,则可以确定特征对象A是最小特征对象。其中,特征对象的大小具体可以是特征对象的长度或者面积等。In some embodiments, the above-mentioned S702 may specifically find the smallest feature object by comparing the sizes of feature objects in the same filtered image. For example, if a certain feature object A is found in the filtered image, and for this feature object A, the sizes of other surrounding feature objects are greater than or equal to the size of feature object A, then it can be determined that feature object A is the smallest feature object. The size of the feature object may specifically be the length or area of the feature object, etc.
如果个人计算机获取到N张图像之后再对N张图像分别确定抖动中心,则上述S702具体可以包括:分别在N张滤波后图像的每张滤波后图像中查找至少一个特征对象中的最小特征对象。If the personal computer obtains N images and then determines the jitter center for the N images respectively, the above-mentioned S702 may specifically include: searching for the smallest characteristic object among at least one characteristic object in each filtered image of the N filtered images. .
S703.基于最小特征对象,确定滤波后图像对应的图像中抖动中心所在的位置。S703. Based on the minimum feature object, determine the location of the jitter center in the image corresponding to the filtered image.
在不同马达增益对应的图像中,图像的抖动中心所在的位置可能是不相同的。在一些实施例中,图像的抖动中心可能处于图像以外,或者图像的抖动中心可能处于图像以内。In images corresponding to different motor gains, the location of the jitter center of the image may be different. In some embodiments, the jitter center of the image may be outside the image, or the jitter center of the image may be within the image.
在一些实施例中,上述S703具体可以包括:在目标滤波后图像中,若最小特征对象处于目标滤波后图像的边缘,且最小特征对象的大小超出第二预设阈值,则确定抖动中心在目标滤波后图像对应的图像以外。In some embodiments, the above-mentioned S703 may specifically include: in the target filtered image, if the smallest feature object is at the edge of the target filtered image, and the size of the smallest feature object exceeds the second preset threshold, determine that the jitter center is at the target Other than the image corresponding to the filtered image.
其中,目标滤波后图像是N张滤波后图像中的任意一张滤波后图像。Among them, the target filtered image is any filtered image among the N filtered images.
由于图像的抖动中心是抖动(模糊量)最小的位置,如果抖动中心处于图像以内,那么抖动中心所在位置附近的特征点的模糊量较小,此时特征点以及与该特征点对应的特征对象的大小应当是接近的。因此,在一些实施例中,可以通过设置第二预设阈值对特征对象的大小进行判断,确定图像的抖动中心是否处于图像内。其中,第二预设阈值用于衡量特征对象的大小。第二预设阈值可以根据摄像模组在没有抖动(振动)时对第一预设标定板采集的图像中特征点的大小进行设置。示例性的,第二预设阈值可以设置为没有抖动时摄像模组采集的图像中的特征点大小的1.2倍或其他倍数。Since the jitter center of the image is the position with the smallest jitter (blur amount), if the jitter center is within the image, then the blur amount of the feature points near the jitter center is small. At this time, the feature points and the feature objects corresponding to the feature points should be close in size. Therefore, in some embodiments, the size of the characteristic object can be judged by setting a second preset threshold to determine whether the jitter center of the image is within the image. Wherein, the second preset threshold is used to measure the size of the feature object. The second preset threshold can be set according to the size of the feature points in the image collected by the first preset calibration plate when the camera module has no jitter (vibration). For example, the second preset threshold can be set to 1.2 times or other multiples of the size of the feature points in the image captured by the camera module when there is no shaking.
如果在目标滤波后图像中找到最小特征对象的大小处于目标滤波后图像的边缘,并且这个最小特征对象的大小超出了第二预设阈值,那么可以认为目标滤波后图像对应图像的抖动中心并没有出现在标滤波后图像对应的图像以内。在一些实施例中,由于OIS标定的目标是要找到抖动中心与图像中心尽量接近的位置,因此在确定抖动中心没有处于图像以内的情况下,可以不需要确定该图像的抖动中心的具体位置。If the size of the smallest feature object found in the target filtered image is at the edge of the target filtered image, and the size of this smallest feature object exceeds the second preset threshold, then it can be considered that the jitter center of the image corresponding to the target filtered image does not Appears within the image corresponding to the standard filtered image. In some embodiments, since the goal of OIS calibration is to find a position as close as possible to the center of the jitter and the center of the image, there is no need to determine the specific position of the jitter center of the image when it is determined that the jitter center is not within the image.
在另一些实施例中,如果在目标滤波后图像中,找到的最小特征对象并非处于目标滤波后图像的边缘,或者,目标滤波后图像中的最小特征对象的大小未超出第二预设阈值,则基于最小特征对象在目标滤波后图像中的位置确定抖动中心所在的位置。In other embodiments, if in the target filtered image, the smallest feature object found is not at the edge of the target filtered image, or the size of the smallest feature object in the target filtered image does not exceed the second preset threshold, Then the location of the jitter center is determined based on the position of the minimum feature object in the target filtered image.
由上述实施例的说明可知,最小特征对象如果出现在滤波后图像的边缘且大小超出第二预设阈值时,判定抖动中心在该滤波后图像对应的图像以外。那么相反,如果最小特征对象在滤波后图像的边缘但是该最小特征对象的大小没有超出第二预设阈值,或者该最小特征对象没有处于滤波后图像的边缘,那么则可以判定此时抖动中心处于该滤波后图像对应的图像以内。之后,再基于最小特征对象的位置来确定抖动中心的位置。It can be seen from the description of the above embodiment that if the smallest feature object appears at the edge of the filtered image and the size exceeds the second preset threshold, it is determined that the jitter center is outside the image corresponding to the filtered image. On the contrary, if the minimum feature object is at the edge of the filtered image but the size of the minimum feature object does not exceed the second preset threshold, or the minimum feature object is not at the edge of the filtered image, then it can be determined that the jitter center is at this time Within the image corresponding to the filtered image. After that, the location of the jitter center is determined based on the location of the smallest feature object.
在一些实施例中,第一预设标定板多个特征点,且特征点是周期性排列的,特征点之间可能存在一定间隔。在部分图像中,抖动中心的位置可能正好处于某一个特征点(特征对象)的中心位置。此时,可以直接获取该图像中最小特征对象对应的中心位置。在一些实施例中,上述基于最小特征对象在目标滤波后图像中的位置确定抖动中心所在的位置,具体可以包括:若最小特征对象包括一个特征对象,则将最小特征对象的中心所在位置确定为抖动中心所在位置。In some embodiments, the first preset calibration plate has multiple feature points, and the feature points are arranged periodically, and there may be a certain interval between the feature points. In some images, the jitter center may be exactly at the center of a feature point (feature object). At this time, the center position corresponding to the smallest feature object in the image can be directly obtained. In some embodiments, determining the location of the jitter center based on the location of the minimum feature object in the target filtered image may specifically include: if the minimum feature object includes one feature object, then determining the location of the center of the minimum feature object as The location of the jitter center.
而在另一部分图像中,抖动中心所在的位置可能处于特征点与特征点之间的间隔中。在该实施例中的图像中可能存在多个特征对象的大小相同。此时,可以基于多个最小特征对象所在的位置,来拟合图像的抖动中心所在的位置。在一些实施例中,上述基于最小特征对象在目标滤波后图像中的位置确定抖动中心所在的位置,具体可以包括:若最小特征对象包括两个以上特征对象,则基于最小特征对象所在的位置,拟合抖动中心所在的位置。In another part of the image, the location of the jitter center may be in the interval between feature points. In the image in this embodiment, there may be multiple feature objects of the same size. At this time, the location of the jitter center of the image can be fitted based on the locations of multiple minimum feature objects. In some embodiments, determining the location of the jitter center based on the position of the minimum feature object in the target filtered image may specifically include: if the minimum feature object includes more than two feature objects, based on the location of the minimum feature object, Fit the location of the jitter center.
示例性的,如果滤波后图像中包括4个相同大小的最小特征对象,则可以将抖动中心的位置确定为该4个最小特征对象组成的区域的中心位置。在其他实施例中,基于两个以上最小特征对象所在的位置,拟合图像的抖动中心所在的位置,也可以通过其他任意一种方式实现,在本申请中对此不予限定。For example, if the filtered image includes four minimum feature objects of the same size, the position of the jitter center can be determined as the center position of the area composed of the four minimum feature objects. In other embodiments, based on the locations of two or more minimum feature objects, the location of the jitter center of the fitted image can also be implemented in any other manner, which is not limited in this application.
在本申请实施例提供的技术方案中,结合最小特征对象的数量来查找抖动中心的位置,可以帮助快速有效的查找到抖动中心的位置。In the technical solution provided by the embodiments of this application, finding the location of the jitter center based on the number of minimum feature objects can help quickly and effectively find the location of the jitter center.
如图8中的a、b和c所示为一些实施例中滤波后图像的示意图。其中801、802和803等分别表示不同的特征对象。如图8中的a所示,个人计算机可以查找到滤波后图像中的最小特征对象处于图像边缘,且最小特征对象的大小超出第二预设阈值,则确定抖动中心在目标滤波后图像对应的图像以外,示例性的,图8中的a的抖动中心可以处于801所示位置。如图8中的b所示,在查找到滤波后图像中的最小特征对象未处于滤波后图像的边缘,则确定抖动中心在图像以内。之后可以基于图8中的b中的最小特征对象(如图中802所示)确定抖动中心所在的位置。在另一些实施例中,也可以在查找到最小特征对象处于图像边缘但最小特征对象(如图中803所示)的大小未超出第二预设阈值时,确定图像的抖动中心处于图像以内。如图8中的c所示,滤波后图像中的最小特征对象处于图像中心,也就表示该滤波后图像对应图像的抖动中心处于图像中心。As shown in a, b and c in Figure 8, schematic diagrams of filtered images in some embodiments are shown. Among them, 801, 802 and 803 respectively represent different characteristic objects. As shown in a in Figure 8, the personal computer can find that the smallest feature object in the filtered image is at the edge of the image, and the size of the smallest feature object exceeds the second preset threshold, then it is determined that the jitter center is in the target filtered image corresponding to In addition to the image, for example, the jitter center of a in Figure 8 can be at the position shown as 801. As shown in b in Figure 8, after finding that the smallest feature object in the filtered image is not at the edge of the filtered image, it is determined that the jitter center is within the image. Then the location of the jitter center can be determined based on the minimum feature object in b in Figure 8 (shown as 802 in the figure). In other embodiments, when the smallest feature object is found to be at the edge of the image but the size of the smallest feature object (shown as 803 in the figure) does not exceed the second preset threshold, it can be determined that the jitter center of the image is within the image. As shown in c in Figure 8, the smallest feature object in the filtered image is in the center of the image, which means that the jitter center of the corresponding image in the filtered image is in the center of the image.
在本申请实施例提供的技术方案中,设置第二预设阈值来区分抖动中心是否处于图像以内,当确定抖动中心处于图像以外时,需继续调整马达的增益使抖动中心移动至图像以内。在确定抖动中心处于图像以内之后,再对马达增益进行调整,使图像的抖动中心可以移动到图像中心。这样,可以便于确定马达的最佳增益值。由于对摄像模组采集的原始图像进行了滤波处理,可以直接通过比较特征对象的大小来确定抖动中心位置。不需要计算特征点的模糊量,可以减少标定过程中的计算量,提高OIS标定的效率。In the technical solution provided by the embodiment of the present application, a second preset threshold is set to distinguish whether the jitter center is within the image. When it is determined that the jitter center is outside the image, the gain of the motor needs to be continuously adjusted to move the jitter center within the image. After confirming that the jitter center is within the image, adjust the motor gain so that the jitter center of the image can move to the center of the image. In this way, the optimal gain value of the motor can be easily determined. Since the original image collected by the camera module is filtered, the shaking center position can be determined directly by comparing the size of the characteristic object. There is no need to calculate the fuzzy amount of feature points, which can reduce the calculation amount during the calibration process and improve the efficiency of OIS calibration.
S409.个人计算机确定抖动中心与图像中心之间的距离满足预设条件的目标图像。S409. The personal computer determines the target image whose distance between the jitter center and the image center satisfies the preset condition.
在一些实施例中,预设条件用于指示图像的抖动中心与图像中心之间的距离在采集的不同图像中距离最小,且距离小于第一预设阈值。应理解,由于马达的生产差异,可能出现无论怎么调整马达的增益,都无法使抖动中心与图像中心完全重合。因此在本申请实施例中,只要查找到抖动中心与图像中心之间的距离小于一定值,并且是所有图像中抖动中心与图像中心之间的距离中最小的一个距离,即可将该图像对应的马达增益确定为马达的最佳增益值。在本申请实施例中,将满足预设条件的图像记为目标图像。In some embodiments, the preset condition is used to indicate that the distance between the jitter center of the image and the center of the image is the smallest among different collected images, and the distance is smaller than the first preset threshold. It should be understood that due to differences in the production of motors, it may happen that no matter how the gain of the motor is adjusted, the jitter center and the image center cannot be completely coincident. Therefore, in the embodiment of the present application, as long as the distance between the jitter center and the image center is found to be less than a certain value and is the smallest distance between the jitter center and the image center in all images, the image can be corresponding to The motor gain is determined as the optimal gain value of the motor. In this embodiment of the present application, images that meet preset conditions are recorded as target images.
在一些实施例中,个人计算机可以是在获取到摄像模组采集的N张图像之后,再分别对N张图像执行S408,即确定各图像的抖动中心。在该实施例中,上述S409具体可以包括:个人计算机在N张图像中查找抖动中心与图像中心之间的距离满足预设条件的目标图像。In some embodiments, after acquiring the N images collected by the camera module, the personal computer may perform S408 on the N images respectively, that is, determine the jitter center of each image. In this embodiment, the above-mentioned S409 may specifically include: the personal computer searches the N images for a target image whose distance between the jitter center and the image center satisfies the preset condition.
进一步的,个人计算机在N张图像中查找抖动中心与图像中心之间的距离满足预设条件的目标图像,具体可以包括:个人计算机分别判断每一张图像的抖动中心与图像中心之间的距离是否满足预设条件。Further, the personal computer searches the N images for a target image whose distance between the jitter center and the image center satisfies the preset condition. Specifically, the personal computer determines the distance between the jitter center and the image center of each image. Whether the preset conditions are met.
在另一些实施例中,个人计算机也可以是在每获取到摄像模组采集的一张图像之后即执行S407和S408,查找该图像的抖动中心。在该实施例中,如图9所示,上述S409具体可以包括S901和S902:In other embodiments, the personal computer may also execute S407 and S408 after each image acquired by the camera module to find the jitter center of the image. In this embodiment, as shown in Figure 9, the above-mentioned S409 may specifically include S901 and S902:
S901.个人计算机判断当前图像的抖动中心与图像中心之间的距离是否满足预设条件。S901. The personal computer determines whether the distance between the jitter center of the current image and the image center meets the preset conditions.
在该实施例中,预设条件用于指示当前图像的抖动中心与图像中心之间的距离在已获取到所有图像中距离最小,且距离小于第一预设阈值。如果当前图像的抖动中心与图像中心之间的距离满足预设条件,即表示当前图像即为目标图像。In this embodiment, the preset condition is used to indicate that the distance between the jitter center of the current image and the image center is the smallest among all acquired images, and the distance is smaller than the first preset threshold. If the distance between the jitter center of the current image and the image center meets the preset conditions, it means that the current image is the target image.
S902.个人计算机将当前图像确定为目标图像。S902. The personal computer determines the current image as the target image.
在另一些实施例中,第二指令携带马达的增益的调整规则时,在摄像模组控制马达的增益按照大小顺序进行调整为不同的预设数值时,在个人计算机每获取摄像模组发送的一张图像之后执行S407的实施例中,如果在S409中确定当前图像的抖动中心与图像中心之间的距离满足预设条件,那么可以直接基于当前图像确定马达的标定增益值。即,如果当前图像的抖动中心与图像中心之间的距离满足预设条件,那么摄像模组可以不需要再继续采集新的图像。In other embodiments, when the second instruction carries the adjustment rule for the gain of the motor, when the camera module controls the gain of the motor to be adjusted to different preset values in order of magnitude, the personal computer obtains the information sent by the camera module every time. In the embodiment where S407 is performed after an image, if it is determined in S409 that the distance between the jitter center of the current image and the image center satisfies the preset condition, then the calibrated gain value of the motor can be determined directly based on the current image. That is, if the distance between the jitter center of the current image and the image center meets the preset conditions, the camera module does not need to continue to collect new images.
在一些实施例中,在确定当前图像的抖动中心与图像中心之间的距离满足预设条件之后,上述方法还包括:个人计算机可以停止获取摄像模组采集的图像,摄像模组可以不用再继续使用设置其他马达增益值采集图像。In some embodiments, after determining that the distance between the jitter center of the current image and the image center satisfies the preset condition, the above method further includes: the personal computer can stop acquiring the images collected by the camera module, and the camera module does not need to continue. Acquire images using setting other motor gain values.
在第二指令包括一个预设数值的实施例中,个人计算机可以停止向摄像模组发送第二指令。在第二指令包括多个预设数值或者第二指令包括马达增益的调整规则的实施例中,在S409中确定当前图像的抖动中心与图像中心之间的距离满足预设条件之后,个人计算机可以向摄像模组发送第三指令。其中,第三指令可以用于指示摄像模组停止调整马达的增益,以及停止对第一预设标定板采集图像。In the embodiment where the second command includes a preset value, the personal computer may stop sending the second command to the camera module. In an embodiment in which the second instruction includes a plurality of preset values or the second instruction includes an adjustment rule for the motor gain, after it is determined in S409 that the distance between the jitter center of the current image and the image center satisfies the preset condition, the personal computer may Send a third command to the camera module. The third instruction may be used to instruct the camera module to stop adjusting the gain of the motor and stop collecting images of the first preset calibration plate.
应理解,上述实例中在S901之后,若确定当前图像的抖动中心与图像中心之间的距离不满足预设条件,则可以返回S403,依次执行S403-S408,重新采集新的图像并分析是否满足预设条件。It should be understood that after S901 in the above example, if it is determined that the distance between the jitter center of the current image and the image center does not meet the preset conditions, you can return to S403, execute S403-S408 in sequence, re-acquire a new image and analyze whether it meets the preset conditions. Preset conditions.
在本申请实施例提供的技术方案中,如果摄像模组在标定过程中马达的增益是按照大小顺序进行调整的,那么在找到一张图像的抖动中心与图像中心满足预设条件,则可以控制摄像模组停止采集新的图像。这样,可以减少不必要的图像采集。同时个人计算机不需要再对后面采集的图像查找抖动中心、确定抖动中心与图像中心之间的距离,因此可以减少OIS标定的时间,提高OIS标定的效率。In the technical solution provided by the embodiment of this application, if the gain of the motor of the camera module is adjusted in order of size during the calibration process, then when the jitter center of an image and the image center are found to meet the preset conditions, it can be controlled The camera module stops collecting new images. In this way, unnecessary image acquisition can be reduced. At the same time, the personal computer no longer needs to search for the jitter center of the images collected later and determine the distance between the jitter center and the image center. Therefore, the time of OIS calibration can be reduced and the efficiency of OIS calibration can be improved.
S410.个人计算机获取采集目标图像时马达对应的目标增益,并将目标增益确定为马达的标定增益值。S410. The personal computer obtains the target gain corresponding to the motor when collecting the target image, and determines the target gain as the calibrated gain value of the motor.
由上述实施例的说明可知,如果查找到抖动中心与图像中心之间的距离满足预设条件,即表示在这一图像中,图像中心或者图像中心较近的位置的防抖动效果是整张图像中最好的。因此,可以将这一张图像所对应马达的增益(目标增益),确定为马达的标定增益值,使得该马达设置为标定增益时,确保图像中心(镜头画面中心)的光学防抖动效果最佳。It can be seen from the description of the above embodiment that if the distance between the shake center and the image center is found to meet the preset conditions, it means that in this image, the anti-shake effect of the image center or a position closer to the image center is the entire image. The best in images. Therefore, the gain (target gain) of the motor corresponding to this image can be determined as the calibrated gain value of the motor, so that when the motor is set to the calibrated gain, the optical anti-shake effect at the center of the image (center of the lens screen) is ensured to be optimal. good.
在本申请实施例提供的技术方案中,通过对摄像模组在不同的马达增益时采集的图像进行分析,在每张图像中查找抖动中心所在的位置,并且根据抖动中心与图像中心之间的距离是否小于一定值且距离在N张图像中距离最小,来查找目标图像。然后,将采集目标图像所使用的马达的增益值确定为马达的标定增益值。这样,能够尽可能确保OIS标定针对的位置是图像中心或距离图像中心较近的位置,也就是摄像模组的画面中心所在的位置,以尽可能使OIS标定的位置离图像中心近,从而提高OIS标定精确度。同时,只需要查找不同图像的抖动中心,并在确定抖动中心距离图像中心较近时即可完成OIS标定,可以帮助快速完成OIS标定过程,减少OIS标定所需的时间,提高OIS标定的效率。In the technical solution provided by the embodiment of the present application, by analyzing the images collected by the camera module at different motor gains, the location of the jitter center is found in each image, and based on the distance between the jitter center and the image center Find the target image by checking whether the distance is less than a certain value and the distance is the smallest among N images. Then, the gain value of the motor used to collect the target image is determined as the calibrated gain value of the motor. In this way, it is possible to ensure that the position targeted by the OIS calibration is the center of the image or a position closer to the center of the image, that is, where the center of the camera module is located, so that the position of the OIS calibration is as close as possible to the center of the image, thereby improving OIS calibration accuracy. At the same time, you only need to find the jitter centers of different images, and complete the OIS calibration when the jitter center is determined to be close to the image center. This can help quickly complete the OIS calibration process, reduce the time required for OIS calibration, and improve the efficiency of OIS calibration.
由上述实施例的说明可知,上述S403中个人计算机向摄像模组发送第二指令时,预设数值可以是按照预设步长进行递增或递减的。以第二指令携带一个预设数值为例,个人计算机在向摄像模组发送第二指令时控制预设数值按照预设步长进行递增或递减。It can be seen from the description of the above embodiment that when the personal computer sends the second command to the camera module in S403, the preset value may be increased or decreased according to the preset step size. Taking the second command carrying a preset value as an example, the personal computer controls the preset value to increase or decrease according to the preset step when sending the second command to the camera module.
同时,结合对图8的说明可知,在摄像模组将马达的增益设置为不同数值时,可能出现图像的抖动中心处于图像以外或者图像以内的情况。在本实施例中,预设数值从0开始递增。结合图9所示的流程,个人计算机向摄像模组发送一次第二指令,接收摄像模组采集的图像并分析:如果当前图像的图像中心与抖动中心之间的距离不满足预设条件。然后个人计算机再向摄像模组发送新的第二指令,再接收摄像模组发送的新的图像进行分析。At the same time, combined with the description of Figure 8, it can be seen that when the camera module sets the gain of the motor to different values, the jitter center of the image may be outside the image or within the image. In this embodiment, the preset value starts from 0 and increases. Combined with the process shown in Figure 9, the personal computer sends a second command to the camera module, receives the image collected by the camera module and analyzes: if the distance between the image center of the current image and the jitter center does not meet the preset conditions. Then the personal computer sends a new second command to the camera module, and then receives the new image sent by the camera module for analysis.
由于抖动中心处于图像以外时无法确定抖动中心的具体位置,因此在在个人计算机首次向摄像模组发送第二指令时,可以以第一预设步长对预设数值进行递增。在预设数值(马达的增益)递增的过程中,摄像模组采集的图像中抖动中心将会随之移动。当抖动中心出现在图像以内时,可以确定抖动中心的具体位置。其中,第一预设步长可以根据实际情况进行设置。Since the specific location of the jitter center cannot be determined when the jitter center is outside the image, when the personal computer sends the second command to the camera module for the first time, the preset value can be incremented by the first preset step. As the preset value (motor gain) increases, the jitter center in the images captured by the camera module will move accordingly. When the jitter center appears within the image, the specific location of the jitter center can be determined. Among them, the first preset step size can be set according to the actual situation.
在抖动中心开始出现在图像以内之后,可以结合两张图像中抖动中心的位置的移动距离,以及该两张图像分别对应的马达的增益的差值,来确定马达的增益值和抖动中心之间的变化的关联关系,或者称为敏感度。然后基于所确定的变化关联关系控制调整马达的增益值,使图像的抖动中心快速移动到图像中心的位置。从而减少标定所需的次数和时间,提高标定的效率。After the jitter center begins to appear within the image, the distance between the position of the jitter center in the two images and the difference in gain of the motor corresponding to the two images can be combined to determine the gain value of the motor and the jitter center. The relationship between changes, or sensitivity. Then based on the determined change correlation, the gain value of the motor is controlled and adjusted to quickly move the jitter center of the image to the center of the image. This reduces the number of times and time required for calibration and improves calibration efficiency.
在一些实施例中,上述S403中第二指令携带的预设数值从0开始逐渐递增,上述S405摄像模组在将马达的增益调整为不同的预设数值时分别采集对应的图像。相应的,上述S406中,个人计算机可以获取到不同马达增益时摄像模组采集的图像。In some embodiments, the preset value carried by the second command in S403 gradually increases from 0, and the camera module in S405 respectively collects corresponding images when adjusting the gain of the motor to different preset values. Correspondingly, in the above S406, the personal computer can obtain the images collected by the camera module at different motor gains.
在一些实施例中,上述S406包括:获取摄像模组在马达的增益设置为第一增益时采集的第一图像;第一增益大于或者等于0。然后个人计算机执行S407和S408,若确定第一图像的抖动中心处于第一图像以外,则以第一预设步长在第一增益的基础上进行递增或递减得到马达的增益。In some embodiments, the above S406 includes: acquiring the first image collected by the camera module when the gain of the motor is set to the first gain; the first gain is greater than or equal to 0. Then the personal computer executes S407 and S408. If it is determined that the jitter center of the first image is outside the first image, the gain of the motor is obtained by incrementing or decrementing the first gain with a first preset step size.
在另一些实施例中,在马达的增益从初始值开始递增或递减的过程中,获取摄像模组在马达的增益设置为第二增益时采集的第二图像;若第二图像的抖动中心处于第二图像以内,则在第二增益的基础上增加或减少第二预设步长得到第三增益,获取摄像模组采集的第三图像;基于第二图像的抖动中心和第三图像的抖动中心的移动距离,以及第二预设步长,确定目标步长;在第三增益的基础上增加或减少目标步长得到第四增益,获取摄像模组在马达的增益设置为第四增益时采集的第四图像。In other embodiments, while the gain of the motor is increasing or decreasing from the initial value, the second image collected by the camera module when the gain of the motor is set to the second gain is acquired; if the jitter center of the second image is at within the second image, then increase or decrease the second preset step size on the basis of the second gain to obtain the third gain, and obtain the third image collected by the camera module; based on the jitter center of the second image and the jitter of the third image The moving distance of the center and the second preset step size determine the target step size; increase or decrease the target step size on the basis of the third gain to obtain the fourth gain, and obtain the camera module when the gain of the motor is set to the fourth gain. The fourth image collected.
其中,第二预设步长与第一预设步长可以设置为相同也可以设置为不同。在本申请实施例中,当个人计算机确定抖动中心开始出现在图像中之后,可以只调整一次马达增益;即对第二增益调整得到第三增益。然后对马达设置为第三增益时摄像模组采集的第三图像进行分析,确定第三图像的抖动中心位置。再确定第三图像的抖动中心位置相较于第二图像的抖动中心位置移动的距离。结合第三增益和第二增益的差值,即第二预设步长,可以确定增益的变化与抖动中心的变化之间的关联关系。之后,再结合第三图像的抖动中心的位置与图像中心之间的距离,以及增益的变化与抖动中心的变化之间的关联关系,确定在第三图像的基础上,使抖动中心移动到图像中心所需要调整的增益的调整值,即上述目标步长。The second preset step size and the first preset step size may be set to be the same or different. In the embodiment of the present application, after the personal computer determines that the jitter center begins to appear in the image, the motor gain can be adjusted only once; that is, the second gain is adjusted to obtain the third gain. Then, the third image collected by the camera module when the motor is set to the third gain is analyzed to determine the jitter center position of the third image. Then determine the distance moved by the jitter center position of the third image compared to the jitter center position of the second image. Combining the difference between the third gain and the second gain, that is, the second preset step size, the correlation between the change in gain and the change in the jitter center can be determined. After that, combined with the distance between the position of the jitter center of the third image and the image center, and the correlation between the change in gain and the change in the jitter center, it is determined that on the basis of the third image, the jitter center moves to the image The adjustment value of the gain that needs to be adjusted in the center is the above target step size.
最后,个人计算机可以向摄像模组发送目标步长,指示摄像模组控制马达在第三增益的基础上按照目标步长进行调整,得到第四增益。此时,摄像模组再对第一预设标定板采集第四图像,依照上述关系,该第四图像的抖动中心与图像中心几乎重叠,也就是抖动中心与图像中心之间的距离满足预设条件。之后,摄像模组将第四图像发送至个人计算机,个人计算机对第四图像依次执行S408和S409,将会得到第四图像的抖动中心与图像中心之间的距离满足预设条件。那么,在S410中,个人计算机可以将第四图像直接确定为目标图像。从而减少标定所需要的次数,提高OIS标定的效率。Finally, the personal computer can send the target step size to the camera module, instructing the camera module to control the motor to adjust according to the target step size based on the third gain to obtain the fourth gain. At this time, the camera module collects the fourth image of the first preset calibration plate. According to the above relationship, the jitter center of the fourth image almost overlaps with the image center, that is, the distance between the jitter center and the image center meets the preset condition. Afterwards, the camera module sends the fourth image to the personal computer, and the personal computer sequentially executes S408 and S409 on the fourth image, and will obtain that the distance between the jitter center of the fourth image and the image center satisfies the preset condition. Then, in S410, the personal computer can directly determine the fourth image as the target image. This reduces the number of times required for calibration and improves the efficiency of OIS calibration.
应理解,上述第二图像和第三图像的抖动中心分别处于各自的图像以内,但并不处于图像中心。It should be understood that the jitter centers of the above-mentioned second image and the third image are respectively within the respective images, but not at the center of the image.
在本申请实施例提供的技术方案中,在光学防抖动的标定过程中,控制马达的增益依次递增或递减,可以使抖动中心在不同图像中的位置朝一个方向变化,这样便于快速的找到抖动中心与图像中心接近的图像。从而可以提高OIS标定的速度。In the technical solution provided by the embodiment of the present application, during the calibration process of optical anti-shake, the gain of the control motor is increased or decreased sequentially, which can cause the position of the jitter center in different images to change in one direction, which facilitates rapid finding. Images where the jitter center is close to the center of the image. This can improve the speed of OIS calibration.
在上述S410之后,也就是查找到目标图像之后,目标图像是能够使摄像模组的OIS效果最好的图像。可以确定目标图像的抖动中心所在的位置的模糊量几乎为零。如果抖动中心处于某一个特征点的中心位置,那么该特征点的模糊量几乎为零。如果抖动中心并不与任意一个特征点的中心位置完全重合,那么抖动中心所在的位置较近范围内的特征点的模糊量也较小。在目标图像中找到模糊量最小的特征点之后,可以利用模糊量最小的特征点的模糊量对马达的性能进行评价。在一些实施例中,对马达的性能进行评价可以采用计算压缩比的方式实现。After the above S410, that is, after the target image is found, the target image is the image that can achieve the best OIS effect of the camera module. The amount of blur where the jitter center of the target image is located can be determined to be almost zero. If the jitter center is at the center of a feature point, the blur amount of the feature point is almost zero. If the jitter center does not completely coincide with the center position of any feature point, then the blur amount of the feature points closer to the jitter center will also be smaller. After finding the feature point with the smallest blur amount in the target image, the blur amount of the feature point with the smallest blur amount can be used to evaluate the performance of the motor. In some embodiments, the performance of the motor can be evaluated by calculating the compression ratio.
在一些实施例中,在上述S410之后,如图10所示,上述方法还包括S1000-S1006,其中:In some embodiments, after the above S410, as shown in Figure 10, the above method also includes S1000-S1006, wherein:
S1000.摄像模组在第二拍摄状态下,对第一预设标定板采集第五图像。S1000. In the second shooting state, the camera module collects the fifth image of the first preset calibration plate.
其中,第二拍摄状态包括摄像模组处于振动状态且OIS功能关闭的拍摄状态记为第二拍摄状态。The second shooting state includes a shooting state in which the camera module is in a vibrating state and the OIS function is turned off, which is recorded as the second shooting state.
在一些实施例中,摄像模组可以响应于个人计算机的指令关闭摄像模组的OIS功能。在该实施例中,在上述S1000之前,还包括:个人计算机向摄像模组发送第四指令,该第四指令用于控制摄像模组关闭OIS功能。在另一些实施例中,摄像模组的OIS功能也可以由相关人员手动关闭。In some embodiments, the camera module can turn off the OIS function of the camera module in response to instructions from the personal computer. In this embodiment, before the above-mentioned S1000, it also includes: the personal computer sends a fourth instruction to the camera module, and the fourth instruction is used to control the camera module to turn off the OIS function. In other embodiments, the OIS function of the camera module can also be manually turned off by relevant personnel.
在一些实施例中,S1000中摄像模组采集图像时,测试设备仍以预设振动参数控制振动台进行振动,从而带动摄像模组进行振动。In some embodiments, when the camera module in S1000 collects images, the test equipment still controls the vibration table to vibrate with preset vibration parameters, thereby driving the camera module to vibrate.
S1001.摄像模组向个人计算机发送第五图像。S1001. The camera module sends the fifth image to the personal computer.
S1002.个人计算机向测试准备发送第五指令。S1002. The personal computer sends the fifth command to test preparation.
S1003.测试设备响应于第五指令,控制振动台停止振动。S1003. The test equipment responds to the fifth command and controls the vibration table to stop vibrating.
其中,第五指令用于指示测试设备控制振动台停止振动,这样,摄像模组可以保持稳定状态采集第六图像。应理解,在其他实施例中,也可以由相关人员手动关闭振动台的振动。Among them, the fifth instruction is used to instruct the test equipment to control the vibration table to stop vibrating, so that the camera module can maintain a stable state to collect the sixth image. It should be understood that in other embodiments, the vibration of the vibration table can also be manually turned off by relevant personnel.
S1004.摄像模组在第三拍摄状态下,对第一预设标定板采集第六图像。S1004. In the third shooting state, the camera module collects the sixth image of the first preset calibration plate.
其中,第三拍摄状态下,摄像模组保持稳定。Among them, in the third shooting state, the camera module remains stable.
S1005.摄像模组向个人计算机发送第六图像。S1005. The camera module sends the sixth image to the personal computer.
S1006.个人计算机基于目标图像、第五图像以及第六图像中特征点的模糊量,确定压缩比。S1006. The personal computer determines the compression ratio based on the blur amount of the feature points in the target image, the fifth image, and the sixth image.
在一实施例中,压缩比是指图像的压缩比,该压缩比可以用于指示马达的性能。由上述实施例的说明可知,目标图像中的抖动已达到最小,目标图像中的特征点的模糊量最小。那么对于目标图像中的特征点而言,因外界振动带来的模糊已经通过马达的补偿抵消掉,几乎可以忽略不计。在目标图像中如果还存在模糊,则该模糊可能是由于马达本身性能导致无法完全补偿抵消。因此,在外界振动相同的情况下,结合目标图像(OIS开启),以及OIS关闭的情况下采集的图像,可以计算压缩比,用于评价马达的性能。In one embodiment, the compression ratio refers to the compression ratio of the image, and the compression ratio can be used to indicate the performance of the motor. It can be seen from the description of the above embodiments that the jitter in the target image has been minimized, and the blur amount of the feature points in the target image has been minimized. So for the feature points in the target image, the blur caused by external vibration has been offset by the compensation of the motor and can be almost ignored. If there is still blur in the target image, the blur may be due to the inability of the motor to completely compensate for the offset. Therefore, when the external vibration is the same, by combining the target image (OIS on) and the image collected when OIS is off, the compression ratio can be calculated and used to evaluate the performance of the motor.
在一些实施例中,上述S1004具体可以包括:获取第一预设标定板中的目标特征点分别在目标图像、第五图像以及第六图像中对应的模糊量。基于目标特征点在目标图像、第五图像以及第六图像中对应的模糊量,计算压缩比。其中,目标特征点可以是目标图像中任意一个或者多个特征点。在一些实施例中,目标特征点可以是目标图像中抖动最小的特征点。In some embodiments, the above-mentioned S1004 may specifically include: obtaining the blur amounts corresponding to the target feature points in the first preset calibration plate in the target image, the fifth image, and the sixth image respectively. The compression ratio is calculated based on the blur amounts corresponding to the target feature points in the target image, the fifth image, and the sixth image. Among them, the target feature point can be any one or multiple feature points in the target image. In some embodiments, the target feature point may be a feature point with minimal jitter in the target image.
在一些实施例中,目标特征点可以是在目标图像中抖动中心所在的位置,如图8中803所示位置对应的特征点。在另一些实施例中,如果目标图像的抖动中心并没有与任意一个第一预设标定板中的特征点重合,那么可以采用目标图像中距离抖动中心最近一个特征点作为目标特征点。In some embodiments, the target feature point may be the location of the jitter center in the target image, such as the feature point corresponding to the location shown as 803 in Figure 8 . In other embodiments, if the jitter center of the target image does not coincide with any feature point in the first preset calibration plate, then the feature point closest to the jitter center in the target image can be used as the target feature point.
选中目标特征点之后,分别在目标图像、第五图像和第六图像中找到目标特征点,并获取分别在目标图像、第五图像和第六图像中的模糊量。然后基于该三个模糊量确定压缩比。After selecting the target feature point, find the target feature point in the target image, the fifth image, and the sixth image respectively, and obtain the blur amounts in the target image, the fifth image, and the sixth image respectively. The compression ratio is then determined based on the three blur amounts.
其中,获取图像中特征点的模糊量的具体实现方式可以参照相关技术中的描述,在本申请实施例中不予赘述。The specific implementation method of obtaining the blur amount of the feature points in the image can refer to the description in the related art, and will not be described again in the embodiment of the present application.
在一些实施例中,基于目标特征点在目标图像、第五图像以及第六图像中对应的模糊量,计算压缩比,具体可以通过以下公式实现:In some embodiments, the compression ratio is calculated based on the blur amount corresponding to the target feature point in the target image, the fifth image, and the sixth image. Specifically, the compression ratio can be implemented through the following formula:
CR=-20Log10((OIS on-Still)/(OIS off- Still));CR=-20Log10 ((OIS on-Still)/(OIS off- Still));
其中,CR(Compression Ratio)表示压缩比,OIS on表示目标特征点在目标图像中对应的模糊量,OIS off表示目标特征点在第五图像中对应的模糊量,Still表示目标特征点在第六图像中对应的模糊量。Among them, CR (Compression Ratio) represents the compression ratio, OIS on represents the blur amount corresponding to the target feature point in the target image, OIS off represents the blur amount corresponding to the target feature point in the fifth image, and Still represents the target feature point in the sixth image. The corresponding amount of blur in the image.
在目标特征点包括多个的实施例中,可以分别针对每一个目标特征点使用上述公式计算对应的压缩比。然后,对不同的目标特征点对应的压缩比计算平均值,作为用于评价马达性能的压缩比。In an embodiment where there are multiple target feature points, the corresponding compression ratio can be calculated using the above formula for each target feature point. Then, the average compression ratio corresponding to different target feature points is calculated as the compression ratio used to evaluate the motor performance.
在本申请实施例中,摄像模组在振动状态且OIS功能开启时所采集图像中的目标特征点的模糊量,以及摄像模组在振动状态且OIS功能关闭时所采集的图像中目标特征点的模糊量,分别减去摄像模组在稳定状态下采集图像中目标特征点的模糊量,可以减少其他外界因素对压缩比计算的影响。In the embodiment of the present application, the blur amount of the target feature point in the image collected when the camera module is in a vibrating state and the OIS function is turned on, and the target feature point in the image collected when the camera module is in a vibrating state and the OIS function is turned off. The blur amount is subtracted from the blur amount of the target feature points in the image collected by the camera module in a stable state, which can reduce the impact of other external factors on the compression ratio calculation.
在本申请实施例提供的技术方案中,在使用S401-S410的方案对马达的增益进行标定之后,在摄像模组的马达设置为标定增益值时结合图像中特征点的模糊量,计算压缩比,从而评价马达的性能。由于通过上述S401-S410的方案对马达进行标定可以获得精准度较高的标定增益值,因此在该标定增益值的状态下评价马达的性能也可以获得较为准确的评价结果。In the technical solution provided by the embodiment of this application, after the gain of the motor is calibrated using the solution of S401-S410, when the motor of the camera module is set to the calibrated gain value, the compression ratio is calculated based on the blur amount of the feature points in the image. , to evaluate the performance of the motor. Since calibrating the motor through the above-mentioned S401-S410 scheme can obtain a more accurate calibration gain value, more accurate evaluation results can also be obtained by evaluating the performance of the motor under the state of the calibration gain value.
在一些实施例中,上述S405中摄像模组可以采用不同的参数对第一预设标定板采集图像。在一些实施例中,摄像模组的参数包括帧率和曝光时间。当摄像模组通过低帧率,长曝光时间采集图像时,图像中所采集到的特征点以及该特征点的模糊部分形成的图像是较为密集的。因此,在该实施例中,在计算上述压缩比时,针对目标特征点以及该目标特征点的模糊部分,可以用目标特征点的中心运动轨迹的面积来表示目标特征点在目标图像中的模糊量。In some embodiments, the camera module in S405 above can use different parameters to collect images of the first preset calibration plate. In some embodiments, the parameters of the camera module include frame rate and exposure time. When the camera module collects images through low frame rate and long exposure time, the image formed by the collected feature points and the blurred parts of the feature points is relatively dense. Therefore, in this embodiment, when calculating the above compression ratio, for the target feature point and the blurred part of the target feature point, the area of the center motion trajectory of the target feature point can be used to represent the blur of the target feature point in the target image. quantity.
当摄像模组通过高帧率,低曝光时间采集图像时,图像中所采集到的特征点以及该特征点的模糊部分形成的图像相对来说没有那么密集。因此在该实施例中,在计算上述压缩比时,针对目标特征点以及该目标特征点的模糊部分,可以用目标特征点的中心运动轨迹的长度来表示目标特征点在目标图像中的模糊量。When the camera module collects images through high frame rates and low exposure times, the image formed by the collected feature points and the blurred parts of the feature points is relatively less dense. Therefore, in this embodiment, when calculating the above compression ratio, for the target feature point and the blurred part of the target feature point, the length of the center motion trajectory of the target feature point can be used to represent the blur amount of the target feature point in the target image. .
本申请实施例还提供另一种光学防抖动的标定方法,可以使用单一特征点的标定板实现对如潜望式摄像模组的OIS标定。由上述说明可知,如果使用单一特征点的标定板实现潜望式摄像模组的OIS标定,在点亮图像时,单一特征点并不一定处于镜头的画面中心,从而导致OIS标定所针对的位置并非画面中心位置,导致标定精准度不高的问题。为了避免这种情况,在本申请实施例中,在摄像模组点亮画面时,先判断单一特征点在画面中的位置,然后将对该位置进行中心补偿。具体的,可以通过调整马达的行程将单一特征点移动到镜头画面中心。之后再对摄像模组进行OIS标定,即可保证OIS标定过程所针对的位置是摄像模组的镜头画面中心的位置。The embodiment of the present application also provides another optical anti-shake calibration method, which can use a single feature point calibration plate to achieve OIS calibration of, for example, a periscope camera module. From the above description, it can be seen that if a calibration plate with a single feature point is used to implement OIS calibration of a periscope camera module, when the image is lit, the single feature point is not necessarily in the center of the lens, resulting in the position targeted by the OIS calibration. It is not at the center of the screen, resulting in low calibration accuracy. In order to avoid this situation, in the embodiment of the present application, when the camera module lights up the screen, it first determines the position of a single feature point in the screen, and then performs center compensation on the position. Specifically, a single feature point can be moved to the center of the lens frame by adjusting the stroke of the motor. Then perform OIS calibration on the camera module to ensure that the position targeted by the OIS calibration process is the center of the lens screen of the camera module.
在一些实施例中,如图11所示,本申请实施例提供的光学防抖动的标定方法可以包括S1101-S1113,其中:In some embodiments, as shown in Figure 11, the optical anti-shake calibration method provided by the embodiment of the present application may include S1101-S1113, where:
S1101.摄像模组对第二预设标定板采集标定图像。S1101. The camera module collects the calibration image of the second preset calibration plate.
其中,第二预设标定板包括至少一个特征点。Wherein, the second preset calibration plate includes at least one feature point.
在一些实施例中,第二预设标定板包括单一特征点,第二预设标定板中的单一特征点可以设置为标定板的中心位置。第二预设标定板中的单一特征点的形状可以是任意一种形状,如圆形、方形、三角形或者十字形状等等。第二预设标定板中的单一特征点的大小可以根据实际情况设置。应理解,在使用第二预设标定板对摄像模组进行OIS标定时,第二预设标定板设置在摄像模组的取景范围内。In some embodiments, the second preset calibration plate includes a single feature point, and the single feature point in the second preset calibration plate can be set as the center position of the calibration plate. The shape of a single feature point in the second preset calibration plate can be any shape, such as a circle, a square, a triangle or a cross shape, etc. The size of a single feature point in the second preset calibration plate can be set according to actual conditions. It should be understood that when the second preset calibration plate is used to perform OIS calibration on the camera module, the second preset calibration plate is set within the viewing range of the camera module.
在一些实施例中,第二预设标定板也可以包括多个特征点。In some embodiments, the second preset calibration plate may also include multiple feature points.
摄像模组的设置可以参照如图3中的设置。The settings of the camera module can be referred to the settings in Figure 3.
在一些实施例中,摄像模组可以响应于个人计算机的指令对第二预设标定板采集图像。在该实施例中,在上述S1101之前,还包括:个人计算机向摄像模组发送第六指令,该第六指令用于指示摄像模组采集图像。在另一些实施例中,摄像模组采集图像的过程也可以由相关人员手动触发。In some embodiments, the camera module can collect images of the second preset calibration plate in response to instructions from the personal computer. In this embodiment, before the above-mentioned S1101, it also includes: the personal computer sends a sixth instruction to the camera module, and the sixth instruction is used to instruct the camera module to collect images. In other embodiments, the process of image collection by the camera module can also be manually triggered by relevant personnel.
S1102.摄像模组向个人计算机发送标定图像。S1102. The camera module sends the calibration image to the personal computer.
S1103.个人计算机获取预设特征点在标定图像中的第一位置,以及第一位置与标定图像的图像中心之间的距离。S1103. The personal computer obtains the first position of the preset feature point in the calibration image, and the distance between the first position and the image center of the calibration image.
如果第二预设标定板包括单一特征点,预设特征点是该单一特征点。如果第二预设标定板包括两个以上特征点,则预设特征点可以是其中任意一个特征点;该预设特征点可以预先指定。在一些实施例中,第二预设标定板包括两个以上特征点时,预设特征点可以是设置在第二预设标定板中的中心位置的特征点。与上述实施例中的第一预设标定板类似的,第二预设标定板的特征点的大小、形状、颜色以及特征点之间的间隔均可以根据实际情况进行设置,在本申请实施例种不予限定。If the second preset calibration plate includes a single feature point, the preset feature point is the single feature point. If the second preset calibration plate includes more than two feature points, the preset feature point can be any one of the feature points; the preset feature point can be specified in advance. In some embodiments, when the second preset calibration plate includes more than two feature points, the preset feature point may be a feature point provided at a central position in the second preset calibration plate. Similar to the first preset calibration plate in the above embodiment, the size, shape, color and spacing between the feature points of the second preset calibration plate can be set according to the actual situation. In the embodiment of the present application Species are not limited.
预设特征点在标定图像中可能处于标定图像的图像中心位置,也可能未处于图像中心位置,例如可以是图1中12、13、14或15所示位置。摄像模组的画面中心也就是摄像模组采集的标定图像的图像中心。应理解,若第一位置处于标定图像的图像中心位置,那么第一位置与标定图像的图像中心之间的距离为0。The preset feature point may be at the center of the calibration image in the calibration image, or may not be at the center of the image, for example, it may be at the position shown at 12, 13, 14 or 15 in Figure 1. The center of the image of the camera module is also the image center of the calibration image collected by the camera module. It should be understood that if the first position is at the image center of the calibration image, then the distance between the first position and the image center of the calibration image is 0.
S1104.基于第一位置与标定图像的图像中心之间的距离,向摄像模组发送第七指令。S1104. Based on the distance between the first position and the image center of the calibration image, send a seventh instruction to the camera module.
其中,第七指令用于指示摄像模组调整马达的行程,使预设特征点处于摄像模组的画面中心。马达的行程表示马达能够移动的范围。在一些实施例中,第七指令携带马达行程的目标调整值;第七指令用于指示摄像模组基于目标调整值调整马达行程。Among them, the seventh instruction is used to instruct the camera module to adjust the stroke of the motor so that the preset feature point is at the center of the image of the camera module. The stroke of a motor indicates the range within which the motor can move. In some embodiments, the seventh instruction carries the target adjustment value of the motor stroke; the seventh instruction is used to instruct the camera module to adjust the motor stroke based on the target adjustment value.
在一些实施例中,上述S1104是在标定图像中预设特征点未处于图像中心时执行。如果在标定图像中预设特征点处于图像中心位置,则无需调整马达的行程。In some embodiments, the above S1104 is executed when the preset feature point in the calibration image is not located in the center of the image. If the preset feature point in the calibration image is at the center of the image, there is no need to adjust the stroke of the motor.
在一些实施例中,在获取到标定图像中第一位置与摄像模组的画面中心的距离之后,基于该距离可以确定如何调整马达的行程能够使预设特征点移动到画面中心。基于距离确定马达行程的调整方法可以参照相关技术的描述,在本申请实施例中不予赘述。In some embodiments, after obtaining the distance between the first position in the calibration image and the center of the image of the camera module, it is determined based on the distance how to adjust the stroke of the motor to move the preset feature point to the center of the image. The adjustment method for determining the motor stroke based on the distance may refer to the description of the related art, and will not be described again in the embodiment of the present application.
在一些实施例中,上述S1104在确定马达行程的目标调整值时,可以以霍尔标定(Hall cal)的短边位置作上行程,并通过code位置计算下行程。其中,code表示移动到某个距离图像变清晰的那个值。In some embodiments, when determining the target adjustment value of the motor stroke in S1104 above, the short side position of the Hall calibration (Hall cal) can be used for the up stroke, and the down stroke can be calculated through the code position. Among them, code represents the value that moves to a certain distance and the image becomes clear.
S1105.摄像模组响应于第七指令调整马达的行程。S1105. The camera module adjusts the stroke of the motor in response to the seventh command.
应理解,摄像模组响应于第七指令对马达的行程进行调整之后,第二预设标定板中的预设特征点将会出现在摄像模组的画面中心。因此,在S1105之后,再对该摄像模组进行OIS标定,可以避免因预设特征点处于非画面中心而导致的OIS标定精准度不高的问题。也就是说,接下来可以使用第二预设标定板对摄像模组进行OIS标定,也可以获得较为准确的标定结果。It should be understood that after the camera module adjusts the stroke of the motor in response to the seventh instruction, the preset feature point in the second preset calibration plate will appear in the center of the image of the camera module. Therefore, performing OIS calibration on the camera module after S1105 can avoid the problem of low OIS calibration accuracy caused by the preset feature point being outside the center of the screen. In other words, the second preset calibration plate can be used to perform OIS calibration on the camera module, and a more accurate calibration result can be obtained.
S1106.个人计算机向测试设备发送第一指令。S1106. The personal computer sends the first instruction to the test device.
S1107.摄像模组响应于第一指令,以预设振动参数控制振动台进行振动。S1107. The camera module responds to the first instruction and controls the vibration table to vibrate with the preset vibration parameters.
S1108.个人计算机向摄像模组发送第二指令。S1108. The personal computer sends the second command to the camera module.
S1109.摄像模组响应于第二指令,控制摄像模组的马达的增益调整为预设数值。S1109. In response to the second instruction, the camera module controls the gain of the motor of the camera module to adjust to a preset value.
S1110.摄像模组对第二预设标定板采集对应的图像。S1110. The camera module collects corresponding images of the second preset calibration plate.
S1111.摄像模组向个人计算机发送图像。S1111. The camera module sends images to the personal computer.
上述S1106-S1111的具体实现过程可以参照上述实施例中S401-S406的说明。For the specific implementation process of S1106-S1111, please refer to the description of S401-S406 in the above embodiment.
S1112.个人计算机获取图像中预设特征点的抖动情况。S1112. The personal computer obtains the jitter condition of the preset feature points in the image.
由上述实施例的说明可知,预设特征点的抖动越大,图像中预设特征点的模糊量越大。因此,在一些实施例中,个人计算机可以计算图像中预设特征点的模糊量。其中,计算图像中特征点的模糊量的具体实现方式可以参照相关技术中的描述,在本申请实施例中不予赘述。It can be seen from the description of the above embodiments that the greater the jitter of the preset feature points, the greater the blur amount of the preset feature points in the image. Therefore, in some embodiments, the personal computer can calculate the blur amount of preset feature points in the image. The specific implementation method of calculating the blur amount of the feature points in the image can refer to the description in the related art, and will not be described again in the embodiment of the present application.
S1113.个人计算机根据不同马达增益值对应的图像中预设特征点的抖动情况,确定马达的标定增益值。S1113. The personal computer determines the calibrated gain value of the motor based on the jitter of the preset feature points in the image corresponding to different motor gain values.
摄像模组的马达设置为不同的数值时,对外界振动造成的模糊的补偿效果不一致,因此单一特征点的抖动也不一致。在对摄像模组进行OIS标定的过程中,需要找到能够使补偿效果最好的马达增益值,也就是说需要找到能够使预设特征点的抖动最小时对应的马达增益值。也就是说,预设特征点的模糊量越小,补偿效果越好。When the motor of the camera module is set to different values, the compensation effect for the blur caused by external vibration is inconsistent, so the jitter of a single feature point is also inconsistent. In the process of OIS calibration of the camera module, it is necessary to find the motor gain value that can achieve the best compensation effect. In other words, it is necessary to find the motor gain value that minimizes the jitter of the preset feature points. In other words, the smaller the blur amount of the preset feature points, the better the compensation effect.
因此,在一些实施例中,上述S1113具体可以包括:个人计算机查找多张图像中查找预设特征点的模糊量最小(即抖动最小)的图像,获取该模糊量最小的图像所对应的马达增益值,将该马达增益值确定为摄像模组的标定增益值。Therefore, in some embodiments, the above-mentioned S1113 may specifically include: the personal computer searches for the image with the smallest amount of blur (i.e., the smallest jitter) of the preset feature points among multiple images, and obtains the motor gain corresponding to the image with the smallest amount of blur. value, and determine the motor gain value as the calibrated gain value of the camera module.
如图12所示,为本申请实施例中在S1101-S1113的过程中摄像模组对第二预设标定板采集的图像的示意图。在图12的示例中,第二预设标定板包括单一特征点,且该单一特征点是圆形特征点。图12中的a是S1101时采集的图像示意图,单一特征点1201未处于图像中心。图12中的b是S1105摄像模组调整马达的行程之后,对第二预设标定板采集的图像示意图,单一特征点1202处于图像中心,即摄像模组的画面中心。图12中的c是S1110中摄像模组在第三拍摄状态下对预设标定板采集的图像示意图之一,单一特征点存在模糊。图12中的d是S1113中查找到马达的标定增益值之后,将摄像模组的马达调整为标定增益值时,对第二预设标定板采集的图像示意图,单一特征点的模糊较小。As shown in Figure 12, it is a schematic diagram of the image collected by the camera module on the second preset calibration plate during the process of S1101-S1113 in the embodiment of the present application. In the example of FIG. 12 , the second preset calibration plate includes a single feature point, and the single feature point is a circular feature point. a in Figure 12 is a schematic diagram of the image collected at S1101, and the single feature point 1201 is not in the center of the image. b in Figure 12 is a schematic diagram of the image collected from the second preset calibration plate after the S1105 camera module adjusts the stroke of the motor. The single feature point 1202 is in the center of the image, that is, the center of the camera module's screen. c in Figure 12 is one of the schematic diagrams of images collected by the camera module in S1110 on the preset calibration plate in the third shooting state, and a single feature point is blurred. d in Figure 12 is a schematic diagram of the image captured by the second preset calibration plate when the motor of the camera module is adjusted to the calibrated gain value after finding the motor's calibration gain value in S1113. The blur of a single feature point is small.
需要说明的是,使用上述S1101-S1113的方法进行OIS标定的摄像模组,马达的行程的目标调整值也需要作为标定结果一同保存。在该摄像模组投入使用时,需要在马达的行程按照该目标调整值进行调整之后,使用该方法得到的马达的标定增益值进行OIS处理,才可以获得较好的防抖效果。在一些实施例中,上述S1101-S1113的方法适用于马达补偿后线性度及串扰较好的摄像模组。It should be noted that for a camera module that performs OIS calibration using the above-mentioned methods S1101-S1113, the target adjustment value of the motor's stroke also needs to be saved as the calibration result. When the camera module is put into use, it is necessary to use the calibrated gain value of the motor obtained by this method to perform OIS processing after the motor's stroke is adjusted according to the target adjustment value, in order to obtain a better anti-shake effect. In some embodiments, the above-mentioned methods S1101-S1113 are suitable for camera modules with better linearity and crosstalk after motor compensation.
在本申请实施例提供的技术方案中,使用包括单一特征点的标定板对在棱镜的X方向和Y方向进行OIS处理的摄像模组进行OIS标定,通过改变马达的行程,确保单一特征点出现在摄像模组的画面中心。从而可以避免因单一特征点没有处在画面中心时导致的OIS标定精准度不高的问题。In the technical solution provided by the embodiment of the present application, a calibration plate including a single feature point is used to perform OIS calibration on a camera module that performs OIS processing in the X and Y directions of the prism. By changing the stroke of the motor, it is ensured that a single feature point appears. In the center of the camera module's screen. This can avoid the problem of low OIS calibration accuracy caused by a single feature point not being in the center of the picture.
本申请另一些实施例提供了一种计算机设备,该计算机设备可以是上述个人计算机。该计算机设备可以包括:存储器和一个或多个处理器。该存储器与处理器耦合。该存储器还用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,计算机设备可执行上述方法实施例中个人计算机执行的各个功能或者步骤。该计算机设备是电子设备时,其结构可以参考图2所示的个人计算机20的结构。Other embodiments of the present application provide a computer device, which may be the above-mentioned personal computer. The computer device may include memory and one or more processors. The memory is coupled to the processor. The memory is also used to store computer program code, which includes computer instructions. When the processor executes computer instructions, the computer device may perform various functions or steps performed by the personal computer in the above method embodiments. When the computer device is an electronic device, its structure may refer to the structure of the personal computer 20 shown in FIG. 2 .
本申请实施例还提供一种芯片系统,如图13所示,该芯片系统130包括至少一个处理器1301和至少一个接口电路1302。处理器1301和接口电路1302可通过线路互联。例如,接口电路1302可用于从其它装置(例如计算机设备的存储器)接收信号。又例如,接口电路1302可用于向其它装置(例如处理器1301)发送信号。示例性的,接口电路1302可读取存储器中存储的指令,并将该指令发送给处理器1301。当指令被处理器1301执行时,可使得计算机设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。An embodiment of the present application also provides a chip system. As shown in FIG. 13 , the chip system 130 includes at least one processor 1301 and at least one interface circuit 1302 . The processor 1301 and the interface circuit 1302 may be interconnected by wires. For example, interface circuitry 1302 may be used to receive signals from other devices, such as memory of a computer device. As another example, interface circuit 1302 may be used to send signals to other devices (eg, processor 1301). For example, the interface circuit 1302 can read instructions stored in the memory and send the instructions to the processor 1301. When the instructions are executed by the processor 1301, the computer device can be caused to perform various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of this application.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当计算机指令在上述个人计算机上运行时,使得该电子设备执行上述方法实施例中个人计算机执行的各个功能或者步骤。Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are run on the above-mentioned personal computer, the electronic device causes the electronic device to execute each of the steps executed by the personal computer in the above-mentioned method embodiment. function or step.
本申请实施例还提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中个人计算机执行的各个功能或者步骤。其中,该计算机可以是电子设备,如个人计算机。Embodiments of the present application also provide a computer program product. When the computer program product is run on a computer, it causes the computer to perform various functions or steps performed by the personal computer in the above method embodiments. Wherein, the computer may be an electronic device, such as a personal computer.
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated according to needs. Different functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or can be integrated into another device, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separate. A component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Integrated units may be stored in a readable storage medium if they are implemented in the form of software functional units and sold or used as independent products. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium includes several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above contents are only specific implementation modes of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310047676.5A CN116017158B (en) | 2023-01-31 | 2023-01-31 | Calibration method and equipment for optical anti-shake |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310047676.5A CN116017158B (en) | 2023-01-31 | 2023-01-31 | Calibration method and equipment for optical anti-shake |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116017158A CN116017158A (en) | 2023-04-25 |
CN116017158B true CN116017158B (en) | 2023-09-15 |
Family
ID=86029871
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310047676.5A Active CN116017158B (en) | 2023-01-31 | 2023-01-31 | Calibration method and equipment for optical anti-shake |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116017158B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117191357B (en) * | 2023-11-02 | 2024-04-05 | 南通蓬盛机械有限公司 | Performance evaluation method and system of optical lens |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130059811A (en) * | 2011-11-29 | 2013-06-07 | 엘지이노텍 주식회사 | Auto calibration method of ois camera |
CN105791656A (en) * | 2014-12-19 | 2016-07-20 | 宁波舜宇光电信息有限公司 | Correction system and method of image module optical image stabilizer system |
CN106500832A (en) * | 2016-10-20 | 2017-03-15 | 中国计量科学研究院 | A kind of low-frequency vibration calibrating installation based on machine vision |
CN109348125A (en) * | 2018-10-31 | 2019-02-15 | Oppo广东移动通信有限公司 | Video correction method, video correction device, electronic equipment and computer-readable storage medium |
CN111314607A (en) * | 2020-02-21 | 2020-06-19 | 昆山丘钛微电子科技有限公司 | Optical anti-shake calibration method and device, electronic equipment and medium |
CN113784112A (en) * | 2021-08-26 | 2021-12-10 | 昆山丘钛微电子科技股份有限公司 | Camera module test method, device, test board and system |
CN114222115A (en) * | 2021-12-16 | 2022-03-22 | 昆山丘钛微电子科技股份有限公司 | A kind of optical anti-shake calibration method, device, equipment and medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008160300A (en) * | 2006-12-21 | 2008-07-10 | Canon Inc | Image processor, and imaging apparatus |
-
2023
- 2023-01-31 CN CN202310047676.5A patent/CN116017158B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130059811A (en) * | 2011-11-29 | 2013-06-07 | 엘지이노텍 주식회사 | Auto calibration method of ois camera |
CN105791656A (en) * | 2014-12-19 | 2016-07-20 | 宁波舜宇光电信息有限公司 | Correction system and method of image module optical image stabilizer system |
CN106500832A (en) * | 2016-10-20 | 2017-03-15 | 中国计量科学研究院 | A kind of low-frequency vibration calibrating installation based on machine vision |
CN109348125A (en) * | 2018-10-31 | 2019-02-15 | Oppo广东移动通信有限公司 | Video correction method, video correction device, electronic equipment and computer-readable storage medium |
CN111314607A (en) * | 2020-02-21 | 2020-06-19 | 昆山丘钛微电子科技有限公司 | Optical anti-shake calibration method and device, electronic equipment and medium |
CN113784112A (en) * | 2021-08-26 | 2021-12-10 | 昆山丘钛微电子科技股份有限公司 | Camera module test method, device, test board and system |
CN114222115A (en) * | 2021-12-16 | 2022-03-22 | 昆山丘钛微电子科技股份有限公司 | A kind of optical anti-shake calibration method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN116017158A (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109348125B (en) | Video correction method, video correction device, electronic equipment and computer-readable storage medium | |
CN108769528B (en) | Image compensation method and apparatus, computer-readable storage medium, and electronic device | |
US8797413B2 (en) | Movement detection apparatus and movement detection method | |
WO2019091486A1 (en) | Photographing processing method and device, terminal, and storage medium | |
CN110933303B (en) | Photographing method and electronic device | |
KR101856947B1 (en) | Photographing apparatus, motion estimation apparatus, method for image compensation, method for motion estimation, computer-readable recording medium | |
CN114762314B (en) | Electronic device and method for controlling camera motion | |
WO2019067732A1 (en) | System and method for event camera data processing | |
CN114449173B (en) | Optical anti-shake control method and device, storage medium and electronic equipment | |
CN108377342A (en) | Double-camera shooting method and device, storage medium and terminal | |
CN114556879A (en) | Time delay detection method, device, system, movable platform and storage medium | |
CN108805938B (en) | Detection method of optical anti-shake module, mobile terminal and storage medium | |
CN111083375B (en) | Focusing method and electronic device | |
CN107580176A (en) | A kind of terminal taking control method, camera shooting terminal and computer-readable recording medium | |
CN116017158B (en) | Calibration method and equipment for optical anti-shake | |
TW201301878A (en) | Image capture method and image capture system | |
CN114567727A (en) | Shooting control system, method and device, storage medium and electronic equipment | |
CN110213484A (en) | A kind of photographic method, terminal device and computer readable storage medium | |
CN112351209B (en) | External lens for mobile terminal, method for controlling lens, mobile terminal and storage medium | |
CN111869194B (en) | Information processing device, information processing method, and storage medium | |
JP6862564B2 (en) | Methods, devices and non-volatile computer-readable media for image composition | |
EP4068755B1 (en) | Photographing method and electronic device | |
CN105391943A (en) | Rapid focusing method and system of shooting device | |
CN109302563B (en) | Anti-shake processing method and device, storage medium and mobile terminal | |
CN106154688A (en) | A kind of method and device of auto-focusing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |