CN110930407B - Suspension gap visual detection method based on image processing - Google Patents

Suspension gap visual detection method based on image processing Download PDF

Info

Publication number
CN110930407B
CN110930407B CN202010082108.5A CN202010082108A CN110930407B CN 110930407 B CN110930407 B CN 110930407B CN 202010082108 A CN202010082108 A CN 202010082108A CN 110930407 B CN110930407 B CN 110930407B
Authority
CN
China
Prior art keywords
image
gap
suspension
region
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010082108.5A
Other languages
Chinese (zh)
Other versions
CN110930407A (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.)
Southwest Jiaotong University
Original Assignee
Southwest Jiaotong University
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 Southwest Jiaotong University filed Critical Southwest Jiaotong University
Priority to CN202010082108.5A priority Critical patent/CN110930407B/en
Publication of CN110930407A publication Critical patent/CN110930407A/en
Application granted granted Critical
Publication of CN110930407B publication Critical patent/CN110930407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical means
    • G01B11/14Measuring arrangements characterised by the use of optical means for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20028Bilateral filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Abstract

The invention discloses a suspension gap visual detection method based on image processing, which comprises the steps of firstly, obtaining an original high-definition image of a suspension gap area, and processing to obtain a binary image of a suspension gap interesting area; then, the number of pixel points with the binarization result of 1 in the suspension gap interesting region binarization image is calculated to obtain the pixel area of the suspension gap interesting regions(ii) a Finally, the pixel area is determinedsCalibrating the actual gap distance, and calculating the actual gap distanced. The method has the advantages that the actual gap distance calculated according to the image pixel area of the suspension gap interesting region is high in measurement precision and strong in anti-interference capability, and can effectively remove asymmetric interference existing in the suspension gap interesting region and alarm and position the interference fault position; the actual suspension gap distance change is calculated through the suspension gap interesting region image pixel area change, the tracking is sensitive, the linearity is high, and the real-time performance and the accuracy can meet the requirements of a suspension ball control system.

Description

Suspension gap visual detection method based on image processing
Technical Field
The invention relates to the technical field of magnetic suspension technology and image processing, in particular to a suspension gap high-precision visual detection method based on image processing.
Background
The suspension gap signal detection is an important ring for closed-loop control of a magnetic suspension system, and the magnetic suspension system adjusts the electromagnetic force through real-time feedback of the gap signal so that a controlled object overcomes the gravity and is stabilized at a balance position. The accuracy and real-time performance of suspension gap signal detection directly affect the control performance of the magnetic suspension system. In the magnetic levitation ball system, the levitation gap actually refers to the distance from the top point of the levitation steel ball to the lower surface of the electromagnet, so the gap sensor is essentially a displacement sensor.
Common displacement sensors mainly include eddy current type, capacitance type, photoelectric type and pressure type. When the magnetic levitation ball system is in a levitation state, the steel ball and the electromagnet are not in any mechanical contact, and the magnetic levitation ball system belongs to non-contact displacement measurement, so that only a non-contact displacement sensor can be selected in a magnetic levitation application scene, and the pressure sensor belongs to a contact type displacement measurement sensor, so that the magnetic levitation ball system is not suitable for a levitation measurement system. Although the capacitive sensor has simple structure and low cost, the capacitive sensor needs higher power supply voltage and has larger nonlinear error. The eddy current sensor is widely applied to a suspension measurement system, but has many disadvantages and shortcomings, for example, the measurement accuracy is greatly influenced by temperature and the surface roughness of a measured object, temperature compensation and nonlinear correction are needed, the cost is high, and the output value of the eddy current sensor can be accessed to a control system only through A/D conversion. The photoelectric sensor measures the displacement of an object according to the amount of light flux blocked by the object to be measured, and has the biggest defects of easy interference and poor environmental adaptability.
The leading-edge research of computer vision is continuously making new breakthroughs, and the development and perfection of the digital image processing technology enable the digital image processing technology to be widely applied to the fields of national defense, scientific research, industry and the like, thereby promoting the social development progress. The visual ranging is carried out through the image processing technology and serves as an important research direction, and great effects are played in the fields of unmanned aerial vehicle obstacle avoidance, automatic driving, target detection and positioning, non-contact measurement and the like. The image processing visual ranging key researches the space position and the geometric dimension of an object, the measuring method is simple and reliable, the technical improvement space is large, and the future application scene can be wider along with the improvement of the computing capacity and the improvement of the hardware performance.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a new method for performing high precision detection of a floating gap according to an image pixel area in a floating gap region based on an image processing technology, which achieves accurate measurement of the floating gap by visual ranging, has high linearity of a measurement result, and can directly access a control system without a/D conversion. The technical scheme is as follows:
a suspension gap visual detection method based on image processing comprises the following steps:
step 1: obtaining an original high-definition image of a suspension gap region, and processing to obtain a binary image of the suspension gap region-of-interest;
step 2: obtaining the pixel area of the interested gap region by calculating the number of pixel points with the binarization result of 1 in the suspension gap interested region binarization images
And step 3: area of pixelsAnd calibrating the actual gap distance, and calculating the actual gap distance:
step 31: obtaining the maximum working gap of the suspension ball system through image acquisition and processing according to the suspension working gap range of the suspension ball systemd max Time-corresponding suspension gap pixel area of region of interestAnd minimum working gapd min Pixel area of suspension gap interesting region corresponding to 0
Step 32: by the formulaObtaining the calibration relation between the actual suspension gap distance and the pixel area, namely the actual gap distance corresponding to the unit pixel area,Pis a calibration coefficient;
step 33: obtaining the pixel area of the interested area of the suspension gap according to the image processingsBy the formulaCalculating the actual gap distanced
Further, the step of processing to obtain a binarized image of the suspension gap region of interest is as follows:
step 11: carrying out suspension gap interested region image cutting operation on the original high-definition image of the suspension gap region, wherein the upper boundary of the interested region is a straight line corresponding to the lower edge of the electromagnetl 1The lower boundary is the straight line of the diameter of the suspension ball in the horizontal directionl 2The left boundary is the left external tangent of the suspension ball in the vertical directionl 3The right boundary is the outer tangent line of the right side of the suspension ball in the vertical directionl 4Cutting according to the boundary range to obtain an interested area image;
step 12: carrying out graying operation on the original RGB mode color image of the suspension gap interesting region, and acquiring the gray value of each pixel point by adopting a weighted average method;
step 13: carrying out enhancement filtering operation on the gray level image, and obtaining an enhanced gray level image by adopting a bilateral filtering algorithm;
step 14: selecting an optimal threshold value by adopting a maximum inter-class variance method according to an enhanced gray level image after image enhancement filteringTAnd performing optimal threshold segmentation binarization operation:
wherein the content of the first and second substances,f(i,j)is to enhance the gray scale image coordinates(i,j)The gray value of the pixel point is determined,g(i,j)the image is the image optimal threshold segmentation binarization result; according to the optimum threshold valueTAnd operating all pixel points of the enhanced gray level image, measuring that the binarization result of the background area is 1, namely white, and the binarization result of the foreground target area is 0, namely black, so as to obtain the suspension gap region-of-interest binarization image.
Further, the pixel area of the region of interest of the suspension gap is calculatedsThe process is as follows:
step 21: positioned to the upper vertex of the levitated ballT 0 Using the bilateral symmetry of the region to be measured to passT 0 Vertical center line of pointI 0Dividing the binary image of the suspension gap region of interest into four subarea images with equal width in the horizontal direction as a symmetry axisA 1A 2A 3AndA 4outside ofA 1AndA 4two partitions aboutI 0Symmetrical, middleA 2AndA 3two partitions aboutI 0Symmetry;
step 22: defining the number of pixel points with binarization result of 1 in the suspension gap region-of-interest binarized image as the pixel areasCalculating four divisional images respectivelyA 1A 2A 3AndA 4pixel area ofAnd
step 23: the pixel area is set to be calculated in the manner ofs= +Is an outer sideA 1AndA 4the sum of the pixel areas of the two sub-regions is calculated as the initial value=Is a middleA 2AndA 3the sum of the pixel areas of the two sub-regions is set in the way of calculating the initial value =
Step 24: setting an upper thresholdT h1 And a lower thresholdT h2 ,0<T h2 <T h1 (ii) a Selecting and calculating according to the relationship between the pixel area difference value of the symmetric region and the upper and lower limit thresholdsAndthe manner of (a);
(a) for symmetric partitionsA 1AndA 4calculating--The | result is merged with the upper thresholdT h1 And a lower thresholdT h2 Performing a hysteresis threshold comparison:
if does-|≥T h1 Then, obvious asymmetric interference exists in the image gap part of the partial suspension gap interesting region; if it is notThe interference position appears inA 4Partition, at this time set = (ii) a Otherwise, the interference position appears inA 1Partition, at this time set =
If does-|≤T h2 Then the image of the interested area of the partial suspension gap has no obvious interference, and the setting is carried out at the moment=
If it isT h2 <|-|<T h1 At this time, the calculation method of the original pixel area is kept unchanged=
(b) For symmetric partitionsA 2AndA 3calculating--The | result is merged with the upper thresholdT h1 And a lower thresholdT h2 Performing a hysteresis threshold comparison:
if does-|≥T h1 Then, obvious asymmetric interference exists in the image gap part of the partial suspension gap interesting region; if it is notThe interference position appears inA 3Partition, at this time set = (ii) a Otherwise, the position is disturbedAppear atA 2Partition, at this time set =
If does-|≤T h2 Then the image of the interested area of the partial suspension gap has no obvious interference, and the setting is carried out at the moment =
If it isT h2 <|-|<T h1 At this time, the original pixel area calculation mode is kept unchanged: =
furthermore, when the suspension gap interesting area image gap part has obvious asymmetric interference, the system alarms the interference fault and positions the interference position:
step A: by formula calculation aboutI 0Differential image of two-valued image of symmetric left and right partsThe formula is as follows:
wherein the content of the first and second substances,d(i,j)is thatiLine ofjThe difference result of the pixel points at the column position is obtained if the size of the suspension gap region-of-interest binary image is equal toMLine ofNRow, theniThe value range is [ 2 ]1,M],jHas a value range of [, ]1,N];g(i,j)Is the coordinates of the pixel points of the binary image(i,j)The gray value of the pixel point is determined,g(i,j’)is the coordinates of the pixel points of the binary image(i,j’)Gray value of pixel point, pixel point coordinate(i,j)And(i,j’)aboutI 0Left-right symmetry;
and B: obtaining the outline of the interference position through an outline searching function according to the obtained difference image, further drawing a minimum circumscribed rectangle of the outline, and recording the geometric parameters of a circumscribed rectangle frame containing the area as interference position information;
and C: setting alarm thresholdsT e Calculating the minimum circumscribed rectangular area of the interference positionS e When is coming into contact withS e T e And then, the system alarms the interference fault and reports fault position information.
Furthermore, the edge of the target floating ball to be detected is characterized by an arc shape.
Further, the annular LED light source is arranged to provide appropriate illumination intensity.
Furthermore, the foreground object and the background with color contrast are arranged, so that the contrast between the measured background and the foreground object is more prominent, and the colors of the electromagnets in the foreground object are close to those of the suspension ball.
Furthermore, when the original high-definition image of the suspension gap area is obtained, the industrial camera is fixedly installed, the lower boundary of the electromagnet is clearly imaged into a straight line by adjusting the position and the focal length of the camera, and the relative position of the industrial camera and the electromagnet is guaranteed to be unchanged in the visual measurement process.
The invention has the beneficial effects that: the suspension gap detection method based on the image processing technology is simple and reliable, is convenient to calibrate, has high measurement precision and strong anti-interference capability for calculating the actual gap distance according to the image pixel area of the suspension gap interesting region, can effectively remove asymmetric interference existing in the suspension gap interesting region and simultaneously alarms and positions the interference fault position; compared with the common eddy current sensor, the special metal bottom surface for the suspension ball is not required to be matched with the sensor, and the measurement is simple. The invention calculates the actual suspension gap distance change through the suspension gap interesting region image pixel area change, has sensitive tracking and high linearity, can be directly accessed into a control system without A/D conversion, and can meet the requirements of a suspension ball control system on instantaneity and accuracy.
Drawings
Fig. 1 is an image processing flowchart of an image processing unit.
FIG. 2 is a schematic diagram of a pixel area calculation method for a gap region of interest.
Fig. 3 is a flow chart of the calculation of the pixel area of the gap region of interest.
FIG. 4 is a schematic diagram of a pixel area and actual gap distance calibration method.
Fig. 5 is a schematic diagram of an example of the variation of pixel area with gap within a single pixel distance.
Fig. 6 is a graph of an example of pixel area versus gap for a single pixel distance.
Detailed Description
The invention is described in further detail below with reference to the figures and specific embodiments. The method comprises the steps of acquiring a high-definition image of a suspension gap area in real time through a high-speed industrial camera, calculating the pixel area of the suspension gap area of interest according to a binarized image of the suspension gap area of interest after image processing to obtain a corresponding actual suspension gap distance, and realizing high-precision measurement of the suspension gap.
In order to reduce the difficulty of post-image processing and further improve the precision of gap measurement, the embodiment requires that a foreground target and a background with color contrast are selected, so that the contrast between the measured background and the foreground target is more prominent, and the colors of the electromagnets in the foreground target and the suspended ball are close to each other. Meanwhile, in order to improve the problem of uneven image illumination, the annular LED light source is preferably arranged to provide proper illumination intensity. The industrial camera is fixedly installed, the lower boundary of the electromagnet is clearly imaged into a straight line by adjusting the position and the focal length of the camera, and the relative position of the industrial camera and the electromagnet is guaranteed to be unchanged in the visual measurement process.
The method comprises the following specific steps:
step 1: the method comprises the steps of continuously acquiring an original high-definition image of a suspension gap area in real time through a high-speed industrial camera, sending the original high-definition image of the suspension gap area to an image processing unit in real time for image processing, and obtaining a binary image of the suspension gap area of interest after image area of interest cutting, image graying, image enhancement filtering, image optimal threshold segmentation binarization sequentially, wherein the image processing flow of the image processing unit is shown in an attached figure 1. The method comprises the following specific steps:
step 11: carrying out suspension gap interested region image cutting operation on the original high-definition image of the suspension gap region, wherein the upper boundary of the interested region is a straight line corresponding to the lower edge of the electromagnetl 1The lower boundary is the straight line of the diameter of the suspension ball in the horizontal directionl 2The left boundary is the left external tangent of the suspension ball in the vertical directionl 3The right boundary is the outer tangent line of the right side of the suspension ball in the vertical directionl 4And cutting the region of interest according to the boundary range to obtain the region of interest image. The image cropping is a key step of image preprocessing, and the number of pixel points of subsequent image processing and operation is reduced by cropping the image, so that the image processing operation speed is increased. The region-of-interest image cropped in this embodiment is shown in the dotted line box of fig. 2 and 4.
Step 12: and carrying out graying operation on the suspension gap region-of-interest image to prepare for upper layer operations such as subsequent image segmentation and image analysis. The original high-definition image is a three-channel color image in an RGB mode, and the gray value of each pixel point is obtained by adopting a weighted average method:
wherein the content of the first and second substances,f(i,j)is a gray scale image coordinate(i,j)The gray value of the pixel point is determined,R(i,j)G(i,j)andB(i,j)is the gray value of each color channel of the original RGB mode color image.
Step 13: the image enhancement filtering is indispensable operation in image processing, aims to inhibit image noise on the premise of not damaging the image contour and the edge, directly influences the reliability of subsequent image analysis due to the good and bad effect of the image enhancement filtering, and obtains an enhanced gray image after the gray image is enhanced and filtered by adopting a bilateral filtering algorithm.
Step 14: the best threshold segmentation binarization operation is carried out on the enhanced gray level image, and the threshold processing is visual, simple to implement and high in calculation speed, so that the image segmentation is realized by adopting the image threshold processing. Selecting an optimal threshold value by adopting a maximum inter-class variance method according to an enhanced gray level image after image enhancement filteringT
The image thresholding operation can be functionally represented as:
wherein the content of the first and second substances,f(i,j)is to enhance the gray scale image coordinates(i,j)The gray value of the pixel point is determined,g(i,j)the image is the image optimal threshold segmentation binarization result; according to the optimum threshold valueTAnd operating all pixel points of the enhanced gray level image, measuring that the binarization result of the background area is 1, namely white, and the binarization result of the foreground target area is 0, namely black, so as to obtain the suspension gap region-of-interest binarization image.
Step 2: obtaining the pixel area of the interested gap region by calculating the number of pixel points with the binarization result of 1 in the suspension gap interested region binarization images
As shown in fig. 2, the pixel area of the suspension gap region of interest is calculatedsThe method (the calculation flow chart is shown in the attached figure 3):
step 21: positioned to the upper vertex of the levitated ballT 0 Using the bilateral symmetry of the region to be measured to passT 0 Vertical center line of pointI 0Dividing the binary image of the suspension gap region of interest into four subarea images with equal width in the horizontal direction as a symmetry axisA 1A 2A 3AndA 4outside ofA 1AndA 4two partitions aboutI 0Symmetrical, middleA 2AndA 3two partitions aboutI 0Symmetry;
step 22: defining the number of pixel points with binarization result of 1 in the suspension gap region-of-interest binarized image as the pixel areasCalculating four divisional images respectivelyA 1A 2A 3AndA 4pixel area ofAnd
step 23: the pixel area is set to be calculated in the manner ofs= +Is an outer sideA 1AndA 4the sum of the pixel areas of the two sub-regions is calculated as the initial value=Is a middleA 2AndA 3the sum of the pixel areas of the two sub-regions is set in the way of calculating the initial value =
Step 24: setting an upper thresholdT h1 And a lower thresholdT h2 ,0<T h2 <T h1 (ii) a Selecting and calculating according to the relationship between the pixel area difference value of the symmetric region and the upper and lower limit thresholdsAndthe manner of (a);
(a) for symmetric partitionsA 1AndA 4calculating--The | result is merged with the upper thresholdT h1 And a lower thresholdT h2 Performing a hysteresis threshold comparison:
if does-|≥T h1 Then, obvious asymmetric interference exists in the image gap part of the partial suspension gap interesting region; if it is notThe interference position appears inA 4Partition, at this time set = (ii) a Otherwise, the interference position appears inA 1Partition, at this time set =
If does-|≤T h2 Then the image of the interested area of the partial suspension gap has no obvious interference, and the setting is carried out at the moment=
If it isT h2 <|-|<T h1 At this time, the calculation method of the original pixel area is kept unchanged=
(b) For symmetric partitionsA 2AndA 3calculating--The | result is merged with the upper thresholdT h1 And a lower thresholdT h2 Performing a hysteresis threshold comparison:
if does-|≥T h1 Then, obvious asymmetric interference exists in the image gap part of the partial suspension gap interesting region; if it is notThe interference position appears inA 3Partition, at this time set = (ii) a Otherwise, the position is disturbedAppear atA 2Partition, at this time set =
If does-|≤T h2 Then the image of the interested area of the partial suspension gap has no obvious interference, and the setting is carried out at the moment =
If it isT h2 <|-|<T h1 At this time, the original pixel area calculation mode is kept unchanged: =
when the suspension gap interesting area image has obvious asymmetric interference, the system has the functions of interference fault alarm and interference position positioning, and the specific process is as follows:
step A: by formula calculation aboutI 0Difference image of two-valued image of symmetric left and right partsThe formula is as follows:
wherein the content of the first and second substances,d(i,j)is thatiLine ofjThe difference result of the pixel points at the column position is obtained if the size of the suspension gap region-of-interest binary image is equal toMLine ofNRow, theniThe value range is [ 2 ]1,M],jHas a value range of [, ]1,N];g(i,j)Is the coordinates of the pixel points of the binary image(i,j)The gray value of the pixel point is determined,g(i,j’)is the coordinates of the pixel points of the binary image(i,j’)Gray value of pixel point, pixel point coordinate(i,j)And(i,j’)aboutI 0And the left and the right are symmetrical.
And B: from the difference image obtained, by means of OpenCV libraryfindContoursThe function obtains the profile of the location of the disturbance and then passesboundingRectAnd the function acquires the range of the outline, draws the minimum circumscribed rectangle of the outline, and records the geometric parameters of the circumscribed rectangle frame containing the area as interference position information.
And C: setting alarm thresholdsT e Calculating the minimum circumscribed rectangular area of the interference positionS e When is coming into contact withS e T e And then, the system alarms the interference fault and reports fault position information.
And step 3: when gap vision measurement is carried out, the calibration of the pixel area and the actual gap distance is needed. The method for calibrating the pixel area and the actual gap distance is shown in figure 4. The calibration method comprises the following steps:
step 31: obtaining the maximum working gap of the suspension ball system through image acquisition and processing according to the suspension working gap range of the suspension ball systemd max Time-corresponding suspension gap pixel area of region of interestAnd minimum working gapd min Pixel area of suspension gap interesting region corresponding to 0
Step 32: by the formulaObtaining the calibration relation between the actual suspension gap distance and the pixel area, namely the actual gap distance corresponding to the unit pixel area,Pis a calibration coefficient;
step 33: obtaining the pixel area of the interested area of the suspension gap according to the image processingsBy the formulaCalculating the actual gap distancedThe difference between the minimum working gap and the actual gap pixel area.
Particularly, the invention calculates the actual suspension gap distance change through the suspension gap interested region image pixel area change, and has sensitive tracking and high linearity. Theoretically, when the actual suspension gap distance change is reflected in the image to be less than one pixel distance, the method used by the invention counts that the pixel area of the image in the suspension gap area basically changes linearly.
The digital image is a dot-matrix image represented by a matrix, and each pixel can be divided into a square pixel grid without considering sampling errors. An example of the change of the pixel area with the gap distance in the single pixel distance is schematically shown in fig. 5, in which a solid line grid represents a pixel point, a dotted line is a center line of the pixel grid, and the area of the single pixel grid is defaulted to 1. The solid circles in this example are used to simulate a hover ball, and the position of the solid circles after each translation are plotted in fig. 5, each time the solid circles are translated upward from the lower boundary of the pixel grid by 1/10 pixel distances within a single pixel distance. In this example, the area of the pixel grid region above the solid line circle is the effective gap region, and the pixel area of the effective gap region after each upward translation is calculated by taking or rejecting the single pixel grid according to whether the area in the effective region is greater than or equal to 1/2, that is, the number of pixels in the effective gap region is calculated. The curve is plotted according to the pixel area variation as shown in fig. 6. It follows that within a single pixel distance, the pixel area is sensitive and substantially linear with gap variation.
Radius of suspension steel ball theoreticallyRIs 80 mm and the maximum distance of the suspension gapd maxIs 20 mm, and is processed by a formula when the resolution of 640 x 480 is adopted for image processingIt can be known that the detection precision of the suspension gap is less than 1μmThe invention can realize high-precision visual detection of the suspension gap.

