Machine vision-based plate shape detection device and detection method thereof

文档序号:419620 发布日期:2021-12-21 浏览:2次 中文

阅读说明:本技术 一种基于机器视觉的板形检测装置及其检测方法 (Machine vision-based plate shape detection device and detection method thereof ) 是由 郑岗 唐波 张方远 徐开亮 李好文 于 2021-08-27 设计创作,主要内容包括:本发明公开了一种基于机器视觉的板形检测装置,包括带钢,带钢轧制方向的上下两侧分别依次对称设有支撑辊、中间辊及工作辊,工作辊与带钢接触,带钢的上方设有检测激光发射器,背离带钢轧制方向的一侧设有图像采集装置和标准激光发射器,标准激光发射器与图像采集装置安装在同一位置处,检测激光发射器、标准激光发射器及图像采集装置均连接图像处理装置。本发明还公开了一种基于机器视觉的板形检测方法,本发明解决了现有非接触式板形检测装置检测精度低,无法克服轧制过程中带钢振动和板带位移带来误差,以及接触式板形检测设备复杂,安装调试困难,成本高昂的问题。(The invention discloses a plate shape detection device based on machine vision, which comprises a strip steel, wherein a supporting roller, a middle roller and a working roller are respectively and symmetrically arranged on the upper side and the lower side of the rolling direction of the strip steel in sequence, the working roller is in contact with the strip steel, a detection laser transmitter is arranged above the strip steel, an image acquisition device and a standard laser transmitter are arranged on one side deviating from the rolling direction of the strip steel, the standard laser transmitter and the image acquisition device are arranged at the same position, and the detection laser transmitter, the standard laser transmitter and the image acquisition device are all connected with an image processing device. The invention also discloses a plate shape detection method based on machine vision, and solves the problems that the existing non-contact plate shape detection device is low in detection precision, cannot overcome errors caused by strip steel vibration and strip belt displacement in the rolling process, and is complex in contact type plate shape detection equipment, difficult to install and debug and high in cost.)

1. The utility model provides a plate-shaped detection device based on machine vision, includes belted steel, its characterized in that: the upper side and the lower side of the rolling direction of the strip steel are respectively and symmetrically provided with a supporting roller, a middle roller and a working roller in sequence, the working rollers are in contact with the strip steel, a detection laser transmitter is arranged above the strip steel, one side deviating from the rolling direction of the strip steel is provided with an image acquisition device and a standard laser transmitter, the standard laser transmitter and the image acquisition device are arranged at the same position, and the detection laser transmitter, the standard laser transmitter and the image acquisition device are all connected with an image processing device.

2. The machine vision-based plate shape detecting apparatus according to claim 1, wherein: the image acquisition device is a camera, and the image processing device is a computer.

3. The detection method of the machine vision-based plate shape detection device according to claim 2, characterized by comprising the following steps:

step 1, carrying out gray processing on an image acquired by an image acquisition device;

step 2, correcting the image angle processed in the step 1 by adopting a rotating image method, so that two beams of laser irradiated on the strip steel by a standard laser transmitter and a detection laser transmitter are in a vertical state in the rotated image;

step 3, based on the image processed in the step 2, directly taking out the corresponding pixel point set in the original sampling region and mapping the pixel point set to a rectangular region as an image of the region of interest;

step 4, filtering the image of the region of interest determined in the step 3;

step 5, performing contrast lifting operation on the image processed in the step 4;

step 6, carrying out normalization processing on the image processed in the step 5;

step 7, determining the edge position of the detected laser line by adopting a Canny algorithm based on the image obtained in the step 6, and calculating the width of the laser line;

step 8, calculating the gray scale gravity center of the image line based on the edge position of the laser line obtained in the step 7;

and 9, calculating the shape data of each row of strip steel plates.

4. The machine vision-based plate shape detection method according to claim 3, wherein in the step 1, the image collected by the image collection device is grayed by adopting the following formula (1):

Grey=0.299*R+0.587*G+0.114*B (1);

wherein, Grey is an output gray value; r, G, B are three different channel values.

