CN110533686B - Method and system for judging whether line frequency of linear array camera is matched with object motion speed - Google Patents
Method and system for judging whether line frequency of linear array camera is matched with object motion speed Download PDFInfo
- Publication number
- CN110533686B CN110533686B CN201910951129.3A CN201910951129A CN110533686B CN 110533686 B CN110533686 B CN 110533686B CN 201910951129 A CN201910951129 A CN 201910951129A CN 110533686 B CN110533686 B CN 110533686B
- Authority
- CN
- China
- Prior art keywords
- checkerboard
- length
- gray
- image
- index
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 239000011159 matrix material Substances 0.000 claims description 31
- 230000007704 transition Effects 0.000 claims description 11
- 230000009191 jumping Effects 0.000 claims description 6
- 238000001514 detection method Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
The application discloses a method and a system for judging whether line frequency of a linear array camera is matched with the motion speed of an object, wherein the method comprises the following steps: the checkerboard target image is rightly fixed on a measured object, and the line frequency of the linear array camera and the movement speed of the object are set; acquiring checkerboard images shot by a linear array camera; carrying out inclination correction on the checkerboard image; detecting and obtaining a gray level jump area in the checkerboard image, and recording a flag bit of the gray level jump area; recording index values of all gray level jumps according to the zone bits of the gray level jump area; calculating the length of the horizontal edge and the length of the vertical edge of the checkerboard image according to the index value; and calculating the matching degree of the line frequency of the linear array camera and the motion speed of the object according to the length of the transverse edge and the length of the vertical edge of the checkerboard. The judgment method provided by the application adopts the checkerboard as the target to acquire the image, and judges whether the line frequency of the linear array camera is matched with the movement speed of the object or not by calculating the side length of the target in the shot image, so that the operation is simple, and objective and accurate judgment can be obtained.
Description
Technical Field
The application relates to the technical field of linear array cameras, in particular to a method and a system for judging whether a line frequency of a linear array camera is matched with an object motion speed.
Background
The linear array camera adopts a linear array sensor, acquires a line of images each time, shoots the images in a linear shape with the length of several k, needs to splice a plurality of lines into an image, must require the object to be shot (or the linear array camera) to move along the image height direction, has very high resolution, and is commonly used in the detection field with long and thin detected visual field and extremely large visual field or extremely high precision.
Due to the characteristics of the linear array camera, the linear array camera and an object need to have relative motion when continuously shooting images, the linear array camera is usually fixed, the object moves, and if the motion speed of the object is not matched with the line frequency of the linear array camera, a target object in the shot images can be deformed. And if the motion speed of the object is greater than the line frequency of the linear array camera, compressing the target object, and otherwise, if the motion speed of the object is less than the line frequency of the linear array camera, stretching the target object. Only when the object motion speed is matched with the line frequency of the linear array camera, the shot target object is ensured not to be deformed.
However, at present, most of applications have less strict requirements on matching of the line frequency of the linear array camera and the motion speed of the object on one hand, and on the other hand, even if the line frequency of the linear array camera and the motion speed of the object are required to be matched, the line frequency of the linear array camera and the motion speed of the object cannot be accurately judged due to the fact that human eyes subjectively judge the line frequency of the linear array camera and the motion speed of the object, and the conclusion is not objective.
Disclosure of Invention
The application provides a method and a system for judging whether the line frequency of a linear array camera is matched with the motion speed of an object, so as to accurately judge whether the line frequency of the linear array camera is matched with the motion speed of the object.
In order to solve the technical problem, the embodiment of the application discloses the following technical scheme:
in a first aspect, an embodiment of the present application discloses a method and a system for determining whether a line frequency of a line-scan camera matches an object motion speed, where the method includes:
the checkerboard target image is rightly fixed on a measured object, and the line frequency of the linear array camera and the movement speed of the object are set;
acquiring a checkerboard image shot by the linear array camera;
performing tilt correction on the checkerboard image;
detecting and obtaining a gray level jump area in the checkerboard image, and recording a zone bit of the gray level jump area;
recording index values of all gray level jumps according to the zone bits of the gray level jump area;
calculating the length of the transverse edge and the length of the vertical edge of the checkerboard image according to the index value;
and calculating the matching degree of the line frequency of the linear array camera and the motion speed of the object according to the length of the transverse edge and the length of the vertical edge of the checkerboard.
Optionally, the acquiring the checkerboard image shot by the linear array camera includes acquiring an image of a checkerboard in the center of the field of view of the linear array camera, or acquiring an image of a checkerboard filled in the field of view of the linear array camera.
Optionally, performing tilt correction on the checkerboard image, including:
detecting and obtaining the inclination angle theta of the checkerboard image;
acquiring coordinates (x) of target points in the checkerboard image0,y0),x0And y0Respectively representing the row index and the column index of the target point in the checkerboard image;
calculating to obtain corrected coordinates (x, y) of the target point according to a formula (1);
where x and y denote a row index and a column index of the tilt-corrected target point, respectively.
Optionally, the detecting and obtaining a gray level jump area in the checkerboard image, and recording a flag bit of the gray level jump area includes:
acquiring a gray value of a pixel point at the current position;
calculating the absolute value of the difference between the gray value of the pixel point at the current position and the gray value of the pixel point at the adjacent position;
judging whether the absolute value is larger than a set threshold value or not;
if the absolute value is larger than the set threshold, the current position is considered as a gray level jump area;
and recording the zone bit of the gray level jump region according to the gray level value of the pixel point at the current position and the gray level value of the pixel point at the adjacent position.
Optionally, recording the flag bit of the gray level jump area according to the gray level value of the pixel point at the current position and the gray level value of the pixel point at the adjacent position, including:
judging whether the gray value of the pixel point at the current position is larger than the gray value of the pixel point at the adjacent position;
if the gray value of the pixel point at the current position is larger than the gray value of the pixel point at the adjacent position, recording the zone bit of the gray hopping region as a first zone bit;
and if the gray value of the pixel point at the current position is smaller than the gray value of the pixel point at the adjacent position, recording the zone bit of the gray hopping region as a second zone bit.
Optionally, recording index values of all gray transitions according to the flag bit of the gray transition region, including:
judging whether the zone bit of the target line is consistent with the zone bit of the previous line;
if the zone bit of the target row is not consistent with the zone bit of the previous row, recording the row index of the target row, and sequentially storing the row index in a row index matrix;
and if the zone bit of the target row is consistent with the zone bit of the previous row, directly jumping to the next row for continuous judgment.
Optionally, recording index values of all gray transitions according to the flag bit of the gray transition region, including:
judging whether the flag bit of the target column is consistent with the flag bit of the previous column;
if the zone bit of the target row is not consistent with the zone bit of the previous row, recording the row index of the target row, and storing the row index in a row index matrix;
and if the zone bit of the target column is consistent with the zone bit of the previous column, directly jumping to the next column for continuous judgment.
Optionally, the calculating the length of the horizontal edge and the length of the vertical edge of the checkerboard image according to the index value includes:
calculating the difference of adjacent row index values in the row index matrix line by line to obtain a length matrix of the transverse edge of the checkerboard;
and calculating the difference of the index values of adjacent columns in the column index matrix column by column to obtain a vertical edge length matrix of the checkerboard.
Optionally, the calculating according to the length of the horizontal edge and the length of the vertical edge of the checkerboard to obtain the matching degree of the line frequency and the object motion speed of the line-scan digital camera includes:
sequentially substituting data in the length matrix of the transverse edge of the checkerboard and the length matrix of the vertical edge of the checkerboard into a formula (2), and calculating to obtain a matching error of each checkerboard;
wherein, length _ h represents the length of the horizontal side of the checkerboard, and length _ v represents the length of the vertical side of the checkerboard;
taking the mean value of all the matching errors as the matching error of the line frequency and the object motion speed of the linear array camera;
and judging the matching degree of the line frequency of the linear array camera and the motion speed of the object according to the matching error.
In a second aspect, an embodiment of the present application further provides a simple system for determining whether a line frequency of a line-scan camera matches an object motion speed, including:
the setting module is used for rightly fixing the checkerboard target image on a measured object and setting the line frequency of the linear array camera and the movement speed of the object;
the acquisition module is used for acquiring checkerboard images shot by the linear array camera;
the correction module is used for carrying out inclination correction on the checkerboard image;
the detection module is used for detecting and obtaining a gray level jump area in the checkerboard image and recording a zone bit of the gray level jump area;
the recording module is used for recording the index value of the gray level jump according to the zone bit of the gray level jump area;
the first calculation module is used for calculating the length of the transverse edge and the length of the vertical edge of the checkerboard image according to the index value;
and the second calculation module is used for calculating the matching degree of the line frequency and the object motion speed of the linear array camera according to the length of the transverse edge and the length of the vertical edge of the checkerboard.
Compared with the prior art, the beneficial effect of this application is:
the method for judging whether the line frequency of the linear array camera is matched with the motion speed of the object comprises the following steps: the method comprises the steps of fixing a checkerboard target image on a measured object in a straightening mode, setting line frequency of a linear array camera and the moving speed of the object, collecting checkerboard images shot by the linear array camera, performing inclination correction on the checkerboard images, detecting to obtain gray level jump areas in the checkerboard images, recording mark bits of the gray level jump areas, recording index values of all gray level jumps according to the mark bits of the gray level jump areas, calculating the length of a transverse edge and the length of a vertical edge of the checkerboard images according to the index values, and calculating the matching degree of the line frequency of the linear array camera and the moving speed of the object according to the length of the transverse edge and the length of the vertical edge of the checkerboard. The invention adopts a method of shooting a checkerboard target graph and analyzing the collected image to quantitatively describe the matching degree of the line frequency and the object motion speed of the linear array camera, because the checkerboard is square, whether the image is deformed or not is conveniently judged, in addition, the checkerboard only has black and white colors, the image contrast is very large, the boundary of the checkerboard is conveniently positioned, the lengths of the horizontal edge and the vertical edge of the checkerboard are respectively detected by collecting the checkerboard image, and whether the line frequency and the object motion speed of the linear array camera are matched or not is judged according to the lengths of the horizontal edge and the vertical edge, so that the operation is simple, and the objective and accurate judgment can be obtained.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for determining whether a line frequency of a line-scan camera matches an object motion speed according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an exemplary checkerboard target map;
a schematic diagram of a checkerboard horizontal side and vertical side is exemplarily shown in fig. 3;
fig. 4 is a schematic diagram of a system for determining whether a line frequency of a line-scan camera matches an object motion speed according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a flowchart of a method for determining whether a line frequency of a line-scan camera matches an object motion speed according to an embodiment of the present disclosure is shown.
As shown in fig. 1, a method for determining whether a line frequency of a line camera is matched with an object motion speed provided in an embodiment of the present application includes:
s100: and (3) rightly fixing the checkerboard target image on a measured object, and setting the line frequency of the linear array camera and the movement speed of the object.
The target adopts a checkerboard diagram, the checkerboard is as shown in fig. 2, because the checkerboard is square, whether the image is deformed or not is convenient to judge, in addition, the checkerboard only has black and white, the image contrast is very large, and the boundary of the checkerboard is convenient to position. Firstly, the line frequency of the line-scan camera and the movement speed of an object are set, and then the checkerboard target image is placed and fixed on a conveying belt or an object to be measured, so that the line-scan camera can shoot checkerboard images moving along with the object to be measured.
S200: and acquiring checkerboard images shot by the linear array camera.
After the linear array camera shoots the checkerboard images, one checkerboard image in the center of the field of view of the linear array camera is collected, or the checkerboard image is filled with the field of view of the linear array camera.
S300: and performing inclination correction on the checkerboard image.
If the captured checkerboard image is tilted, it needs to be corrected for tilt for subsequent analysis. There are many methods for tilt correction, and the present example is described by taking the method of Hough transform + projection correction as an example, without limitation. The angle of inclination of the straight line in the image can be detected through Hough transformation, and the angle of inclination of the checkerboard image can be obtained. Assuming that the inclination angle of the checkerboard image is θ, the coordinates of the target point in the original image are (x)0,y0),x0And y0And respectively representing the row index and the column index of the target point in the checkerboard image, calculating the coordinates (x, y) of the corrected target point through a formula (1) according to a projection correction method, and respectively representing the row index and the column index of the target point after inclination correction by x and y.
S400: and detecting to obtain a gray level jump area in the checkerboard image, and recording a zone bit of the gray level jump area.
The horizontal sides and the vertical sides of the checkerboards are respectively shown in fig. 3, and the length of the horizontal sides and the length of the vertical sides of each checkerboard can be obtained by detecting the collected full checkerboard. Specifically, when the length of the transverse edge is detected, the gray value of the pixel point at the current position of the first row is obtained, the absolute value of the difference between the gray value of the pixel point at the current position of the first row and the gray value of the pixel point at the adjacent position is calculated, whether the absolute value is greater than a set threshold (preferably, the set threshold is 50) is judged, if the absolute value is greater than the set threshold, the position is considered to be a gray level jump area, namely the boundary of the checkerboard, and the row index of the position is recorded and stored in the first row of the row index matrix.
For the first position meeting the condition, the gray value of the pixel point at the current position and the gray value of the pixel point at the adjacent position need to be judged, if the gray value of the pixel point at the current position is greater than the gray value of the pixel point at the adjacent position, the position is a white-to-black boundary, and the zone bit of the row is recorded as a first zone bit (preferably, the first zone bit is 1); if the gray value of the pixel point at the current position is smaller than the gray value of the pixel point at the adjacent position, the position is a black-to-white boundary, and the zone bit of the line is recorded as a second zone bit (preferably, the second zone bit is 0). And sequentially carrying out the processing line by line, and recording the zone bits of all the gray level jump areas of the whole image.
S500: and recording index values of all gray level jumps according to the zone bits of the gray level jump area.
After recording and obtaining the zone bits of all the gray level jump areas of the whole image, judging whether the zone bit of the target row is consistent with the zone bit of the previous row, if the zone bit of the target row is inconsistent with the zone bit of the previous row, recording the row index of the target row, and sequentially storing the row index in a row index matrix; and if the zone bit of the target row is consistent with the zone bit of the previous row, directly jumping to the next row for continuous judgment. Each grid of the checkerboard occupies a plurality of rows and columns of the image, and assuming that the 1 st row to the 10 th row of the image belong to the first white grid, the flag bits of the 10 rows are the same, and the flag bits are changed only when the next black grid is entered. That is, the flag is used to distinguish where the intersection of the trellis is located.
S600: and calculating the length of the horizontal edge and the length of the vertical edge of the checkerboard image according to the index value.
After traversing all the row data, a complete row index matrix is obtained, index values of all the gray level jumps are recorded in the matrix, and if the length of the transverse edge is to be obtained, the difference of adjacent data needs to be calculated line by line, namely the current row index is used for subtracting the previous row index of the same row, and finally the transverse edge length matrix of all the complete checkerboards is obtained. Assuming that the complete checkerboard has M rows and N columns, the size of the length matrix of the horizontal side is M × N.
The method for detecting and calculating the vertical edge of the checkerboard is the same as that of the horizontal edge, namely when the length of the vertical edge is detected, the gray value of the pixel point at the current position in the first row is obtained, the absolute value of the difference between the gray value of the pixel point at the current position in the first row and the gray value of the pixel point at the adjacent position is calculated, whether the absolute value is greater than a set threshold value (the preferred set threshold value is 50) is judged, if the absolute value is greater than the set threshold value, the position is considered to be a gray level jump area, namely the boundary of the checkerboard, and the row index of the position is recorded and stored and is stored in the first row of the row index matrix.
For the first position meeting the condition, the gray value of the pixel point at the current position and the gray value of the pixel point at the adjacent position need to be judged, if the gray value of the pixel point at the current position is greater than the gray value of the pixel point at the adjacent position, the position is a white-to-black boundary, and the zone bit of the row is recorded as a first zone bit (preferably, the first zone bit is 1); if the gray value of the pixel point at the current position is smaller than the gray value of the pixel point at the adjacent position, the position is a black-to-white boundary, and the zone bit of the row is recorded as a second zone bit (preferably, the second zone bit is 0). And sequentially carrying out the processing column by column, and recording the zone bits of all the gray level jump areas of the whole image.
After recording and obtaining the zone bits of all the gray level jump areas of the whole image, judging whether the zone bit of the target row is consistent with the zone bit of the previous row, if the zone bit of the target row is inconsistent with the zone bit of the previous row, recording the row index of the target row, and sequentially storing the row index in a row index matrix; and if the zone bit of the target column is consistent with the zone bit of the previous column, directly jumping to the next column for continuous judgment.
After traversing all the column data, obtaining a complete column index matrix, recording index values of all gray level jumps in the matrix, and calculating the difference of adjacent data column by column to obtain the length of a vertical edge, namely subtracting the previous column index of the same column from the current column index to finally obtain a vertical edge length matrix of all complete checkerboards, wherein the size of the vertical edge length matrix is the same as that of the horizontal edge length matrix and is also M multiplied by N, and the data at the same position in the two length matrices represents the horizontal edge length and the vertical edge length of the same checkerboard.
S700: and calculating the matching degree of the line frequency of the linear array camera and the motion speed of the object according to the length of the transverse edge and the length of the vertical edge of the checkerboard.
Considering that the horizontal resolution of the image is the resolution of the line camera, which is the inherent attribute of the camera, and the vertical resolution of the image is related to the line frequency of the line camera and the matching degree of the object motion speed, which is variable, the matching degree of the line camera and the object motion speed can be judged by calculating the change of the vertical side and the horizontal side of the checkerboard. Defining a matching error alpha, and calculating a formula shown in formula (2):
wherein, length _ h represents the length of the horizontal side of the checkerboard, and length _ v represents the length of the vertical side of the checkerboard. If the line frequency of the linear array camera is strictly matched with the motion speed of the object, the matching error alpha is 0; if the line frequency of the linear array camera is higher than the motion speed of the object, the matching error is a negative number, and the larger the numerical value is, the more serious the image is stretched; if the line frequency of the line-scan camera is lower than the motion speed of the object, the matching error is an integer, and the image is compressed more seriously if the numerical value is larger.
And (3) sequentially substituting the data in the length matrix of the horizontal edge and the length matrix of the vertical edge of the checkerboard obtained by the calculation in the step (S600) into the formula (2) according to the corresponding positions to obtain the matching error of each checkerboard, and describing the matching error of the line frequency and the object movement speed of the current linear array camera by using the average value of all the matching errors so as to judge the matching degree of the two.
The method for judging whether the line frequency of the linear array camera is matched with the motion speed of the object provided by the embodiment of the application quantitatively describes the matching degree of the line frequency of the linear array camera and the motion speed of the object by adopting a method for shooting a target graph and analyzing an acquired image, the target graph adopts a checkerboard graph, the lengths of the transverse edges and the vertical edges of the checkerboard graph are respectively detected by acquiring checkerboard images, and whether the line frequency of the linear array camera is matched with the motion speed of the object is judged by calculating the side length of the target in the shot image, so that the operation is simple, and objective and accurate judgment can be obtained.
Based on the method for determining whether the line frequency of the line camera is matched with the object motion speed in the foregoing embodiment, the embodiment of the present application further provides a system for determining whether the line frequency of the line camera is matched with the object motion speed, as shown in fig. 4, the system for determining whether the line frequency of the line camera is matched with the object motion speed in the embodiment of the present application includes:
the setting module 100 is used for rightly fixing the checkerboard target map on a detected object and setting the line frequency of the linear array camera and the motion speed of the object.
And the acquisition module 200 is used for acquiring checkerboard images shot by the linear array camera.
A correcting module 300, configured to perform tilt correction on the checkerboard image.
And the detection module 400 is configured to detect and obtain a gray level jump area in the checkerboard image, and record a flag bit of the gray level jump area.
And a recording module 500, configured to record the index value of the grayscale jump according to the flag bit of the grayscale jump region.
The first calculating module 600 is configured to calculate, according to the index value, a length of a horizontal edge and a length of a vertical edge of the checkerboard image.
And the second calculating module 700 is configured to calculate the matching degree between the line frequency and the object motion speed of the line camera according to the length of the horizontal edge and the length of the vertical edge of the checkerboard.
It is noted that, in this specification, relational terms such as "first" and "second," and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
The above-described embodiments of the present application do not limit the scope of the present application.
Claims (10)
1. A method for judging whether line frequency of a linear array camera is matched with the motion speed of an object is characterized by comprising the following steps:
the checkerboard target image is rightly fixed on a measured object, and the line frequency of the linear array camera and the movement speed of the object are set;
acquiring a checkerboard image shot by the linear array camera;
performing tilt correction on the checkerboard image;
detecting and obtaining a gray level jump area in the checkerboard image, and recording a zone bit of the gray level jump area; the flag bit is used for indicating the boundaries of different gray values in the checkerboard image;
recording index values of all gray level jumps according to the zone bits of the gray level jump area; the index value comprises a row index and a column index corresponding to the gray jump area;
calculating the length of the transverse edge and the length of the vertical edge of the checkerboard image according to the index value;
and calculating the matching degree of the line frequency of the linear array camera and the motion speed of the object according to the length of the transverse edge and the length of the vertical edge of the checkerboard.
2. The method of claim 1, wherein acquiring the checkerboard image captured by the line camera comprises acquiring an image of a checkerboard in the center of the field of view of the line camera or acquiring an image of a checkerboard filling the field of view of the line camera.
3. The method according to claim 1, wherein performing a tilt correction on said checkerboard image comprises:
detecting and obtaining the inclination angle theta of the checkerboard image;
acquiring coordinates (x) of target points in the checkerboard image0,y0),x0And y0Respectively representing the row index and the column index of the target point in the checkerboard image;
calculating to obtain corrected coordinates (x, y) of the target point according to a formula (1);
where x and y denote a row index and a column index of the tilt-corrected target point, respectively.
4. The method of claim 1, wherein detecting and obtaining a gray transition area in the checkerboard image, and recording a flag bit of the gray transition area comprises:
acquiring a gray value of a pixel point at the current position;
calculating the absolute value of the difference between the gray value of the pixel point at the current position and the gray value of the pixel point at the adjacent position;
judging whether the absolute value is larger than a set threshold value or not;
if the absolute value is larger than the set threshold, the current position is considered as a gray level jump area;
and recording the zone bit of the gray level jump region according to the gray level value of the pixel point at the current position and the gray level value of the pixel point at the adjacent position.
5. The method of claim 4, wherein recording the flag bit of the gray transition region according to the gray values of the current-position pixel and the adjacent-position pixel comprises:
judging whether the gray value of the pixel point at the current position is larger than the gray value of the pixel point at the adjacent position;
if the gray value of the pixel point at the current position is larger than the gray value of the pixel point at the adjacent position, recording the zone bit of the gray hopping region as a first zone bit;
and if the gray value of the pixel point at the current position is smaller than the gray value of the pixel point at the adjacent position, recording the zone bit of the gray hopping region as a second zone bit.
6. The method of claim 1, wherein recording the index values of all gray transitions according to the flag bit of the gray transition region comprises:
judging whether the zone bit of the target line is consistent with the zone bit of the previous line;
if the zone bit of the target row is not consistent with the zone bit of the previous row, recording the row index of the target row, and sequentially storing the row index in a row index matrix;
and if the zone bit of the target row is consistent with the zone bit of the previous row, directly jumping to the next row for continuous judgment.
7. The method of claim 6, wherein recording the index values of all gray transitions according to the flag bit of the gray transition region comprises:
judging whether the flag bit of the target column is consistent with the flag bit of the previous column;
if the zone bit of the target row is not consistent with the zone bit of the previous row, recording the row index of the target row, and storing the row index in a row index matrix;
and if the zone bit of the target column is consistent with the zone bit of the previous column, directly jumping to the next column for continuous judgment.
8. The method according to claim 7, wherein calculating the length of the horizontal side and the length of the vertical side of the checkerboard image according to the index value comprises:
calculating the difference of adjacent row index values in the row index matrix line by line to obtain a length matrix of the transverse edge of the checkerboard;
and calculating the difference of the index values of adjacent columns in the column index matrix column by column to obtain a vertical edge length matrix of the checkerboard.
9. The method as claimed in claim 8, wherein calculating the degree of matching between the line frequency of the line camera and the moving speed of the object according to the length of the horizontal side and the length of the vertical side of the checkerboard comprises:
sequentially substituting data in the length matrix of the transverse edge of the checkerboard and the length matrix of the vertical edge of the checkerboard into a formula (2), and calculating to obtain a matching error of each checkerboard;
wherein, length _ h represents the length of the horizontal side of the checkerboard, and length _ v represents the length of the vertical side of the checkerboard;
taking the mean value of all the matching errors as the matching error of the line frequency and the object motion speed of the linear array camera;
and judging the matching degree of the line frequency of the linear array camera and the motion speed of the object according to the matching error.
10. A linear array camera line frequency and object motion speed matching judging system is characterized by comprising:
the setting module is used for rightly fixing the checkerboard target image on a measured object and setting the line frequency of the linear array camera and the movement speed of the object;
the acquisition module is used for acquiring checkerboard images shot by the linear array camera;
the correction module is used for carrying out inclination correction on the checkerboard image;
the detection module is used for detecting and obtaining a gray level jump area in the checkerboard image and recording a zone bit of the gray level jump area; the flag bit is used for indicating the boundaries of different gray values in the checkerboard image;
the recording module is used for recording the index value of the gray level jump according to the zone bit of the gray level jump area; the index value comprises a row index and a column index of the gray jump;
the first calculation module is used for calculating the length of the transverse edge and the length of the vertical edge of the checkerboard image according to the index value;
and the second calculation module is used for calculating the matching degree of the line frequency and the object motion speed of the linear array camera according to the length of the transverse edge and the length of the vertical edge of the checkerboard.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910951129.3A CN110533686B (en) | 2019-10-08 | 2019-10-08 | Method and system for judging whether line frequency of linear array camera is matched with object motion speed |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910951129.3A CN110533686B (en) | 2019-10-08 | 2019-10-08 | Method and system for judging whether line frequency of linear array camera is matched with object motion speed |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110533686A CN110533686A (en) | 2019-12-03 |
CN110533686B true CN110533686B (en) | 2022-03-04 |
Family
ID=68671345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910951129.3A Active CN110533686B (en) | 2019-10-08 | 2019-10-08 | Method and system for judging whether line frequency of linear array camera is matched with object motion speed |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110533686B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111797695B (en) * | 2020-06-10 | 2023-09-29 | 盐城工业职业技术学院 | Automatic identification method and system for twist of folded yarn |
CN111650392A (en) * | 2020-07-03 | 2020-09-11 | 东北大学 | Metal sheet movement speed detection method based on linear array camera stereoscopic vision |
CN112762896B (en) * | 2020-12-30 | 2023-05-23 | 凌云光技术股份有限公司 | Device and method for judging and adjusting levelness of large-depth-of-field lens camera |
CN112714311B (en) * | 2020-12-30 | 2021-10-26 | 中国科学院长春光学精密机械与物理研究所 | Line frequency calibration method and correction system of TDI camera |
CN115468738B (en) * | 2022-10-31 | 2024-02-27 | 易思维(杭州)科技股份有限公司 | Measurement precision evaluation device and evaluation method of linear array camera measurement system |
CN116858833B (en) * | 2023-07-07 | 2024-02-23 | 东莞康视达自动化科技有限公司 | Time-sharing line scanning system and method based on machine vision |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101901501A (en) * | 2010-07-22 | 2010-12-01 | 首都师范大学 | Method for generating laser color cloud picture |
CN103488978A (en) * | 2013-09-26 | 2014-01-01 | 浙江工业大学 | License plate positioning method based on gray level jump and character projection interval mode |
CN104680171A (en) * | 2013-11-27 | 2015-06-03 | 富士通株式会社 | Device and method for detecting zebra crossing in image |
CN107818542A (en) * | 2017-10-30 | 2018-03-20 | 凌云光技术集团有限责任公司 | The restorative procedure and device of a kind of anamorphose |
CN108760767A (en) * | 2018-05-31 | 2018-11-06 | 电子科技大学 | Large-size LCD Screen defect inspection method based on machine vision |
CN109769096A (en) * | 2019-01-23 | 2019-05-17 | 电子科技大学 | A kind of servo control method for linear array CCD scanning process |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7077319B2 (en) * | 2000-11-24 | 2006-07-18 | Metrologic Instruments, Inc. | Imaging engine employing planar light illumination and linear imaging |
-
2019
- 2019-10-08 CN CN201910951129.3A patent/CN110533686B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101901501A (en) * | 2010-07-22 | 2010-12-01 | 首都师范大学 | Method for generating laser color cloud picture |
CN103488978A (en) * | 2013-09-26 | 2014-01-01 | 浙江工业大学 | License plate positioning method based on gray level jump and character projection interval mode |
CN104680171A (en) * | 2013-11-27 | 2015-06-03 | 富士通株式会社 | Device and method for detecting zebra crossing in image |
CN107818542A (en) * | 2017-10-30 | 2018-03-20 | 凌云光技术集团有限责任公司 | The restorative procedure and device of a kind of anamorphose |
CN108760767A (en) * | 2018-05-31 | 2018-11-06 | 电子科技大学 | Large-size LCD Screen defect inspection method based on machine vision |
CN109769096A (en) * | 2019-01-23 | 2019-05-17 | 电子科技大学 | A kind of servo control method for linear array CCD scanning process |
Non-Patent Citations (4)
Title |
---|
"Development of an optical inspection platform for surface defect detection in touch panel glass";Ming Chang;《International journal of optomechatronics》;20160428;全文 * |
"基于单目视觉的靶标定位***研究与应用";朱彤;《中国优秀硕士学位论文全文数据库信息科技辑》;20170401;全文 * |
"基于机器视觉的目标识别***研究";苏晓峰;《中国优秀硕士学位论文全文数据库信息科技辑》;20190115;全文 * |
"基于面线相机组合的密集度测试方法研究";陈朝阳;《中国优秀硕士学位论文全文数据库信息科技辑》;20140428;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110533686A (en) | 2019-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110533686B (en) | Method and system for judging whether line frequency of linear array camera is matched with object motion speed | |
CN110611770B (en) | Method and system for judging whether line frequency of linear array camera is matched with object motion speed | |
US8970853B2 (en) | Three-dimensional measurement apparatus, three-dimensional measurement method, and storage medium | |
KR101616432B1 (en) | Method of measuring sea level in image and Method of measuring draft of ship using the same | |
US20110235898A1 (en) | Matching process in three-dimensional registration and computer-readable storage medium storing a program thereof | |
JP2009244023A (en) | Measuring device using line sensor | |
CN110264397B (en) | Method and device for extracting effective region of fisheye image | |
CN113688846B (en) | Object size recognition method, readable storage medium, and object size recognition system | |
CN114005108A (en) | Pointer instrument degree identification method based on coordinate transformation | |
CN115060162A (en) | Chamfer dimension measuring method and device, electronic equipment and storage medium | |
JP2014155063A (en) | Chart for resolution measurement, resolution measurement method, positional adjustment method for camera module, and camera module manufacturing method | |
CN110689537B (en) | Method and system for judging whether line-scan camera is used for acquiring images at constant speed | |
CN114187363A (en) | Method and device for obtaining radial distortion parameter value and mobile terminal | |
JP2002140693A (en) | Image processing parameter determination device, its method and recording medium with recorded image processing parameter determination program | |
CN113375555A (en) | Power line clamp measuring method and system based on mobile phone image | |
CN113160223A (en) | Contour determination method, contour determination device, detection device and storage medium | |
CN115546072B (en) | Image distortion correction method | |
EP4375924A1 (en) | Cell alignment degree measurement method, controller, detection system, and storage medium | |
US8102516B2 (en) | Test method for compound-eye distance measuring apparatus, test apparatus, and chart used for the same | |
CN115684012A (en) | Visual inspection system, calibration method, device and readable storage medium | |
CN113674361B (en) | Vehicle-mounted all-round-looking calibration implementation method and system | |
CN112233063B (en) | Circle center positioning method for large-size round object | |
KR101174820B1 (en) | Apparatus for measuring dynamic displacement of floating structure and vision-based unit thereof | |
CN113469171A (en) | Method, device and medium for identifying interest area in SFR test card image | |
JP2008058221A (en) | Velocity of high-speed moving body, estimation method of position, estimation program, and estimation system |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701 Applicant after: Lingyunguang Technology Co., Ltd Address before: 100094 Beijing city Haidian District Cui Hunan loop 13 Hospital No. 7 Building 7 room 701 Applicant before: LUSTER LIGHTTECH GROUP Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |