CN104197830A - Method and system for correcting optical test fixture - Google Patents

Method and system for correcting optical test fixture Download PDF

Info

Publication number
CN104197830A
CN104197830A CN201410384372.9A CN201410384372A CN104197830A CN 104197830 A CN104197830 A CN 104197830A CN 201410384372 A CN201410384372 A CN 201410384372A CN 104197830 A CN104197830 A CN 104197830A
Authority
CN
China
Prior art keywords
circle
center
identification
industrial camera
centers
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.)
Granted
Application number
CN201410384372.9A
Other languages
Chinese (zh)
Other versions
CN104197830B (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.)
Goertek Techology Co Ltd
Original Assignee
Qingdao Goertek 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 Qingdao Goertek Co Ltd filed Critical Qingdao Goertek Co Ltd
Priority to CN201410384372.9A priority Critical patent/CN104197830B/en
Publication of CN104197830A publication Critical patent/CN104197830A/en
Application granted granted Critical
Publication of CN104197830B publication Critical patent/CN104197830B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a method and a system for correcting an optical test fixture. The method comprises the following steps of: aligning the cylindrical through hole of a standard module to shoot by virtue of an industrial camera; identifying an inner circle and an outer circle in the shot picture, and correcting the identified circles of the inner circle and the outer circle, so as to obtain the corrected circle centres of the inner circle and the outer circle; calculating a deviation angle between the standard module and the industrial camera according to the corrected circle centres of the inner circle and the outer circle, and the centre of the shot picture; judging whether the deviation angle meets the accuracy requirements of the optical test fixture, if not, then adjusting the industrial camera to meet the accuracy requirements of the optical test fixture. According to the technical scheme of the invention, the problem that the accuracy of the optical test fixture is difficult to achieve the test requirements due to the deviation between the optical axis of an imaging device and the central axis of the shot device can be solved.

Description

