Automatic testing method and device for optical sighting telescope
By combining a reflective collimator and a dual-axis linkage displacement platform with a host computer vision algorithm, the exit pupil distance, diameter, and magnification of the optical sight are automatically identified, solving the problems of low efficiency and large error in the existing technology and realizing high-precision automated testing.
Patent Information
- Application Number
- CN202510960524.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-28
AI Technical Summary
The existing technology has problems such as low efficiency, poor repeatability and large subjective errors in the testing of pupil distance, pupil diameter and magnification of optical sights, and the degree of automation is insufficient.
The system employs a reflective collimator, sight bracket, and dual-axis linkage displacement platform in collaboration with a host computer vision algorithm. By generating a collimated beam, setting parameters, and acquiring image data, it automatically identifies the focus position and calculates the pupil distance, diameter, and magnification using a half-window jump extremum detection algorithm and Hough circle transform technology.
It enables unmanned, high-precision measurement of optical sight parameters, significantly improving measurement efficiency and accuracy. It is suitable for automated quality inspection and production line integration of optical sights, eliminating errors caused by human intervention.
Smart Images

Figure CN120846644A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical measurement, and in particular to an automatic testing method and apparatus for optical sights. Background Technology
[0002] Optical sights are usually key equipment for aiming rifles and other light weapons. They are an important support for improving shooting accuracy and hit rate. Compared with iron sights without a scope, optical sights use optical lenses to image the target and aiming line on the same focal plane, which facilitates aiming and shooting. The exit pupil parameter and magnification constitute the key technical indicators for evaluating the performance of the sight. The exit pupil parameter includes the exit pupil diameter and exit pupil distance.
[0003] The exit pupil diameter directly affects the light throughput and image quality of the sight, determining the shooter's field of view brightness and aiming tolerance. The exit pupil distance ensures a safe distance between the human eye and the eyepiece, avoiding the risk of mechanical damage. Magnification precisely balances the ability to resolve target details and the field of view. Therefore, exit pupil distance, exit pupil diameter, and magnification are usually tested.
[0004] Current technologies for testing the exit pupil distance, exit pupil diameter, and magnification of optical sights typically rely on manual measurement and adjustment, along with semi-automatic measurement methods based on cameras. However, this approach suffers from low efficiency, poor repeatability, and significant subjective errors due to dependence on the operator's visual judgment and manual adjustment. Furthermore, while autofocus devices are introduced, manual operation is still required to locate the approximate focus position. Therefore, it is necessary to use automated testing methods to automatically test the exit pupil distance, exit pupil diameter, and magnification of optical sights. Summary of the Invention
[0005] The purpose of this invention is to provide an automatic testing method and apparatus for optical sights, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an automatic testing method for optical sights, comprising the following specific steps:
[0007] Step 1: Set positioning markers. Attach the first black quadrilateral marker to the left half of the eyepiece of the sight and the second black quadrilateral marker to the right half of the objective lens, ensuring that the two markers do not overlap in the field of view of the sight.
[0008] Step 2: Secure the sight to the sight holder, with the eyepiece of the sight facing the side of the industrial camera;
[0009] Step 3: Generate a collimated beam, activate the reflective collimator module, generate a collimated beam through the parabolic mirror and the white light source, construct an infinite white background, and adjust the position of the slide rail;
[0010] Step 4: Set parameters and start testing. Open the host computer software, set the parameters, and then click the start button. The host computer sends commands to the motor to perform automatic testing.
[0011] Step 5: Collect image data at different locations during camera movement, and perform local sharpness calculation on the central region of each frame image to generate a location and sharpness dataset;
[0012] Step 6: Use the half-window jump extreme value detection algorithm to identify the positions of the eyepiece mark focus point and the exit pupil image focus point from the dataset, and calculate the distance between them as the exit pupil distance;
[0013] Step 7: Extract the exit pupil outline and convert it to the actual diameter, and calculate the sight magnification. After the test is completed, the host computer automatically generates a test report, which includes the exit pupil distance, diameter and magnification, and controls the displacement platform to return to the initial position to prepare for the next round of testing.
[0014] Preferably, the side lengths of the first black quadrilateral marker and the second black quadrilateral marker in step one are 4mm and 3mm, respectively, and when the sight is fixed in step two, the optical axis of the sight is parallel to the movement direction of the electric displacement platform.
[0015] Preferably, the position adjustment of the slide rail in step three is used to enable the industrial camera and lens to capture clear images of the two markers within the travel range of the electric displacement platform, and to perform the following cyclic operation:
[0016] Acquire the current field of view image and calculate the image sharpness evaluation value Q using the Tenengrad gradient method;
[0017] Record slider position x i Corresponding resolution Q i ;
[0018] The slider is driven to move to the right by a set step size Δx;
[0019] Repeat until the slider reaches the right limit or the preset end position;
[0020] The above operations generate a dataset with increasing x: {(x0,Q0),(x1,Q),(x2,Q2),.......,(x n Q n )};
[0021] With x as the variable and Q as the independent variable, this data has two extreme points, corresponding to the cases where the imaging system is focused on the marker on the eyepiece surface and the case where the imaging system is focused on the marker on the exit pupil image plane, respectively. The camera coordinate values x corresponding to the two extreme points are obtained using a half-window skip extreme value detection algorithm. lens and x EP x EP To determine the coordinates of the imaging system when focusing on the exit pupil image plane marker, x lens The coordinates of the imaging system when focusing on the marker on the eyepiece surface are given by the following formula for calculating the exit pupil distance:
[0022] L = |x lens -x EP |
[0023] After the exit pupil distance test is completed, move the slider to x. EP Given the coordinates, at which point the camera captures a clear exit pupil image, and extracting the pixel diameter n, the actual exit pupil diameter EPD is obtained by the following formula:
[0024]
[0025] Where n is the pixel size of the exit pupil image, H is the vertical physical size of the sensor, N is the vertical pixel size of the image, u is the object distance, and f is the focal length of the imaging objective lens.
[0026] Given the exit pupil diameter EPD and the objective lens frame size D, the magnification M can be obtained from the following formula:
[0027]
[0028] Preferably, the setting parameters in step four specifically include the movement stroke, the movement step length, and the window size, with values of 150mm, 0.1mm, and 69, respectively. The automatic testing by the host computer in step four specifically includes driving the industrial camera to move continuously along the optical axis direction through a dual-axis linkage displacement platform, so as to independently control the imaging distance and optical focus. The dual-axis linkage displacement platform includes a first electric displacement platform and a second electric displacement platform.
[0029] Preferably, the half-window jump extreme value detection algorithm in step six specifically includes setting the window size to W, where W is an odd number to ensure the symmetry of the two sides of the window:
[0030] S1: Read the dataset {(x0,Q0),(x1,Q),(x2,Q2),.......,(x n Q n The dataset contains n data points.
[0031] S2: Employ a variable window extreme value localization strategy, setting the detection starting point as the [missing value]. Each point is centered on the current detection point. A symmetric detection window is constructed for the radius. Local extremum search is performed within the window. The Q values of all data points within the window are traversed, and the point with the largest Q value is marked as a candidate extremum.
[0032] S3: When the center point of the window is the maximum value within the window, add it to the extreme value set and trigger adaptive window jump, intelligently jump the center of the search window to the first point after the current window, and skip the confirmed extreme value neighborhood;
[0033] When the maximum value within the window is not at the left or right endpoint of the window, the center of the window is directly moved to the position of the maximum value to continue the search. When the maximum value within the window is at one of the endpoints of the window, the search is moved to the right endpoint to continue the search.
[0034] S4: Until At this point, it is no longer possible to construct a complete window; the search must be stopped.
[0035] The extreme value distribution of the half-window jump extreme value detection algorithm is as follows: Within this range, the time complexity of the half-window jump extreme value detection algorithm is O(n).
[0036] Preferably, step seven, extracting the exit pupil contour and converting it to the actual diameter, specifically includes acquiring an image at the exit pupil image focus point, fitting the pixel diameter of the exit pupil image contour using Hough circle transform, and combining the known sensor physical size, image resolution, and objective lens focal length to proportionally convert the actual exit pupil diameter. Furthermore, the calculation of the sight magnification in step seven is automatically calculated based on the ratio of the objective lens frame physical size to the exit pupil diameter.
[0037] An automatic testing device for optical sights, comprising:
[0038] A reflective collimator is used to generate a collimated beam to simulate a background light source at infinity.
[0039] A sight bracket is used to fix the optical sight under test and align the optical axis of the sight with the optical axis of the test device. The sight bracket includes the sight under test and the bracket body. The sight bracket is located on the side of the reflective collimator.
[0040] A dual-axis linkage displacement platform, comprising a first electric displacement platform, a second electric displacement platform, and a slide rail base, wherein the first electric displacement platform is mounted on the bottom of the second electric displacement platform, the slide rail base is mounted on the bottom of the first electric displacement platform, and the second electric displacement platform is provided with an optical imaging component for acquiring image data of the eyepiece and objective lens areas of the sight.
[0041] An optical imaging assembly, comprising a lens and an industrial camera, wherein the lens is mounted at the end of the industrial camera, and the industrial camera is mounted on a second electrically driven displacement platform.
[0042] Preferred options also include:
[0043] The system includes a host computer, a motion control card, and a data processing platform. The host computer and data processing platform are connected to the motion control card and to an industrial camera. The host computer and data processing platform are used to control the movement of the dual-axis linkage displacement platform, image acquisition, and data processing, and automatically output the measurement results of the exit pupil distance, exit pupil diameter, and magnification.
[0044] Positioning markers are attached to the left half of the eyepiece and the right half of the objective lens of the sight, respectively.
[0045] Preferably, the host computer includes:
[0046] Motion control module, which drives the displacement platform to move in a set step size and records position data;
[0047] An extreme value detection module is used to quickly locate the eyepiece marker focus point and exit pupil image focus point in the dataset based on a half-window jump extreme value detection algorithm.
[0048] Preferably, the host computer further includes a parameter calculation module, which is used to extract the pupil image contour through Hough circle transformation, calculate the actual exit pupil diameter by combining sensor parameters and objective lens focal length, and calculate the magnification based on the objective lens frame size.
[0049] The technical effects and advantages of this invention are as follows:
[0050] This invention achieves unmanned, high-precision measurement of exit pupil distance, diameter, and magnification through the collaboration of a reflective collimator, sight bracket, dual-axis linkage displacement platform, and host computer vision algorithm. It employs a half-window jump extreme value detection algorithm and local image sharpness calculation technology, combined with a dual-marker positioning strategy for the eyepiece and objective lens, to automatically identify the focus position and extract the exit pupil contour. Furthermore, it calculates the actual exit pupil diameter based on Hough circle transform and sensor parameters, and calculates the magnification based on the objective lens frame size. This facilitates automatic displacement control and data processing, eliminating human intervention errors and significantly improving measurement efficiency and accuracy. It is suitable for automated quality inspection and production line integration of optical sights, solving the problems of excessive human intervention and low testing efficiency in traditional solutions. It achieves fully automated inspection from parameter measurement to data output, significantly improving measurement accuracy and engineering application efficiency. Attached Figure Description
[0051] Figure 1This is a schematic diagram of the automatic testing process for the optical sight of the present invention.
[0052] Figure 2 This is a schematic diagram of the automatic testing device for the optical sight of the present invention.
[0053] Figure 3 This is a schematic diagram of the first black quadrilateral marker of the present invention.
[0054] Figure 4 This is a schematic diagram of the second black quadrilateral marker of the present invention.
[0055] Figure 5 This is a schematic diagram illustrating the clarity and location data of the present invention.
[0056] In the figure: 1. Reflective collimator; 2. Sight bracket; 21. Sight under test; 22. Main body of bracket; 3. Dual-axis linkage displacement platform; 31. Lens; 32. Industrial camera; 33. First electric displacement platform; 34. Second electric displacement platform; 35. Slide rail base. Detailed Implementation
[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] This invention provides, for example Figure 1-5 An automated testing method for optical sights, as shown, includes the following specific steps:
[0059] Step 1: Set positioning markers. Attach the first black quadrilateral marker to the left half of the eyepiece of the sight and the second black quadrilateral marker to the right half of the objective lens, ensuring that the two markers do not overlap in the field of view of the sight. The side lengths of the first and second black quadrilateral markers are 4mm and 3mm, respectively.
[0060] Step 2: Fix the sight, ensuring it is securely mounted on the sight holder with the eyepiece facing the side of the industrial camera. When the sight is fixed, its optical axis should be parallel to the direction of movement of the electric displacement platform.
[0061] Step 3: Generate a collimated beam, activate the reflective collimator module, generate a collimated beam through the parabolic mirror and the white light source, construct an infinite white background, and adjust the position of the slide rail;
[0062] Step 4: Set parameters and start testing. Open the host computer software, set the parameters, and then click the start button. The host computer sends commands to the motor to perform automatic testing. The calculation process of the host computer software is as follows:
[0063] Depend on Figure 5 Based on the data and the exit pupil distance formula, the pupil distance can be calculated as follows:
[0064] L = |x lens -x EP |=|-30.789-(-124.889)|=94.100(mm);
[0065] pass Figure 4 The original fitting yielded a pixel diameter n of 316 (pixels);
[0066] The image was captured using a camera sensor with a resolution of 4504×4096. The camera sensor size is 12.7mm×9.6mm. Therefore, the vertical pixel size N of the image is 4096 pixels, the vertical physical size H of the sensor is 9.6mm, the object distance u is 100mm, the focal length f of the imaging system lens is 16mm, and the diameter D of the objective lens frame of the sight under test is 28.4mm. The exit pupil diameter can then be calculated using the formula for exit pupil diameter.
[0067]
[0068] Simultaneously, the magnification rate is derived from the magnification formula:
[0069]
[0070] Step 5: Collect image data at different locations during camera movement, and perform local sharpness calculation on the central region of each frame image to generate a location and sharpness dataset;
[0071] Step 6: Use the half-window jump extreme value detection algorithm to identify the positions of the eyepiece mark focus point and the exit pupil image focus point from the dataset, and calculate the distance between them as the exit pupil distance;
[0072] Step 7: Extract the exit pupil outline and convert it to the actual diameter, and calculate the sight magnification. After the test, the host computer automatically generates a test report, including the exit pupil distance, diameter, and magnification, and controls the displacement platform to return to the initial position, preparing for the next round of testing. The exit pupil image is concentrated only in the central area of the image, so local sharpness calculation can replace full-image scanning, which significantly reduces the amount of calculation. The above steps facilitate automatic operation without human judgment. Combined with other production equipment on the production line, automated testing can be achieved, reducing the testing cost and measurement error of the exit pupil parameters and magnification of optical sights, and improving measurement accuracy and testing efficiency. Figure 3 and Figure 4 To acquire image data, Figure 3 The image captured when focusing on the marker on the eyepiece surface is the image of the first black quadrilateral marker. Figure 4 The image captured when focusing on the exit pupil image plane marker is the image of the second black quadrilateral marker. Figure 5 The icons in the image indicate the two valid extreme points found by the half-window jump extreme point detection method, as well as the noise points that were filtered out.
[0073] Furthermore, the position adjustment of the slide rail in step three is used to enable the industrial camera and lens to capture clear images of the two markers within the travel range of the electric displacement platform, and to perform the following cyclic operation:
[0074] Acquire the current field of view image and calculate the image sharpness evaluation value Q using the Tenengrad gradient method;
[0075] Record slider position x i Corresponding resolution Q i ;
[0076] The slider is driven to move to the right by a set step size Δx (the step size affects the measurement resolution);
[0077] Repeat until the slider reaches the right limit or the preset end position;
[0078] The above operations generate a dataset with increasing x: {(x0,Q0),(x1,Q),(x2,Q2),.......,(x n Q n )};
[0079] With x as the variable and Q as the independent variable, this data has two extreme points, corresponding to the cases where the imaging system is focused on the eyepiece surface marker and the case where the imaging system is focused on the exit pupil image plane marker (the image formed at the exit pupil position after the objective lens surface marker passes through the sight optical system). The camera coordinate values x corresponding to the two extreme points are obtained using a half-window skip extreme value detection algorithm. lens and x EP x EP To determine the coordinates of the imaging system when focusing on the exit pupil image plane marker, x lens The coordinates of the imaging system when focusing on the marker on the eyepiece surface are given by the following formula for calculating the exit pupil distance:
[0080] L = |x lens -x EP |
[0081] After the exit pupil distance test is completed, move the slider to x. EP Given the coordinates, at which point the camera captures a clear exit pupil image, and extracting the pixel diameter n (pixel), the actual exit pupil diameter EPD is obtained using the following formula:
[0082]
[0083] Where n (pixel) is the pixel size of the exit pupil image, H is the vertical physical size of the sensor, N (pixel) is the vertical pixel size of the image, u is the object distance, and f is the focal length of the imaging objective lens.
[0084] Given the exit pupil diameter EPD and the objective lens frame size D, the magnification M can be obtained from the following formula:
[0085]
[0086] Furthermore, the setting parameters in step four specifically include the movement stroke, movement step size, and window size, with values of 150mm, 0.1mm, and 69, respectively. The automatic testing by the host computer in step four specifically includes driving the industrial camera to move continuously along the optical axis through a dual-axis linkage displacement platform, enabling independent control of the imaging distance and optical focus. The dual-axis linkage displacement platform includes a first electric displacement platform and a second electric displacement platform. The stroke of the first electric displacement platform needs to be long enough to fully meet the test requirements of the exit pupil parameters.
[0087] Specifically, the half-window jump extremum detection algorithm in step six includes setting the window size to W, where W is an odd number to ensure symmetry on both sides of the window:
[0088] S1: Read the dataset {(x0,Q0),(x1,Q),(x2,Q2),.......,(x n Q n The dataset contains n data points.
[0089] S2: Employ a variable window extreme value localization strategy, setting the detection starting point as the [missing value]. Each point is centered on the current detection point. A symmetrical detection window is constructed for the radius. Local extremum search is performed within the window. The Q-values (i.e., sharpness index) of all data points within the window are traversed, and the point with the largest Q-value is marked as a candidate extremum.
[0090] S3: When the center point of the window is the maximum value within the window, add it to the extreme value set and trigger adaptive window jumping, intelligently jumping the search window center to the first point after the current window (assuming the current window center is the i-th point, then the window center jumps to the i-th point). (points), skipping the confirmed extreme value neighborhood;
[0091] When the maximum value within the window is not at the left or right endpoint of the window, the center of the window is directly moved to the position of the maximum value to continue the search. When the maximum value within the window is at one of the endpoints of the window, the search is moved to the right endpoint to continue the search.
[0092] S4: Until At this point, it is no longer possible to construct a complete window; the search must be stopped.
[0093] The extreme value distribution of the half-window jump extreme value detection algorithm is in Furthermore, the time complexity of the half-window jump extremum detection algorithm is O(n), which is significantly better than the traditional sliding window algorithm's O(n×W). The half-window jump extremum detection algorithm needs to reasonably set the window size W. If the W value is too small, it will be sensitive to noise and may misjudge local fluctuations as extrema. If the W value is too large, multiple extrema will be merged, and only the global maximum value can be detected, losing detailed information.
[0094] Furthermore, step seven, which involves extracting the exit pupil contour and converting it to its actual diameter, specifically includes acquiring an image at the exit pupil image focus point, fitting the pixel diameter of the pupil image contour using Hough circle transform, and then, in conjunction with the known sensor physical size, image resolution, and objective lens focal length, proportionally converting the actual exit pupil diameter. In addition, the calculation of the sight magnification in step seven is automatically calculated based on the ratio of the objective lens frame physical size to the exit pupil diameter.
[0095] An automatic testing device for optical sights includes a reflective collimator 1, a sight bracket 2, and a dual-axis linkage displacement platform 3. The reflective collimator 1 generates a collimated beam to simulate an infinity background light source. The sight bracket 2 is used to fix the optical sight under test and align the optical axis of the sight with the optical axis of the testing device. The sight bracket 2 includes the sight under test 21 and a bracket body 22, and is located on the side of the reflective collimator 1. The dual-axis linkage displacement platform 3 includes a first electric displacement platform 33, a second electric displacement platform 34, and a slide rail base 35. The first electric displacement platform 33 is mounted on the bottom of the second electric displacement platform 34, and the slide rail base 35 is mounted on the first electric displacement platform 34. At the bottom of the moving displacement platform 33, an optical imaging component is provided on the second electric displacement platform 34 for acquiring image data of the eyepiece and objective lens area of the sight. The optical imaging component includes a lens 31 and an industrial camera 32. The lens 31 is mounted on the end of the industrial camera 32, and the industrial camera 32 is mounted on the second electric displacement platform 34. This facilitates the formation of an image acquisition system by the optical imaging component and the dual-axis linkage displacement platform 3. The image acquisition system simulates the human eye and uses data processing to simulate the human brain. The observation distance and position of the optical imaging component are adjusted by the movement of the first electric displacement platform 33. Image data at each position is acquired and analyzed to obtain measurement results.
[0096] Furthermore, it also includes a host computer, a motion control card, a data processing platform, and positioning markers. The host computer and data processing platform are connected to the motion control card, which facilitates displacement control, image acquisition, and data analysis, automatically generating exit pupil parameters and magnification measurement reports for the sight. The host computer and data processing platform are also connected to the industrial camera 32. The host computer and data processing platform are used to control the movement of the dual-axis linkage displacement platform 3, image acquisition, and data processing, and automatically output the exit pupil distance, exit pupil diameter, and magnification measurement results. Adjacent positioning markers are respectively attached to the left half of the eyepiece and the right half of the objective lens of the sight, thereby simulating infinity through the reflective collimator 1. The system utilizes a background light source and a dual-axis linkage displacement platform to drive an industrial camera 32 to move precisely along the optical axis. Combined with positioning markers for the eyepiece and objective lens, it automatically collects image data from different positions. Based on machine vision algorithms, it analyzes the image sharpness curve and employs a half-window jump extreme value detection algorithm to quickly locate the two focus peaks of the eyepiece marker and the exit pupil image, thereby automatically calculating the exit pupil distance. Furthermore, it obtains the exit pupil diameter through image contour extraction and sensor parameter conversion, and derives the magnification rate by combining the objective lens frame size. Through hardware collaborative control and intelligent algorithm processing, the system achieves fully automated high-precision detection of key parameters of the optical sight, significantly improving measurement efficiency and consistency.
[0097] Furthermore, the host computer includes a motion control module, an extreme value detection module, and a parameter calculation module. The motion control module is used to drive the displacement platform to move at a set step size and record position data. The extreme value detection module is used to quickly locate the eyepiece mark focus point and the exit pupil image focus point in the dataset based on the half-window jump extreme value detection algorithm. The parameter calculation module is used to extract the pupil image contour through Hough circle transform, and calculate the actual exit pupil diameter by combining sensor parameters and objective lens focal length, and calculate the magnification based on the objective lens frame size.
[0098] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An automatic testing method for optical sights, characterized in that, The specific steps include the following: Step 1: Set positioning markers. Attach the first black quadrilateral marker to the left half of the eyepiece of the sight and the second black quadrilateral marker to the right half of the objective lens, ensuring that the two markers do not overlap in the field of view of the sight. Step 2: Secure the sight to the sight holder, with the eyepiece of the sight facing the side of the industrial camera; Step 3: Generate a collimated beam, activate the reflective collimator module, generate a collimated beam through the parabolic mirror and the white light source, construct an infinite white background, and adjust the position of the slide rail; Step 4: Set parameters and start testing. Open the host computer software, set the parameters, and then click the start button. The host computer sends commands to the motor to perform automatic testing. Step 5: Collect image data at different locations during camera movement, and perform local sharpness calculation on the central region of each frame image to generate a location and sharpness dataset; Step 6: Use the half-window jump extreme value detection algorithm to identify the positions of the eyepiece mark focus point and the exit pupil image focus point from the dataset, and calculate the distance between them as the exit pupil distance; Step 7: Extract the exit pupil outline and convert it to the actual diameter, and calculate the sight magnification. After the test is completed, the host computer automatically generates a test report, which includes the exit pupil distance, diameter and magnification, and controls the displacement platform to return to the initial position to prepare for the next round of testing.
2. The automatic testing method for optical sights according to claim 1, characterized in that, In step one, the side lengths of the first black quadrilateral marker and the second black quadrilateral marker are 4mm and 3mm respectively. In step two, when the sight is fixed, the optical axis of the sight is parallel to the movement direction of the electric displacement platform.
3. The automatic testing method for optical sights according to claim 1, characterized in that, The adjustment of the slide rail position in step three is used to enable the industrial camera and lens to capture clear images of the two markers within the travel range of the electric displacement platform, and to perform the following cyclic operation: Acquire the current field of view image and calculate the image sharpness evaluation value Q using the Tenengrad gradient method; Record slider position x i Corresponding resolution Q i ; The slider is driven to move to the right by a set step size Δx; Repeat until the slider reaches the right limit or the preset end position; The above operations generate a dataset with increasing x: {(x0,Q0),(x1,Q),(x2,Q2),.......,(x n Q n )}; With x as the variable and Q as the independent variable, this data has two extreme points, corresponding to the cases where the imaging system is focused on the marker on the eyepiece surface and the case where the imaging system is focused on the marker on the exit pupil image plane, respectively. The camera coordinate values x corresponding to the two extreme points are obtained using a half-window skip extreme value detection algorithm. lens and x EP x EP To determine the coordinates of the imaging system when focusing on the exit pupil image plane marker, x lens The coordinates of the imaging system when focusing on the marker on the eyepiece surface are given by the following formula for calculating the exit pupil distance: L=|x lens -x EP | After the exit pupil distance test is completed, move the slider to x. EP Given the coordinates, at which point the camera captures a clear exit pupil image, and extracting the pixel diameter n, the actual exit pupil diameter EPD is obtained by the following formula: Where n is the pixel size of the exit pupil image, H is the vertical physical size of the sensor, N is the vertical pixel size of the image, u is the object distance, and f is the focal length of the imaging objective lens. Given the exit pupil diameter EPD and the objective lens frame size D, the magnification M can be obtained from the following formula:
4. The automatic testing method for optical sights according to claim 1, characterized in that, The setting parameters in step four specifically include the movement stroke, movement step length, and window size, with values of 150mm, 0.1mm, and 69, respectively. The automatic testing by the host computer in step four specifically includes driving the industrial camera to move continuously along the optical axis through a dual-axis linkage displacement platform, enabling independent control of the imaging distance and optical focus. The dual-axis linkage displacement platform includes a first electric displacement platform and a second electric displacement platform.
5. The automatic testing method for optical sights according to claim 1, characterized in that, The half-window jump extreme value detection algorithm in step six specifically includes setting the window size to W, where W is an odd number to ensure symmetry on both sides of the window: S1: Read the dataset {(x0,Q0),(x1,Q),(x2,Q2),.......,(x n Q n The dataset contains n data points. S2: Employ a variable window extreme value localization strategy, setting the detection starting point as the [missing value]. Each point is centered on the current detection point. A symmetric detection window is constructed for the radius. Local extremum search is performed within the window. The Q values of all data points within the window are traversed, and the point with the largest Q value is marked as a candidate extremum. S3: When the center point of the window is the maximum value within the window, add it to the extreme value set and trigger adaptive window jump, intelligently jump the center of the search window to the first point after the current window, and skip the confirmed extreme value neighborhood; When the maximum value within the window is not at the left or right endpoint of the window, the center of the window is directly moved to the position of the maximum value to continue the search. When the maximum value within the window is at one of the endpoints of the window, the search is moved to the right endpoint to continue the search. S4: Until At this point, it is no longer possible to construct a complete window; the search must be stopped. The extreme value distribution of the half-window jump extreme value detection algorithm is in Within this range, the time complexity of the half-window jump extreme value detection algorithm is O(n).
6. The automatic testing method for optical sights according to claim 1, characterized in that, The step seven, extracting the exit pupil contour and converting it to the actual diameter, specifically includes acquiring an image at the exit pupil image focus point, fitting the pixel diameter of the pupil image contour using Hough circle transform, and combining the known sensor physical size, image resolution, and objective lens focal length to convert the actual exit pupil diameter proportionally. Furthermore, the calculation of the sight magnification in step seven is automatically calculated based on the ratio of the objective lens frame physical size to the exit pupil diameter.
7. An automatic testing device for optical sights, characterized in that, include: A reflective collimator (1) is used to generate a collimated beam to simulate a background light source at infinity; The sight bracket (2) is used to fix the optical sight under test and align the optical axis of the sight with the optical axis of the test device. The sight bracket (2) includes the sight under test (21) and the bracket body (22). The sight bracket (2) is located on the side of the reflective collimator (1). A dual-axis linkage displacement platform (3) includes a first electric displacement platform (33), a second electric displacement platform (34), and a slide rail base (35). The first electric displacement platform (33) is installed at the bottom of the second electric displacement platform (34), and the slide rail base (35) is installed at the bottom of the first electric displacement platform (33). The second electric displacement platform (34) is provided with an optical imaging component for acquiring image data of the eyepiece and objective lens area of the sight. An optical imaging assembly, comprising a lens (31) and an industrial camera (32), wherein the lens (31) is mounted on the end of the industrial camera (32), and the industrial camera (32) is mounted on a second electric displacement platform (34).
8. An automatic testing device for optical sights according to claim 7, characterized in that, Also includes: The host computer, motion control card and data processing platform are connected to the motion control card and the host computer and data processing platform are connected to the industrial camera (32). The host computer and data processing platform are used to control the movement of the dual-axis linkage displacement platform (3), image acquisition and data processing, and automatically output the measurement results of the exit pupil distance, exit pupil diameter and magnification. Positioning markers are attached to the left half of the eyepiece and the right half of the objective lens of the sight, respectively.
9. An automatic testing device for optical sights according to claim 8, characterized in that, The host computer includes: Motion control module, which drives the displacement platform to move in a set step size and records position data; An extreme value detection module is used to quickly locate the eyepiece marker focus point and exit pupil image focus point in the dataset based on a half-window jump extreme value detection algorithm.
10. An automatic testing device for optical sights according to claim 9, characterized in that, The host computer also includes a parameter calculation module, which is used to extract the pupil image contour through Hough circle transformation, and calculate the actual exit pupil diameter by combining sensor parameters and objective lens focal length, and calculate the magnification based on the objective lens frame size.