A digital optical axis stability detection method and system
By constructing an optical axis stability detection platform in optoelectronic imaging products and using digital methods to calculate the center and angular offset, the problem of deteriorated aiming effect caused by optical axis offset was solved, and efficient and accurate optical axis stability detection was achieved.
Patent Information
- Application Number
- CN202510114666.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-01-24
AI Technical Summary
Existing optoelectronic imaging products are prone to optical axis shift during focusing or after being vibrated, resulting in poor aiming performance. Traditional detection methods are time-consuming and labor-intensive, and their accuracy depends on manual judgment, making it difficult to achieve efficient and accurate detection.
A digital optical axis stability detection method is adopted. The optical axis stability detection platform is composed of the photoelectric imaging product under test, collimator and target. The controller records the imaging of the target by the photoelectric imaging product at a specified object distance. The optical axis stability is detected by calculating the center coordinate offset and angular offset.
It enables rapid and accurate detection of the optical axis stability of photoelectric imaging products, improving detection efficiency and reducing human error.
Smart Images

Figure CN119915496B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical axis stability detection technology, specifically relating to a digital optical axis stability detection method and system. Background Technology
[0002] In practical applications, optoelectronic imaging products need to aim at various targets at near and far distances. According to the Gaussian formula, the sharpest imaging position differs for targets with different objectives. Therefore, adjusting the optical back focus is necessary to achieve the best imaging effect for targets at different object distances, resulting in better aiming accuracy and a better user experience. However, lenses with focusing capabilities require more complex optical structure designs to change the relative position of the lens and camera body. During focusing or after impacts and vibrations, issues such as gaps in mating parts and shock resistance reliability often cause optical axis shifts, leading to a deterioration in aiming performance. Therefore, optical axis stability has always been a crucial indicator for optoelectronic imaging products. In the production and testing of such products, an optical axis stability testing system is an essential test item.
[0003] Traditional testing methods place the product within the collimator's optical path, aim at a single point or line target, and then adjust the focus. The stability of the optical axis is qualitatively estimated by observing the target's movement within the image. Alternatively, a portion of the image is captured during the process, and the pixel coordinates of the target within the image are calculated to determine the offset difference. More precise methods add a two-dimensional turntable to the product fixture. When optical axis movement is detected, the turntable is rotated to record the angle, thus calculating the offset angles in both the horizontal and vertical directions. However, existing methods are time-consuming and labor-intensive, and their accuracy is highly dependent on manual judgment, making them prone to errors. Summary of the Invention
[0004] Based on this, the present invention provides a digital optical axis stability detection method and system, which aims to quickly and accurately measure the optical axis stability of optoelectronic imaging products.
[0005] A first aspect of this invention provides a digital optical axis stability detection method, applied in a scenario with an optical axis stability detection platform. The optical axis stability detection platform includes a test photoelectric imaging product, a collimator, and a target, connected sequentially by optical paths. The target is fixed on a first platform, and the target is moved via the first platform. The test photoelectric imaging product is fixed on a second platform, and the height and angle of the test photoelectric imaging product are adjusted via the second platform so that the test photoelectric imaging product aims at the target through the collimator. Both the test photoelectric imaging product and the target are electrically connected to a controller. The method includes:
[0006] Step 1.1: Control the photoelectric imaging product under test to work, image the target at a specified object distance through the collimator, and record a first image, the first image containing the initial feature aperture region determined according to the target;
[0007] Step 1.2: After performing a preset evaluation operation on the photoelectric imaging product under test, repeat the operation in Step 1.1 and record the second image. The second image contains the target feature aperture region corresponding to the initial feature aperture region.
[0008] Step 1.3: Determine the center coordinates of the initial feature aperture region in the first image and the target feature aperture region in the second image, respectively, and calculate the offset based on the center coordinates to detect the optical axis stability.
[0009] Furthermore, both the first and second images contain five feature hole regions, with one feature hole region located in the middle region of the target and the other four feature hole regions arranged circumferentially in the middle region.
[0010] Furthermore, the step of determining the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, and calculating the offset based on the center coordinates, includes:
[0011] Obtain the first detection region of the first image and the second detection region of the second image, and perform grayscale processing and binarization processing on the first detection region and the second detection region in sequence to obtain the corresponding first binarized image and second binarized image respectively;
[0012] Contour extraction is performed on the first binarized image and the second binarized image respectively, and the area of each contour is determined. Based on the preset area, contour filtering is performed to obtain each target contour. The contour extracted from the first binarized image is the initial feature hole region, and the contour extracted from the second binarized image is the target feature hole region.
[0013] Determine the minimum bounding rectangle of each target contour, and obtain the center coordinates of the minimum bounding rectangle;
[0014] Calculate each center offset based on the center coordinates of the minimum bounding rectangle in the first binarized image and the center coordinates of the minimum bounding rectangle in the corresponding second binarized image;
[0015] Calculate the average center offset based on each of the aforementioned center offsets;
[0016] The angular offset is calculated based on the size of the camera module pixel, the focal length of the lens, and the average offset of the center.
[0017] Furthermore, the step of determining the minimum bounding rectangle of each of the target contours includes:
[0018] Step 2.1: Obtain the coordinates of the top left and bottom right points on the target contour, determine the circumscribed rectangle, and determine the area of the circumscribed rectangle;
[0019] Step 2.2: Rotate the coordinates of all points on the target contour by a preset angle, obtain the coordinates of the top left and bottom right points on the rotated target contour, determine the corresponding bounding rectangle, and calculate the area of the corresponding bounding rectangle.
[0020] Step 2.3: Determine whether the area of the bounding rectangle defined by the rotated target contour is less than the area of the bounding rectangle defined by the original target contour. If so, proceed to step 2.4.
[0021] Step 2.4 involves repeating steps 2.2 and 2.3 until the area of the bounding rectangle determined by the rotated target contour is not less than the area of the bounding rectangle determined by the target contour before rotation, and then defining the bounding rectangle determined by the target contour before rotation as the minimum bounding rectangle.
[0022] Furthermore, in the step of calculating each center offset based on the center coordinates of the minimum bounding rectangle in the first binarized image and the corresponding center coordinates of the minimum bounding rectangle in the second binarized image, the formula for calculating the center offset is:
[0023]
[0024] Where, Δ i x represents the center offset of the i-th feature hole region. centerP1_i Let x represent the x-coordinate of the center point of the i-th feature hole region in the first binarized image. centerP2_i The x-coordinate of the center point of the i-th feature hole region in the second binarized image is y. centerP1_i The y-coordinate represents the center point of the i-th feature hole region in the first binarized image. centerP2_i This represents the ordinate of the center point of the i-th feature hole region in the second binarized image.
[0025] Furthermore, in the step of calculating the angular offset based on the sensor pixel size, lens focal length, and the average center offset, the formula for calculating the angular offset is:
[0026] Δ θ =0.06·tan -1 (Δ pix ·a / (f′·1000))
[0027] Where, Δ θThe angular offset, Δ pix The value represents the average center offset, a represents the size of the camera module pixel, and f′ represents the focal length of the lens.
[0028] Further, the step of determining the center coordinates of the initial feature aperture region in the first image and the target feature aperture region in the second image, and calculating the offset based on the center coordinates to detect optical axis stability, includes the following:
[0029] Based on the distribution of each feature pore region on the target, the corresponding target detection region is determined, wherein the part of each feature pore region closest to the middle region is taken as the target detection region.
[0030] The target detection region is converted into a grayscale image, and edge detection is performed on the grayscale image to obtain an edge image;
[0031] The edge image is subjected to Fourier transform to obtain a frequency domain image;
[0032] The frequency domain graph is normalized to obtain the MTF curve;
[0033] Based on the MTF curve and the preset amplitude, the corresponding frequency is determined as the MTF value of the corresponding feature aperture region.
[0034] A second aspect of this invention provides a digital optical axis stability detection system for implementing the digital optical axis stability detection method as described in the first aspect, the system comprising:
[0035] The first recording module is used to control the operation of the photoelectric imaging product under test, to image the target at a specified object distance through the collimator, and to record a first image, the first image containing the initial feature aperture region determined according to the target.
[0036] The second recording module is used to perform a preset evaluation operation on the photoelectric imaging product under test, and then repeat the operation in the first recording module to record a second image. The second image contains a target feature aperture region corresponding to the initial feature aperture region.
[0037] The calculation module is used to determine the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, respectively, and calculate the offset based on the center coordinates to detect the optical axis stability.
[0038] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the digital optical axis stability detection method as described in the first aspect.
[0039] A fourth aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the digital optical axis stability detection method as described in the first aspect.
[0040] This invention provides a digital optical axis stability detection method and system. The system comprises a test photoelectric imaging product, a collimator, and a target, forming an optical axis stability detection platform. The test photoelectric imaging product is controlled to operate, and the collimator images the target at a specified object distance, recording a first image. The first image includes an initial feature aperture region determined based on the target. After performing a preset evaluation operation on the test photoelectric imaging product, the above operation is repeated, recording a second image. The second image includes a target feature aperture region corresponding to the initial feature aperture region. The center coordinates of the initial feature aperture region in the first image and the target feature aperture region in the second image are determined respectively. Based on the center coordinates, the offset is calculated to detect optical axis stability. This method significantly improves detection efficiency and obtains accurate detection results. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the optical axis stability testing platform;
[0042] Figure 2 The flowchart illustrates the implementation of a digital optical axis stability detection method according to Embodiment 1 of the present invention.
[0043] Figure 3 This is a schematic diagram of the target.
[0044] Figure 4 This is a schematic diagram of the software interface;
[0045] Figure 5 This is a structural block diagram of a digital optical axis stability detection system provided in Embodiment 2 of the present invention;
[0046] Figure 6 This is a schematic diagram of the electronic device in Embodiment 3 of the present invention.
[0047] In the figure: 1. Photoelectric imaging product under test; 2. Collimator; 3. Target; 4. First stage; 5. Second stage; 6. Controller.
[0048] The following detailed embodiments will be further described in conjunction with the above-mentioned accompanying drawings. Detailed Implementation
[0049] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0050] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0052] Example 1
[0053] Please see Figure 1 , Figure 1 This is a schematic diagram of the optical axis stability testing platform. Specifically, the optical axis stability testing platform includes a photoelectric imaging product under test 1, a collimator 2, and a target 3 connected in sequence by optical paths. The target 3 is fixed on the first stage 4, and the target 3 is moved by the first stage 4. The photoelectric imaging product under test 1 is fixed on the second stage 5, and the height and angle of the photoelectric imaging product under test 1 are adjusted by the second stage 5 so that the photoelectric imaging product under test 1 aims at the target 3 through the collimator 2. Both the photoelectric imaging product under test 1 and the target 3 are electrically connected to the controller 6.
[0054] It should be noted that the first stage 4 has the function of electrically controlling the movement of the target 3, which can adjust the relative position of the target 3 and the collimator 2 to simulate targets at different object distances. The test object, i.e., the photoelectric imaging product 1 to be tested, is fixed on the second stage 5 using a high-precision connecting device with minimal clamping error, and is not limited to using Picatinny rails or similar forms. The test object detects and images the target 3 through the collimator 2 and transmits the image to the controller 6, which can be a computer.
[0055] In the actual testing process, after the target 3 at the first object distance is focused and clear, the current image is acquired. Then, the target 3 is moved to the position of the second object distance, refocused and the current image is acquired. The target 3 comparison area can be manually or automatically selected on the operation software interface. Finally, the pixel offset of the target position in the two images is calculated.
[0056] Please see Figure 2 , Figure 2 The following is a flowchart illustrating the implementation of a digital optical axis stability detection method according to Embodiment 1 of the present invention. In this embodiment, the digital optical axis stability detection method specifically includes steps S01 to S03.
[0057] Step S01: Control the photoelectric imaging product under test to work, image the target at a specified object distance through the collimator, and record a first image, the first image containing the initial feature aperture region determined according to the target.
[0058] Step S02: After performing a preset evaluation operation on the photoelectric imaging product under test, repeat the operation in step S01 and record a second image. The second image contains the target feature aperture region corresponding to the initial feature aperture region.
[0059] It should be noted that both the first and second images show five feature aperture regions. One feature aperture region is located in the center of the target, while the other four feature aperture regions are circumferentially positioned within the center. Please refer to [link / reference]. Figure 3 The diagram shows a target, which is rectangular in shape. In other embodiments of the present invention, the target may also be semi-circular, parallelogram, etc.
[0060] In this embodiment, the preset evaluation operations include repeated disassembly and assembly, impact, or focusing of the photoelectric imaging product under test.
[0061] Step S03: Determine the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, respectively, and calculate the offset based on the center coordinates to detect the optical axis stability.
[0062] Specifically, the first detection region of the first image and the second detection region of the second image are obtained. The first detection region and the second detection region are then subjected to grayscale processing and binarization processing in sequence to obtain the corresponding first binarized image and second binarized image, respectively. In this embodiment, the detection region is determined according to the size information of the image. The detection region is centered on the center of the input image, with a width w of 1 / 3 of the width of the input image and a height h of 1 / 3 of the height of the input image.
[0063] Contours are extracted from the first and second binarized images respectively, and the area of each contour is determined. Based on the preset area, contours are filtered to obtain each target contour. The contours extracted from the first binarized image are the initial feature hole regions, and the contours extracted from the second binarized image are the target feature hole regions. It should be noted that contours with an area in the range of (15, 500) are set as target contours.
[0064] Determine the minimum bounding rectangle of each target contour and obtain the center coordinates of the minimum bounding rectangle. Specifically, in step one, obtain the coordinates (x, y, y) of the top leftmost point on the target contour. min ,y min ) and the coordinates of the bottom right point (x max ,y max Determine the circumscribed rectangle and its area.
[0065] Step 2: Rotate the coordinates of all points on the target contour by a preset angle, obtain the coordinates of the top left and bottom right points on the rotated target contour, determine the corresponding bounding rectangle, and calculate the area of the corresponding bounding rectangle. The rotated point position (x', y') is:
[0066] x' = x × cos(b) - y × sin(b)
[0067] y' = x × sin(b) + y × cos(b)
[0068] b is the preset angle;
[0069] Step 3: Determine whether the area of the bounding rectangle defined by the rotated target contour is less than the area of the bounding rectangle defined by the target contour before rotation. If so, proceed to step 4.
[0070] Step four, then repeat steps two and three until the area of the bounding rectangle determined by the target contour after rotation is not less than the area of the bounding rectangle determined by the target contour before rotation, and define the bounding rectangle determined by the target contour before rotation as the minimum bounding rectangle.
[0071] Based on the center coordinates of the minimum bounding rectangle in the first binarized image and the corresponding center coordinates of the minimum bounding rectangle in the second binarized image, calculate the center offsets. The formula for calculating the center offsets is as follows:
[0072]
[0073] Where, Δ i x represents the center offset of the i-th feature hole region. centerP1_i Let x represent the x-coordinate of the center point of the i-th feature hole region in the first binarized image. centerP2_iThe x-coordinate of the center point of the i-th feature hole region in the second binarized image is y. centerP1_i The y-coordinate represents the center point of the i-th feature hole region in the first binarized image. centerP2_i This represents the ordinate of the center point of the i-th feature hole region in the second binarized image. In this embodiment, all detected center coordinates are sorted from top to bottom and from left to right. The sorted coordinates are the center coordinates of all detected feature hole regions. The sequence number, center point position, and detection border are also displayed in the input image. Please refer to [link / reference]. Figure 4 This is a schematic diagram of the software interface;
[0074] Calculate the average center offset based on each center offset;
[0075] The angular offset is calculated based on the camera module pixel size, lens focal length, and average center offset. The formula for calculating the angular offset is:
[0076] Δ θ =0.06·tan -1 (Δ pix ·a / (f′·1000))
[0077] Where, Δ θ The angular offset, Δ pix The value represents the average center offset, a represents the size of the camera module pixel, and f′ represents the focal length of the lens.
[0078] In other embodiments of the present invention, after determining the center coordinates of the initial feature aperture region in the first image and the target feature aperture region in the second image, and calculating the offset based on the center coordinates to detect the optical axis stability, the method further includes:
[0079] Based on the distribution of each feature aperture region on the target, the corresponding target detection region is determined. Specifically, the region closest to the center of each feature aperture region is taken as the target detection region. For example, taking a specific feature aperture region on the target, the coordinates of the top left point (x') are... min ,y' min ) and the coordinates of the bottom right point (x' max ,y' max To obtain the width rect_w and height rect_h of the minimum bounding rectangle, the expressions for width rect_w and height rect_h are:
[0080] rect_w=x' max -x' min
[0081] rect_h=y' max -y' min
[0082] Based on the order of the feature aperture regions, taking the middle feature aperture region as the center, determine the positions of the other four feature aperture regions (two feature aperture regions are located on the left, and the other two feature aperture regions are located on the right). The target detection areas of the feature aperture regions on the left and in the center are defined by (x'). max ,y' max The target detection region is defined with center (-rect_h / 2), width (rect_w / 2), and height (rect_y / 2). The target detection region for the feature hole area on the right is defined with center (x'). min ,y' min The target detection region is determined with center (+rect_h / 2), width (rect_w / 2), and height (rect_h / 2).
[0083] The target detection area is converted into a grayscale image, and edge detection is performed on the grayscale image to obtain an edge image. In this embodiment, Canny edge detection is used.
[0084] Perform a Fourier transform on the edge image to obtain the frequency domain image;
[0085] The frequency domain plot is normalized to obtain the MTF curve;
[0086] Based on the MTF curve and the preset amplitude, the corresponding frequency is determined as the MTF value of the corresponding feature aperture region, where the preset amplitude is 0.5.
[0087] In summary, the digital optical axis stability detection method proposed in this invention comprises an optical axis stability detection platform consisting of a photoelectric imaging product under test, a collimator, and a target. The method controls the photoelectric imaging product under test to operate, images the target at a specified object distance using the collimator, and records a first image containing an initial feature aperture region determined based on the target. After performing a preset evaluation operation on the photoelectric imaging product under test, the above operation is repeated to record a second image containing a target feature aperture region corresponding to the initial feature aperture region. The center coordinates of the initial feature aperture region in the first image and the target feature aperture region in the second image are determined respectively, and the offset is calculated based on the center coordinates to detect optical axis stability. This method can greatly improve detection efficiency and obtain accurate detection results.
[0088] Example 2
[0089] Please see Figure 5 , Figure 5This is a structural block diagram of a digital optical axis stability detection system provided in Embodiment 2 of the present invention. This digital optical axis stability detection system 200 is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0090] Specifically, the digital optical axis stability detection system 200 includes: a first recording module 21, a second recording module 22, and a calculation module 23, wherein:
[0091] The first recording module 21 is used to control the operation of the photoelectric imaging product under test, to image the target at a specified object distance through the collimator, and to record a first image, wherein the first image includes an initial feature aperture region determined according to the target.
[0092] The second recording module 22 is used to repeat the operation in the first recording module after performing a preset evaluation operation on the photoelectric imaging product under test, and record a second image. The second image includes a target feature aperture region corresponding to the initial feature aperture region. There are five feature aperture regions in both the first image and the second image. One feature aperture region is located in the middle region of the target, and the other four feature aperture regions are circumferentially arranged in the middle region.
[0093] The calculation module 23 is used to determine the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, respectively, and calculate the offset based on the center coordinates to detect the optical axis stability.
[0094] Furthermore, in some optional embodiments of the present invention, the computing module 23 includes:
[0095] The acquisition unit is used to acquire the first detection region of the first image and the second detection region of the second image, and to perform grayscale processing and binarization processing on the first detection region and the second detection region in sequence to obtain the corresponding first binarized image and second binarized image respectively.
[0096] The contour extraction unit is used to extract contours from the first binarized image and the second binarized image respectively, determine the area of each contour, and perform contour filtering according to the preset area to obtain each target contour. The contour extracted from the first binarized image is the initial feature hole region, and the contour extracted from the second binarized image is the target feature hole region.
[0097] A determining unit is used to determine the minimum bounding rectangle of each of the target contours and obtain the center coordinates of the minimum bounding rectangle;
[0098] The first calculation unit is used to calculate the center offset based on the center coordinates of the minimum bounding rectangle in the first binarized image and the center coordinates of the corresponding minimum bounding rectangle in the second binarized image. The formula for calculating the center offset is:
[0099]
[0100] Where, Δ i x represents the center offset of the i-th feature hole region. centerP1_i Let x represent the x-coordinate of the center point of the i-th feature hole region in the first binarized image. centerP2_i The x-coordinate of the center point of the i-th feature hole region in the second binarized image is y. centerP1_i The y-coordinate represents the center point of the i-th feature hole region in the first binarized image. centerP2_i This represents the ordinate of the center point of the i-th feature hole region in the second binarized image;
[0101] The second calculation unit is used to calculate the average center offset based on each of the center offsets.
[0102] The third calculation unit is used to calculate the angular offset based on the camera module pixel size, lens focal length, and the average center offset. The formula for calculating the angular offset is:
[0103] Δ θ =0.06·tan -1 (Δ pix ·a / (f′·1000))
[0104] Where, Δ θ The angular offset, Δ pix The value represents the average center offset, a represents the size of the camera module pixel, and f′ represents the focal length of the lens.
[0105] Furthermore, in some optional embodiments of the present invention, the determining unit includes:
[0106] The first acquisition subunit is used to acquire the coordinates of the top left and bottom right points on the target contour, determine the circumscribed rectangle, and determine the area of the circumscribed rectangle.
[0107] The rotation subunit is used to rotate the coordinates of all points on the target contour by a preset angle, obtain the coordinates of the top left and bottom right points on the rotated target contour, determine the corresponding bounding rectangle, and calculate the area of the corresponding bounding rectangle.
[0108] The judgment sub-unit is used to determine whether the area of the bounding rectangle defined by the rotated target contour is less than the area of the bounding rectangle defined by the target contour before rotation.
[0109] The loop subunit is used to repeatedly execute the rotation subunit and the judgment subunit when it is determined that the area of the outer rectangle determined by the rotated target contour is less than the area of the outer rectangle determined by the target contour before rotation, until the area of the outer rectangle determined by the rotated target contour is not less than the area of the outer rectangle determined by the target contour before rotation, and the outer rectangle determined by the target contour before rotation is defined as the minimum outer rectangle.
[0110] Furthermore, in some optional embodiments of the present invention, the digital optical axis stability detection system 200 further includes:
[0111] The target detection region determination module is used to determine the corresponding target detection region based on the distribution of each feature pore region on the target. Specifically, the part of each feature pore region closest to the middle region is taken as the target detection region.
[0112] The conversion module is used to convert the target detection region into a grayscale image and perform edge detection on the grayscale image to obtain an edge image;
[0113] The Fourier transform module is used to perform a Fourier transform on the edge image to obtain a frequency domain image;
[0114] The normalization processing module is used to normalize the frequency domain graph to obtain the MTF curve;
[0115] The frequency determination module is used to determine the corresponding frequency based on the MTF curve and the preset amplitude, so as to serve as the MTF value of the corresponding feature aperture region.
[0116] Example 3
[0117] In another aspect, the present invention also proposes an electronic device, please refer to [link to relevant documentation]. Figure 6 The electronic device shown is an embodiment of the present invention, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the digital optical axis stability detection method as described above.
[0118] In some embodiments, the processor 10 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 20 or process data, such as executing access restriction programs.
[0119] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 20 can include both internal and external storage units of the electronic device. The memory 20 can be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or will be output.
[0120] It should be pointed out that, Figure 6 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0121] This invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the digital optical axis stability detection method described above.
[0122] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0123] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0124] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0125] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0126] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A digital optical axis stability detection method, characterized in that, In a scenario with an optical axis stability testing platform, the optical axis stability testing platform includes a test photoelectric imaging product, a collimator, and a target connected sequentially via optical paths. The target is fixed on a first platform, and the target is moved via the first platform. The test photoelectric imaging product is fixed on a second platform, and the height and angle of the test photoelectric imaging product are adjusted via the second platform so that the test photoelectric imaging product aims at the target through the collimator. Both the test photoelectric imaging product and the target are electrically connected to a controller. The method includes: Step 1.1: Control the photoelectric imaging product under test to work, image the target at a specified object distance through the collimator, and record a first image, the first image containing the initial feature aperture region determined according to the target; Step 1.2: After performing a preset evaluation operation on the photoelectric imaging product under test, repeat the operation in Step 1.1 and record the second image. The second image contains the target feature aperture region corresponding to the initial feature aperture region. Step 1.3: Determine the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, respectively, and calculate the offset based on the center coordinates to detect the optical axis stability; Both the first and second images contain five feature hole regions, one of which is located in the middle of the target, and the other four feature hole regions are circumferentially arranged in the middle of the target. The steps of determining the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, and calculating the offset based on the center coordinates, include: Obtain the first detection region of the first image and the second detection region of the second image, and perform grayscale processing and binarization processing on the first detection region and the second detection region in sequence to obtain the corresponding first binarized image and second binarized image respectively; Contour extraction is performed on the first binarized image and the second binarized image respectively, and the area of each contour is determined. Based on the preset area, contour filtering is performed to obtain each target contour. The contour extracted from the first binarized image is the initial feature hole region, and the contour extracted from the second binarized image is the target feature hole region. Determine the minimum bounding rectangle of each target contour, and obtain the center coordinates of the minimum bounding rectangle; Calculate each center offset based on the center coordinates of the minimum bounding rectangle in the first binarized image and the center coordinates of the minimum bounding rectangle in the corresponding second binarized image; Calculate the average center offset based on each of the aforementioned center offsets; The angular offset is calculated based on the size of the camera module pixel, the focal length of the lens, and the average offset of the center.
2. The digital optical axis stability detection method according to claim 1, characterized in that, The step of determining the minimum bounding rectangle of each of the target contours includes: Step 2.1: Obtain the coordinates of the top left and bottom right points on the target contour, determine the circumscribed rectangle, and determine the area of the circumscribed rectangle; Step 2.2: Rotate the coordinates of all points on the target contour by a preset angle, obtain the coordinates of the top left and bottom right points on the rotated target contour, determine the corresponding bounding rectangle, and calculate the area of the corresponding bounding rectangle. Step 2.3: Determine whether the area of the bounding rectangle defined by the rotated target contour is less than the area of the bounding rectangle defined by the target contour before rotation. If so, proceed to step 2.
4. Step 2.4 involves repeating steps 2.2 and 2.3 until the area of the bounding rectangle determined by the rotated target contour is not less than the area of the bounding rectangle determined by the target contour before rotation, and then defining the bounding rectangle determined by the target contour before rotation as the minimum bounding rectangle.
3. The digital optical axis stability detection method according to claim 2, characterized in that, In the step of calculating the center offset based on the center coordinates of the minimum bounding rectangle in the first binarized image and the corresponding center coordinates of the minimum bounding rectangle in the second binarized image, the formula for calculating the center offset is: in, This represents the center offset of the i-th feature hole region. This represents the x-coordinate of the center point of the i-th feature hole region in the first binarized image. This represents the x-coordinate of the center point of the i-th feature hole region in the second binarized image. This represents the ordinate of the center point of the i-th feature hole region in the first binarized image. This represents the ordinate of the center point of the i-th feature hole region in the second binarized image.
4. The digital optical axis stability detection method according to claim 3, characterized in that, In the step of calculating the angular offset based on the sensor pixel size, lens focal length, and the average center offset, the formula for calculating the angular offset is: in, This represents the angular offset. This represents the average offset of the center. This indicates the size of the movement's pixels. This indicates the focal length of the lens.
5. The digital optical axis stability detection method according to claim 4, characterized in that, The step of determining the center coordinates of the initial feature aperture region in the first image and the target feature aperture region in the second image, and calculating the offset based on the center coordinates to detect optical axis stability, is followed by: Based on the distribution of each feature pore region on the target, the corresponding target detection region is determined, wherein the part of each feature pore region closest to the middle region is taken as the target detection region. The target detection region is converted into a grayscale image, and edge detection is performed on the grayscale image to obtain an edge image; The edge image is subjected to Fourier transform to obtain a frequency domain image; The frequency domain graph is normalized to obtain the MTF curve; Based on the MTF curve and the preset amplitude, the corresponding frequency is determined as the MTF value of the corresponding feature aperture region.
6. A digital optical axis stability detection system, characterized in that, For implementing the digital optical axis stability detection method as described in any one of claims 1-5, the system comprises: The first recording module is used to control the operation of the photoelectric imaging product under test, to image the target at a specified object distance through the collimator, and to record a first image, the first image containing the initial feature aperture region determined according to the target. The second recording module is used to perform a preset evaluation operation on the photoelectric imaging product under test, and then repeat the operation in the first recording module to record a second image. The second image contains a target feature aperture region corresponding to the initial feature aperture region. The calculation module is used to determine the center coordinates of the initial feature hole region in the first image and the target feature hole region in the second image, respectively, and calculate the offset based on the center coordinates to detect the optical axis stability.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the digital optical axis stability detection method as described in any one of claims 1-5.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the program, implements the digital optical axis stability detection method as described in any one of claims 1-5.
Citation Information
Patent Citations
A system and method for three-dimensional laser scanning with optical position sensing
WO2024220842A2