Claims (7)

1. A suspension gap visual detection method based on image processing is characterized by comprising the following steps:
step 1: obtaining an original high-definition image of a suspension gap region, and processing to obtain a binary image of the suspension gap region-of-interest;
step 2: obtaining the pixel area of the interested gap region by calculating the number of pixel points with the binarization result of 1 in the suspension gap interested region binarization images
And step 3: area of pixelsAnd calibrating the actual gap distance, and calculating the actual gap distance:
step 31: obtaining the maximum working gap of the suspension ball system through image acquisition and processing according to the suspension working gap range of the suspension ball systemd max Time-corresponding suspension gap pixel area of region of interestAnd minimum working gapd min Pixel area of suspension gap interesting region corresponding to 0
Step 32: by the formulaObtaining the calibration relation between the actual suspension gap distance and the pixel area, namely the actual gap distance corresponding to the unit pixel area,Pis a calibration coefficient;
step 33: obtaining the pixel area of the interested area of the suspension gap according to the image processingsBy the formulaCalculating the actual gap distanced
Calculating the pixel area of the suspension gap region of interestsThe process is as follows:
step 21: positioned to the upper vertex of the levitated ballT 0 Using the bilateral symmetry of the region to be measured to passT 0 Vertical center line of pointI 0Dividing the binary image of the suspension gap region of interest into four subarea images with equal width in the horizontal direction as a symmetry axisA 1A 2A 3AndA 4outside ofA 1AndA 4two partitions aboutI 0Symmetrical, middleA 2AndA 3two partitions aboutI 0Symmetry;
step 22: defining the number of pixel points with binarization result of 1 in the suspension gap region-of-interest binarized image as the pixel areasCalculating four divisional images respectivelyA 1A 2A 3AndA 4pixel area ofAnd
step 23: the pixel area is set to be calculated in the manner ofs= +Is an outer sideA 1AndA 4the sum of the pixel areas of the two sub-regions is calculated as the initial value=Is a middleA 2AndA 3the sum of the pixel areas of the two sub-regions is set in the way of calculating the initial value =
Step 24: setting an upper thresholdT h1 And a lower thresholdT h2 ,0<T h2 <T h1 (ii) a Selecting and calculating according to the relationship between the pixel area difference value of the symmetric region and the upper and lower limit thresholdsAndthe manner of (a);
(a) for symmetric partitionsA 1AndA 4calculating--The | result is merged with the upper thresholdT h1 And a lower thresholdT h2 Performing a hysteresis threshold comparison:
if does-|≥T h1 Then, obvious asymmetric interference exists in the image gap part of the partial suspension gap interesting region; if it is notThe interference position appears inA 4Partition, at this time set = (ii) a Otherwise, the interference position appears inA 1Partition, at this time set =
If does-|≤T h2 Then the image of the interested area of the partial suspension gap has no obvious interference, and the setting is carried out at the moment=
If it isT h2 <|-|<T h1 At this time, the calculation method of the original pixel area is kept unchanged=
(b) For symmetric partitionsA 2AndA 3calculating--The | result is merged with the upper thresholdT h1 And a lower thresholdT h2 Performing a hysteresis threshold comparison:
if does-|≥T h1 Then, obvious asymmetric interference exists in the image gap part of the partial suspension gap interesting region; if it is notThe interference position appears inA 3Partition, at this time set = (ii) a Otherwise, the interference position appears inA 2Partition, at this time set =
If does-|≤T h2 Then the part suspends the gap region of interestThe domain image has no obvious interference, and the setting is carried out at the moment =
If it isT h2 <|-|<T h1 At this time, the original pixel area calculation mode is kept unchanged: =
2. the image processing-based suspension gap visual inspection method according to claim 1, wherein the processing step of obtaining a binarized image of a suspension gap region of interest is as follows:
step 11: carrying out suspension gap interested region image cutting operation on the original high-definition image of the suspension gap region, wherein the upper boundary of the interested region is a straight line corresponding to the lower edge of the electromagnetl 1The lower boundary is the straight line of the diameter of the suspension ball in the horizontal directionl 2The left boundary is the left external tangent of the suspension ball in the vertical directionl 3The right boundary is the outer tangent line of the right side of the suspension ball in the vertical directionl 4Cutting according to the boundary range to obtain an interested area image;
step 12: carrying out graying operation on the original RGB mode color image of the suspension gap interesting region, and acquiring the gray value of each pixel point by adopting a weighted average method;
step 13: carrying out enhancement filtering operation on the gray level image, and obtaining an enhanced gray level image by adopting a bilateral filtering algorithm;
step 14: selecting an optimal threshold value by adopting a maximum inter-class variance method according to an enhanced gray level image after image enhancement filteringTAnd performing optimal threshold segmentation binarization operation:
wherein the content of the first and second substances,f(i,j)is to enhance the gray scale image coordinates(i,j)The gray value of the pixel point is determined,g(i,j)the image is the image optimal threshold segmentation binarization result; according to the optimum threshold valueTAnd operating all pixel points of the enhanced gray level image, measuring that the binarization result of the background area is 1, namely white, and the binarization result of the foreground target area is 0, namely black, so as to obtain the suspension gap region-of-interest binarization image.
3. The image processing-based suspension gap visual inspection method according to claim 1, characterized in that when there is significant asymmetric disturbance in the suspension gap interesting region image gap portion, the system alarms disturbance fault and locates disturbance position:
step A: by formula calculation aboutI 0The differential image of the two symmetric binary images of the left part and the right part has the following formula:
wherein the content of the first and second substances,d(i,j)is thatiLine ofjThe difference result of the pixel points at the column position is obtained if the size of the suspension gap region-of-interest binary image is equal toMLine ofNRow, theniThe value range is [ 2 ]1,M],jHas a value range of [, ]1,N];g(i,j)Is the coordinates of the pixel points of the binary image(i,j)The gray value of the pixel point is determined,g(i,j’)is the coordinates of the pixel points of the binary image(i,j’)Processing gray value of pixel point, pixel pointCoordinates of the object(i,j)And(i,j’)aboutI 0Left-right symmetry;
and B: obtaining the outline of the interference position through an outline searching function according to the obtained difference image, further drawing a minimum circumscribed rectangle of the outline, and recording the geometric parameters of a circumscribed rectangle frame containing the area as interference position information;
and C: setting alarm thresholdsT e Calculating the minimum circumscribed rectangular area of the interference positionS e When is coming into contact withS e T e And then, the system alarms the interference fault and reports fault position information.
4. The image-processing-based suspension gap visual inspection method according to claim 1, wherein the edge feature of the target suspension ball to be inspected is a circular arc.
5. The image processing-based suspension gap visual inspection method according to claim 1, characterized in that a ring-shaped LED light source is arranged to provide a suitable illumination intensity.
6. The image processing-based suspension gap visual inspection method according to claim 1, characterized in that a foreground object and a background with color contrast are provided, so that the contrast between the measurement background and the foreground object is more prominent, and simultaneously, the electromagnets in the foreground object and the suspension ball are ensured to be similar in color.
7. The image processing-based suspension gap vision inspection method according to claim 1, wherein when an original high-definition image of the suspension gap area is obtained, an industrial camera is fixedly installed, and the relative position of the industrial camera and the electromagnet is ensured to be unchanged in the vision measurement process by adjusting the position and the focal length of the camera to clearly image the lower boundary of the electromagnet into a straight line.
CN202010082108.5A 2020-02-07 2020-02-07 Suspension gap visual detection method based on image processing Active CN110930407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010082108.5A CN110930407B (en) 2020-02-07 2020-02-07 Suspension gap visual detection method based on image processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010082108.5A CN110930407B (en) 2020-02-07 2020-02-07 Suspension gap visual detection method based on image processing
LU101668A LU101668B1 (en) 2020-02-07 2020-03-09 Visual measurement method of levitation gap based on image processing