Method and system for calibrating optical test tool
Technical Field
The invention relates to the technical field of optical test systems, in particular to a method and a system for calibrating an optical test tool.
Background
The head-mounted display equipment uses a high-resolution liquid crystal LCD screen, visual experience which is not in ethical proportion is brought to a user through optical amplification, and in the assembling process of the head-mounted display equipment, the assembling precision requirement of an optical lens is very high, so that the precision requirement of an optical testing tool is higher.
In the prior art, when an optical test tool is calibrated by using an optical imaging principle, the optical axis of an imaging device and the central axis of a shot device have deviation, so that the precision of the optical test tool hardly meets the test requirement.
Disclosure of Invention
The invention provides a method and a system for calibrating an optical test tool, which aim to solve the problem that the precision of the optical test tool is difficult to meet the test requirement due to the deviation between the optical axis of an imaging device and the central axis of a shot device.
In one aspect, an embodiment of the present invention provides a method for calibrating an optical test fixture, where the method includes:
placing a standard module and an industrial camera at corresponding positions of an optical testing tool, wherein the standard module is used for simulating a product to be tested and comprises at least one cylindrical through hole, and planes where two ends of the cylindrical through hole are located are parallel to each other;
the lens direction of the industrial camera faces the cylindrical through hole of the standard module, the industrial camera is used for aiming at the cylindrical through hole to take a picture, the opening of the cylindrical through hole close to one end of the industrial camera in the picture to be taken is imaged as an outer circle, and the opening of the other end of the cylindrical through hole is imaged as an inner circle;
recognizing the outer circle and the inner circle in the photographed picture, and respectively obtaining recognition circles of the outer circle and the inner circle;
respectively correcting the circle centers of the identification circles of the outer circle and the inner circle to obtain the corrected circle centers of the outer circle and the inner circle;
calculating a deviation angle between the standard module and the industrial camera according to the circle centers of the corrected outer circle and inner circle and the center of the photographed picture;
and judging whether the deviation angle meets the precision requirement of the optical test tool, and if not, finely adjusting the industrial camera until the precision requirement of the optical test tool is met.
The circle centers of the identification circles of the outer circle and the inner circle are respectively corrected to obtain the corrected circle centers of the outer circle and the inner circle, and the method comprises the following steps:
setting two concentric circles with the same size as the identification circle to be corrected, and enabling the identification circle to be located between the two concentric circles to obtain annular areas on the inner side and the outer side of the identification circle;
using over-centre 2n-1Straight lineDividing the inner and outer annular regions into N equal parts, wherein the outer annular region is divided into A1,...,ANThe inner annular region is divided into B1,...,BN,N=2nN is an integer greater than or equal to 2;
moving the center position of the identification circle pixel by pixel within a range, calculating and recording the area Ai、BiThe circle center position corresponding to the maximum value of the square sum is the circle center of the identification circle after correction, wherein i is more than or equal to 1 and less than or equal to N.
Preferably, the method for calibrating an optical test fixture further includes:
placing the target image on a corresponding position of an optical test tool, wherein the standard module is positioned between the industrial camera and the target image;
and utilizing the industrial camera to align the cylindrical through hole of the standard module to photograph the target image.
Further, the circle centers of the identification circles of the outer circle and the inner circle are respectively corrected to obtain the corrected circle centers of the outer circle and the inner circle, and the method comprises the following steps:
setting two concentric circles with the same size as the identification circle to be corrected, and enabling the identification circle to be located between the two concentric circles to obtain annular areas on the inner side and the outer side of the identification circle;
setting a square frame, wherein the center of the square frame is superposed with the center of the identification circle, and the side length of the square frame is smaller than the diameter of the small concentric circle;
sequentially dividing the outer annular region into C by using the square frame1、C2、C3、C44 regions sequentially dividing the inner annular region into D1、D2、D3、D44 areas;
moving said circle of recognition pixel by pixel within a rangeThe position of the center of a circle, calculating and recording the area Cj、DjThe circle center position corresponding to the maximum value of the square sum of the pixel value differences in the identification circle is the circle center corrected by the identification circle, wherein j is more than or equal to 1 and less than or equal to 4.
In another aspect, an embodiment of the present invention provides a system for calibrating an optical test fixture, where the system includes: the calibration system comprises an optical test tool, a standard module, an industrial camera and a calibration processor, wherein the calibration processor comprises an image recognition module, a circle center correction module, a deviation calculation module and a judgment fine adjustment module; wherein,
the optical test tool is used for bearing a standard module and an industrial camera;
the standard module is used for simulating a product to be tested and comprises at least one cylindrical through hole, and planes where two ends of the cylindrical through hole are located are parallel to each other;
the lens direction of the industrial camera faces the cylindrical through hole of the standard module and is used for aligning the cylindrical through hole to take a picture, the opening of the cylindrical through hole close to one end of the industrial camera in the picture to be taken is imaged as an outer circle, and the opening of the other end of the cylindrical through hole is imaged as an inner circle;
the image identification module is used for identifying the outer circle and the inner circle in the photographed picture and respectively obtaining the identification circles of the outer circle and the inner circle;
the circle center correction module is used for correcting the circle center of each identification circle in the image identification module and respectively obtaining the circle centers of the corrected outer circle and inner circle;
the deviation calculation module is used for calculating a deviation angle between the standard module and the industrial camera according to the circle centers of the corrected excircle and the corrected inner circle obtained by the circle center correction module and the center of the photographed picture;
and the judgment fine adjustment module is used for judging whether the deviation angle calculated by the deviation calculation module meets the precision requirement of the optical test tool, and if not, fine adjusting the industrial camera until the precision requirement of the optical test tool is met.
The circle center correction module comprises:
the first setting unit is used for setting two concentric circles which are concentric with the identification circle to be corrected, so that the identification circle is positioned between the two concentric circles, and annular areas on the inner side and the outer side of the identification circle are obtained;
a first dividing unit for using the over-center 2n-1The inner and outer annular regions are equally divided by straight lines, and the outer annular region is sequentially divided into A1,...,ANSequentially dividing the inner annular region into B1,...,BNWherein N is 2nN is an integer greater than or equal to 2;
a first circle center determining unit for moving the circle center position of the identification circle pixel by pixel within a range, calculating and recording the area Ai、BiThe circle center position corresponding to the maximum value of the square sum is the circle center of the identification circle after correction, wherein i is more than or equal to 1 and less than or equal to N.
Preferably, the system for calibrating the optical test tool further comprises a target map;
the optical test tool is used for bearing a standard module, an industrial camera and a target map;
the target image is used for aligning when the industrial camera shoots through the cylindrical through hole of the standard module.
The circle center correction module comprises:
the first setting unit is used for setting two concentric circles which are concentric with the identification circle to be corrected, so that the identification circle is positioned between the two concentric circles, and annular areas on the inner side and the outer side of the identification circle are obtained;
the second setting unit is used for setting a square frame, the center of the square frame is superposed with the center of the identification circle, and the side length of the square frame is smaller than the diameter of the small concentric circle;
a second dividing unit for sequentially dividing the outer annular region into C by the square frame1、C2、C3、C44 regions sequentially dividing the inner annular region into D1、D2、D3、D44 areas;
a second circle center determining unit for moving the circle center position of the recognition circle pixel by pixel within a range, calculating and recording the area Cj、DjThe circle center position corresponding to the maximum value of the square sum of the pixel value differences in the identification circle is the circle center corrected by the identification circle, wherein j is more than or equal to 1 and less than or equal to 4.
The embodiment of the invention has the beneficial effects that: the invention has disclosed a method for calibrating the optical test frock and system, because the centre of a circle of the recognition circle has errors on the one hand, therefore to this error, the invention corrects the centre of a circle of recognition circle of excircle and inner circle of the picture of shooing separately, then utilize centre of a circle of excircle and inner circle after correcting to calculate the deviation angle between industry camera and the standard module, have guaranteed the true data of the deviation angle, can achieve zero error, thus the deviation angle according to this reflection true data calibrates the optical test frock, solve because there is the problem that the precision of the optical test frock is difficult to meet the test requirement that the optical test frock has deviation with the central axis of the shooting device, have obtained the optical test frock and reached the technological effect of the precision requirement of the whole test system; on the other hand, the invention can completely complete the analysis and judgment of the accuracy of the optical test tool by software, thereby improving the stability and the reproducibility; on the other hand, the calibration method and the calibration system for the optical test tool can realize calibration of the test tool with different precision requirements by replacing the industrial camera, so that the method and the system for calibrating the optical test tool have good universality.
Drawings
Fig. 1 is a flowchart of a method for calibrating an optical test fixture according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the result of identifying the outer circle and the inner circle using Opencv software;
FIG. 3 is a schematic diagram illustrating a correction method for correcting the identification circle of the inner circle in FIG. 2 according to an embodiment of the present invention;
FIG. 4-a is a diagram illustrating the result of using Opencv to identify a standard circle in a standard picture;
FIG. 4-b is a schematic diagram illustrating the result of correcting the recognition circle in FIG. 4-a by using the correction method provided by the embodiment of the present invention;
FIG. 5-a is a schematic diagram illustrating the result of identifying a circle in an actual measurement picture by Opencv;
FIG. 5-b is a schematic diagram illustrating the result of correcting the recognition circle in FIG. 5-a by using the correction method provided by the embodiment of the invention;
FIG. 6 is a diagram illustrating the result of identifying the outer circle and the inner circle using Opencv software;
FIG. 7 is a schematic diagram illustrating a correction method for correcting the identified circle of the inner circle in FIG. 6 according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a system for calibrating an optical test fixture according to an embodiment of the present invention;
fig. 9 is a schematic diagram of the relative positions of the standard module and the industrial camera.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for calibrating an optical test fixture according to an embodiment of the present invention, where the method includes:
s100, a standard module and an industrial camera are placed at corresponding positions of the optical testing tool, the standard module is used for simulating a product to be tested and comprises at least one cylindrical through hole, and planes at two ends of the cylindrical through hole are parallel to each other.
S101, the direction of the lens of the industrial camera faces towards the cylindrical through hole of the standard module, the industrial camera is aligned to the cylindrical through hole to shoot, the cylindrical through hole is close to the opening at one end of the industrial camera to form an outer circle, and the opening at the other end of the industrial camera to form an inner circle.
S102, recognizing the outer circle and the inner circle in the photographed picture, and respectively obtaining recognition circles of the outer circle and the inner circle.
Preferably, Opencv is used to identify the identification circle of the inner circle and the outer circle in the picture. Fig. 2 is a schematic diagram of a result of identifying an outer circle and an inner circle in a picture by using Opencv software, in which 20 is an identification circle of the outer circle, 22 is a circle center, 21 is an identification circle of the inner circle, 23 is a circle center, and a portion between the two identification circles is an inner wall of a cylindrical through hole of a standard module.
It should be noted that the identification circle has symmetry; however, when the Opencv software is used for identifying the edge of the circle, the center of the circle is deviated upwards and leftwards.
S103, respectively correcting the circle centers of the identification circles of the outer circle and the inner circle to obtain the corrected circle centers of the outer circle and the inner circle.
Specifically, in the annular areas on the inner side and the outer side of the identification circle, the larger the difference of the pixel average values is, the more accurate the corrected circle is; taking the recognized circle as a reference, moving the position of the circle center one by one within a range, and calculating the difference of pixel values on the inner side and the outer side of the circle, wherein the circle center position with the largest difference is the most accurate circle position; the difference between the pixel values on the inner and outer sides is calculated using a method similar to the calculation of the variance. Based on the above thought of correcting the identification circle, the circle centers of the identification circles of the outer circle and the inner circle are respectively corrected to obtain the circle centers of the corrected outer circle and inner circle, comprising the following steps:
fig. 3 is a schematic diagram of correcting the identification circle of the inner circle in fig. 2 by using the correction method according to the embodiment of the present invention, in which 30 is the identification circle, corresponding to the inner circle 21, 31 in fig. 2 is the moving range of the center of the circle, 32 is the large concentric circle for correcting the center of the identification circle 30, and 33 is the small concentric circle for correcting the center of the identification circle 30.
Firstly, setting two concentric circles with the same size as the identification circle 30 to be corrected, enabling the identification circle 30 to be located between the two concentric circles, and obtaining annular areas on the inner side and the outer side of the identification circle 30, wherein the diameters of the two concentric circles can be set according to theoretical calculation or experience;
step two, utilizing the 2 passing through the center of circlen-1The inner and outer annular regions are equally divided by straight lines, wherein the outer annular region is sequentially divided into A1,...,ANSequentially dividing the inner annular region into B1,...,BN,N=2nN is an integer greater than or equal to 2;
in addition, A isiAnd BiIs a concentric fan ring enclosed by two adjacent straight lines and circular rings at the inner side and the outer side, wherein i is more than or equal to 1 and less than or equal to N.
Step three, moving the circle center position of the identification circle 30 pixel by pixel in a range, calculating and recording the area Ai、BiThe circle center position corresponding to the maximum value of the square sum of the pixel differences in the identification circle 30 is the corrected circle center, wherein i is more than or equal to 1 and less than or equal to N.
Specifically, when the center of the recognition circle 30 is located at a certain pixel, the area a is traversed at this timei、BiAll the pixels in the table are respectively calculated as Ai、BiPixel values in the region, which are respectively denoted as Pi、Pi'; and according to the formulaCalculating the sum of squares of the pixel value differences in all regions;
moving the center of the recognition circle 30 to the next pixel, and repeating the calculation process until sum values of all pixels in the center moving range 31 are calculated;
and comparing the sum value, wherein the circle with the maximum sum value is the corrected circle, and the circle center position of the circle is the circle center of the corrected circle.
It should be noted that the moving range of the circle center is preferably a circle, and the diameter of the circle center can be set according to theoretical calculation or experience; the invention is not limited to the circular moving range, and any other shape can be used as the moving range of the circle center; and in the process of moving the center of the identification circle, the large concentric circle and the small concentric circle synchronously move along with the identification circle.
Fig. 4-a and fig. 5-a are schematic diagrams of results of identifying circles in a standard picture and an actual measurement picture by using Opencv, respectively, where the standard circle in the standard picture is pure white and the actual measurement picture is pure black, the actual measurement picture is obtained by using an industrial camera to aim at a cylindrical through hole to take a picture in the process of calibrating an optical test fixture, and the edges of thin lines marked in the two pictures are both the results of identifying the circles in the pictures by using Opencv software; fig. 4-b and 5-b are schematic diagrams illustrating the result of correcting the circle identified in fig. 4-a and 5-a by using the correction method provided by the embodiment of the present invention, wherein the thin lines marked are the edges of the circle obtained after correction. Wherein, the left half part of fig. 4-a and 5-a is the upper left part of the identification circle, the right half part is the lower right part of the identification circle, the left half part of fig. 4-b and 5-b is the upper left part of the corrected circle, and the right half part is the lower right part of the corrected circle.
By comparing the circles before and after the correction, it is possible to obtain:
comparing FIG. 4-a with FIG. 4-b, one can obtain: when the correction method provided by the invention is used for correcting the identification circle in the standard picture, the edge can be accurately identified, and zero error is achieved;
comparing fig. 5-a with fig. 5-b, it can be seen that the upper left part of the recognition circle before correction is in the gray area, while the lower right part is at the gray and white edges, the symmetry is poor; the upper left part and the lower right part of the corrected identification circle are positioned in the gray area, so that the symmetry is obviously improved and is closer to an objective fact; this makes it possible to obtain: the result of the correction of the identification circle by using the correction method provided by the invention is obviously superior to the uncorrected identification result.
And S104, calculating a deviation angle between the standard module and the industrial camera according to the circle centers of the corrected outer circle and inner circle and the center of the photographed picture.
Specifically, the method comprises the following steps:
according toRespectively obtaining the error of the centers of two ends of the cylindrical through hole deviating from a standard optical axis, wherein the error of the center of a circle is the pixel error between the center of the circle and the center of the picture after correction, and the standard optical axis is the axis where the center of the industrial camera is located;
according toObtaining a deviation angle alpha between the standard module and the industrial camera, wherein the vector sum of the deviation errors of the centers of the through holes at the two ends is as follows: and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are the same, calculating the difference of the errors of the centers of the two ends of the through hole deviating from the standard optical axis, and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are opposite, calculating the sum of the errors of the centers of the two ends of the through hole deviating from the standard optical axis.
And S105, judging whether the deviation angle meets the precision requirement of the optical test tool, and if not, finely adjusting the industrial camera until the precision requirement of the optical test tool is met.
Specifically, if the deviation of the optical test tool is full, the test requirement is met, the standard module is replaced by a product to be tested, and the optical test tool is used for testing; otherwise, the industrial camera is translated left and right and/or tilted left and right and/or translated up and down and/or tilted up and down until the deviation of the optical testing tool meets the testing requirement.
In practical applications, the method for calibrating an optical test fixture generally further includes:
placing the target image on a corresponding position of the optical testing tool, and enabling the standard module to be located between the industrial camera and the target image;
the industrial camera is utilized to shoot through the cylindrical through hole of the standard module to align the target picture to obtain a shot picture, as shown in fig. 6, the result schematic diagram is that Opencv software is adopted to identify the outer circle and the inner circle in the picture, 60 in the picture is an identification circle of the outer circle, 61 is an identification circle of the inner circle, 62 is a target picture pattern, 63 is a cross line of the target picture, and the part between the two identification circles is the inner wall of the cylindrical through hole of the standard module.
In the process of correcting the identification circles of the outer circle and the inner circle in the photographed picture, in order to eliminate the influence of the cross line of the target map on the final calculation result, the square frame is used for dividing the area used for calculating the sum value in the inner circle and the outer circle, so that the influence of the cross line of the target map on the final calculation result can be remarkably solved.
Specifically, fig. 7 is a schematic diagram of correcting the identification circle of the inner circle in fig. 6 by using the correction method according to the embodiment of the present invention, where 70 in the diagram is the identification circle, corresponding to the inner circle 61, 71 in fig. 6 is the moving range of the center of the circle, 72 is the large concentric circle that corrects the center of the identification circle 70, 73 is the small concentric circle that corrects the center of the identification circle 70, and 74 is the square frame. The method comprises the following steps:
step one, setting two concentric circles with the same size as the identification circle 70, enabling the identification circle 70 to be located between the two concentric circles, and obtaining annular areas on the inner side and the outer side of the identification circle 70, wherein the diameters of the two concentric circles can be set according to theoretical calculation or experience;
step two, setting a square frame 74 to eliminate the influence of the crosshair of the target map on the final calculation result, wherein the square frame 74 is divided into four small square frames by the crosshair of the target map, the center of the square frame is superposed with the center of the recognition circle 70, and the side length of the square frame is smaller than the diameter of the small concentric circle 73;
thirdly, the square frame 74 is utilized to divide the outer annular area into C1、C2、C3、C44 regions sequentially dividing the inner annular region into D1、D2、D3、D44 areas;
in addition, the above-mentioned Cj、DjIs a small area enclosed by one of the right-angle parts of the square frame 74 and the circular rings at the inner side and the outer side, wherein j is more than or equal to 1 and less than or equal to 4.
Step four, moving the circle center position of the identification circle one by one within a range, calculating and recording the area Cj、DjThe circle center position corresponding to the square sum maximum value of the square sum of the pixel value differences in the correction is the circle center after correction.
Specifically, when the center of the recognition circle 70 is located at a certain pixel, the current region C is traversedj、DjAll the pixels in the table are respectively calculated to Cj、DjPixel values in the region, respectively denoted as Qj、Q'j(ii) a And according to the formulaCalculating the sum of squares of the pixel value differences in all regions;
moving the center of the recognition circle 70 to the next pixel, and repeating the calculation process until sum values of all pixels in the center moving range 71 are calculated;
and comparing the sum value, wherein the circle with the maximum sum value is the corrected circle, and the circle center position of the circle is the circle center of the corrected circle.
It should be noted that the moving range of the circle center is preferably a circle, and the diameter of the circle center can be set according to theoretical calculation or experience; the invention is not limited to the circular moving range, and any other shape can be used as the moving range of the circle center; in the process of moving the center of the identification circle, the two concentric circles and the square frame move synchronously along with the identification circle.
Fig. 8 is a schematic structural diagram of a system for calibrating an optical test fixture according to an embodiment of the present invention, where the system includes: the calibration system comprises an optical test tool 10, a standard module 20, an industrial camera 30 and a calibration processor 40, wherein the calibration processor 40 comprises an image recognition module 41, a circle center correction module 42, a deviation calculation module 43 and a judgment fine adjustment module 44; wherein,
the optical test tool 10 is used for carrying a standard module 20 and an industrial camera 30.
Specifically, as shown in fig. 9, it is a schematic diagram of relative positions of the standard module and the industrial camera, in which 30 is the industrial camera, 20 is the standard module, and 21 is a cylindrical through hole of the standard module 20.
It should be noted that the industrial camera 30 has a general control and data transmission interface, including a USB2.0, USB3.0 or ethernet interface; the industrial camera has high resolution, stable image output, high transmission speed and good anti-interference performance; easy to operate and control.
The optical test tool 10 is stable in test environment, and particularly, the light source of the environment has good stability; and the test tool meets the requirement of a three-dimensional space, and at least six directions can be regulated and controlled.
The processing precision of the standard module 20 meets the precision requirement of the whole test system, and pictures shot in different areas have recognizable differences so as to ensure normal analysis of the pictures.
The standard module 20 is used for simulating a product to be tested and comprises at least one cylindrical through hole 21, and planes where two ends of the cylindrical through hole 21 are located are parallel to each other.
The camera lens direction orientation of industry camera 30 the cylindrical through-hole 21 of standard module is used for aiming at cylindrical through-hole shoots, in the picture of shooing cylindrical through-hole 21 is close to the trompil formation of image of industry camera 30 one end is the excircle, and the trompil formation of image of the other end is interior circle.
The image recognition module 41 is configured to recognize the outer circle and the inner circle in the photographed picture, and obtain recognition circles of the outer circle and the inner circle, respectively.
The circle center correcting module 42 is configured to correct the circle center of the circle identified in the image identifying module 41, and obtain the corrected circle centers of the outer circle and the inner circle, respectively.
The circle center correction module 42 further includes:
the first setting unit is used for setting two concentric circles which are concentric with the identification circle to be corrected, so that the identification circle is positioned between the two concentric circles, and annular areas on the inner side and the outer side of the identification circle are obtained;
a first dividing unit for using the over-center 2n-1The inner and outer annular regions are equally divided by straight lines, and the outer annular region is sequentially divided into A1,...,ANSequentially dividing the inner annular region into B1,...,BNWherein N is 2nN is an integer greater than or equal to 2;
a first circle center determining unit for moving the circle center position of the identification circle pixel by pixel within a range, calculating and recording the area Ai、BiThe circle center position corresponding to the maximum value of the square sum is the circle center of the identification circle after correction, wherein i is more than or equal to 1 and less than or equal to N.
The deviation calculating module 43 is configured to calculate a deviation angle between the standard module 20 and the industrial camera 30 according to the circle centers of the corrected outer circle and inner circle obtained by the circle center correcting module 42 and the center of the photographed picture.
The deviation calculation module 43 includes:
a center deviation unit forRespectively obtaining the error of the centers of two ends of the cylindrical through hole deviating from a standard optical axis, wherein the error of the center of a circle is the pixel error between the center of the circle and the center of the picture after correction, and the standard optical axis is the axis where the center of the industrial camera is located;
deviation angle unit for based onObtaining a deviation angle alpha between the standard module and the industrial camera, wherein the vector sum of the deviation errors of the centers of the through holes at the two ends is as follows: and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are the same, calculating the difference of the errors of the centers of the two ends of the through hole deviating from the standard optical axis, and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are opposite, calculating the sum of the errors of the centers of the two ends of the through hole deviating from the standard optical axis.
And the judgment fine adjustment module 44 is configured to judge whether the deviation angle calculated by the deviation calculation module meets the precision requirement of the optical test fixture, and if not, fine adjust the industrial camera until the precision requirement of the optical test fixture is met.
Preferably, the system for calibrating the optical test tool further comprises a target chart, which is used for aligning when the industrial camera shoots through the cylindrical through hole of the standard module;
the optical test tool is further used for bearing a standard module, an industrial camera and a target map.
The industrial camera is used for aligning the cylindrical through hole of the standard module to photograph a target picture, the through hole is close to the open pore image of one end of the industrial camera to form an outer circle, and the open pore image of the other end of the industrial camera to form an inner circle.
The circle center correction module further comprises:
the first setting unit is used for setting two concentric circles which are concentric with the identification circle to be corrected, so that the identification circle is positioned between the two concentric circles, and annular areas on the inner side and the outer side of the identification circle are obtained;
the second setting unit is used for setting a square frame, the center of the square frame is superposed with the center of the identification circle, and the side length of the square frame is smaller than the diameter of the small concentric circle;
a second dividing unit for sequentially dividing the outer annular region into C by the square frame1、C2、C3、C44 regions sequentially dividing the inner annular region into D1、D2、D3、D44 areas;
a second circle center determining unit for moving the circle center position of the recognition circle pixel by pixel within a range, calculating and recording the area Cj、DjThe circle center position corresponding to the square sum maximum value of the square sum of the pixel value differences in the correction is the circle center after correction, wherein j is more than or equal to 1 and less than or equal to 4.
In summary, the invention discloses a method and a system for calibrating an optical test fixture, on one hand, because the center of a recognition circle has an error, aiming at the error, the invention respectively corrects the centers of the recognition circle of the outer circle and the inner circle of a photographed picture, and then calculates the deviation angle between a standard module and an industrial camera by using the corrected centers of the outer circle and the inner circle, thereby ensuring the real data of the deviation angle and being capable of achieving zero error, thereby calibrating the optical test fixture according to the deviation angle reflecting the real data, solving the problem that the precision of the optical test fixture is difficult to meet the test requirement due to the deviation between the optical axis of an imaging device and the central axis of a photographed device, and obtaining the technical effect that the optical test fixture meets the precision requirement of the whole test system; on the other hand, the invention can completely complete the analysis and judgment of the accuracy of the optical test tool by software, thereby improving the stability and the reproducibility; on the other hand, the calibration method and the calibration system for the optical test tool can realize calibration of the test tool with different precision requirements by replacing the industrial camera, so that the method and the system for calibrating the optical test tool have good universality.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method of calibrating an optical test fixture, the method comprising:
placing a standard module and an industrial camera at corresponding positions of an optical testing tool, wherein the standard module is used for simulating a product to be tested and comprises at least one cylindrical through hole, and planes where two ends of the cylindrical through hole are located are parallel to each other;
the lens direction of the industrial camera faces the cylindrical through hole of the standard module, the industrial camera is used for aiming at the cylindrical through hole to take a picture, the opening of the cylindrical through hole close to one end of the industrial camera in the picture to be taken is imaged as an outer circle, and the opening of the other end of the cylindrical through hole is imaged as an inner circle;
recognizing the outer circle and the inner circle in the photographed picture, and respectively obtaining recognition circles of the outer circle and the inner circle;
respectively correcting the circle centers of the identification circles of the outer circle and the inner circle to obtain the corrected circle centers of the outer circle and the inner circle;
calculating a deviation angle between the standard module and the industrial camera according to the circle centers of the corrected outer circle and inner circle and the center of the photographed picture;
and judging whether the deviation angle meets the precision requirement of the optical test tool, and if not, finely adjusting the industrial camera until the precision requirement of the optical test tool is met.
2. The method of claim 1, further comprising:
placing the target image on a corresponding position of an optical test tool, wherein the standard module is positioned between the industrial camera and the target image;
and the industrial camera is utilized to penetrate through the cylindrical through hole of the standard module to align the target image for photographing.
3. The method according to claim 1, wherein the correcting the centers of the identification circles of the outer circle and the inner circle respectively to obtain the corrected centers of the outer circle and the inner circle comprises:
setting two concentric circles with the same size as the identification circle to be corrected, and enabling the identification circle to be located between the two concentric circles to obtain annular areas on the inner side and the outer side of the identification circle;
using over-centre 2n-1The inner and outer annular regions are equally divided by straight lines, wherein the outer annular region is sequentially divided into A1,...,ANThe inner annular region is divided into B1,...,BN,N=2nN is an integer greater than or equal to 2;
moving the center position of the identification circle pixel by pixel within a range, calculating and recording the area Ai、BiThe circle center position corresponding to the maximum value of the square sum is the circle center of the identification circle after correction, wherein i is more than or equal to 1 and less than or equal to N.
4. The method of claim 2, wherein the step of correcting the centers of the identification circles of the outer circle and the inner circle to obtain corrected centers of the outer circle and the inner circle comprises the steps of:
setting two concentric circles with the same size as the identification circle to be corrected, and enabling the identification circle to be located between the two concentric circles to obtain annular areas on the inner side and the outer side of the identification circle;
setting a square frame, wherein the center of the square frame is superposed with the center of the identification circle, and the side length of the square frame is smaller than the diameter of the small concentric circle;
sequentially dividing the outer annular region into C by using the square frame1、C2、C3、C44 regions sequentially dividing the inner annular region into D1、D2、D3、D44 areas;
moving the center position of the identification circle pixel by pixel within a range, calculating and recording the area Cj、DjThe circle center position corresponding to the maximum value of the square sum of the pixel value differences in the identification circle is the circle center corrected by the identification circle, wherein j is more than or equal to 1 and less than or equal to 4.
5. The method according to any one of claims 1 to 4, wherein calculating a deviation angle between the standard module and the industrial camera according to the centers of the corrected outer circle and inner circle and the center of the photographed picture comprises:
according toRespectively obtaining the error of the centers of two ends of the cylindrical through hole deviating from a standard optical axis, wherein the error of the center of a circle is the pixel error between the center of the circle and the center of the picture after correction, and the standard optical axis is the axis where the center of the industrial camera is located;
according toObtaining a deviation angle alpha between the standard module and the industrial camera, wherein the vector sum of the deviation errors of the centers of the through holes at the two ends is as follows: and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are the same, calculating the difference of the errors of the centers of the two ends of the through hole deviating from the standard optical axis, and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are opposite, calculating the sum of the errors of the centers of the two ends of the through hole deviating from the standard optical axis.
6. A system for calibrating an optical test fixture, the system comprising: the calibration system comprises an optical test tool, a standard module, an industrial camera and a calibration processor, wherein the calibration processor comprises an image recognition module, a circle center correction module, a deviation calculation module and a judgment fine adjustment module; wherein,
the optical test tool is used for bearing a standard module and an industrial camera;
the standard module is used for simulating a product to be tested and comprises at least one cylindrical through hole, and planes where two ends of the cylindrical through hole are located are parallel to each other;
the lens direction of the industrial camera faces the cylindrical through hole of the standard module and is used for aligning the cylindrical through hole to take a picture, the opening of the cylindrical through hole close to one end of the industrial camera in the picture to be taken is imaged as an outer circle, and the opening of the other end of the cylindrical through hole is imaged as an inner circle;
the image identification module is used for identifying the outer circle and the inner circle in the photographed picture and respectively obtaining the identification circles of the outer circle and the inner circle;
the circle center correction module is used for correcting the circle center of each identification circle in the image identification module and respectively obtaining the circle centers of the corrected outer circle and inner circle;
the deviation calculation module is used for calculating a deviation angle between the standard module and the industrial camera according to the circle centers of the corrected excircle and the corrected inner circle obtained by the circle center correction module and the center of the photographed picture;
and the judgment fine adjustment module is used for judging whether the deviation angle calculated by the deviation calculation module meets the precision requirement of the optical test tool, and if not, fine adjusting the industrial camera until the precision requirement of the optical test tool is met.
7. The system of claim 6, further comprising a target map;
the optical test tool is used for bearing a standard module, an industrial camera and a target map;
the target image is used for aligning when the industrial camera shoots through the cylindrical through hole of the standard module.
8. The system of claim 6, wherein the circle center correction module comprises:
the first setting unit is used for setting two concentric circles which are concentric with the identification circle to be corrected, so that the identification circle is positioned between the two concentric circles, and annular areas on the inner side and the outer side of the identification circle are obtained;
a first dividing unit for using the over-center 2n-1The inner and outer annular regions are equally divided by straight lines, and the outer annular region is sequentially divided into A1,...,ANSequentially dividing the inner annular region into B1,...,BNWherein N is 2nN is an integer greater than or equal to 2;
a first circle center determining unit for moving the circle center position of the identification circle pixel by pixel within a range, calculating and recording the area Ai、BiThe circle center position corresponding to the maximum value of the square sum is the circle center of the identification circle after correction, wherein i is more than or equal to 1 and less than or equal to N.
9. The system of claim 7, wherein the circle center correction module comprises:
the first setting unit is used for setting two concentric circles which are concentric with the identification circle to be corrected, so that the identification circle is positioned between the two concentric circles, and annular areas on the inner side and the outer side of the identification circle are obtained;
the second setting unit is used for setting a square frame, the center of the square frame is superposed with the center of the identification circle, and the side length of the square frame is smaller than the diameter of the small concentric circle;
a second dividing unit for sequentially dividing the outer annular region into C by the square frame1、C2、C3、C44 regions sequentially dividing the inner annular region into D1、D2、D3、D44 areas;
a second circle center determining unit for moving the circle center position of the recognition circle pixel by pixel within a range, calculating and recording the area Cj、DjThe circle center position corresponding to the maximum value of the square sum of the pixel value differences in the identification circle is the circle center corrected by the identification circle, wherein j is more than or equal to 1 and less than or equal to 4.
10. The system according to any one of claims 6-9, wherein the deviation calculation module comprises:
a center deviation unit forRespectively obtaining the error of the centers of two ends of the cylindrical through hole deviating from a standard optical axis, wherein the error of the center of a circle is the pixel error between the center of the circle and the center of the picture after correction, and the standard optical axis is the axis where the center of the industrial camera is located;
deviation angle unit for based onObtaining a deviation angle alpha between the standard module and the industrial camera, wherein the vector sum of the deviation errors of the centers of the through holes at the two ends is as follows: and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are the same, calculating the difference of the errors of the centers of the two ends of the through hole deviating from the standard optical axis, and if the directions of the centers of the two ends of the through hole deviating from the standard optical axis are opposite, calculating the sum of the errors of the centers of the two ends of the through hole deviating from the standard optical axis.
CN201410384372.9A 2014-08-06 2014-08-06 Method and system for correcting optical test fixture Active CN104197830B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410384372.9A CN104197830B (en) 2014-08-06 2014-08-06 Method and system for correcting optical test fixture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410384372.9A CN104197830B (en) 2014-08-06 2014-08-06 Method and system for correcting optical test fixture

