OIS anti-shake performance detection method and device without vibration table
Through the method without shaking table, the sine function curve is used to control the camera to capture images and directly calculate the OIS anti-shake performance index, which solves the problems of low detection efficiency and high cost in the existing technology, and realizes efficient and convenient anti-shake performance detection.
Patent Information
- Application Number
- CN202410743543.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-08-23
AI Technical Summary
The existing OIS anti-shake performance detection method relies on a vibration table, which has low detection efficiency, high cost, complex operation, and requires professional and technical personnel for maintenance.
Using the method without shaking table, by calibrating the reference point and using the ideal sine function curve to control the camera to capture the image, obtain the original image data, perform preprocessing and fitting, determine the center coordinate sequence and sine function curve, calculate the anti-shake performance index, and directly Compare actual and theoretical movement distances to evaluate anti-shake performance.
It simplifies the inspection process, improves inspection efficiency, and reduces costs and difficulties. Without the need for gyroscopes and vibration tables, operators can complete inspections quickly and conveniently, improving production efficiency.
Smart Images

Figure CN118540585A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera anti-shake performance detection technology, and in particular to an OIS anti-shake performance detection method and device without a vibration platform. Background Art
[0002] With the development of photography technology, taking photos has become an indispensable part of people's daily life. However, in the process of taking photos, it is difficult to avoid the problem of unstable images caused by slight shaking of the hands. This shaking will cause the camera to tilt slightly, which will cause the lens angle to change. If the lens is used as a reference object, then this tilt is equivalent to the movement of the object being photographed, so the image formed on the image sensor will also shift, which will not only cause the image to be blurred, but also make the image unable to achieve a stable visual effect, greatly affecting the photo-taking experience.
[0003] To solve this problem, optical image stabilization (OIS) technology came into being. OIS technology uses a gyroscope to detect the camera offset angle caused by manual operation in real time. Once the offset is detected, the OIS system will calculate the offset caused by the tilt on the image based on this angle, and control the lens to perform translational movement in the opposite direction relative to the image sensor to achieve precise offset compensation to eliminate the image offset caused by hand shake and stabilize the image, thereby greatly improving the quality and experience of taking pictures. However, OIS anti-shake products cannot be put into use directly after assembly. Instead, they need to go through a series of complex detection and calibration processes to ensure the accuracy and effectiveness of their anti-shake function.
[0004] The traditional OIS anti-shake effect detection method usually requires the use of an image acquisition board installed on a camera and image analysis software on a computer. When the OIS is turned on and off, the position of the center of the OIS test card graphic captured by the vibration platform under vibration and static conditions is analyzed respectively to calculate the module suppression rate. On the one hand, since the working state of the vibration platform needs to be switched during the detection process, and image analysis is performed in at least two states, dynamic and static, the detection efficiency is low. On the other hand, the vibration table equipment is not only expensive, but also complicated to operate, requiring professional technicians to operate and maintain it, which undoubtedly increases the production cost and detection difficulty. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a method and device for detecting OIS anti-shake performance without a vibration table, so as to solve the problems of low detection efficiency and high detection difficulty and cost in the prior art.
[0006] To achieve the above object, a technical solution of the present invention provides an OIS anti-shake performance detection method without a vibration table, comprising the following steps:
[0007] Calibrate several reference points, and control the camera to continuously shoot each reference point based on an ideal sine function curve to obtain multiple original images;
[0008] Sequentially acquiring the original images to form an original image data sequence;
[0009] Preprocessing each original image in the original image data sequence, and detecting the center coordinates of each reference point in the original image to obtain a center coordinate sequence;
[0010] Performing a sine function fitting on the center coordinate sequence to obtain a sine function curve of the reference point center;
[0011] The peaks and troughs of the waveform are determined based on the center coordinate sequence and the sine function curve, the actual movement distance of the camera is determined according to the peaks and troughs, and the anti-shake performance index is calculated according to the actual movement distance and theoretical movement distance of the camera.
[0012] Furthermore, in the step of calibrating several reference points and controlling the camera to continuously shoot each reference point based on an ideal sinusoidal function curve to obtain multiple original images, the reference points are calibrated on a target plate, and several reference points are equidistantly calibrated on the target plate. When the camera continuously captures original images of the reference points, the number of original images captured is greater than or equal to 90, and the camera's acquisition time is greater than three times the vibration frequency of the ideal sinusoidal function curve.
[0013] Furthermore, the step of preprocessing each original image in the original image data sequence and detecting the center coordinates of each reference point in the original image to obtain a center coordinate sequence includes the following sub-steps:
[0014] After converting the format of each original image in the original image data sequence to obtain an RGB picture, the RGB picture is packaged to obtain a BMP picture, wherein the original image is converted to the RGB picture by using an interpolation method;
[0015] Cropping each BMP picture in turn to obtain a preprocessed picture, wherein the preprocessed picture contains only one reference point and the reference point is located at the center of the preprocessed picture;
[0016] The pre-processed images are identified in sequence, the center of the reference point in the pre-processed images and its center coordinates are determined, and a center coordinate sequence is obtained by time-sequential integration.
[0017] Furthermore, in the step of sequentially identifying the pre-processed images, determining the center of the reference point in the pre-processed images and its center coordinates, and integrating in time sequence to obtain a center coordinate sequence, the method for identifying the center coordinates of the reference point is:
[0018] Convert the preprocessed image into a corresponding grayscale image;
[0019] Setting a pixel threshold, and binarizing the grayscale image according to the pixel threshold to obtain a binary image, wherein the binary image includes a first pixel whose pixel value is less than the pixel threshold and a second pixel whose pixel value is greater than or equal to the pixel threshold;
[0020] Each pixel of the binary image is traversed, and for each first pixel, the X coordinate value and the Y coordinate value of the first pixel coordinate are respectively accumulated and then the average value is calculated to obtain the center coordinate of the reference point.
[0021] Furthermore, in the step of fitting the center coordinate sequence with a sine function to obtain a sine function curve of the reference point center, the specific method of fitting the curve is:
[0022] A sine function model is defined with the acquisition period of each original image as the horizontal coordinate and the fluctuation amplitude of each center coordinate in each original image as the vertical coordinate; initial parameters of the sine function model are set according to the anti-shake requirements of the camera; the initial parameters of the sine function model are estimated based on each center coordinate in the center coordinate sequence to obtain the fitting parameters of the estimated sine function model, and a fitted sine function curve is output; wherein the initial parameters include initial amplitude, initial frequency, initial phase and initial offset, and the fitting parameters correspond to the initial parameters, and the fitting parameters include fitting amplitude, fitting frequency, fitting phase and fitting offset.
[0023] Furthermore, in the step of fitting the center coordinate sequence with a sine function to obtain a sine function curve at the center of the reference point, after estimating the parameters and outputting the sine function curve, the error of the sine function curve is also controlled; the specific method of control is:
[0024] The actual motion fluctuation of the reference point photographed by the camera is determined according to the sine function curve, and the theoretical fluctuation trajectory of the reference point photographed by the camera is determined according to the theoretical sine function, and the fitting frequency of the sine function curve and the theoretical frequency of the ideal sine function curve, as well as the actual displacement of the reference point based on the sine function curve and the theoretical displacement based on the ideal sine function curve are respectively obtained; the frequency error of the curve is calculated according to the fitting frequency and the theoretical frequency, and the displacement error of the reference point is calculated according to the actual displacement and the theoretical displacement, and it is judged whether the frequency error and the displacement error meet the preset conditions. If so, the sine function curve is output, otherwise, the initial parameters are adjusted to repeat the parameter estimation.
[0025] Furthermore, the frequency error satisfies the following conditions:
[0026]
[0027] in, is the frequency error, ω is the fitting frequency, and ω' is the theoretical frequency;
[0028] The shift error satisfies the following conditions:
[0029] |y-y'|<5;
[0030] Among them, |y-y'| is the displacement error, y is the actual displacement of the reference point, and y' is the theoretical displacement of the reference point.
[0031] Further, in the step of determining the peaks and troughs of the waveform based on the center coordinate sequence and the sine function curve, determining the actual movement distance of the camera according to the peaks and troughs, and calculating the anti-shake performance index according to the actual movement distance and theoretical movement distance of the camera, the following sub-steps are included:
[0032] Determine the peak and trough of the sine function curve according to the center coordinate sequence and the sine function curve, and determine the peak center coordinate and the trough center coordinate corresponding to the occurrence time of the peak and the trough;
[0033] Calculate the average peak amplitude of the fluctuation amplitude of the peak center coordinate and the average trough amplitude of the fluctuation amplitude of the trough center coordinate respectively;
[0034] Calculating the actual moving distance of the camera according to the average amplitude of the peak and the average amplitude of the trough;
[0035] The theoretical moving distance of the camera is determined based on the ideal sine function curve, and the anti-shake performance index is calculated according to the actual moving distance and the theoretical moving distance of the camera.
[0036] Further, in the step of calculating the actual moving distance of the camera according to the average peak amplitude and the average trough amplitude, the actual moving distance of the camera is expressed as:
[0037]
[0038] Among them, LB is the actual moving distance of the camera, is the average peak amplitude, X n is the fluctuation amplitude of the nth peak, n=1,2,...,N, N is the number of peaks; is the average amplitude of the trough, Y m is the fluctuation amplitude of the mth trough, m=1,2,...,M, M is the number of troughs;
[0039] In the step of determining the theoretical moving distance of the camera based on the ideal sinusoidal function curve, and calculating the anti-shake performance index according to the actual moving distance of the camera and the theoretical moving distance, the anti-shake performance index is expressed as:
[0040]
[0041] Among them, DB is the anti-shake performance index, and LA is the theoretical moving distance of the camera.
[0042] In order to achieve the above object, another technical solution of the present invention provides an OIS anti-shake performance detection device without a vibration table, comprising:
[0043] A target plate, on which a plurality of reference points are marked;
[0044] A light source is arranged behind the target plate and is used to provide illumination;
[0045] A signal generating module, used for generating an ideal sinusoidal function curve;
[0046] An image acquisition system, comprising a camera and an image acquisition module electrically connected to the camera, wherein the camera moves based on the control of the ideal sine function curve, and the image acquisition module is used to continuously acquire original images when the camera moves; and
[0047] Image processing system, including:
[0048] An image acquisition module, used for sequentially acquiring the original images to form an original image data sequence;
[0049] A coordinate recognition module, used for preprocessing each original image in the original image data sequence, and detecting the center coordinates of each reference point in the original image to obtain a center coordinate sequence;
[0050] A curve fitting module, used for performing a sine function fitting on the center coordinate sequence to obtain a sine function curve of the reference point center;
[0051] The index calculation module is used to determine the peaks and troughs of the waveform based on the central coordinate sequence and the sine function curve, determine the actual movement distance of the camera according to the peaks and troughs, and calculate the anti-shake performance index according to the actual movement distance and theoretical movement distance of the camera.
[0052] The present invention controls the movement of the camera by using an ideal sinusoidal function curve as an analog signal source. When the OIS system of the camera receives the ideal sinusoidal signal, the camera will accurately follow the signal to perform periodic movement and synchronously capture the image of the reference point; by identifying and analyzing the central coordinates of the reference point in the image, the actual movement distance of the camera can be accurately calculated, and then by comparing the actual movement distance with the theoretical movement distance of the camera under the control of the ideal sinusoidal function curve, the anti-shake performance index of the camera can be quickly obtained. The whole process does not require the use of a gyroscope and a vibration table, thereby saving time for switching the working state of the vibration table, greatly simplifying the detection process, allowing operators to complete the detection more quickly and conveniently, which is conducive to improving the detection efficiency, and then to improving the production efficiency of the camera. At the same time, it also reduces the purchase of the vibration table and the operation and maintenance of a dedicated person, which can effectively save the detection cost and test difficulty. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The figure is a flow chart of a method for detecting OIS anti-shake performance of a vibration-free platform according to an embodiment of the present invention.
[0054] Figure 2 Schematic diagram of the standard plate.
[0055] Figure 3 This is a flowchart of step S3.
[0056] Figure 4 The actual fluctuation trajectory diagram of the reference point.
[0057] Figure 5 is the fitted sine function curve.
[0058] Figure 6 This is a flowchart of step S5.
[0059] Figure 7 It is a structural block diagram of an OIS anti-shake performance detection device without a vibration table according to another embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following is further described in detail through specific implementation methods:
[0061] Example
[0062] Please refer to Figure 1, which is a flow chart of an OIS anti-shake performance detection method without a vibration platform according to an embodiment of the present invention. In the OIS anti-shake performance detection method without a vibration platform of this embodiment, during the anti-shake performance detection process, an ideal sinusoidal function curve is connected to the camera as a control signal to control the motion trajectory of the camera, and the camera is made to acquire images based on the motion trajectory, and the reference points in the image are identified through image processing and recognition technology, and fitted into the actual motion trajectory of the camera, and finally the difference between the actual motion trajectory of the camera and the theoretical motion trajectory is compared to detect the anti-shake performance of the camera. The whole process does not require the use of a vibration platform, and only one (group) of image analysis is required, so the detection effect is high. Specifically, the OIS anti-shake performance detection method without a vibration platform of this embodiment includes the following steps:
[0063] S1: Calibrate reference points and capture original images.
[0064] Please refer to Figure 2 , a mark plate is provided, on which a number of reference points are marked. In the present embodiment, each reference point is defined as a black dot, the diameter of the dot is 15±5mm, the center of each dot is on the same straight line and the distance between two adjacent dots is equidistant; the dot area is defined as a non-light-transmitting area to facilitate the identification of the dots in subsequent steps; the other areas on the mark plate except the reference points are light-transmitting areas (such as transparent areas), so that the light emitted by the light source placed behind the mark plate can pass through the mark plate, so as to provide the camera with a suitable color temperature and illumination when taking images. In some other embodiments, the dots on the mark plate can also be implemented with other opaque colors, as long as the light-transmitting area and the non-light-transmitting area on the mark plate can be implemented and distinguished.
[0065] When shooting the original image, an ideal sine function curve is connected to the control system of the camera to control the camera to move synchronously with the ideal sine function curve and to sequentially and continuously shoot each reference point on the reference plate while moving, so as to obtain multiple original images. In this embodiment, when the camera continuously collects the original images of the reference points, the number of collected original images is greater than or equal to 90, and the collection time of the camera is greater than three times the vibration frequency of the ideal sine function curve, that is:
[0066]
[0067] Where: T 0 is the acquisition time of the camera; f' is the vibration frequency of the ideal sinusoidal function curve.
[0068] S2: Obtain the original image data sequence.
[0069] The original images collected by the camera are acquired in sequence, and the original images are integrated in time sequence to form an original image data sequence.
[0070] S3: Preprocess the original image and identify the center coordinates.
[0071] Preprocess each original image in the original image data sequence to obtain a preprocessed image, determine the midpoint of the reference point in the preprocessed image and identify the center coordinates of the reference point, and integrate each center coordinate in time sequence to obtain a center coordinate sequence; in this embodiment, the center of the reference point is defined as the center of the circle of the reference point. It is understandable that in some other embodiments, when determining the center of the reference point, other points can also be selected, as long as the determined point is consistent for each reference point.
[0072] Please refer to Figure 3 , this step includes the following sub-steps:
[0073] S301: Convert the original image into a BMP picture.
[0074] The original images in the original image data sequence are obtained, and the formats of the original images are converted to obtain a set of RGB images, and then the RGB images are encapsulated to obtain BMP images, so that the center coordinates of the reference points in the BMP images can be identified later. In this embodiment, the original images are converted into RGB images by using an interpolation method, such as nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, etc. The specific method of encapsulating the RGB images into BMP images can be implemented by using existing technologies, which will not be described in detail here.
[0075] S302: Crop the BMP image.
[0076] Each BMP image is cropped in turn to obtain a preprocessed image. In order to facilitate accurate identification of the center coordinates of the reference point, the BMP image needs to be cropped to obtain a preprocessed image that can directly identify the center coordinates; in this embodiment, the preprocessed image only contains one reference point and the reference point is located at the center of the preprocessed image. Specifically, when there is only one reference point in the BMP image, it is only necessary to crop the redundant area around the BMP image so that the reference point is as close to the center of the image as possible, and when the BMP image contains multiple reference points, it is necessary to crop the reference points farther from the center of the image and retain the reference points closer to the center of the image and make the retained reference points as close to the center of the image as possible, so as to obtain a set of preprocessed images.
[0077] S303: Identify the center coordinates and integrate them to form a center coordinate sequence.
[0078] The pre-processed images are identified in sequence, the center of the reference point in the pre-processed image and its center coordinates are determined, and each center coordinate is integrated in time sequence to obtain a center coordinate sequence. Specifically, the method for identifying the center of the reference point and its center coordinates is:
[0079] First, obtain the camera preprocessed image and perform color conversion on the preprocessed image to obtain a grayscale image.
[0080] Then, a pixel threshold is set, and the grayscale image is binarized according to the pixel threshold to obtain a binary image. When the grayscale image is binarized, each pixel of the grayscale image is traversed, and if the pixel value of the pixel is less than the pixel threshold, the pixel value of the pixel is set to "0" (that is, set to black), and if the pixel value of the pixel is greater than or equal to the pixel threshold, the pixel value of the pixel is set to "255" (that is, set to white) to generate the binary image. In this way, the obtained binary image includes a first pixel (that is, a black pixel) whose pixel value is less than the pixel threshold and a second pixel (that is, a white pixel) whose pixel value is greater than or equal to the pixel threshold.
[0081] Finally, traverse each pixel of the binary image. For each first pixel in the binary image, it has a first pixel coordinate in the target plane coordinate system. The X coordinate value and Y coordinate value of the first pixel coordinate are accumulated and the average value is calculated to obtain the first reference coordinate. Specifically, in the binary image, traverse each pixel. If the pixel value of the pixel is "0" (i.e., a black pixel after binarization), the first pixel coordinate of the pixel is recorded. If the pixel value of the pixel is "255", the pixel value of the next pixel is determined until all the pixels in the binary image are judged. In the judgment process, each time a black pixel is determined, the X coordinate value and Y coordinate value of the first pixel coordinate are accumulated to obtain the sum of the X coordinate values and the sum of the Y coordinate values of all the first pixel coordinates in the binary image corresponding to the preprocessed image, which is expressed as (∑X i ,∑Y i )(where ∑X i is the sum of the X coordinate values of the first pixel coordinates in the binary image corresponding to the preprocessed image, ∑Y i The center coordinates of the reference point are obtained by calculating the sum of the X coordinate values and the sum of the Y coordinate values, which is expressed as (X I ,Y I )(where X I =∑X i / i,Y I =∑Y i / i), and integrate the center coordinates of all reference points into a center coordinate sequence in time sequence.
[0082] S4: Fit the center coordinate sequence into a sinusoidal function curve.
[0083] The center coordinate sequence is fitted with a sine function to obtain a sine function curve of the center of the reference point. In this embodiment, since the camera is controlled based on an ideal sine function curve, the fluctuation trajectory of the reference point captured by the camera when following the movement is also approximately a periodic change similar to the sine function. Therefore, fitting the center coordinates of each reference point with a sine function can reflect the actual fluctuation trajectory of the reference point (such as Figure 4 The actual fluctuation trajectory of the reference point is shown in Figure 2).
[0084] Since the center coordinates include X coordinates and Y coordinates, when performing curve fitting, the X coordinate values and Y coordinate values in the center coordinates are fitted respectively. Specifically, taking the X coordinate as an example, the specific method of fitting the curve is as follows:
[0085] First, the X-axis sine function model is defined with the acquisition period of each original image (i.e., the acquisition time of the camera) as the horizontal coordinate and the fluctuation amplitude of the X-coordinate value in each center coordinate of each original image as the vertical coordinate. In this embodiment, the X-axis sine function model is expressed as:
[0086]
[0087] in: It is the X-axis sinusoidal function model; is the period of the X-axis sine function model, and is a positive integer; is the initial amplitude of the X-axis sine function model, is the initial frequency of the X-axis sine function model, is the initial phase of the X-axis sine function model, The initial offset of the X-axis sine function model.
[0088] Then, the initial parameters of the X-axis sine function model are set according to the anti-shake requirements of the camera. In this embodiment, the initial parameters include at least an initial amplitude, an initial frequency, an initial phase, and an initial offset. The anti-shake requirements vary according to the specific camera. In specific implementation, the initial amplitude, initial frequency, initial phase, and initial offset can be customized according to actual conditions. Taking the vibration frequency f=6 Hz as an example, the initial parameters of the X-axis sine function model are set as follows: initial amplitude Initial frequency Initial Phase Initial offset This defines the X-axis sine function model.
[0089] Finally, the initial parameters of the X-axis sine function model are estimated based on the X-coordinate value of each center coordinate in the center coordinate sequence to obtain the estimated fitting parameters of the X-axis sine function model. The fitting parameters correspond to the initial parameters, including fitting amplitude, fitting frequency, fitting phase and fitting offset, thereby generating and outputting the fitted X-axis sine function curve. When estimating the fitting parameters, this embodiment can estimate the fitting parameters based on the least squares method, the global optimization algorithm, etc. to construct a sine function curve.
[0090] like Figure 5 As shown, it is the X-axis sinusoidal function curve after fitting, which is expressed as:
[0091]
[0092] Where: y x is the fitted X-axis sine function model, whose value is the fluctuation amplitude of the X-coordinate value of the center coordinate, that is, the actual displacement of the reference point center in the X-axis direction; t x is the acquisition period of the original image, t x =T 0 , and t x is a positive integer; A x is the fitting amplitude of the X-axis sine function model, ω x is the fitting frequency of the X-axis sine function model, is the fitting phase of the X-axis sine function model, k x is the fitting offset of the X-axis sine function model.
[0093] The curve fitting of the Y coordinate value in the center coordinate is the same as the fitting process of the X coordinate value, which will not be described here. The Y-axis sine function curve obtained by fitting is expressed as:
[0094]
[0095] Where: y y is the fitted Y-axis sinusoidal function model, whose value is the fluctuation amplitude of the Y coordinate value of the center coordinate, that is, the actual displacement of the reference point center in the Y-axis direction; t y is the acquisition period of the original image, t y =T 0 , and t y is a positive integer; A y is the fitting amplitude of the Y-axis sine function model, ω y is the fitting frequency of the Y-axis sine function model, is the fitting phase of the Y-axis sine function model, k y is the fitting offset of the Y-axis sine function model.
[0096] As a preferred method of this embodiment, since the camera of this embodiment will move following the sine function signal under the control of the ideal sine function curve, in order to ensure that the fitted sine function curve conforms to the actual motion trajectory of the camera as much as possible, the error of the fitted sine function curve is controlled. Specifically, the control method is as follows:
[0097] The actual fluctuation trajectory of the reference point photographed by the camera is determined according to the sine function curve, and the theoretical fluctuation trajectory of the reference point photographed by the camera is determined according to the theoretical sine function, and the fitting frequency of the sine function curve and the theoretical frequency of the ideal sine function curve are obtained, as well as the actual displacement of the reference point based on the sine function curve and the theoretical displacement based on the ideal sine function curve are obtained respectively; the frequency error of the curve is calculated according to the fitting frequency and the theoretical frequency, and the displacement error of the reference point is calculated according to the actual displacement and the theoretical displacement, and it is judged whether the frequency error and the displacement error meet the preset conditions. If so, the sine function curve is output, otherwise, the initial parameters are adjusted to repeat the parameter estimation.
[0098] In this embodiment, the frequency error needs to meet the following preset conditions:
[0099]
[0100] in: is the frequency error; ω is the fitting frequency of the X-axis sine function model and / or the Y-axis sine function model; ω' is the theoretical frequency.
[0101] The shift error must meet the following preset conditions:
[0102] |y-y'|<5 (6)
[0103] Wherein: |y-y'| is the displacement error; y is the X-axis sine function model and / or the Y-axis sine function model, that is, the actual displacement of the reference point on the X-axis and / or the Y-axis; y' is the theoretical displacement of the reference point on the X-axis and / or the Y-axis.
[0104] S5: Calculates anti-shake performance indicators.
[0105] The peaks and troughs of the sine function curve are determined based on the center coordinates in the center coordinate sequence and the sine function curve, and the center coordinates of the reference points corresponding to the peaks and troughs are obtained to determine the actual movement distance of the camera. The anti-shake performance index is calculated based on the actual movement distance and theoretical movement distance of the camera to test the anti-shake performance of the camera.
[0106] Please refer to Figure 6 , this step includes the following sub-steps:
[0107] S501: Determine the peaks and troughs and their center coordinates.
[0108] The peaks and troughs of the sine function curve are determined according to the center coordinate sequence and the sine function curve, and the center coordinates of the peaks and troughs are determined according to the time when the peaks and troughs appear. Specifically, the time when the peaks and troughs appear is determined according to the X-axis sine function curve, and the X coordinates of each center coordinate in the center coordinate sequence at the corresponding time are obtained based on the time, and the time when the peaks and troughs appear is determined according to the Y-axis sine function curve, and the Y coordinates of each center coordinate in the center coordinate sequence at the corresponding time are obtained based on the time.
[0109] S502: Calculate the average value of the fluctuation amplitudes of the peak and the trough.
[0110] The peak average amplitude of the fluctuation amplitude of the peak center coordinate and the trough average amplitude of the fluctuation amplitude of the trough center coordinate are calculated respectively. Specifically, the peak average amplitude of the X coordinate is calculated according to the fluctuation amplitude of the X coordinate of each center coordinate, and the peak average amplitude of the Y coordinate is calculated according to the fluctuation amplitude of the Y coordinate of each center coordinate.
[0111] In this embodiment, the calculation formulas for the average peak amplitude and the average trough amplitude of the X coordinate in the center coordinate are as follows:
[0112]
[0113] Among them: AveMax x ,AveMin x are the average amplitude of the peak and the average amplitude of the trough of the X coordinate respectively; is the fluctuation amplitude of the nth peak in the X coordinate, n=1,2,...,N x , N x is the number of peaks in the X coordinate; is the fluctuation amplitude of the mth trough in the X coordinate, m=1,2,...,M x , M x is the number of valleys in the X coordinate.
[0114] The calculation formulas for the average peak amplitude and the average trough amplitude of the Y coordinate in the center coordinate are as follows:
[0115]
[0116] Among them: AveMax y ,AveMin y are the average amplitude of the peak and the average amplitude of the trough of the Y coordinate respectively; is the fluctuation amplitude of the nth peak in the Y coordinate, n=1,2,...,N y , N y is the number of peaks in the Y coordinate; is the fluctuation amplitude of the mth trough in the Y coordinate, m=1,2,...,M y , M y is the number of valleys in the Y coordinate.
[0117] S503: Calculate the actual moving distance of the camera.
[0118] The actual moving distance of the camera is calculated according to the average amplitude of the peak and the average amplitude of the trough. Specifically, the actual moving distance of the camera on the X axis is calculated according to the average amplitude of the peak and the average amplitude of the trough of the X coordinate, and the actual moving distance of the camera on the Y axis is calculated according to the average amplitude of the peak and the average amplitude of the trough of the Y coordinate.
[0119] In this embodiment, the calculation formula for the actual moving distance of the camera on the X-axis is as follows:
[0120] LB x =AveMax x +AveMin x (9)
[0121] Among them: LB x The actual moving distance of the camera on the X axis.
[0122] The calculation formula for the actual movement distance of the camera on the Y axis is as follows:
[0123] LB y =AveMax y +AveMin y (10)
[0124] Among them: LB y The actual moving distance of the camera on the Y axis.
[0125] S504: Calculate an anti-shake performance index.
[0126] The theoretical moving distance of the camera is determined based on the ideal sine function curve, and the anti-shake performance index is calculated based on the actual moving distance of the camera and the theoretical moving distance; in this embodiment, the anti-shake performance index includes an X-axis anti-shake performance index and a Y-axis anti-shake performance index. Specifically, the X-axis anti-shake performance index and the Y-axis anti-shake performance index are calculated based on the actual moving distance of the camera on the X-axis and the Y-axis and the theoretical moving distance, respectively.
[0127] In this embodiment, the theoretical moving distance of the camera on the X-axis is:
[0128] LA x =EFL×tan(a x ) (11)
[0129] Where: LAx is the theoretical moving distance of the camera on the X axis; EFL is the focal length of the camera, which can be obtained by referring to the specification manual; a x It is the angle between the camera's offset on the X-axis and the optical axis.
[0130] The theoretical moving distance of the camera on the Y axis is:
[0131] LA y =EFL×tan(a y ) (12)
[0132] Where: LA y is the theoretical moving distance of the camera on the Y axis; EFL is the focal length of the camera, which can be obtained by referring to the specification manual; a y It is the angle between the camera's offset on the Y axis and the optical axis.
[0133] Thus, the X-axis anti-shake performance index and the Y-axis anti-shake performance index can be calculated respectively. In this embodiment, the calculation formula of the X-axis anti-shake performance index is as follows:
[0134]
[0135] Among them, DB x It is the X-axis anti-shake performance indicator.
[0136] The calculation formula of the Y-axis anti-shake performance index is as follows:
[0137]
[0138] Among them, DB y It is the Y-axis anti-shake performance indicator.
[0139] As shown in the following Table 1, a comparison is made between the anti-shake performance indicators tested by the anti-shake performance detection method of this embodiment and the conventional anti-shake performance indicators tested by a vibration table.
[0140] Table 1
[0141]
[0142] As shown in Table 2 below, frequency error and shift error data of the anti-shake performance detection method of this embodiment are shown.
[0143] Table 2
[0144] SN Result Frequency Error X Frequency error Y Shift error X Shift error Y 036XX43L0C3J pass 0.010948 0.017849 1.30249 1.136963 036XX43D02EX pass 0.059883 0.056251 1.054504 0.774536 036XX43D054E pass 0.059205 0.054389 1.047424 0.863342 036XX43D0600 pass 0.054095 0.046678 1.033569 0.717468
[0145] According to Table 1 and Table 2 above, the X-axis anti-shake performance index and the Y-axis anti-shake performance index obtained by the method of this embodiment can accurately reflect the test situation of the camera. It can be seen that the anti-shake performance detection method of this embodiment can quickly and conveniently realize the anti-shake performance detection of the camera, and the whole process does not require a vibration table, thereby saving the time of switching the working state of the vibration table, which is conducive to improving the detection efficiency. At the same time, it also reduces the purchase of the vibration table and the operation and maintenance of the dedicated person, which can effectively save the detection cost and test difficulty.
[0146] Please refer to Figure 7 , is a structural block diagram of an OIS anti-shake performance detection device for a vibration-free platform according to another embodiment of the present invention. The OIS anti-shake performance detection device for a vibration-free platform according to this embodiment is used to implement the OIS anti-shake performance detection method for a vibration-free platform according to the above embodiment, so as to simplify the detection process and thereby improve the anti-shake performance detection efficiency of the camera. Specifically, the OIS anti-shake performance detection device for a vibration-free platform according to this embodiment includes a target plate 1, a light source 2, a signal generating module 3, an image acquisition system 4 and an image processing system 5.
[0147] There are several reference points marked on the target plate 1. Each reference point is defined as a black dot with a diameter of 15±5mm. The centers of the dots are on the same straight line and the distance between two adjacent dots is equidistant. The dot area is defined as a non-light-transmitting area to facilitate the identification of the dots in subsequent steps. The other areas on the target plate 1 except the reference points are light-transmitting areas. The light source 2 is set behind the target plate 1 to provide illumination. The light emitted by the light source 2 can pass through the light-transmitting area of the target plate 1 to provide appropriate color temperature and illumination for the image acquisition system 4 set in front of the target plate 1 when taking images.
[0148] The signal generating module 3 can generate an ideal sinusoidal function curve and is connected to the image acquisition system 4 .
[0149] The image acquisition system 4 includes a camera 41 and an image acquisition module 42 electrically connected to the camera 41. The camera 41 is connected to the ideal sinusoidal function curve generated by the signal generating module 3, and can move accordingly based on the control of the ideal sinusoidal function curve and shoot reference points on the target plate 1. The image acquisition module 42 continuously acquires the original image of each reference point when the camera 41 moves and transmits it to the image processing system 5. In this embodiment, the number of the acquired original images is greater than or equal to 90, and the acquisition time is greater than three times the vibration frequency of the ideal sinusoidal function curve.
[0150] The image processing system 5 includes an image acquisition module 51, a coordinate identification module 52, a curve fitting module 53 and an index calculation module 54. The image acquisition module 51 is connected to the image acquisition module 42 to sequentially acquire the original images transmitted by the image acquisition module 42, and integrate the original images in time sequence to form an original image data sequence. The coordinate identification module 52 sequentially converts the format of the original images acquired by the image acquisition module 51 and crops them to obtain pre-processed images, determines the midpoint of the reference point in the pre-processed image and identifies the center coordinates of the reference point, and then integrates the center coordinates in time sequence to obtain a center coordinate sequence. The curve fitting module 53 performs a sine function fitting on the center coordinate sequence to obtain a sine function curve of the reference point center; through curve fitting, the actual fluctuation trajectory of the reference point can be reflected to facilitate error control. The index calculation module 54 determines the peaks and valleys of the sine function curve based on the center coordinates in the center coordinate sequence and the sine function curve, obtains the center coordinates of the reference points corresponding to the peaks and valleys, so as to determine the actual moving distance of the camera, and calculates the anti-shake performance index according to the actual moving distance and the theoretical moving distance of the camera to detect the anti-shake performance of the camera. In this embodiment, the specific process of the image processing system 5 performing image processing and calculating the anti-shake index refers to the relevant records of steps S2 to S5 in the above embodiment, which will not be repeated here.
[0151] The OIS anti-shake performance testing device without a vibration table in this embodiment can complete the calculation of the anti-shake performance index of the camera 41 at one time without the aid of a vibration table to provide static testing and dynamic testing for the camera 41, thereby detecting the anti-shake performance of the camera 41 with high detection efficiency and low difficulty.
Claims
1. A method for detecting OIS anti-shake performance without a vibration table, characterized in that: The following steps are involved: Calibrate several reference points, and control the camera to continuously shoot each reference point based on an ideal sine function curve to obtain multiple original images; Sequentially acquiring the original images to form an original image data sequence; Preprocessing each original image in the original image data sequence, and detecting the center coordinates of each reference point in the original image to obtain a center coordinate sequence; Performing a sine function fitting on the center coordinate sequence to obtain a sine function curve of the reference point center; The peaks and troughs of the waveform are determined based on the center coordinate sequence and the sine function curve, the actual movement distance of the camera is determined according to the peaks and troughs, and the anti-shake performance index is calculated according to the actual movement distance and theoretical movement distance of the camera.
2. The OIS anti-shake performance detection method of the vibration-free table according to claim 1, characterized in that: In the step of calibrating a plurality of reference points and controlling a camera to continuously shoot each reference point based on an ideal sinusoidal function curve to obtain a plurality of original images, the reference points are calibrated on a reference plate, and a plurality of reference points are equidistantly calibrated on the reference plate. When the camera continuously captures original images of the reference points, the number of original images captured is greater than or equal to 90, and the camera's acquisition time is greater than three times the vibration frequency of the ideal sinusoidal function curve.
3. The OIS anti-shake performance detection method of the vibration-free table according to claim 2, characterized in that: The step of preprocessing each original image in the original image data sequence and detecting the center coordinates of each reference point in the original image to obtain a center coordinate sequence includes the following sub-steps: After converting the format of each original image in the original image data sequence to obtain an RGB picture, the RGB picture is packaged to obtain a BMP picture, wherein the original image is converted to the RGB picture by using an interpolation method; Cropping each BMP picture in turn to obtain a preprocessed picture, wherein the preprocessed picture contains only one reference point and the reference point is located at the center of the preprocessed picture; The pre-processed images are identified in sequence, the center of the reference point in the pre-processed images and its center coordinates are determined, and a center coordinate sequence is obtained by time-sequential integration.
4. The OIS anti-shake performance detection method of the vibration-free table according to claim 3, characterized in that: In the step of sequentially identifying the pre-processed images, determining the center of the reference point in the pre-processed images and its center coordinates, and integrating in time sequence to obtain a center coordinate sequence, the method for identifying the center coordinates of the reference point is: Convert the preprocessed image into a corresponding grayscale image; Setting a pixel threshold, and binarizing the grayscale image according to the pixel threshold to obtain a binary image, wherein the binary image includes a first pixel whose pixel value is less than the pixel threshold and a second pixel whose pixel value is greater than or equal to the pixel threshold; Each pixel of the binary image is traversed, and for each first pixel, the X coordinate value and the Y coordinate value of the first pixel coordinate are respectively accumulated and then the average value is calculated to obtain the center coordinate of the reference point.
5. The OIS anti-shake performance detection method of the vibration-free table according to claim 3, characterized in that: In the step of fitting the center coordinate sequence with a sine function to obtain a sine function curve of the reference point center, the specific method of fitting the curve is: A sine function model is defined with the acquisition period of each original image as the horizontal coordinate and the fluctuation amplitude of each center coordinate in each original image as the vertical coordinate; initial parameters of the sine function model are set according to the anti-shake requirements of the camera; the initial parameters of the sine function model are estimated based on each center coordinate in the center coordinate sequence to obtain the fitting parameters of the estimated sine function model, and a fitted sine function curve is output; wherein the initial parameters include initial amplitude, initial frequency, initial phase and initial offset, and the fitting parameters correspond to the initial parameters, and the fitting parameters include fitting amplitude, fitting frequency, fitting phase and fitting offset.
6. The OIS anti-shake performance detection method of the vibration-free platform according to claim 5, characterized in that: In the step of fitting the center coordinate sequence with a sine function to obtain a sine function curve at the center of the reference point, after estimating the parameters and outputting the sine function curve, the error of the sine function curve is also controlled; the specific method of control is: The actual motion fluctuation of the reference point photographed by the camera is determined according to the sine function curve, and the theoretical fluctuation trajectory of the reference point photographed by the camera is determined according to the theoretical sine function, and the fitting frequency of the sine function curve and the theoretical frequency of the ideal sine function curve, as well as the actual displacement of the reference point based on the sine function curve and the theoretical displacement based on the ideal sine function curve are respectively obtained; the frequency error of the curve is calculated according to the fitting frequency and the theoretical frequency, and the displacement error of the reference point is calculated according to the actual displacement and the theoretical displacement, and it is judged whether the frequency error and the displacement error meet the preset conditions. If so, the sine function curve is output, otherwise, the initial parameters are adjusted to repeat the parameter estimation.
7. The OIS anti-shake performance detection method of the vibration-free platform according to claim 6, characterized in that: The frequency error satisfies the following conditions: in, is the frequency error, ω is the fitting frequency, and ω' is the theoretical frequency; The shift error satisfies the following conditions: y-y'|<5; Among them, |y-y'| is the displacement error, y is the actual displacement of the reference point, and y' is the theoretical displacement of the reference point.
8. The OIS anti-shake performance detection method of the vibration-free table according to claim 5, characterized in that: The steps of determining the peaks and troughs of the waveform based on the center coordinate sequence and the sine function curve, determining the actual moving distance of the camera according to the peaks and troughs, and calculating the anti-shake performance index according to the actual moving distance and theoretical moving distance of the camera include the following sub-steps: Determine the peak and trough of the sine function curve according to the center coordinate sequence and the sine function curve, and determine the peak center coordinate and the trough center coordinate corresponding to the occurrence time of the peak and the trough; Calculate the average peak amplitude of the fluctuation amplitude of the peak center coordinate and the average trough amplitude of the fluctuation amplitude of the trough center coordinate respectively; Calculating the actual moving distance of the camera according to the average amplitude of the peak and the average amplitude of the trough; The theoretical moving distance of the camera is determined based on the ideal sine function curve, and the anti-shake performance index is calculated according to the actual moving distance and the theoretical moving distance of the camera.
9. The OIS anti-shake performance detection method of the vibration-free platform according to claim 8, characterized in that: In the step of calculating the actual moving distance of the camera according to the average peak amplitude and the average trough amplitude, the actual moving distance of the camera is expressed as: Among them, LB is the actual moving distance of the camera, is the average peak amplitude, X n is the fluctuation amplitude of the nth peak, n=1,2,...,N, N is the number of peaks; is the average amplitude of the trough, Y m is the fluctuation amplitude of the mth trough, m=1,2,...,M, M is the number of troughs; In the step of determining the theoretical moving distance of the camera based on the ideal sinusoidal function curve, and calculating the anti-shake performance index according to the actual moving distance of the camera and the theoretical moving distance, the anti-shake performance index is expressed as: Among them, DB is the anti-shake performance index, and LA is the theoretical moving distance of the camera.
10. An OIS anti-shake performance detection device without a vibration table, characterized in that: include: A target plate, on which a plurality of reference points are marked; A light source is arranged behind the target plate and is used to provide illumination; A signal generating module, used for generating an ideal sinusoidal function curve; An image acquisition system, comprising a camera and an image acquisition module electrically connected to the camera, wherein the camera moves based on the control of the ideal sine function curve, and the image acquisition module is used to continuously acquire original images when the camera moves; as well as Image processing system, including: An image acquisition module, used for sequentially acquiring the original images to form an original image data sequence; A coordinate recognition module, used for preprocessing each original image in the original image data sequence, and detecting the center coordinates of each reference point in the original image to obtain a center coordinate sequence; A curve fitting module, used for performing a sine function fitting on the center coordinate sequence to obtain a sine function curve of the reference point center; The index calculation module is used to determine the peaks and troughs of the waveform based on the central coordinate sequence and the sine function curve, determine the actual movement distance of the camera according to the peaks and troughs, and calculate the anti-shake performance index according to the actual movement distance and theoretical movement distance of the camera.
Citation Information
Cited By
Optical anti-shake test method and system, computer equipment and storage medium
CN121253114A
