CN113554667A - Three-dimensional displacement detection method and device based on image recognition - Google Patents

Three-dimensional displacement detection method and device based on image recognition Download PDF

Info

Publication number
CN113554667A
CN113554667A CN202110851767.5A CN202110851767A CN113554667A CN 113554667 A CN113554667 A CN 113554667A CN 202110851767 A CN202110851767 A CN 202110851767A CN 113554667 A CN113554667 A CN 113554667A
Authority
CN
China
Prior art keywords
image
scale
coordinate system
delta
point
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
CN202110851767.5A
Other languages
Chinese (zh)
Other versions
CN113554667B (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.)
Shanghai Abian Intelligent Technology Co ltd
Shanghai Smu Vision Smart Technology Co ltd
Original Assignee
Shanghai Abian Intelligent Technology Co ltd
Shanghai Smu Vision Smart Technology 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 Shanghai Abian Intelligent Technology Co ltd, Shanghai Smu Vision Smart Technology Co ltd filed Critical Shanghai Abian Intelligent Technology Co ltd
Priority to CN202110851767.5A priority Critical patent/CN113554667B/en
Publication of CN113554667A publication Critical patent/CN113554667A/en
Application granted granted Critical
Publication of CN113554667B publication Critical patent/CN113554667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/75Determining position or orientation of objects or cameras using feature-based methods involving models

Abstract

The invention provides a three-dimensional displacement detection method based on image recognition, which comprises the following steps: s1, establishing a measurement coordinate system; s2, acquiring the distance d between the image acquisition unit and the object to be measurediAcquiring an image of an object to be measured and segmenting a scale image based on a trained neural network model; s3, identifying the corner points of the scale image, selecting a first corner point and a second corner point, and acquiring the actual distance sca of the first corner point and the second corner point on the scale and the pixel distance pix in the scale imageiTo obtain pixiConversion parameter p to scai(ii) a S4, fitting to obtain a relational expression between d and p, wherein d represents the distance between the image acquisition unit and the object to be detected, and p represents a conversion parameter corresponding to d; s5, obtaining the pixel displacement of the scale image at the moment of T-T + delta T on the imaging plane, and obtaining the actual displacement delta x, delta y and delta z of the scale in the axial direction of the measuring coordinate system X, Y, Z in the time of T-T + delta T based on the pixel displacement and the relational expression. The invention provides a three-dimensional displacement detection device based on image recognition.

Description

Three-dimensional displacement detection method and device based on image recognition
Technical Field
The invention relates to the technical field of displacement detection, in particular to a three-dimensional displacement detection method and device based on image recognition.
Background
After construction of various large-scale engineering structures (such as bridges, dams, water towers and the like), displacement and deformation can occur due to the influence of external environment in the long-term use process, so that other fault problems are caused, great potential safety hazards are brought, and life safety and property safety are harmed. In order to be able to remove the fault before the damage is extended, it is necessary to detect the displacement of the structure in a timely manner.
Currently, most methods for measuring the displacement of a large structure adopt a sensor mounted on the structure to perform real-time measurement. The direct mounting measurement method enables the sensor to be easily damaged in the process of vibration displacement along with the measured object, and the obtained measurement data are only digital and difficult to support subsequent research.
Disclosure of Invention
The invention aims to provide a three-dimensional displacement detection method and device based on image recognition, which can obtain the three-dimensional displacement of an object to be detected only by carrying out data processing on collected image data of the object to be detected under the condition of not directly contacting the object to be detected.
In order to achieve the above object, the present invention provides a three-dimensional displacement detection method based on image recognition, wherein a scale is fixed on an outer surface of a sample, the method comprising the steps of:
s1, establishing a measurement coordinate system based on the initial position of the image acquisition unit, wherein the imaging plane of the image acquisition unit at the initial position is an O-XY plane of the measurement coordinate system, and the direction perpendicular to the O-XY plane is the Z-axis direction of the measurement coordinate system; establishing a two-dimensional scale coordinate system based on the plane where the scale is located;
s2, acquiring the distance d between the Z-axis direction image acquisition unit and the object to be measurediThe initial value of i is 1; acquiring an image of an object to be measured, and segmenting a scale image from the image of the object to be measured based on a trained neural network model;
s3, identifying all edge points of the scale image through an edge detection algorithm, screening out corner points in the edge points through a corner point detection algorithm, and selecting a first corner point and a second corner point from the screened corner points; establishing a two-dimensional scale image coordinate system corresponding to the scale coordinate system based on the scale image; acquiring the actual distance sca of a first corner point and a second corner point on a scale in the scale coordinate system, and acquiring the pixel distance pix of the first corner point and the second corner point on a scale image in the scale image coordinate systemiObtaining the pixel distance pixiConversion parameter p to actual distance scai(ii) a Updating i to i + 1; when i is less than or equal to n, changing the distance between the image acquisition unit and the object to be detected along the Z-axis direction, and entering S2; otherwise, go to S4;
s4, based on { d1,…,dnAnd { p }1,…,pnFitting to obtain a relational expression between d and p; wherein d represents the distance between the Z-axis direction image acquisition unit and the object to be measured, and p represents a conversion parameter corresponding to d;
s5, obtaining the pixel displacement of the scale image on the imaging plane of the image acquisition unit within the time from the moment T to the moment T + delta T; and obtaining actual displacements delta x, delta y and delta z of the scale in the axial direction of the measuring coordinate system X, Y, Z in the time range of T-T + delta T based on the pixel displacement and the relational expression.
Optionally, the step S2 acquires an image of the object to be measured, and segments a ruler image from the image of the object to be measured based on the trained neural network model, including:
s21, acquiring a plurality of corresponding images of the object to be detected by adjusting the position of the image acquisition unit;
s22, selecting partial images of the objects to be tested from the images of the objects to be tested as a training set, and using the rest images of the objects to be tested as a testing set; manually marking scale images in the images of the objects to be tested in the training set;
s23, training the neural network model through the training set, wherein the neural network model is used for identifying ruler images in the image of the object to be tested;
and S24, inputting the test set into the trained neural network model, and verifying the neural network model.
Optionally, the step S3 of identifying all edge points of the ruler image by the edge detection algorithm includes:
s31, converting the scale image into a corresponding gray scale image; setting a gray threshold value, and converting the gray image into a corresponding binary image;
s32, scanning the binary image from top to bottom and from left to right to obtain all edge points of the binary image;
and S33, deleting the isolated edge points.
Optionally, in step S32: when scanning from top to bottom, if the pixel values of two pixels adjacent up and down are different, recording the upper pixel in the two pixels as an edge point; when scanning from left to right, if the pixel values of two pixels adjacent to each other on the left and right are different, the left pixel of the two pixels is regarded as an edge point.
Optionally, the ruler is divided into a plurality of regions, at least one region includes a plurality of rectangular marks with different colors from the region, and the step S3 of obtaining the corner points in the edge points through the corner point detection algorithm includes:
traversing all edge points from top to bottom and from left to right; establishing a vector by taking the current edge point as a starting point and the last adjacent edge point of the current edge point as an end point
Figure BDA0003182777050000031
Establishing a vector by taking the current edge point as a starting point and the last adjacent edge point of the current edge point as an end point
Figure BDA0003182777050000032
If it is
Figure BDA0003182777050000033
And
Figure BDA0003182777050000034
is 90 deg., then the current edge point is the corner point.
Optionally, in step S3,
Figure BDA0003182777050000035
optionally, in step S4, a linear relation between d and p is obtained by least squares fitting: d ═ ap + b;
wherein
Figure BDA0003182777050000036
Figure BDA0003182777050000037
Optionally, step S5 includes:
s51, fixedly placing the image acquisition unit at the initial position, acquiring images of the object to be measured at T, T + delta t moments, and respectively extracting scale images at T, T + delta t moments; acquiring pixel displacement delta x 'and delta y' of an internal standard ruler image within the time of T-T + delta T;
s52, acquiring the T + delta T moment, and obtaining the corresponding conversion parameters according to the pixel distance pix' of the first corner point and the second corner point in the scale image coordinate system
Figure BDA0003182777050000038
Obtaining the actual displacement Δ x, Δ y of the scale on the axis of the measuring coordinate system X, Y within the time length of T-T + Δ T:
Figure BDA0003182777050000039
wherein, p'x、p′yThe conversion parameter p' in the direction of the axis of the measurement coordinate system X, Y;
s53, acquiring the actual displacement Δ Z of the scale in the Z-axis direction of the measurement coordinate system within the time period of T to T + Δ T.
Optionally, p'x、p′yThe calculation method comprises the following steps:
s521, acquiring the actual distance sca between the first corner point and the second corner point on the scale on the horizontal axis and the vertical axis of the scale coordinate systemx、scay
S522, obtaining pixel distances pix 'of first corner points and second corner points in the scale image at the moment T + delta T on the horizontal axis and the vertical axis of a scale image coordinate system'x、pix′y
S523, calculation is carried out to obtain
Figure BDA0003182777050000041
The invention also provides a three-dimensional displacement detection device based on image recognition, which is used for realizing the detection method, and the device comprises:
the scale is fixedly arranged on the outer surface of the to-be-measured object;
the light source generator is fixedly embedded in the outer surface of the object to be measured, positioned between the scale and the object to be measured and used for providing background light for the scale;
the image acquisition unit is used for acquiring an image of an object to be detected, and the image of the object to be detected comprises a scale image;
and the image processing unit acquires the three-dimensional displacement of the object to be measured in the measurement coordinate system based on the scale image through a built-in image processing algorithm.
Compared with the prior art, the invention has the beneficial effects that:
1) the three-dimensional displacement detection device based on image recognition has simple structure and low cost, and the image acquisition unit and the image processing unit do not need to be contacted with the object to be detected, so the economic loss of the damage of the detection device caused by the deformation of the object to be detected can be effectively reduced (the cost of the scale and the light source generator can be ignored);
2) according to the invention, only the scale needs to be fixed on the object to be measured, and the image acquisition unit is installed at a remote position for image acquisition, so that the direct contact between the image acquisition unit and the image processing unit and the object to be measured is avoided, and data errors caused by vibration displacement of the object to be measured can be prevented;
3) the three-dimensional displacement detection method based on image recognition is high in detection precision, can meet actual requirements, and has good popularization value.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description will be briefly introduced, and it is obvious that the drawings in the following description are an embodiment of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts according to the drawings:
FIG. 1 is a schematic diagram of an image of an object to be measured acquired by an image acquisition unit according to the present invention;
FIG. 2 is a flow chart of a three-dimensional displacement detection method based on image recognition according to the present invention;
FIG. 3 is a schematic diagram of the edge detection result of the scale image and the displacement of the scale image along the X, Y axis;
FIG. 4 is a schematic diagram of corner detection performed by the present invention;
FIG. 5 is a schematic view of a three-dimensional displacement detection device based on image recognition according to the present invention;
in the figure: 1. a scale; 2. a light source generator; 3. an image acquisition unit; 4. an analyte.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of 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 invention.
In the invention, a scale 1 is fixedly arranged on the outer surface of the object to be measured. An image of the object to be measured shown in fig. 1 is acquired by the image acquisition unit 3, and the image of the object to be measured includes a ruler image. In an embodiment of the present invention, the image acquisition unit 3 is a visual camera. The scale image is divided into four rectangular regions, and the adjacent regions have different colors (represented by black and white in this embodiment). At least one region is a rectangle containing a number of marks of a different color than the region. In this embodiment, a plurality of white rectangular marks (also referred to as rectangular scales) are provided at the boundary between the black and white regions, and the white rectangular marks fall within the black region. The intervals of the plurality of rectangular marks may be equal or unequal.
The invention provides a three-dimensional displacement detection method based on image recognition, as shown in figure 2, the method comprises the following steps:
s1, establishing a measurement coordinate system based on the initial position of the image acquisition unit 3, wherein the imaging plane of the image acquisition unit 3 at the initial position is an O-XY plane of the measurement coordinate system, and the direction perpendicular to the O-XY plane is the Z-axis direction of the measurement coordinate system;
s2, acquiring the vertical distance d between the image acquisition unit 3 and the object 4 to be measurediThe initial value of i is 1;
acquiring an image of an object to be measured, and segmenting a scale image from the image of the object to be measured based on a trained neural network model;
step S2 includes:
s21, adjusting the position of the image acquisition unit 3, and acquiring a plurality of images of the object to be detected at different positions;
s22, selecting partial images of the objects to be tested from the images of the objects to be tested as a training set, and using the rest images of the objects to be tested as a testing set; manually marking scale images in the images of the objects to be tested in the training set;
s23, training the neural network model through the training set, wherein the neural network model is used for identifying ruler images in the image of the object to be tested;
and S24, inputting the test set into the trained neural network model, and verifying the neural network model.
S3, identifying all edge points of the scale image through an edge detection algorithm, screening out corner points in the edge points through a corner point detection algorithm, and selecting a first corner point and a second corner point from the screened corner points; establishing a two-dimensional scale image coordinate system corresponding to the scale coordinate system based on the scale image; acquiring the actual distance sca of a first corner point and a second corner point on a scale in the scale coordinate system, and acquiring the pixel distance pix of the first corner point and the second corner point on a scale image in the scale image coordinate systemiObtaining the pixel distance pixiConversion parameter p to actual distance scai(ii) a Updating i to i + 1; when i is less than or equal to n, changing the distance between the image acquisition unit and the object to be detected along the Z-axis direction, and entering S2; otherwise, go to S4;
identifying all edge points of the ruler image by the edge detection algorithm in step S3 includes:
s31, converting the scale image into a corresponding gray scale image; setting a gray threshold value, and converting the gray image into a corresponding binary image; in the embodiment of the invention, when the pixel value of the pixel point of the scale image is higher than the gray threshold, the pixel value of the pixel point is marked as 1 (represented by black); the pixel value of the pixel point of the scale image is higher than the gray threshold, and the pixel value of the pixel point is marked as 0 (represented by white).
And S32, scanning the binary image from top to bottom and from left to right to obtain all edge points of the binary image. The edge lines made up of all the edge points are shown in fig. 3.
In the embodiment of the invention, a binary image coordinate system is established by taking the pixel point at the leftmost lower corner of the binary image as an origin. Assuming that a binary image has 255 × 255 pixels, the scanning order of the binary image can be understood as: scanning is performed in the binary image coordinate system in the order of pixel coordinates of (0,254) → (0,253) … → (0,0) → (1,254) → … → (1,1) → (1,0) → … → (254, 0).
In the embodiment of the invention, when scanning from top to bottom, if the pixel values of two pixels adjacent up and down suddenly change (the pixel value is changed from 0 to 1, or from 1 to 0), the upper pixel in the two pixels is taken as an edge point; when scanning from left to right, if the pixel values of two pixels adjacent to each other on the left and right are suddenly changed, the left pixel of the two pixels is taken as an edge point.
And S33, deleting the isolated edge points. In the embodiment of the invention, if all 8 pixel points around a certain edge point in the binary image are non-edge points, the edge point is an isolated edge point and is deleted.
In step S3, the obtaining of the corner points in the edge points by the corner point detection algorithm includes:
traversing all the edge points according to the sequence from top to bottom and from left to right; in this embodiment, in the process of traversing edge points, an edge point a coordinate (1,1), an edge point B coordinate (2,3), an edge point C coordinate (2,4), an edge point D coordinate (2,5), and an edge point E (1, 5); then for edge point a, the next adjacent edge point is pixel E and the next adjacent edge point is pixel B.
Establishing a vector by taking the current edge point as a starting point and the last adjacent edge point of the current edge point as an end point
Figure BDA0003182777050000071
Establishing a vector by taking the current edge point as a starting point and the last adjacent edge point of the current edge point as an end point
Figure BDA0003182777050000072
If it is
Figure BDA0003182777050000073
And
Figure BDA0003182777050000074
is 90 deg., then the current edge point is the corner point. If it is
Figure BDA0003182777050000075
And
Figure BDA0003182777050000076
the included angle is 180 degrees, which indicates that the current edge point and the two adjacent edge points are positioned on a straight line.
The pixel distance calculation method in the embodiment of the invention comprises the following steps:
if the coordinates of the two pixel points in the binary image are (x)i,yi)、(xj,yj) Then the pixel distance of the two pixel points
Figure BDA0003182777050000077
As shown in fig. 4, in an embodiment of the present invention, a pixel point a and a pixel point b are selected as a first corner and a second corner. The actual distance between the known pixel points a and b on the scale 1 is 5 mm.
S4, based on { d1,…,dnAnd { p }1,…,pnFitting to obtain a relational expression between d and p; wherein d represents the distance between the Z-axis direction image acquisition unit 3 and the object 4 to be measured, and p represents a conversion parameter corresponding to d;
in the embodiment of the present invention, step S4 obtains the linear relation between d and p by least squares fitting: d ═ ap + b;
wherein
Figure BDA0003182777050000081
Figure BDA0003182777050000082
S5, fixedly placing the image acquisition unit 3 at the initial position, and obtaining the pixel displacement of the scale image on the imaging plane of the image acquisition unit within the time length from the time T to the time T + delta T; actual displacements delta x and delta y of the scale 1 in the axial direction of the measuring coordinate system X, Y are obtained based on the pixel displacement and the corresponding conversion parameters; and acquiring the actual displacement delta Z of the scale 1 in the Z-axis direction of the measuring coordinate system within the time length from the moment T to the moment T + delta T based on the relational expression.
Step S5 includes:
s51, fixedly placing the image acquisition unit 3 at the initial position, acquiring an image of the object to be measured at the time of T, T + delta t, respectively extracting scale images at the time of T, T + delta t and converting the scale images into corresponding binary images; as shown in fig. 3, obtaining pixel displacements Δ x 'and Δ y' of the standard ruler image within the time T-T + Δ T; the solid line in fig. 3 represents a binary image at time T, and the broken line in fig. 3 represents a binary image at time T + Δ T;
s52, acquiring the T + delta T moment, and obtaining the corresponding conversion parameters according to the pixel distance pix' of the first corner point and the second corner point in the scale image coordinate system
Figure BDA0003182777050000083
Obtaining the actual displacement Δ x, Δ y of the scale on the axis of the measuring coordinate system X, Y within the time length of T-T + Δ T:
Figure BDA0003182777050000084
wherein, p'x、p′yThe conversion parameter p' in the direction of the axis of the measurement coordinate system X, Y;
in this example, p'x、p′yThe calculation method comprises the following steps:
s521, acquiring the actual distance sca between the first corner point and the second corner point on the scale on the horizontal axis and the vertical axis of the scale coordinate systemx、scay
S522, obtaining pixel distances pix 'of first corner points and second corner points in the scale image at the moment T + delta T on the horizontal axis and the vertical axis of a scale image coordinate system'x、pix′y
S523, calculation is carried out to obtain
Figure BDA0003182777050000091
S53, acquiring the actual displacement Δ Z of the scale in the Z-axis direction of the measurement coordinate system within the time period of T to T + Δ T. And (Δ x, Δ y, Δ z) is the three-dimensional displacement of the object to be measured in the measurement coordinate system from the time T to the time T + Δ T.
The present invention also provides a three-dimensional displacement detection device based on image recognition, which is used in the detection method of the present invention, as shown in fig. 5, the device comprises: scale 1, light source generator 2, image acquisition unit 3, image processing unit (not shown in the figure).
The scale 1 is fixedly arranged on the outer surface of the to-be-measured object;
the light source generator 2 is fixedly embedded in the outer surface of the object to be measured, is positioned between the scale 1 and the object to be measured 4, and is used for providing background light for the scale 1; in the embodiment of the present invention, the light source generator 2 is an infrared light source generator;
the image acquisition unit 3 is used for acquiring an image of an object to be detected, wherein the image of the object to be detected comprises a scale image;
and the image processing unit acquires the three-dimensional displacement of the object 4 to be measured in the measurement coordinate system based on the scale image through a built-in image processing algorithm.
The detection device has simple structure and low cost, and the image acquisition unit 3 and the image processing unit do not need to be contacted with the object 4 to be detected, so the economic loss of the detection device caused by the deformation of the object 4 to be detected can be effectively reduced (the cost of the scale 1 and the light source generator 2 can be ignored). According to the invention, only the scale 1 is required to be fixed on the object to be measured, and the image acquisition unit 3 is arranged at a remote position for image acquisition, so that the direct contact between the image acquisition unit 3 and the image processing unit and the object to be measured 4 is avoided, and data errors caused by vibration displacement of the object to be measured 4 can be prevented. The detection method disclosed by the invention is high in detection precision, can meet the actual requirements, and has good popularization value.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A three-dimensional displacement detection method based on image recognition is characterized in that a scale is fixedly arranged on the outer surface of a to-be-detected object, and the method comprises the following steps:
s1, establishing a measurement coordinate system based on the initial position of the image acquisition unit, wherein the imaging plane of the image acquisition unit at the initial position is an O-XY plane of the measurement coordinate system, and the direction perpendicular to the O-XY plane is the Z-axis direction of the measurement coordinate system; establishing a two-dimensional scale coordinate system based on the plane where the scale is located;
s2, acquiring the distance d between the Z-axis direction image acquisition unit and the object to be measurediThe initial value of i is 1; acquiring an image of an object to be measured, and segmenting a scale image from the image of the object to be measured based on a trained neural network model;
s3, identifying all edge points of the scale image through an edge detection algorithm, screening out corner points in the edge points through a corner point detection algorithm, and selecting a first corner point and a second corner point from the screened corner points; establishing a two-dimensional scale image coordinate system corresponding to the scale coordinate system based on the scale image; acquiring the actual distance sca of a first corner point and a second corner point on a scale in the scale coordinate system, and acquiring the pixel distance pix of the first corner point and the second corner point on a scale image in the scale image coordinate systemiObtaining the pixel distance pixiConversion parameter p to actual distance scai(ii) a Updating i to i + 1; when i is less than or equal to n, changing the distance between the image acquisition unit and the object to be detected along the Z-axis direction, and entering S2; otherwise, go to S4;
s4, based on { d1,…,dnAnd { p }1,…,pnFitting to obtain a relational expression between d and p; wherein d represents the distance between the Z-axis direction image acquisition unit and the object to be measured, and p represents a conversion parameter corresponding to d;
s5, obtaining the pixel displacement of the scale image on the imaging plane of the image acquisition unit within the time from the moment T to the moment T + delta T; and obtaining actual displacements delta x, delta y and delta z of the scale in the axial direction of the measuring coordinate system X, Y, Z in the time range of T-T + delta T based on the pixel displacement and the relational expression.
2. The method for detecting three-dimensional displacement based on image recognition according to claim 1, wherein the step S2 of acquiring an image of an object to be measured and segmenting a ruler image from the image of the object to be measured based on a trained neural network model comprises:
s21, acquiring a plurality of corresponding images of the object to be detected by adjusting the position of the image acquisition unit;
s22, selecting partial images of the objects to be tested from the images of the objects to be tested as a training set, and using the rest images of the objects to be tested as a testing set; manually marking scale images in the images of the objects to be tested in the training set;
s23, training the neural network model through the training set, wherein the neural network model is used for identifying ruler images in the image of the object to be tested;
and S24, inputting the test set into the trained neural network model, and verifying the neural network model.
3. The image recognition-based three-dimensional displacement detection method of claim 1, wherein the step S3 of recognizing all edge points of the ruler image through the edge detection algorithm comprises:
s31, converting the scale image into a corresponding gray scale image; setting a gray threshold value, and converting the gray image into a corresponding binary image;
s32, scanning the binary image from top to bottom and from left to right to obtain all edge points of the binary image;
and S33, deleting the isolated edge points.
4. The image recognition-based three-dimensional displacement detection method according to claim 3, wherein in step S32: when scanning from top to bottom, if the pixel values of two pixels adjacent up and down are different, recording the upper pixel in the two pixels as an edge point; when scanning from left to right, if the pixel values of two pixels adjacent to each other on the left and right are different, the left pixel of the two pixels is regarded as an edge point.
5. The method of claim 3, wherein the scale is divided into a plurality of regions, at least one of the regions includes rectangular marks having a color different from that of the region, and the step S3 of obtaining the corner points of the edge points through the corner point detection algorithm includes:
traversing all edge points from top to bottom and from left to right; establishing a vector by taking the current edge point as a starting point and the last adjacent edge point of the current edge point as an end point
Figure FDA0003182777040000021
Establishing a vector by taking the current edge point as a starting point and the last adjacent edge point of the current edge point as an end point
Figure FDA0003182777040000022
If it is
Figure FDA0003182777040000023
And
Figure FDA0003182777040000024
is 90 deg., then the current edge point is the corner point.
6. The image recognition-based three-dimensional displacement detection method according to claim 1, wherein in step S3,
Figure FDA0003182777040000025
7. the image recognition-based three-dimensional displacement detection method according to claim 1, wherein the linear relation between d and p is obtained by least square fitting in step S4: d ═ ap + b;
wherein
Figure FDA0003182777040000026
Figure FDA0003182777040000031
8. The image recognition-based three-dimensional displacement detection method according to claim 7, wherein the step S5 includes:
s51, fixedly placing the image acquisition unit at the initial position, acquiring images of the object to be measured at T, T + delta t moments, and respectively extracting scale images at T, T + delta t moments; acquiring pixel displacement delta x 'and delta y' of an internal standard ruler image within the time of T-T + delta T;
s52, acquiring the T + delta T moment, and obtaining the corresponding conversion parameters according to the pixel distance pix' of the first corner point and the second corner point in the scale image coordinate system
Figure FDA0003182777040000032
Obtaining the actual displacement Δ x, Δ y of the scale on the axis of the measuring coordinate system X, Y within the time length of T-T + Δ T:
Figure FDA0003182777040000033
wherein, p'x、p′yThe conversion parameter p' in the direction of the axis of the measurement coordinate system X, Y;
s53, acquiring the actual displacement Δ Z of the scale in the Z-axis direction of the measurement coordinate system within the time period of T to T + Δ T.
9. The image recognition-based three-dimensional displacement detection method according to claim 8, wherein p'x、p′yThe calculation method comprises the following steps:
s521, acquiring the actual distance sca between the first corner point and the second corner point on the scale on the horizontal axis and the vertical axis of the scale coordinate systemx、scay
S522, obtaining pixel distances pix 'of first corner points and second corner points in the scale image at the moment T + delta T on the horizontal axis and the vertical axis of a scale image coordinate system'x、pix′y
S523, calculation is carried out to obtain
Figure FDA0003182777040000034
10. A three-dimensional displacement detection device based on image recognition, for implementing the detection method according to any one of claims 1 to 9, comprising:
the scale is fixedly arranged on the outer surface of the to-be-measured object;
the light source generator is fixedly embedded in the outer surface of the object to be measured, positioned between the scale and the object to be measured and used for providing background light for the scale;
the image acquisition unit is used for acquiring an image of an object to be detected, and the image of the object to be detected comprises a scale image;
and the image processing unit acquires the three-dimensional displacement of the object to be measured in the measurement coordinate system based on the scale image through a built-in image processing algorithm.
CN202110851767.5A 2021-07-27 2021-07-27 Three-dimensional displacement detection method and device based on image recognition Active CN113554667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110851767.5A CN113554667B (en) 2021-07-27 2021-07-27 Three-dimensional displacement detection method and device based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110851767.5A CN113554667B (en) 2021-07-27 2021-07-27 Three-dimensional displacement detection method and device based on image recognition

Publications (2)

Publication Number Publication Date
CN113554667A true CN113554667A (en) 2021-10-26
CN113554667B CN113554667B (en) 2023-12-12

Family

ID=78132975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110851767.5A Active CN113554667B (en) 2021-07-27 2021-07-27 Three-dimensional displacement detection method and device based on image recognition

Country Status (1)

Country Link
CN (1) CN113554667B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114838666A (en) * 2022-04-26 2022-08-02 西安航天动力试验技术研究所 Super-resolution real-time displacement measurement system and measurement method
CN116612162A (en) * 2023-07-21 2023-08-18 中色创新研究院(天津)有限公司 Hole site calibration analysis method, system and storage medium based on image comparison model
CN117141046A (en) * 2023-10-30 2023-12-01 江苏爱箔乐铝箔制品有限公司 Safety monitoring method and system of aluminum foil cutlery box punch forming machine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108627092A (en) * 2018-04-17 2018-10-09 南京阿凡达机器人科技有限公司 A kind of measurement method, system, storage medium and the mobile terminal of package volume
US20190347461A1 (en) * 2017-04-26 2019-11-14 South China University Of Technology Three-dimensional finger vein recognition method and system
CN111288967A (en) * 2020-01-19 2020-06-16 广州翰南工程技术有限公司 Remote high-precision displacement detection method based on machine vision
WO2020133046A1 (en) * 2018-12-27 2020-07-02 深圳配天智能技术研究院有限公司 Defect detection method and device
CN113048888A (en) * 2021-03-05 2021-06-29 杭州国翌科技有限公司 Binocular vision-based remote three-dimensional displacement measurement method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190347461A1 (en) * 2017-04-26 2019-11-14 South China University Of Technology Three-dimensional finger vein recognition method and system
CN108627092A (en) * 2018-04-17 2018-10-09 南京阿凡达机器人科技有限公司 A kind of measurement method, system, storage medium and the mobile terminal of package volume
WO2020133046A1 (en) * 2018-12-27 2020-07-02 深圳配天智能技术研究院有限公司 Defect detection method and device
CN111288967A (en) * 2020-01-19 2020-06-16 广州翰南工程技术有限公司 Remote high-precision displacement detection method based on machine vision
CN113048888A (en) * 2021-03-05 2021-06-29 杭州国翌科技有限公司 Binocular vision-based remote three-dimensional displacement measurement method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
亓信同;范伟军;赵静;: "橡胶密封圈几何尺寸图像检测技术研究", 计算机测量与控制, no. 12, pages 48 - 50 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114838666A (en) * 2022-04-26 2022-08-02 西安航天动力试验技术研究所 Super-resolution real-time displacement measurement system and measurement method
CN114838666B (en) * 2022-04-26 2023-09-12 西安航天动力试验技术研究所 Super-resolution real-time displacement measurement method
CN116612162A (en) * 2023-07-21 2023-08-18 中色创新研究院(天津)有限公司 Hole site calibration analysis method, system and storage medium based on image comparison model
CN116612162B (en) * 2023-07-21 2023-11-17 中色创新研究院(天津)有限公司 Hole site calibration analysis method, system and storage medium based on image comparison model
CN117141046A (en) * 2023-10-30 2023-12-01 江苏爱箔乐铝箔制品有限公司 Safety monitoring method and system of aluminum foil cutlery box punch forming machine
CN117141046B (en) * 2023-10-30 2023-12-26 江苏爱箔乐铝箔制品有限公司 Safety monitoring method and system of aluminum foil cutlery box punch forming machine

Also Published As

Publication number Publication date
CN113554667B (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN113554667B (en) Three-dimensional displacement detection method and device based on image recognition
US11551341B2 (en) Method and device for automatically drawing structural cracks and precisely measuring widths thereof
CN106683089B (en) Tower deformation detection method with constraint registration
CN112766274B (en) Water gauge image water level automatic reading method and system based on Mask RCNN algorithm
CN108562250B (en) Keyboard keycap flatness rapid measurement method and device based on structured light imaging
CN111260615B (en) Laser and machine vision fusion-based method for detecting apparent diseases of unmanned aerial vehicle bridge
CN110826549A (en) Inspection robot instrument image identification method and system based on computer vision
CN111104860B (en) Unmanned aerial vehicle water quality chromaticity monitoring method based on machine vision
CN108764234B (en) Liquid level meter reading identification method based on inspection robot
CN114549835B (en) Pointer instrument correction identification method and device based on deep learning
CN110533649B (en) Unmanned aerial vehicle general structure crack identification and detection device and method
CN110503623A (en) A method of Bird's Nest defect on the identification transmission line of electricity based on convolutional neural networks
CN112378349A (en) Sagger flatness detection device based on binocular structured light and detection method thereof
CN113705564B (en) Pointer type instrument identification reading method
CN115984360A (en) Method and system for calculating length of dry beach based on image processing
CN116465315A (en) Automatic screen quality detection method and system
CN115792919A (en) Method for identifying pollution hot spot area through horizontal scanning and monitoring of aerosol laser radar
CN113902894A (en) Strip type level meter automatic reading identification method based on image processing
CN115170551A (en) Product detection and tracing method and system based on visual technology calibration
CN114638805A (en) Track slab crack detection method and system and storage medium
CN111189826B (en) Intelligent scoring experimental equipment and method for measuring pH value of solution to be measured by pH test paper
CN113822104B (en) Artificial intelligence surface of water detecting system based on virtual scale of many candidates
CN114705722A (en) Infrared identification method and device for wall surface damage
CN106875378B (en) A kind of power line foreign matter detecting method
CN108871226B (en) Method, device and system for measuring snow depth

Legal Events

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