5. The machine vision-based plate shape detection method according to claim 4, wherein in the step 5, the image is subjected to a contrast pull-up operation through the following formula (2):

p(M,N)=q(M,N)*k (2);

wherein k is the pixel lifting proportion; p (M, N) is the pixel gray value of the M row and N column after the contrast ratio is raised; and q (M, N) is the pixel gray value of the M-th row and N columns before the contrast is raised.

6. The machine vision-based plate shape detection method according to claim 5, wherein in the step 6, the image is normalized by the following formula (3):

wherein X is original data; xnormIs normalized numberAccordingly; xmaxIs the original data set maximum; xminIs the original data set minimum.

7. The machine vision-based plate shape detection method according to claim 6, wherein in the step 7, the width of the laser line is calculated by the following formula (4):

gc=xl-xr (4);

wherein, gcIs the laser line width; x is the number oflCorresponding left edge coordinates for each row; x is the number ofrFor each row, the right edge coordinates are assigned.

8. The machine vision-based plate shape detection method according to claim 7, wherein in the step 8, the following formula (5) is adopted to calculate the gray scale gravity center of the image line:

wherein U is the gray scale gravity center of the image line; giCorresponding gray values to the pixel coordinates of all the effective element points; mu.siPixel coordinates of all effective element points; m is the pixel number of all effective element points.

9. The machine vision-based plate shape detection method according to claim 8, wherein in the step 9, the following formula (6) is adopted to calculate each row of plate shape data:

Gy=gc*(Xs-XD),y=yt...yk (6);

wherein G isyThe profile data for the y rows; gcThe width of the detection laser line is y lines; xSIs the x coordinate of the y line of standard laser lines; xDDetecting the x coordinate of the laser line for the y row; y istThe coordinate of the upper edge of the strip steel in the y direction is shown; y iskIs the coordinate of the lower edge of the strip steel in the y direction.

Technical Field

The invention belongs to the technical field of plate shape detection, relates to a plate shape detection device based on machine vision, and further relates to a detection method of the detection device.

Background

Steel is a basic raw material, and a large amount of steel is applied to many important production links, such as various aspects in national defense, industry, agriculture and daily life, and plays an important role in national economic development of China. The market puts higher demands on the supply of steel, and puts higher demands on the aspects of the performance quality, the external size, the thickness precision, the surface quality and the like of the interior of the strip steel.

The strip shape is an important index in the rolling process of the strip steel, and the strip steel can be broken due to the serious strip shape problem of the cold-rolled strip steel, so that an automatic production line in the whole production process is stopped, production equipment such as a rolling mill is damaged, and even serious economic loss can be caused. Therefore, the cold-rolled strip steel has good straightness to ensure the strip shape on the basis of higher thickness precision. This flatness information needs to be provided by real-time strip shape inspection equipment. Therefore, the detection of the strip steel shape is the main technical condition and the premise for realizing the automatic control of the strip steel shape.

At present, from the aspects of detection methods and market use conditions, the plate shape detectors are mainly divided into two types, namely contact type plate shape detectors and non-contact type plate shape detectors. For a contact type plate shape meter, the detection of plate shape information is direct, signals are easy to fidelity in the processing process, the measurement precision of the plate shape of strip steel is high, and the current equipment can reach +/-0.5I unit. But correspondingly, the defects are high cost, expensive accessories and complex installation and debugging process. Because the detection roller directly contacts with the plate, the roller surface of the detection roller must be ground again after being worn, and the detection roller must be calibrated again according to the standard technical requirements, so that the process complexity of the plate shape detection is increased. The non-contact type strip shape instrument is used for obtaining strip shape information of strip steel on the premise that the strip shape detection device is not in direct contact with the strip steel. The non-contact sensor has simple hardware structure, is not contacted with the strip steel, is easy to maintain, has all non-transmission parts, and is convenient to install. The hardware has wide choice, and the cost and the fittings are cheap. The sensor does not contact the surface of the strip steel, thereby eliminating the possibility of damaging the surface of the strip steel. However, the existing non-contact type plate shape detection device cannot overcome errors caused by field strip steel vibration, received plate shape signals are indirect signals, and the difficulty of data processing is high.