Publications (2)

Publication Number Publication Date
CN110930407A CN110930407A (en) 2020-03-27
CN110930407B true CN110930407B (en) 2020-05-15

Family

ID=69854691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010082108.5A Active CN110930407B (en) 2020-02-07 2020-02-07 Suspension gap visual detection method based on image processing

Country Status (2)

Country Link
CN (1) CN110930407B (en)
LU (1) LU101668B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734780A (en) * 2020-12-25 2021-04-30 哈尔滨市科佳通用机电股份有限公司 Method for identifying deformation fault of pull ring of derailment automatic braking pull ring device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403610A (en) * 2008-11-06 2009-04-08 陕西科技大学 System and method for measuring leather area based on digital image method
CN105510195A (en) * 2015-12-07 2016-04-20 华侨大学 On-line detection method for particle size and shape of stacked aggregate
CN107154050A (en) * 2017-05-03 2017-09-12 魏玉震 A kind of automatic obtaining method of the stone material geometric parameter based on machine vision
CN107717631A (en) * 2017-10-31 2018-02-23 中国科学院合肥物质科学研究院 A kind of HSC Milling Tools wear automatic monitoring method
CN108801151A (en) * 2018-05-29 2018-11-13 云南富龙高速公路建设指挥部 Pavement crack detection device based on smart mobile phone and detection method
CN109559314A (en) * 2019-01-18 2019-04-02 西南交通大学 A kind of electromagnetic suspension ball system and its image processing method based on machine vision
CN110458785A (en) * 2019-08-16 2019-11-15 西南交通大学 A kind of magnetic levitation ball levitation gap detection method based on image sensing

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957178B (en) * 2009-07-17 2012-05-23 上海同岩土木工程科技有限公司 Method and device for measuring tunnel lining cracks
CN102680480A (en) * 2012-05-03 2012-09-19 中南大学 Intelligent detecting method for cracks of concrete structures
CN110264459A (en) * 2019-06-24 2019-09-20 江苏开放大学(江苏城市职业学院) A kind of interstices of soil characteristics information extraction method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403610A (en) * 2008-11-06 2009-04-08 陕西科技大学 System and method for measuring leather area based on digital image method
CN105510195A (en) * 2015-12-07 2016-04-20 华侨大学 On-line detection method for particle size and shape of stacked aggregate
CN107154050A (en) * 2017-05-03 2017-09-12 魏玉震 A kind of automatic obtaining method of the stone material geometric parameter based on machine vision
CN107717631A (en) * 2017-10-31 2018-02-23 中国科学院合肥物质科学研究院 A kind of HSC Milling Tools wear automatic monitoring method
CN108801151A (en) * 2018-05-29 2018-11-13 云南富龙高速公路建设指挥部 Pavement crack detection device based on smart mobile phone and detection method
CN109559314A (en) * 2019-01-18 2019-04-02 西南交通大学 A kind of electromagnetic suspension ball system and its image processing method based on machine vision
CN110458785A (en) * 2019-08-16 2019-11-15 西南交通大学 A kind of magnetic levitation ball levitation gap detection method based on image sensing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于数字图像处理的轨道梁裂缝检测技术;杜清超 等;《四川建筑》;20190828;第39卷(第4期);95-97 *
开放式微细切削数控系统研究;黄逊彬;《中国优秀硕士学位论文全文数据库 工程科技I辑》;20130415;正文第5.2-5.3节,图5.5 *
汽油机火花塞间隙图像法测量;李晓斌;《山西农业大学学报(自然科学版)》;20151115;第35卷(第6期);664-667 *