Publications (2)

Publication Number Publication Date
CN104197830A true CN104197830A (en) 2014-12-10
CN104197830B CN104197830B (en) 2017-04-19

Family

ID=52083158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410384372.9A Active CN104197830B (en) 2014-08-06 2014-08-06 Method and system for correcting optical test fixture

Country Status (1)

Country Link
CN (1) CN104197830B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106482672A (en) * 2016-10-31 2017-03-08 歌尔科技有限公司 A kind of method and system judging lens plane and test pattern plane parallelism
CN106546196A (en) * 2016-10-13 2017-03-29 深圳市保千里电子有限公司 A kind of optical axis real-time calibration method and system
CN108040249A (en) * 2017-11-24 2018-05-15 深圳市比亚迪电子部品件有限公司 A kind of camera optical centre calibration jig
CN109218720A (en) * 2018-11-15 2019-01-15 Oppo(重庆)智能科技有限公司 A kind of detection jig for structure optical mode group
CN109283542A (en) * 2018-09-10 2019-01-29 上海隧道工程有限公司 Steel die of tunnel tube piece end plate is molded to level detecting apparatus and its detection method
CN109982072A (en) * 2019-04-03 2019-07-05 信利光电股份有限公司 A kind of camera module calibration light source is to correction method
CN110095072A (en) * 2019-06-14 2019-08-06 厦门市计量检定测试院 The calibration assemblies and its repositioning method of the online Size Measuring System of CCD
CN110411344A (en) * 2019-08-06 2019-11-05 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) A kind of calibration method, calibrating installation, calibration system and electronic equipment
CN113495257A (en) * 2020-04-07 2021-10-12 广东博智林机器人有限公司 Angle calibration device and angle calibration method
CN113551880A (en) * 2021-06-30 2021-10-26 歌尔光学科技有限公司 Eccentricity testing tool and eccentricity testing method for lens
CN113758499A (en) * 2021-03-18 2021-12-07 北京京东乾石科技有限公司 Method, device and equipment for determining assembly deviation compensation parameters of positioning sensor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01137210A (en) * 1987-11-25 1989-05-30 Matsushita Electric Ind Co Ltd Optical axis aligning device
JPH04365586A (en) * 1991-06-14 1992-12-17 Toyota Autom Loom Works Ltd Optical axis aligning method and orthogonal axis aligning method for hand eye
CN103402116A (en) * 2013-08-01 2013-11-20 北京小米科技有限责任公司 Optical center calibration method and device
CN103954434A (en) * 2014-04-16 2014-07-30 青岛歌尔声学科技有限公司 Optical axis calibration gauge, system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01137210A (en) * 1987-11-25 1989-05-30 Matsushita Electric Ind Co Ltd Optical axis aligning device
JPH04365586A (en) * 1991-06-14 1992-12-17 Toyota Autom Loom Works Ltd Optical axis aligning method and orthogonal axis aligning method for hand eye
CN103402116A (en) * 2013-08-01 2013-11-20 北京小米科技有限责任公司 Optical center calibration method and device
CN103954434A (en) * 2014-04-16 2014-07-30 青岛歌尔声学科技有限公司 Optical axis calibration gauge, system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
牛建军等: "同心圆检测中的区域划分算法", 《光子学报》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106546196A (en) * 2016-10-13 2017-03-29 深圳市保千里电子有限公司 A kind of optical axis real-time calibration method and system
CN106546196B (en) * 2016-10-13 2018-04-03 深圳市保千里电子有限公司 A kind of optical axis real-time calibration method and system
CN106482672A (en) * 2016-10-31 2017-03-08 歌尔科技有限公司 A kind of method and system judging lens plane and test pattern plane parallelism
CN108040249A (en) * 2017-11-24 2018-05-15 深圳市比亚迪电子部品件有限公司 A kind of camera optical centre calibration jig
CN109283542B (en) * 2018-09-10 2020-09-15 上海隧道工程有限公司 Tunnel segment steel die end plate mold closing in-place detection device and detection method thereof
CN109283542A (en) * 2018-09-10 2019-01-29 上海隧道工程有限公司 Steel die of tunnel tube piece end plate is molded to level detecting apparatus and its detection method
CN109218720A (en) * 2018-11-15 2019-01-15 Oppo(重庆)智能科技有限公司 A kind of detection jig for structure optical mode group
CN109982072A (en) * 2019-04-03 2019-07-05 信利光电股份有限公司 A kind of camera module calibration light source is to correction method
CN110095072A (en) * 2019-06-14 2019-08-06 厦门市计量检定测试院 The calibration assemblies and its repositioning method of the online Size Measuring System of CCD
CN110411344A (en) * 2019-08-06 2019-11-05 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) A kind of calibration method, calibrating installation, calibration system and electronic equipment
CN110411344B (en) * 2019-08-06 2021-07-20 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) Calibration method, calibration device, calibration system and electronic equipment
CN113495257A (en) * 2020-04-07 2021-10-12 广东博智林机器人有限公司 Angle calibration device and angle calibration method
CN113758499A (en) * 2021-03-18 2021-12-07 北京京东乾石科技有限公司 Method, device and equipment for determining assembly deviation compensation parameters of positioning sensor
CN113758499B (en) * 2021-03-18 2024-05-17 北京京东乾石科技有限公司 Method, device and equipment for determining positioning sensor assembly deviation compensation parameter
CN113551880A (en) * 2021-06-30 2021-10-26 歌尔光学科技有限公司 Eccentricity testing tool and eccentricity testing method for lens
CN113551880B (en) * 2021-06-30 2024-08-20 歌尔光学科技有限公司 Eccentric testing tool and eccentric testing method for lens

Also Published As

Publication number Publication date
CN104197830B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
CN104197830B (en) Method and system for correcting optical test fixture
CN107767422B (en) Fisheye lens correction method and device and portable terminal
CN109859272B (en) Automatic focusing binocular camera calibration method and device
CN105716582B (en) Measurement method, device and the camera field of view angle measuring instrument at camera field of view angle
US8934721B2 (en) Microscopic vision measurement method based on adaptive positioning of camera coordinate frame
CN107702695B (en) Method for testing relative position of camera module lens and image sensor
CN106485758B (en) Unmanned aerial vehicle camera calibration device, calibration method and assembly line calibration implementation method
CN112669394B (en) Automatic calibration method for vision detection system
CN110858899B (en) Method and system for measuring optical axis center and field angle of camera movement
CN111210468A (en) Image depth information acquisition method and device
CN111896221B (en) Alignment method of rotating optical measurement system for virtual coordinate system auxiliary camera calibration
CN115830103A (en) Monocular color-based transparent object positioning method and device and storage medium
CN106815866B (en) Calibration method of fisheye camera, calibration system and target thereof
CN110260822B (en) High-precision calibration method for multi-view structured light system
CN109238235A (en) Monocular sequence image realizes rigid body pose parameter continuity measurement method
CN103440643A (en) Single-linear-array camera calibration method
CN108088658A (en) A kind of dazzle measuring method and its measuring system
CN104820978A (en) Reference positioning method of CCD (Charge Coupled Device) cameras
CN108550171B (en) Linear array camera calibration method containing eight-diagram coding information based on cross ratio invariance
CN111376254A (en) Plane distance measuring method and system and method and system for adjusting plane by mechanical arm
CN110136068A (en) Sound film top dome assembly system based on location position between bilateral telecentric lens camera
TW201833868A (en) Method and device for fisheye camera automatic calibration
CN104167001A (en) Large-visual-field camera calibration method based on orthogonal compensation
US20170219339A1 (en) Measuring and correcting optical misalignment
CN110068313B (en) Digital zenith instrument orientation method based on projection transformation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240514

Address after: 266104 No. 500, Songling Road, Laoshan District, Qingdao, Shandong

Patentee after: GOERTEK TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: 266061 5, 3 building, Fortune Plaza, 18 Qinling Mountains Road, Laoshan District, Qingdao, Shandong.

Patentee before: QINGDAO GOERTEK TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right