Disclosure of Invention

The invention aims to provide a plate shape detection device based on machine vision, and solves the problems that the existing non-contact plate shape detection device is low in detection precision, cannot overcome errors caused by strip steel vibration and strip plate displacement in a rolling process, and is complex in contact type plate shape detection equipment, difficult to install and debug and high in cost.

The invention also provides a machine vision-based plate shape detection method.

The invention adopts a first technical scheme that the plate shape detection device based on machine vision comprises a strip steel, wherein a supporting roller, a middle roller and a working roller are respectively and symmetrically arranged on the upper side and the lower side of the rolling direction of the strip steel in sequence, the working roller is in contact with the strip steel, a detection laser transmitter is arranged above the strip steel, an image acquisition device and a standard laser transmitter are arranged on one side deviating from the rolling direction of the strip steel, the standard laser transmitter and the image acquisition device are arranged at the same position, and the detection laser transmitter, the standard laser transmitter and the image acquisition device are all connected with an image processing device.

The first technical scheme of the invention is also characterized in that:

the image acquisition device is a camera, and the image processing device is a computer.

The second technical scheme adopted by the invention is that the plate shape detection method based on machine vision specifically comprises the following steps:

step 1, carrying out gray processing on an image acquired by an image acquisition device;

step 2, correcting the image angle processed in the step 1 by adopting a rotating image method, so that two beams of laser irradiated on the strip steel by a standard laser transmitter and a detection laser transmitter are in a vertical state in the rotated image;

step 3, based on the image processed in the step 2, directly taking out the corresponding pixel point set in the original sampling region and mapping the pixel point set to a rectangular region as an image of the region of interest;

step 4, filtering the image of the region of interest determined in the step 3;

step 5, performing contrast lifting operation on the image processed in the step 4;

step 6, carrying out normalization processing on the image processed in the step 5;

step 7, determining the edge position of the detected laser line by adopting a Canny algorithm based on the image obtained in the step 6, and calculating the width of the laser line;

step 8, calculating the gray scale gravity center of the image line based on the edge position of the laser line obtained in the step 7;

and 9, calculating the shape data of each row of strip steel plates.

The second technical scheme of the invention is also characterized in that:

in the step 1, the following formula (1) is adopted to perform graying processing on the image acquired by the image acquisition device:

Grey=0.299*R+0.587*G+0.114*B (1);

wherein, Grey is an output gray value; r, G, B are three different channel values.

In step 5, the image is subjected to contrast lifting operation through the following formula (2):

p(M,N)=q(M,N)*k (2);

wherein k is the pixel lifting proportion; p (M, N) is the pixel gray value of the M row and N column after the contrast ratio is raised; and p (M, N) is the pixel gray value of the M-th row and N columns before the contrast is raised.

In step 6, the following formula (3) is adopted to carry out normalization processing on the image:

wherein X is original data; xnormThe normalized data is obtained; xmaxIs the original data set maximum; xminIs the original data set minimum.

In step 7, the width of the laser line is calculated by the following formula (4):

gc=xl-xr (4);

wherein, gcIs the laser line width; x is the number oflCorresponding left edge coordinates for each row; x is the number ofrFor each row, the right edge coordinates are assigned.

In step 8, calculating the gray scale gravity center of the image line by adopting the following formula (5):

wherein U is the gray scale gravity center of the image line; giCorresponding gray values to the pixel coordinates of all the effective element points; mu.siPixel coordinates of all effective element points; m is the pixel number of all effective element points.

In step 9, the plate shape data of each row is calculated by adopting the following formula (6):

Gy=gc*(XS-XD),y=yt...yk (6);

wherein G isyThe profile data for the y rows; gcThe width of the detection laser line is y lines; xSIs the x coordinate of the y line of standard laser lines; xDDetecting the x coordinate of the laser line for the y row; y istThe coordinate of the upper edge of the strip steel in the y direction is shown; y iskIs the coordinate of the lower edge of the strip steel in the y direction.

The invention has the beneficial effects that: the invention forms two parallel laser lines by irradiating the surface of the strip steel through two laser transmitters, one is a detection laser line and the other is a standard laser line, and the image of the corresponding position is collected by a camera for processing. The standard laser line is sent out by camera same position, meets plate shape and changes, and standard laser line does not change. Detect the laser line install on the support left side with, the camera is 45 degrees angles, runs into the plate-type bad, detects the laser line and can take place to correspond the change. The strip shape information of the strip steel in the cold rolling process is reflected by comparing the relative position change of the line structure light centers of the standard laser line and the detection laser line. Meanwhile, the strip width information can be obtained by detecting the break points of the laser lines on the operation side and the transmission side, and the error caused by the up-and-down displacement of the strip can be eliminated.

Drawings

FIG. 1 is a schematic structural diagram of a machine vision-based plate shape detection device according to the present invention;

FIG. 2 is a flow chart of a machine vision-based method for detecting a shape of a plate according to the present invention;

FIG. 3 is a strip steel plate shape information display interface diagram in the plate shape detection method based on machine vision.

In the figure, 1, a strip steel, 2, a working roll, 3, a middle roll, 4, a supporting roll, 5, a detection laser emitter, 6, a standard laser emitter and 7, a camera.

Detailed Description

The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

The invention relates to a plate shape detection device based on machine vision, which comprises a strip steel 1 (the strip steel 1 is a detected main body of the device) in a rolling process, a working roll 2, a middle roll 3, a supporting roll 4, a detection laser emitter 5, a standard laser emitter 6 and a camera 7 as shown in figure 1.

Detection laser emitter 5, standard laser emitter 6 all install in the field operation side, and 2.7 meters apart from ground height, wherein detection laser emitter 5 installs and keeps away from camera position, and standard laser emitter 6 and camera 7 installation are same position. The reflected light of the two beams of laser emitted by the detection laser emitter 5 and the standard laser emitter 6 in the strip steel 1 is vertical to the rolling direction of the strip steel 1; the camera 7 is mounted at 32 deg. to the two laser lines. The detection laser transmitter 5, the standard laser transmitter 6 and the camera 7 are all connected with a computer. The detection laser emitter 5 and the standard laser emitter 6 are both infrared laser lines with the wavelength of 650nm, a 650nm optical filter is additionally arranged on a lens corresponding to the camera 7, and light with the corresponding wavelength is collected.

The detection laser emitter 5 and the standard laser emitter 6 which irradiate the surface of the strip steel are irradiated in parallel, the detection laser emitter 5 must be arranged at a certain distance from the camera 7 to the standard laser emitter 6, and the reflected light rays must present a certain angle with the camera 7. The standard laser transmitter 6 and the camera 7 must be installed at the same position to ensure that the standard laser does not change with the change of the board shape. And a plate shape display interface is arranged near the operation side of the rolling field, and the detected plate shape information is visually displayed and is provided for field operators to control the plate shape.

The detection principle is that a laser (a detection laser emitter 5 and a standard laser emitter 6) and an image sensor are arranged at the position of an on-site operation side, so that linear laser emitted by the laser can irradiate the strip steel, and the image sensor can acquire the strip steel and the reflected light of the linear laser. And accurately obtaining the position information of the detection laser line and the standard laser line by using technical means such as image processing and the like, and finally obtaining the strip steel plate shape information through calculation.

The invention relates to a machine vision-based plate shape detection method, which utilizes the position of a laser line emitted by a standard laser emitter 6 as a standard position, and calculates and detects the relative position change of the laser line emitted by a laser emitter 5 to calculate plate shape data. The Canny edge detection algorithm is combined with the gray scale gravity center method, and the accurate position of the line structure light center is extracted in a complex environment.

The specific detection steps are shown in fig. 2:

step 1, carrying out gray scale operation on the acquired field image according to a formula (1).

Grey=0.299*R+0.587*G+0.114*B (1);

Wherein, Grey — output gray value; R-Red channel value; g-green channel value; b-blue channel value.

The invention needs to detect the plate shape information in real time, and has higher requirement on the timeliness of the program algorithm. And because each pixel of the single-channel image only corresponds to one gray value, compared with the RGB image, the single-channel image processing speed is theoretically three times faster. The single-channel image can convert the original image collected by the sensor into a gray image to be displayed, and meanwhile, the recognition of the target and the extraction of the edge cannot be influenced.

Step 2, because the reflected light of the laser line has a certain angle with the collection direction of the camera, the collected image is corrected by adopting a rotating image method; under the condition of normal plate shape, the two laser beams are in a vertical state in the rotated image.

And 3, directly taking out the needed corresponding pixel point set from the original sampling region by using a method for defining a specific region, mapping the pixel point set to the rectangular region to be used as a region-of-interest image (ROI region), and developing the image around the subsequent image preprocessing and algorithm. The region of interest containing the object is extracted from the background. The method can reduce the influence of noise in other areas on the site on the extraction of the central position of the subsequent laser line, reduce the size of the image processing area, remarkably accelerate the information extraction and calculation speed, and meet the requirement of a measurement system on real-time property. And simultaneously, detecting the upper edge and the lower edge of the strip steel by utilizing Hough transformation to obtain the position of the strip steel.

And step 4, denoising by adopting bilateral Gaussian filtering, compared with the traditional Gaussian filtering, the bilateral Gaussian filtering can simultaneously carry out edge storage in the image denoising process, and when denoising is carried out by adopting other filtering algorithms, the target edge to be detected can be blurred, so that the processing and retaining effects on image edge details are poor. Compared with a Gaussian filter, the bilateral Gaussian filter has one more Gaussian variance, which is a Gaussian filter function based on spatial gray value distribution, so that at an edge position, a pixel farther from the edge does not influence the pixel value at the edge position. The change of the gray value at the edge of the laser line is better preserved by bilateral Gaussian filtering, and the edge position is clearer.

And 5, performing image contrast lifting operation according to the formula (2).

p(M,N)=q(M,N)*k (2);

In the formula, K is the pixel lifting proportion; p (M, N) -comparing the pixel gray value of the raised M row and N column; q (M, N) -the pixel gray value of the M row and N column before the contrast is raised.

This step can enhance the gray difference between the high gray value region and the low gray value region, thereby enhancing the edge. Because the gray value of the laser line is high and the gray value of the periphery is low, after the laser line is amplified in the same proportion, the brightening part of the laser line is higher than the background part, and the difference between the brightening part and the background part is increased.

And 6, operating the image subjected to contrast lifting by utilizing image normalization according to a formula (3), normalizing the data with indefinite size into the data of the area with the designated size, and distributing the data of each line in a specific interval.

In the formula, X is original data; xnorm-the normalized data; xmax-the original data set maximum; xmin-raw data set minimum.

And 7, accurately identifying edges through four steps by using a Canny algorithm, inhibiting effective non-edge pixels through a non-maximum value, and removing false edges through setting a double threshold value. Compared with other algorithms, the method can perform effective edge connection, and has the advantages of timeliness and foreground and background distinguishing. And calculating the width of the laser line according to the double edges obtained by Canny through a formula (4).

gc=xl-xr (4);

In the formula, gc-laser line width; x is the number ofl-each row corresponds to a left edge coordinate; x is the number ofr-each row corresponds to a right edge coordinate;

and 8, calculating the gray scale gravity center again by using a double-edge result obtained by Canny calculation by adopting a gray scale gravity center method based on the edge detection result. The method performs targeted processing on the characteristics of the line structured light and the interference in the image, and obtains good laser line center position coordinates. The center position of the detection laser line is calculated according to the formula (5). And under the condition of ensuring timeliness, the method has obvious advantages in the accuracy and standard deviation of the calculation result.

In the formula, U is the image line gray scale gravity center; gi-pixel coordinates of all valid element points correspond to a grey value; mu.si-pixel coordinates of all valid element points; m is the pixel number of all effective element points. And meanwhile, the position of the standard laser line is detected by utilizing Hough transformation to provide a standard position for calculating the plate shape.

And 9, under the condition that the resolution of the collected image is 3072 × 2048, the laser line change caused by the plate shape change is usually 10-15 pixels, and the laser line change cannot be directly observed. And calculating the shape information according to the difference that the two laser lines are deformed when meeting the plate strip, the detection laser lines are deformed correspondingly, and the standard laser lines are not changed, and meanwhile, adding the width information into the shape data of the steel strip for calculation. The deformation of the strip steel is mainly reflected in the rolling direction of the strip steel, so that the x coordinates of two laser lines corresponding to the same y coordinate are respectively calculated, and the difference is made. And meanwhile, multiplying the width information to obtain the plate-shaped data of each row.

Gy=gc*(XS-XD)(y=yt...yk) (6);

In the formula: gy-panel data for row y; gc-detection laser line width of row y; xS-x-coordinate of y-line standard laser line; xD-the y-line detects the x-coordinate of the laser line; y ist-the y-direction coordinates of the upper edge of the strip steel; y isk-the y-direction coordinate of the lower edge of the strip.

And step 10, combining the upper edge position and the lower edge position of the strip steel obtained in the step 3, extracting plate shape data only on the surface of the strip steel to obtain the actual strip steel plate shape.

And step 11, drawing a strip steel plate shape information interface. As shown in fig. 3, the 3D curve is strip steel plate shape information, and the left side information displays the strip steel upper edge position, the strip steel lower edge position, the strip steel center position and the real-time rolling speed from top to bottom in sequence; the upper right is shown as the on-site system time.

The invention is based on an image processing means, and realizes the real-time detection of the cold-rolled strip steel plate shape information by utilizing the line laser emitter and the image sensor. The algorithms of image preprocessing, image edge detection and line structure light center extraction are all completed by using C + + language under a Visual Studio 2017 platform. The final experimental result proves that the researched cold-rolled plate shape detection method based on image processing can accurately detect real-time plate shape data and restore plate shape information. Accurate plate shape information is provided for plate shape control in the actual cold rolling process of the strip steel. The main advantages are as follows:

1. according to the characteristics of plate shape change in the actual rolling process, the corresponding laser line data information under various plate shapes is researched. The method comprises the steps of obtaining the plate shape information of the cold-rolled strip steel through image preprocessing, edge detection, line structure light center extraction and other means; for the image preprocessing part, a color space conversion method is adopted to convert the image into a gray scale space, reduce the information redundancy and accelerate the detection processing speed, bilateral Gaussian filtering is utilized to remove Gaussian noise from the image, and contrast ratio raising and image line normalization are adopted to enhance the image after noise reduction; for an image edge detection part, detecting the effective laser line edge in the image through four basic steps of a Canny edge detection algorithm; in the extraction of the light center of the online structure, after comparing with a geometric center method based on edge detection, a traditional gray scale center method and the like, an improved gray scale center method based on edge detection is adopted. The plate shape data is obtained by calculating the relative positions of the two laser lines and the width of the detection laser line, so that the error caused by the vibration of the camera is effectively eliminated, and the stability of the detection result is improved.

2. In the actual detection link, due to the limitation that the rolling speed of the strip steel is high and the acquisition frame rate of the image sensor is low, smear appears in part of the acquired images. This phenomenon results in a wide laser line having a wide fluctuation range. And obtaining plate shape data by detecting the width side of the laser line. And obtaining the edge position coordinates of the laser line by methods of bilateral Gaussian filtering, contrast ratio lifting, image line normalization and Canny edge detection. The coordinate difference of the edge position of each line of each frame image is the width of the corresponding line.

3. Because vibration is generated in the working process of the cold rolling mill, tension imbalance also occurs in the rolling process of the strip steel, and then the strip steel moves up and down on the operation side and the transmission side. The positions of the upper edge and the lower edge of the strip steel are detected by adopting a Hough line transformation method. The position and the width of the strip steel are obtained, and meanwhile, the guarantee is provided for the accurate measurement of the strip shape.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种管道双目三维测量装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!