Also Published As

Publication number Publication date
LU101668B1 (en) 2020-07-09
CN110930407A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN110268190B (en) Underground pipe gallery leakage detection method based on static infrared thermography processing
CN103345755B (en) A kind of Chessboard angular point sub-pixel extraction based on Harris operator
CN110930407B (en) Suspension gap visual detection method based on image processing
KR100382577B1 (en) Wheel measuring apparatus
CN110458785B (en) Magnetic levitation ball levitation gap detection method based on image sensing
CN109490316B (en) Surface defect detection algorithm based on machine vision
CN107203973B (en) Sub-pixel positioning method for center line laser of three-dimensional laser scanning system
CN106780483B (en) More continuous casting billet end face visual identifying systems and centre coordinate acquiring method
CN106599760B (en) Method for calculating running area of inspection robot of transformer substation
CN108007388A (en) A kind of turntable angle high precision online measuring method based on machine vision
CN103293168B (en) Fruit surface defect detection method based on visual saliency
CN108759973A (en) A kind of water level measurement method
CN105005985B (en) Backlight image micron order edge detection method
CN107506739B (en) Night forward vehicle detection and distance measurement method
CN111998910A (en) Visual measurement method and system for water level of multi-stage water gauge
CN111640158A (en) End-to-end camera based on corresponding mask and laser radar external reference calibration method
Yimin et al. A novel approach to sub-pixel corner detection of the grid in camera calibration
CN109489566A (en) Lithium battery diaphragm material cuts checking method for width, detection system and device
CN109448059B (en) Rapid X-corner sub-pixel detection method
Xue et al. Research of vehicle monocular measurement system based on computer vision
CN110954005B (en) Medium-low speed maglev train suspension gap detection method based on image processing
Jing et al. Research on Visual Measurement for Levitation Gap in Maglev System
Hu et al. Pit defect detection on steel shell end face based on machine vision
CN108846363A (en) A kind of subregion vehicle bottom shadow detection method based on divergence expression scanning
Zhao et al. Research on Stalk Crops Internodes and Buds Identification based on Computer Vision

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