CN117850032B - Optical lens adjusting method and system - Google Patents

Optical lens adjusting method and system Download PDF

Info

Publication number
CN117850032B
CN117850032B CN202410263269.2A CN202410263269A CN117850032B CN 117850032 B CN117850032 B CN 117850032B CN 202410263269 A CN202410263269 A CN 202410263269A CN 117850032 B CN117850032 B CN 117850032B
Authority
CN
China
Prior art keywords
ideal
matrix
actual
adjustment
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410263269.2A
Other languages
Chinese (zh)
Other versions
CN117850032A (en
Inventor
吴时杰
王维虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ruiguangda Photoelectric Co ltd
Original Assignee
Shenzhen Ruiguangda Photoelectric Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ruiguangda Photoelectric Co ltd filed Critical Shenzhen Ruiguangda Photoelectric Co ltd
Priority to CN202410263269.2A priority Critical patent/CN117850032B/en
Publication of CN117850032A publication Critical patent/CN117850032A/en
Application granted granted Critical
Publication of CN117850032B publication Critical patent/CN117850032B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B27/00Optical systems or apparatus not provided for by any of the groups G02B1/00 - G02B26/00, G02B30/00
    • G02B27/0012Optical design, e.g. procedures, algorithms, optimisation routines
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/02Mountings, adjusting means, or light-tight connections, for optical elements for lenses
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/02Mountings, adjusting means, or light-tight connections, for optical elements for lenses
    • G02B7/023Mountings, adjusting means, or light-tight connections, for optical elements for lenses permitting adjustment

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

The invention discloses a method and a system for adjusting an optical lens, which belong to the technical field of adjustment of the optical lens, and the method comprises the following steps: setting a target object, acquiring a target image based on the target object, and determining a plurality of target areas according to the target image; performing optical lens adjustment simulation to obtain an actual imaging image and an ideal imaging image; determining an actual matrix and an ideal matrix according to each target area; calculating a difference matrix according to the actual matrix and the ideal matrix, and carrying out initial adjustment of the optical lens according to each difference matrix; determining an actual imaging image, an ideal imaging image, an actual matrix and an ideal matrix after initial adjustment; determining corresponding actual resolution, ideal resolution, actual contrast and ideal contrast according to the actual imaging image and the ideal imaging image; determining a difference matrix, and integrating the difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data; and adjusting the optical lens according to the adjustment reference data.

Description

Optical lens adjusting method and system
Technical Field
The invention belongs to the technical field of adjustment and correction of optical lenses, and particularly relates to an adjustment and correction method and system of an optical lens.
Background
In recent years, with the rapid development of technology, optical technology plays an increasingly important role in various fields such as photography, medical instruments, scientific research instruments, and the like. In these applications, high quality imaging systems are an integral part. However, due to factors such as manufacturing accuracy, material characteristics, and the like, lenses often have various aberrations, which directly affect imaging quality.
To solve this problem, an optical lens adjustment system has been developed. Conventional optical lens tuning systems typically fine tune the lens by mechanical tuning means to optimize imaging quality. However, this method has problems such as low adjustment accuracy and complicated operation. Although existing optical lens tuning systems have achieved certain results, there are challenges and problems. For example, how to improve the adjustment accuracy and efficiency, how to achieve effective adjustment of a complex lens system, how to reduce the cost of the adjustment process, and so on. Therefore, further improvement and development of the optical lens adjustment system, improvement of performance and convenience in use thereof, is an important research direction in the current optical field.
Based on the above, the invention provides a method and a system for adjusting an optical lens.
Disclosure of Invention
In order to solve the problems of the above-mentioned scheme, the present invention provides a method and a system for adjusting an optical lens.
The aim of the invention can be achieved by the following technical scheme:
a method of tuning an optical lens, the method comprising:
step SA1: setting a target object, acquiring a corresponding target image based on the target object in a preset standard environment, and determining a plurality of target areas according to the obtained target image;
further, the method for determining the target area includes:
Step SC1: carrying out gray scale processing on the target image to form a target gray scale image; presetting a standard matrix template;
step SC2: extracting a plurality of matrixes to be selected from the target gray level image according to the standard matrix template, and marking the element in the matrixes to be selected as d ij; i=1, 2, … …, n being a positive integer; j=1, 2, … …, m being a positive integer; the candidate matrix is marked as
Identifying adjacent elements of each element in the matrix to be selected, marking the adjacent elements as d ijc, c=1, 2, … … and v, wherein v is a positive integer, and the value range of v is [3,8];
Step SC3: according to the formula Calculating the area value of each matrix to be selected; wherein: QZ is the area value of the corresponding matrix to be selected;
Step SC4: determining a target area according to the matrix to be selected with the largest area value, and removing the corresponding matrix to be selected from the target gray level image to form a new target gray level image;
Identifying the determined number of target areas, ending analysis when the number of target areas reaches a threshold value X2, and outputting each target area; when the number of target areas does not reach the threshold value X2, the process returns to step SC2.
Further, in step SC2, the target gray-scale image is clipped before determining the matrix to be selected.
Step SA2: performing adjustment simulation of the optical lens to obtain a corresponding actual imaging image and an ideal imaging image; determining a corresponding actual matrix and an ideal matrix according to each target area;
Further, the method for determining the actual matrix and the ideal matrix comprises the following steps:
acquiring an actual imaging image and an ideal imaging image, and identifying an actual target area and an ideal target area corresponding to each target area in the actual imaging image and the ideal imaging image;
Carrying out gray processing on the images corresponding to the actual target area and the ideal target area to obtain a corresponding gray image of the actual target area and a corresponding gray image of the ideal target area;
recognizing gray values of pixels in the target area gray image and the ideal target area gray image; and generating a corresponding actual matrix and an ideal matrix according to the standard matrix template.
Step SA3: calculating corresponding difference matrixes according to the actual matrixes and the ideal matrixes, and carrying out initial adjustment of the optical lens according to each difference matrix;
further, the method for calculating the difference matrix includes:
Marking the actual matrix and the ideal matrix as respectively AndCorresponding elements in the actual matrix and the ideal matrix are respectively marked as s ij and l ij; i=1, 2, … …, n being a positive integer; j=1, 2, … …, m being a positive integer;
Marking an element in the difference matrix as c ij; calculating corresponding elements in the difference matrix according to a formula c ij=sij-lij; the difference matrix is
Further, the method for performing initial adjustment of the optical lens according to each difference matrix comprises the following steps:
Step SD1: analyzing each difference matrix according to a preset initial adjustment algorithm, and determining corresponding adjustment parameters;
Step SD2: adjusting the optical lens according to the adjustment parameters, and performing adjustment simulation on the optical lens after adjustment to obtain a corresponding actual matrix and an ideal matrix; calculating a corresponding difference matrix;
step SD3: step SD1 is returned until the estimated adjustment parameter reaches the initial standard.
Step SA4: determining an actual imaging image, an ideal imaging image, an actual matrix and an ideal matrix after initial adjustment; determining corresponding actual resolution, ideal resolution, actual contrast and ideal contrast according to the initially adjusted actual imaging image and ideal imaging image;
further, the calculation method of the actual contrast ratio and the ideal contrast ratio is as follows:
Gray processing is carried out on the actual imaging image and the ideal imaging image, a corresponding actual gray imaging image and an ideal gray imaging image are obtained, and corresponding actual resolution and ideal resolution are calculated according to the corresponding pixel number;
Marking corresponding elements in the actual gray imaging image and the ideal gray imaging image as ya and yz respectively; a and z respectively represent corresponding elements in the actual gray scale imaging image and the ideal gray scale imaging image;
According to the formula Calculating the actual contrast;
According to the formula The actual contrast is calculated.
Step SA5: determining a corresponding difference matrix according to the initially adjusted actual matrix and the ideal matrix; integrating the obtained difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data;
Step SA6: and adjusting the optical lens according to the obtained adjustment reference data.
Further, the method for adjusting the optical lens according to the adjustment reference data comprises the following steps:
Analyzing according to the adjustment reference data to obtain a corresponding adjustment target; determining a corresponding adjustment step according to the adjustment target;
performing adjustment according to the adjustment step, and acquiring a new adjustment target after adjustment; and so on, until the evaluation stops optimizing, the loop is stopped.
An optical lens adjusting system comprises a region positioning module, an initial adjusting module and an adjusting module;
The region positioning module is used for positioning the actual imaging image and the ideal imaging image and determining a corresponding actual target region and an ideal target region; and determining corresponding actual matrixes and ideal matrixes according to the actual target areas and the ideal target areas.
Setting a target object, acquiring a corresponding target image based on the target object in a preset standard environment, and determining a plurality of target areas according to the obtained target image; and performing adjustment simulation of the optical lens to obtain a corresponding actual imaging image and an ideal imaging image.
The initial adjustment module is used for initially adjusting the optical lens, calculating corresponding difference matrixes according to the actual matrixes and the ideal matrixes, and initially adjusting the optical lens according to each difference matrix.
The adjusting module is used for adjusting after the optical lens is initially adjusted, and determining a corresponding difference matrix according to the actual matrix and the ideal matrix; integrating the obtained difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data; and adjusting the optical lens according to the obtained adjustment reference data.
Compared with the prior art, the invention has the beneficial effects that:
the invention can realize intelligent adjustment of the optical lens, effectively improve the adjustment precision and efficiency and reduce the adjustment cost to a greater extent; the method is convenient for most small and medium-sized micro enterprises to perform adjustment and optimization of the optical lens.
By determining a plurality of target areas according to the target image, the corresponding actual matrix and ideal matrix can be conveniently and rapidly identified in the subsequent adjustment process, and meanwhile, the target areas are screened by calculating corresponding area values, so that the image areas with larger difference are preferentially selected, the identification is convenient, and the processing precision is improved; and the target gray level image is cut before the matrix to be selected is determined, so that the data calculation amount in the process of determining the target area is reduced, and the data processing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The technical solutions of the present invention will be clearly and completely described in connection with the embodiments, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a method for adjusting an optical lens includes:
Step SA1: setting a target object, collecting a target image of the target object under a preset standard environment, and determining a plurality of target areas according to the obtained target image;
The target object is a reference for comparing and adjusting the imaging images later and is used as a background in the images.
The method comprises the steps of collecting target images of a target object under a preset standard environment, namely, presetting a collecting environment of the target images, and then collecting the target images, so that the actual imaging images and the ideal imaging images can be collected under the same environment adjustment; and the influence of environmental factors on the adjustment precision is avoided.
The method for determining the target area comprises the following steps:
Step SC1: performing gray scale processing on the target image to form a target gray scale image, such as image segmentation, image denoising, image enhancement and gray scale transformation; recognizing the gray value of each pixel in the target gray image;
Presetting a standard matrix template, wherein the standard matrix template is a blank matrix, namely presetting the number of rows and columns in the matrix; such as Directly filling gray values of pixels at corresponding positions;
Step SC2: extracting a plurality of matrixes to be selected from the target gray level image according to a preset standard matrix template, and marking the element in the matrixes to be selected as d ij; i=1, 2, … …, n being a positive integer; j=1, 2, … …, m being a positive integer; the candidate matrix is marked as
Identifying adjacent elements of each element in the matrix to be selected, wherein the adjacent elements are marked as d ijc, c=1, 2, … … and v, v is a positive integer, and v is 8 at maximum and 3 at minimum; namely, the value range of v is [3,8];
Step SC3: according to the formula Calculating the area value of each matrix to be selected; wherein: QZ is the area value of the corresponding matrix to be selected; /(I)Refers to selecting the maximum value of the differences between one element and its neighboring elements, not the maximum value of the differences of all elements.
Step SC4: determining target areas according to the matrix to be selected with the largest area value, removing the corresponding matrix to be selected from the target gray level image to form a new target gray level image, identifying the number of the determined target areas, ending analysis when the number of the target areas reaches a threshold value X2, and outputting each target area; when the number of target areas does not reach the threshold value X2, the process returns to step SC2.
Extracting a plurality of matrixes to be selected from the target gray level image according to a preset standard matrix template, and reducing the calculated amount before extracting the matrixes to be selected; the extraction can be concretely performed in various modes, one is to divide and reject areas with smaller gray value difference of some obvious pixels according to the distribution condition of gray values of all pixels, and keep areas with larger gray value fluctuation; for example, intelligent recognition and elimination are carried out based on the existing artificial intelligent algorithm; the other is to identify the matrixes one by one according to the standard matrix template, synchronously calculate the corresponding area value in the identification process, directly reject the matrixes with the area value lower than the threshold value X1, and only reserve the matrixes with the area value higher than the threshold value X1 as the matrixes to be selected; other existing modes can also be adopted to perform early-stage deletion, so that the data processing amount is reduced.
Step SA2: performing adjustment simulation of the optical lens to obtain a corresponding actual imaging image and an ideal imaging image; determining corresponding actual matrixes and ideal matrixes in the actual imaging image and the ideal imaging image according to the corresponding positions of the target areas;
The ideal imaging image refers to an image which can completely restore the real appearance of an object after passing through an optical lens. The image has the characteristics of high resolution, high contrast, accurate color reproduction and the like, and can provide the truest and clearest visual information.
The actual imaging image is the image obtained in practice after passing through the optical lens.
The method for determining the actual matrix and the ideal matrix comprises the following steps:
Acquiring corresponding actual imaging images and ideal imaging images, identifying the corresponding positions of each target area in the actual imaging images and the ideal imaging images, respectively marking the positions as an actual target area and an ideal target area, carrying out gray processing on the images corresponding to the actual target area and the ideal target area to obtain corresponding actual target area gray images and ideal target area gray images, identifying the number of pixels in the target area gray images and the ideal target area gray images, respectively calculating the corresponding resolutions, and marking the positions as actual resolution and ideal resolution; and generating a corresponding actual matrix and an ideal matrix according to the actual resolution, the ideal resolution and the standard matrix template. The method comprises the steps of determining elements to be deleted according to actual resolution, ideal resolution and a standard matrix template, screening according to pixel similarity caused by difference of resolution, and determining a matrix corresponding to the actual resolution; the method has a higher allowable error range, so that deletion can be performed, and initial adjustment can be performed only by determining few groups of paired elements from multiple groups of data.
Specifically, a corresponding intelligent model can be established based on a CNN network or a DNN network, and a corresponding training set is established for training in a manual mode, wherein the training set comprises input data and output data, and the input data is an actual target area gray level image, an ideal target area gray level image and a standard matrix template; the output data are an actual matrix and an ideal matrix; and analyzing through the intelligent model after the training is successful.
By determining a plurality of target areas according to the target image, the corresponding actual matrix and ideal matrix can be conveniently and rapidly identified in the subsequent adjustment process, and meanwhile, the target areas are screened by calculating corresponding area values, so that the image areas with larger difference are preferentially selected, the identification is convenient, and the processing precision is improved; and the target gray level image is cut before the matrix to be selected is determined, so that the data calculation amount in the process of determining the target area is reduced, and the data processing efficiency is improved.
Step SA3: calculating corresponding difference matrixes according to the actual matrixes and the ideal matrixes, and carrying out initial adjustment on the optical lens according to each difference matrix;
the method for calculating the difference matrix comprises the following steps:
Marking the actual matrix and the ideal matrix as respectively And/>Corresponding elements in the actual matrix and the ideal matrix are s ij and l ij respectively;
The element in the difference matrix is marked as c ij; calculating corresponding elements in the difference matrix according to a formula c ij=sij-lij; the difference matrix is
The initial adjustment of the optical lens is carried out according to each difference matrix by utilizing the existing mathematical calculation method, the position angle and other differences of the optical lens are determined according to each difference matrix, then corresponding adjustment is carried out, if the angle of the optical lens is deflected, the actual imaging deviation is caused, the difference of the corresponding difference matrix in a certain direction is further increased, the corresponding adjustment parameters such as the adjustment angle are determined according to the size of the difference, and the adjustment is carried out according to the obtained adjustment parameters; specifically, the corresponding initial adjustment algorithm is preset by using the existing mathematical calculation mode to carry out adjustment; although the difference of the number of pixels will be caused by the difference of the resolutions, some pixels which are determined to be paired can still be identified through a plurality of difference matrixes, and the pixels which change are similar to the gray values of the adjacent pixels, so that adjustment is performed in the determination process of the actual matrixes and the ideal matrixes; the corresponding difference value of the paired pixels is obtained, and further subsequent calculation is performed; after the adjustment is completed, the corresponding difference matrix is re-acquired, whether the adjustment is needed again is analyzed, and when the initial standard is not reached, the adjustment is performed again until the initial standard is reached; the initial standard is set by staff in advance, and the current adjusting device of the finger adjusts the upper limit, namely when the upper limit is reached, the optimization is difficult to carry out, and the adjustment is stopped.
Step SA4: determining an actual imaging image, an ideal imaging image, an actual matrix and an ideal matrix after initial adjustment according to the steps SA1 to SA 3; determining corresponding actual resolution, ideal resolution, actual contrast and ideal contrast according to the actual imaging image and the ideal imaging image;
The difference matrix is a matrix after the resolution is optimized.
The calculation method of the actual contrast ratio and the ideal contrast ratio comprises the following steps:
Gray processing is carried out on the actual imaging image and the ideal imaging image, a corresponding actual gray imaging image and an ideal gray imaging image are obtained, and corresponding actual resolution and ideal resolution are calculated according to the corresponding pixel number;
Marking corresponding elements in the actual gray imaging image and the ideal gray imaging image as ya and yz respectively; a and z respectively represent corresponding elements in the actual gray scale imaging image and the ideal gray scale imaging image;
According to the formula Calculating the actual contrast;
According to the formula The actual contrast is calculated.
Step SA5: determining a corresponding difference matrix according to the actual matrix and the ideal matrix; integrating the obtained difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data;
Step SA6: and adjusting the optical lens according to the obtained adjustment reference data.
The invention can realize intelligent adjustment of the optical lens, effectively improve the adjustment precision and efficiency and reduce the adjustment cost to a greater extent; the method is convenient for most small and medium-sized micro enterprises to perform adjustment and optimization of the optical lens.
The method for adjusting the optical lens according to the adjustment reference data comprises the following steps:
Analyzing according to the obtained calibration reference data to obtain a corresponding calibration target, namely, the difference to be overcome is required to be adjusted, and the difference between the actual resolution and the ideal resolution is the corresponding resolution adjustment target; determining a corresponding adjustment step according to the obtained adjustment target;
performing adjustment according to the obtained adjustment step, and obtaining a new adjustment target after adjustment; and so on, stopping the loop until the evaluation is difficult to optimize based on the current calibration equipment data;
i.e. no recirculation is performed when the calibration target has reached its accuracy range according to the calibration device data analysis.
The method for determining the adjustment step according to the adjustment target comprises the following steps:
acquiring related detail data of the adjusting equipment, such as data of the adjusting equipment components, the types, the models, the purposes, related parameters and the like of the various component equipment; integrating the data into tuning equipment data;
Determining the corresponding steps for realizing the adjustment target or overcoming the related difference according to the obtained adjustment equipment data, and integrating the steps into an adjustment step; by way of example, by increasing the brightness of the light source, increasing the angle of incidence of the light, increasing the aperture of the imaging lens, etc., more light is allowed to enter the imaging system, improving the signal-to-noise ratio and contrast of the image, and thus improving the sharpness and color saturation of the image.
An optical lens adjusting system comprises a region positioning module, an initial adjusting module and an adjusting module;
The region positioning module is used for positioning the actual imaging image and the ideal imaging image and determining a corresponding actual target region and an ideal target region; and determining corresponding actual matrixes and ideal matrixes according to the actual target areas and the ideal target areas.
Setting a target object, acquiring a corresponding target image based on the target object in a preset standard environment, and determining a plurality of target areas according to the obtained target image; and performing adjustment simulation of the optical lens to obtain a corresponding actual imaging image and an ideal imaging image.
The method for determining the target area comprises the following steps:
step SC1: carrying out gray processing on the target image to form a target gray image; presetting a standard matrix template;
Step SC2: extracting a plurality of matrixes to be selected from the target gray level image according to the standard matrix template, and marking the element in the matrixes to be selected as d ij; i=1, 2, … …, n being a positive integer; j=1, 2, … …, m being a positive integer; the candidate matrix is marked as
Identifying adjacent elements of each element in the matrix to be selected, and marking the adjacent elements as d ijc, c=1, 2, … …, v being a positive integer, and the value range of v being [3,8];
Step SC3: according to the formula Calculating the area value of each matrix to be selected; wherein: QZ is the area value of the corresponding matrix to be selected;
step SC4: determining a target area according to the matrix to be selected with the largest area value, and removing the corresponding matrix to be selected from the target gray level image to form a new target gray level image;
Identifying the determined number of target areas, ending analysis when the number of target areas reaches a threshold value X2, and outputting each target area; when the number of target areas does not reach the threshold value X2, the process returns to step SC2.
The method for determining the actual matrix and the ideal matrix comprises the following steps:
acquiring an actual imaging image and an ideal imaging image, and identifying an actual target area and an ideal target area corresponding to each target area in the actual imaging image and the ideal imaging image;
Carrying out gray processing on images corresponding to the actual target area and the ideal target area to obtain a corresponding gray image of the actual target area and a corresponding gray image of the ideal target area;
recognizing gray values of pixels in the gray image of the target area and the gray image of the ideal target area; and generating a corresponding actual matrix and an ideal matrix according to the standard matrix template.
The initial adjustment module is used for carrying out initial adjustment on the optical lens, calculating corresponding difference matrixes according to the actual matrixes and the ideal matrixes, and carrying out initial adjustment on the optical lens according to each difference matrix.
The method for carrying out initial adjustment of the optical lens according to each difference matrix comprises the following steps:
Step SD1: analyzing each difference matrix according to a preset initial adjustment algorithm, and determining corresponding adjustment parameters;
Step SD2: adjusting the optical lens according to the adjustment parameters, and performing adjustment simulation on the optical lens after adjustment to obtain a corresponding actual matrix and an ideal matrix; calculating a corresponding difference matrix;
step SD3: step SD1 is returned until the estimated adjustment parameter reaches the initial standard.
Step SA4: determining an actual imaging image, an ideal imaging image, an actual matrix and an ideal matrix after initial adjustment; determining corresponding actual resolution, ideal resolution, actual contrast and ideal contrast according to the actual imaging image and the ideal imaging image;
The calculation method of the actual contrast ratio and the ideal contrast ratio comprises the following steps:
Gray processing is carried out on the actual imaging image and the ideal imaging image, a corresponding actual gray imaging image and an ideal gray imaging image are obtained, and corresponding actual resolution and ideal resolution are calculated according to the corresponding pixel number;
Marking corresponding elements in the actual gray imaging image and the ideal gray imaging image as ya and yz respectively; a and z respectively represent corresponding elements in the actual gray scale imaging image and the ideal gray scale imaging image;
According to the formula Calculating the actual contrast;
According to the formula The actual contrast is calculated.
The adjusting module is used for adjusting after the optical lens is initially adjusted, and determining a corresponding difference matrix according to the actual matrix and the ideal matrix; integrating the obtained difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data; and adjusting the optical lens according to the obtained adjustment reference data.
The method for adjusting the optical lens according to the adjustment reference data comprises the following steps:
Analyzing according to the adjustment reference data to obtain a corresponding adjustment target; determining a corresponding adjustment step according to the adjustment target;
performing adjustment according to the adjustment step, and acquiring a new adjustment target after adjustment; and so on, until the evaluation stops optimizing, the loop is stopped.
In the specific undisclosed part of this embodiment, reference is made to an embodiment of a method for adjusting an optical lens.
The above formulas are all formulas with dimensions removed and numerical values calculated, the formulas are formulas which are obtained by acquiring a large amount of data and performing software simulation to obtain the closest actual situation, and preset parameters and preset thresholds in the formulas are set by a person skilled in the art according to the actual situation or are obtained by simulating a large amount of data.
The above embodiments are only for illustrating the technical method of the present invention and not for limiting the same, and it should be understood by those skilled in the art that the technical method of the present invention may be modified or substituted without departing from the spirit and scope of the technical method of the present invention.

Claims (6)

1. A method of calibrating an optical lens, the method comprising:
step SA1: setting a target object, acquiring a corresponding target image based on the target object, and determining a plurality of target areas according to the obtained target image;
Step SA2: performing adjustment simulation of the optical lens to obtain a corresponding actual imaging image and an ideal imaging image; determining a corresponding actual matrix and an ideal matrix according to each target area;
step SA3: calculating corresponding difference matrixes according to the actual matrixes and the ideal matrixes, and carrying out initial adjustment of the optical lens according to each difference matrix;
step SA4: determining an actual imaging image, an ideal imaging image, an actual matrix and an ideal matrix after initial adjustment; determining corresponding actual resolution, ideal resolution, actual contrast and ideal contrast according to the initially adjusted actual imaging image and ideal imaging image;
Step SA5: determining a corresponding difference matrix according to the initially adjusted actual matrix and the ideal matrix; integrating the obtained difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data;
Step SA6: adjusting the optical lens according to the obtained adjustment reference data;
the method for determining the target area comprises the following steps:
Step SC1: carrying out gray scale processing on the target image to form a target gray scale image; presetting a standard matrix template;
step SC2: extracting a plurality of matrixes to be selected from the target gray level image according to the standard matrix template, and marking the element in the matrixes to be selected as d ij; i=1, 2, … …, n being a positive integer; j=1, 2, … …, m being a positive integer; the candidate matrix is marked as
Identifying adjacent elements of each element in the matrix to be selected, marking the adjacent elements as d ijc, c=1, 2, … … and v, wherein v is a positive integer, and the value range of v is [3,8];
Step SC3: according to the formula Calculating the area value of each matrix to be selected; wherein: QZ is the area value of the corresponding matrix to be selected;
Step SC4: determining a target area according to the matrix to be selected with the largest area value, and removing the corresponding matrix to be selected from the target gray level image to form a new target gray level image;
Identifying the determined number of target areas, ending analysis when the number of target areas reaches a threshold value X2, and outputting each target area; when the number of the target areas does not reach the threshold value X2, returning to the step SC2;
in step SA2, the method for determining the actual matrix and the ideal matrix includes:
acquiring an actual imaging image and an ideal imaging image, and identifying an actual target area and an ideal target area corresponding to each target area in the actual imaging image and the ideal imaging image;
Carrying out gray processing on the images corresponding to the actual target area and the ideal target area to obtain a corresponding gray image of the actual target area and a corresponding gray image of the ideal target area;
recognizing gray values of pixels in the target area gray image and the ideal target area gray image; generating a corresponding actual matrix and an ideal matrix according to the standard matrix template;
In step SA4, the actual contrast and the ideal contrast are calculated by:
Gray processing is carried out on the actual imaging image and the ideal imaging image, a corresponding actual gray imaging image and an ideal gray imaging image are obtained, and corresponding actual resolution and ideal resolution are calculated according to the corresponding pixel number;
Marking corresponding elements in the actual gray imaging image and the ideal gray imaging image as ya and yz respectively; a and z respectively represent corresponding elements in the actual gray scale imaging image and the ideal gray scale imaging image;
According to the formula Calculating the actual contrast;
According to the formula The actual contrast is calculated.
2. The method according to claim 1, wherein in step SC2, the target gray-scale image is cut before determining the matrix to be selected.
3. The method of adjusting an optical lens according to claim 1, wherein in step SA3, the method of calculating the difference matrix comprises:
Marking the actual matrix and the ideal matrix as respectively And/>Corresponding elements in the actual matrix and the ideal matrix are respectively marked as s ij and l ij; i=1, 2, … …, n being a positive integer; j=1, 2, … …, m being a positive integer;
Marking an element in the difference matrix as c ij; calculating corresponding elements in the difference matrix according to a formula c ij=sij-lij; the difference matrix is
4. A method of adjusting an optical lens according to claim 3, wherein the method of performing initial adjustment of the optical lens according to each difference matrix comprises:
Step SD1: analyzing each difference matrix according to a preset initial adjustment algorithm, and determining corresponding adjustment parameters;
Step SD2: adjusting the optical lens according to the adjustment parameters, and performing adjustment simulation on the optical lens after adjustment to obtain a corresponding actual matrix and an ideal matrix; calculating a corresponding difference matrix;
step SD3: step SD1 is returned until the estimated adjustment parameter reaches the initial standard.
5. The method of adjusting an optical lens according to claim 1, wherein in step SA6, the method of adjusting an optical lens according to adjustment reference data comprises:
Analyzing according to the adjustment reference data to obtain a corresponding adjustment target; determining a corresponding adjustment step according to the adjustment target;
performing adjustment according to the adjustment step, and acquiring a new adjustment target after adjustment; and so on, until the evaluation stops optimizing, the loop is stopped.
6. An optical lens adjustment system, characterized in that an optical lens adjustment method according to any one of claims 1 to 5 is performed, comprising: the device comprises a region positioning module, an initial adjusting module and an adjusting module;
The region positioning module is used for positioning the actual imaging image and the ideal imaging image and determining a corresponding actual target region and an ideal target region; determining a corresponding actual matrix and an ideal matrix according to the actual target area and the ideal target area;
Setting a target object, acquiring a corresponding target image based on the target object in a preset standard environment, and determining a plurality of target areas according to the obtained target image; performing adjustment simulation of the optical lens to obtain a corresponding actual imaging image and an ideal imaging image;
the initial adjustment module is used for carrying out initial adjustment on the optical lens, calculating corresponding difference matrixes according to the actual matrixes and the ideal matrixes, and carrying out initial adjustment on the optical lens according to each difference matrix;
The adjusting module is used for adjusting after the optical lens is initially adjusted, and determining a corresponding difference matrix according to the actual matrix and the ideal matrix; integrating the obtained difference matrix, the actual resolution, the ideal resolution, the actual contrast and the ideal contrast into adjustment reference data; and adjusting the optical lens according to the obtained adjustment reference data.
CN202410263269.2A 2024-03-08 2024-03-08 Optical lens adjusting method and system Active CN117850032B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410263269.2A CN117850032B (en) 2024-03-08 2024-03-08 Optical lens adjusting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410263269.2A CN117850032B (en) 2024-03-08 2024-03-08 Optical lens adjusting method and system

Publications (2)

Publication Number Publication Date
CN117850032A CN117850032A (en) 2024-04-09
CN117850032B true CN117850032B (en) 2024-06-21

Family

ID=90536737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410263269.2A Active CN117850032B (en) 2024-03-08 2024-03-08 Optical lens adjusting method and system

Country Status (1)

Country Link
CN (1) CN117850032B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111024229A (en) * 2019-11-28 2020-04-17 天津津航技术物理研究所 Single-chip integrated spectral imaging micro-system spectral data correction method
CN112118388A (en) * 2020-08-04 2020-12-22 绍兴埃瓦科技有限公司 Image processing method, image processing device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111869195B (en) * 2018-03-14 2022-07-08 索尼公司 Image processing apparatus, imaging apparatus, and image processing method
CN112393882B (en) * 2020-04-21 2022-08-23 哈尔滨工业大学 Compound eye imaging adjustment method based on micro-imaging micro-lens parameter detection
CN113156659A (en) * 2021-04-16 2021-07-23 京东方科技集团股份有限公司 Micro-lens array, pixel island 3D display device and preparation method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111024229A (en) * 2019-11-28 2020-04-17 天津津航技术物理研究所 Single-chip integrated spectral imaging micro-system spectral data correction method
CN112118388A (en) * 2020-08-04 2020-12-22 绍兴埃瓦科技有限公司 Image processing method, image processing device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117850032A (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN111007661B (en) Microscopic image automatic focusing method and device based on deep learning
US6768509B1 (en) Method and apparatus for determining points of interest on an image of a camera calibration object
CN110059586B (en) Iris positioning and segmenting system based on cavity residual error attention structure
CN109345597B (en) Camera calibration image acquisition method and device based on augmented reality
CN113592911B (en) Apparent enhanced depth target tracking method
CN112365497A (en) High-speed target detection method and system based on Trident Net and Cascade-RCNN structures
CN114764189A (en) Microscope system and method for evaluating image processing results
CN112381751A (en) Online intelligent detection system and method based on image processing algorithm
CN110363196B (en) Method for accurately recognizing characters of inclined text
CN116681879B (en) Intelligent interpretation method for transition position of optical image boundary layer
CN117850032B (en) Optical lens adjusting method and system
CN112468721A (en) Visual acquisition method and device with automatic focusing function
CN110031471B (en) Method, system and device for analyzing surface defect growth of large-caliber optical element
CN116824333A (en) Nasopharyngeal carcinoma detecting system based on deep learning model
CN112839168B (en) Method for automatically adjusting camera imaging resolution in AOI detection system
CN212646436U (en) Artificial board surface flaw detection device
CN114358131A (en) Digital photo frame intelligent photo optimization processing system
CN114120318A (en) Dark field image target point accurate extraction method based on integrated decision tree
CN112560870B (en) Image target identification method used in underwater complex environment
CN117809162B (en) Method and device for correcting imaging non-uniformity of lens and extracting lens parameters
Zhao et al. A Practical Unified Network for Localization and Recognition of Arbitrary-oriented Container code and type
CN117970595B (en) Microscope automatic focusing method based on deep learning and image processing
CN118134818B (en) Scanning and AI fluorescent image processing method based on fluorescent slide and application thereof
CN113869363B (en) Mountain climbing focusing searching method based on image evaluation network and image evaluation function
CN117392127B (en) Method and device for detecting display panel frame and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant