CN109827504B - Machine vision-based steel coil end face local radial detection method - Google Patents

Machine vision-based steel coil end face local radial detection method Download PDF

Info

Publication number
CN109827504B
CN109827504B CN201910049888.0A CN201910049888A CN109827504B CN 109827504 B CN109827504 B CN 109827504B CN 201910049888 A CN201910049888 A CN 201910049888A CN 109827504 B CN109827504 B CN 109827504B
Authority
CN
China
Prior art keywords
spectrogram
dimensional array
pix
steel coil
local
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
CN201910049888.0A
Other languages
Chinese (zh)
Other versions
CN109827504A (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.)
Ainnovation Nanjing Technology Co ltd
Original Assignee
Ainnovation Nanjing 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 Ainnovation Nanjing Technology Co ltd filed Critical Ainnovation Nanjing Technology Co ltd
Priority to CN201910049888.0A priority Critical patent/CN109827504B/en
Publication of CN109827504A publication Critical patent/CN109827504A/en
Application granted granted Critical
Publication of CN109827504B publication Critical patent/CN109827504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a machine vision-based steel coil end surface local radial detection method, which comprises the following steps of: inputting a local gray-scale image of the end face of one steel coil, representing the local gray-scale image by using a local gray-scale image two-dimensional array f (x, y), and performing two-dimensional discrete time-frequency transformation on the local gray-scale image two-dimensional array f (x, y) to obtain a corresponding frequency spectrogram; equally dividing the two-dimensional array F (u, v) of the spectrogram into four quadrants, and carrying out diagonal quadrant translation exchange of positions to obtain a translation two-dimensional array F _ shift (u, v) matrix of the spectrogram; converting the translation spectrogram into an amplitude spectrogram, and taking a central point (M/2, N/2) as a passing point and k as a slope to form a straight line l; when the slope k takes different values, calculating the pixel mean value pix _ M (k) of the straight line l passing through the two-dimensional array M (u, v) of the amplitude spectrogram; when the pixel average pix _ m (k) is the maximum value, the direction of the slope k is the radial direction of the end face of the steel roll in the original image. The invention perfectly solves the problem of local radial detection of the end face of the steel coil, and has good accuracy and robustness.

Description

Machine vision-based steel coil end face local radial detection method
Technical Field
The invention relates to the technical field of machine vision, in particular to a method for detecting the local radial direction of an end face of a steel coil based on machine vision.
Background
In the field of machine vision, several algorithms are available to detect directionality of simple geometric shapes; such as straight line detection and circle detection based on hough transform, straight line detection based on radon transform, etc., these methods may detect a straight line direction or a radial direction of a circle.
However, these detection algorithms must be performed in images that satisfy many constraints such as simple background and significant geometry. The Hough transform needs to carry out binarization processing on the picture, and a large error exists in the binarization process; the radon transform adopts an integral mode, does not need binarization, but is particularly easily influenced by light and shade change and image complexity.
But no radial detection method with strong feasibility exists for the end faces of the coiled objects wrapped by the ellipses and the plurality of layers.
Disclosure of Invention
The object of the present invention is to solve at least one of the technical drawbacks mentioned.
Therefore, the invention aims to provide a machine vision-based steel coil end surface local radial detection method, which solves the problem of steel coil end surface local radial detection and has good accuracy and robustness.
In order to achieve the purpose, the invention provides a machine vision-based steel coil end surface local radial detection method, which comprises the following steps of:
step S1, inputting a local gray-scale map of the end face of a steel coil, and expressing the local gray-scale map by a local gray-scale map two-dimensional array f (x, y), wherein the local gray-scale map two-dimensional array f (x, y) is M rows and N columns; performing two-dimensional discrete time-frequency transformation on the two-dimensional array F (x, y) of the local gray-scale image to obtain a corresponding spectrogram, and expressing the spectrogram by using the two-dimensional array F (u, v) of the spectrogram;
step S2, equally dividing the two-dimensional array F (u, v) of the spectrogram into four quadrants, wherein the four corner positions of the two-dimensional array F (u, v) of the spectrogram and the elements near the four corner positions represent the origin of the frequency domain and the low-frequency components;
step S3, translating and exchanging the diagonal quadrants of the two-dimensional array F (u, v) matrix of the spectrogram to obtain a translated two-dimensional array F _ shift (u, v) matrix of the spectrogram; so that the origin of the frequency domain is moved to the center of the two-dimensional array F _ shift (u, v) matrix of the translational spectrogram, and the central point at the center of the two-dimensional array F _ shift (u, v) matrix of the translational spectrogram is (M/2, N/2);
step S4, converting the shifted spectrogram into an amplitude spectrogram, that is, taking an absolute value of each element in the two-dimensional array F _ shift (u, v) of the shifted spectrogram, to obtain a two-dimensional array M (u, v) of the amplitude spectrogram;
step S5, using the central point (M/2, N/2) as the passing point and k as the slope to make a straight line l;
step S6, when the slope k is different, calculating the pixel mean pix _ M (k) of the straight line l passing through the two-dimensional array M (u, v) of the amplitude spectrogram;
in step S7, when the pixel average pix _ m (k) has the maximum value, the direction of the slope k is the radial direction of the end face of the steel roll in the original image.
Preferably, in step S1, the two-dimensional discrete time-frequency transform calculation formula is as follows:
Figure BDA0001950396800000021
wherein u is 0,1,2, … M-1; v-0, 1,2, … N-1;
x represents the abscissa of the pixel point in the local gray-scale image, y represents the ordinate of the pixel point in the local gray-scale image, u represents the abscissa of the pixel point in the frequency spectrum image, and v represents the ordinate of the pixel point in the frequency spectrum image.
In any of the above schemes, it is preferable that the frequency domain origin physically represents the direct current component and the low frequency component in step S2.
In any of the above schemes, preferably, in step S5, the mathematical expression of the straight line l is: v ═ k ═ u + (N-k × M)/2.
In any of the above schemes, it is preferable that, in step S6, when the slope k is taking a different value, the pixel mean value pix _ M (k) ∑ M (u, v), (u, v) ∈ straight line l.
In any of the above embodiments, it is preferable that, in step S7, the angle θ e (-90 °, 90 °), and k is the slope of the angle θ, that is, k is arctan (θ × pi/180 °); when the angle theta traverses (-90 degrees and 90 degrees), respectively obtaining the values of pix _ m (k); when the angle θ is 90 °, the average pix _ m (∞) of all the pixels on the straight line l is obtained; and traversing all pix _ m (k), wherein when pix _ m (k) obtains the maximum value, the direction indicated by the slope k is the radial direction of the end face of the steel coil in the original image.
The method for detecting the local radial direction of the end face of the steel coil based on the machine vision perfectly solves the problem of detecting the local radial direction of the end face of the steel coil, has good accuracy and robustness, and can accurately calculate the radial direction in most actual scenes of the end face of the steel coil. Compared with the existing methods, the method has the advantages that the effects in all aspects are greatly improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a general flow diagram of the present invention;
FIG. 2 is a schematic diagram of a diagonal quadrant translational swap of the present invention;
FIG. 3 is an exemplary diagram of a diagonal quadrant translational swap of the present invention;
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The invention provides a machine vision-based steel coil end face local radial detection method, which comprises the following steps of:
step S1, inputting a local gray-scale map of the end face of a steel coil, and expressing the local gray-scale map by a local gray-scale map two-dimensional array f (x, y), wherein the local gray-scale map two-dimensional array f (x, y) is M rows and N columns; performing two-dimensional discrete time-frequency transformation on the two-dimensional array F (x, y) of the local gray-scale image to obtain a corresponding spectrogram, and expressing the spectrogram by using the two-dimensional array F (u, v) of the spectrogram;
the two-dimensional discrete time-frequency transformation calculation formula is as follows:
Figure BDA0001950396800000031
wherein u is 0,1,2, … M-1; v-0, 1,2, … N-1;
x represents the abscissa of the pixel point in the local gray-scale image, y represents the ordinate of the pixel point in the local gray-scale image, u represents the abscissa of the pixel point in the frequency spectrum image, and v represents the ordinate of the pixel point in the frequency spectrum image.
Step S2, equally dividing the two-dimensional array F (u, v) of the spectrogram into four quadrants, wherein the four corner positions of the two-dimensional array F (u, v) of the spectrogram and the elements near the four corner positions represent the origin of the frequency domain and the low-frequency components; the frequency domain origin represents the dc component in a physical sense. As shown in fig. 2, P1 denotes a direct current component, P2 denotes a low frequency component, and P3 denotes a high frequency component.
Step S3, translating the diagonal quadrants of the two-dimensional array F (u, v) matrix of the spectrogram to exchange positions to obtain a translated two-dimensional array F _ shift (u, v) matrix of the spectrogram, as shown in fig. 2-3; so that the origin of the frequency domain is moved to the center of the two-dimensional array F _ shift (u, v) matrix of the translational spectrogram, and the central point at the center of the two-dimensional array F _ shift (u, v) matrix of the translational spectrogram is (M/2, N/2);
to better illustrate step S3, the example in fig. 3 is illustrated, a group of two-dimensional arrays of spectrograms is selected in fig. 3, and diagonal quadrant translation exchange is performed to obtain a two-dimensional array of translated spectrograms; where 01, 08, 57, 64 and their adjacent positions in fig. 3 are frequency domain origins. It should be noted that the data in fig. 3 are only selected for better explanation of the present step.
Step S4, converting the shifted spectrogram into an amplitude spectrogram, that is, taking an absolute value of each element in the two-dimensional array F _ shift (u, v) of the shifted spectrogram, to obtain a two-dimensional array M (u, v) of the amplitude spectrogram;
step S5, using the central point (M/2, N/2) as the passing point and k as the slope to make a straight line l;
wherein, the mathematical expression of the straight line l is: v ═ k ═ u + (N-k × M)/2.
Step S6, when the slope k is different, calculating the pixel mean pix _ M (k) of the straight line l passing through the two-dimensional array M (u, v) of the amplitude spectrogram;
when the slope k takes different values, the pixel mean pix _ M (k) is ∑ M (u, v), (u, v) e ∈ straight line l.
In step S7, when the pixel average pix _ m (k) has the maximum value, the direction of the slope k is the radial direction of the end face of the steel roll in the original image.
The method comprises the following specific steps: let the angle θ e (-90 °, 90 °), k is the slope of the angle θ, i.e., k ═ arctan (θ × pi/180 °); when the angle theta traverses (-90 degrees and 90 degrees), respectively obtaining the values of pix _ m (k); when the angle θ is 90 °, the average pix _ M (∞) of all pixels on the straight line l (the mathematical expression of the straight line ld is u is M/2) is obtained; and traversing all pix _ m (k), wherein when pix _ m (k) obtains the maximum value, the direction indicated by the slope k is the radial direction of the end face of the steel coil in the original image.
According to the method, the two-dimensional array of the local gray-scale image is represented, then the converted spectrogram, the translation spectrogram, the amplitude spectrogram and the like are represented by the corresponding two-dimensional array, and the whole conversion process is not influenced by factors such as brightness, background, color and the like in the image, so that the robustness of the machine vision-based steel coil end surface local radial detection method is very good.
In addition, the two-dimensional array is transformed, the pixel mean value pix _ m (k) is calculated by utilizing the straight line l, when the pixel mean value pix _ m (k) takes the maximum value, the direction of the slope k is the radial direction of the end face of the steel roll in the original image, the accuracy performance and the robustness are good, the method can detect not only the standard circle, but also the end face of the roll wrapped by the ellipse and multiple layers, and the realization of automation is facilitated.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (6)

1. A machine vision-based steel coil end surface local radial detection method is characterized by comprising the following steps:
step S1, inputting a local gray-scale map of the end face of a steel coil, and expressing the local gray-scale map by a local gray-scale map two-dimensional array f (x, y), wherein the local gray-scale map two-dimensional array f (x, y) is M rows and N columns; performing two-dimensional discrete time-frequency transformation on the two-dimensional array F (x, y) of the local gray-scale image to obtain a corresponding spectrogram, and expressing the spectrogram by using the two-dimensional array F (u, v) of the spectrogram;
step S2, equally dividing the two-dimensional array F (u, v) of the spectrogram into four quadrants, wherein the four corner positions of the two-dimensional array F (u, v) of the spectrogram and the elements near the four corner positions represent the origin of the frequency domain and the low-frequency components;
step S3, translating and exchanging the diagonal quadrants of the two-dimensional array F (u, v) matrix of the spectrogram to obtain a translated two-dimensional array F _ shift (u, v) matrix of the spectrogram; so that the origin of the frequency domain is moved to the center of the two-dimensional array F _ shift (u, v) matrix of the translational spectrogram, and the central point at the center of the two-dimensional array F _ shift (u, v) matrix of the translational spectrogram is (M/2, N/2);
step S4, converting the shifted spectrogram into an amplitude spectrogram, that is, taking an absolute value of each element in the two-dimensional array F _ shift (u, v) of the shifted spectrogram, to obtain a two-dimensional array M (u, v) of the amplitude spectrogram;
step S5, using the central point (M/2, N/2) as the passing point and k as the slope to make a straight line l;
step S6, when the slope k is different, calculating the pixel mean pix _ M (k) of the straight line l passing through the two-dimensional array M (u, v) of the amplitude spectrogram;
in step S7, when the pixel average pix _ m (k) has the maximum value, the direction of the slope k is the radial direction of the end face of the steel roll in the original image.
2. The method for detecting the local radial direction of the end face of the steel coil based on the machine vision as claimed in claim 1, wherein in step S1, the two-dimensional discrete time-frequency transformation calculation formula is as follows:
Figure FDA0002526221270000011
wherein u is 0,1,2, … M-1; v-0, 1,2, … N-1;
x represents the abscissa of the pixel point in the local gray-scale image, y represents the ordinate of the pixel point in the local gray-scale image, u represents the abscissa of the pixel point in the frequency spectrum image, and v represents the ordinate of the pixel point in the frequency spectrum image.
3. The method for detecting the local radial direction of the end face of the steel coil based on the machine vision as claimed in claim 1, wherein in step S2, the frequency domain origin represents the direct current component and the low frequency component in a physical sense.
4. The method for detecting the local radial direction of the end face of the steel coil based on the machine vision as claimed in the claim 1, wherein in the step S5, the mathematical expression of the straight line l is as follows: v ═ k ═ u + (N-k × M)/2.
5. The method for detecting the local radial direction of the end face of the steel coil based on the machine vision as claimed in the claim 1, wherein in the step S6, when the slope k takes different values, the pixel mean value pix _ M (k) Σ M (u, v), (u, v) e line l.
6. The method for detecting the local radial direction of the end face of the steel coil based on the machine vision as claimed in the claim 1, wherein in the step S7, an angle θ e (-90 °, 90 °), k is a slope of the angle θ, i.e. k ═ arctan (θ x π/180 °); when the angle theta traverses (-90 degrees and 90 degrees), respectively obtaining the values of pix _ m (k); when the angle θ is simultaneously determined to be 90 °, the average pix _ m (∞) of all pixels on the line l is obtained, where pix _ m (k) includes pix _ m (∞); and traversing all pix _ m (k), wherein when pix _ m (k) obtains the maximum value, the direction indicated by the slope k is the radial direction of the end face of the steel coil in the original image.
CN201910049888.0A 2019-01-18 2019-01-18 Machine vision-based steel coil end face local radial detection method Active CN109827504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910049888.0A CN109827504B (en) 2019-01-18 2019-01-18 Machine vision-based steel coil end face local radial detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910049888.0A CN109827504B (en) 2019-01-18 2019-01-18 Machine vision-based steel coil end face local radial detection method

Publications (2)

Publication Number Publication Date
CN109827504A CN109827504A (en) 2019-05-31
CN109827504B true CN109827504B (en) 2020-08-14

Family

ID=66860989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910049888.0A Active CN109827504B (en) 2019-01-18 2019-01-18 Machine vision-based steel coil end face local radial detection method

Country Status (1)

Country Link
CN (1) CN109827504B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110349142A (en) * 2019-07-05 2019-10-18 创新奇智(青岛)科技有限公司 Defect sample generation method, model training method, system and the electronic equipment of steel coil end-face
CN112577448B (en) * 2020-12-04 2021-09-24 长飞光纤光缆股份有限公司 Optical fiber end face inclination angle measurement method and system based on image gray value

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014025837A (en) * 2012-07-27 2014-02-06 Jfe Steel Corp Processed state evaluating method and processed state evaluating apparatus for steel plates
CN107194919A (en) * 2017-05-18 2017-09-22 南京大学 The mobile phone screen defect inspection method rebuild based on rule grain background
CN207850314U (en) * 2017-09-13 2018-09-11 中冶赛迪工程技术股份有限公司 A kind of strip coiling unfitness of butt joint on-line measuring device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014025837A (en) * 2012-07-27 2014-02-06 Jfe Steel Corp Processed state evaluating method and processed state evaluating apparatus for steel plates
CN107194919A (en) * 2017-05-18 2017-09-22 南京大学 The mobile phone screen defect inspection method rebuild based on rule grain background
CN207850314U (en) * 2017-09-13 2018-09-11 中冶赛迪工程技术股份有限公司 A kind of strip coiling unfitness of butt joint on-line measuring device

Also Published As

Publication number Publication date
CN109827504A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN107945113A (en) The antidote of topography's splicing dislocation
CN109712071B (en) Unmanned aerial vehicle image splicing and positioning method based on track constraint
CN109827504B (en) Machine vision-based steel coil end face local radial detection method
CN116977329B (en) Photovoltaic grid line detection method based on machine vision
CN112085709A (en) Image contrast method and equipment
CN116433733A (en) Registration method and device between optical image and infrared image of circuit board
CN116168037A (en) Method and system for calculating bending degree of wire crimping based on image processing
Firouzi et al. A new framework for canny edge detector in hexagonal lattice
CN117557565B (en) Detection method and device for lithium battery pole piece
CN106485264B (en) It is divided based on gradient sequence and the curve of mapping policy describes and matching process
CN111553927B (en) Checkerboard corner detection method, detection system, computer device and storage medium
CN111311657B (en) Infrared image homologous registration method based on improved corner principal direction distribution
US20070280555A1 (en) Image registration based on concentric image partitions
CN109829899B (en) Background suppression algorithm for steel coil end surface defect detection
CN113592744B (en) Geometric fine correction method suitable for high-resolution remote sensing image
CN110956640B (en) Heterogeneous image edge point detection and registration method
CN110910442B (en) High-speed moving object machine vision size detection method based on kernel-free image restoration
CN113554036A (en) Characteristic point extraction and matching method for improving ORB algorithm
CN113409369A (en) Multi-mode remote sensing image registration method based on improved RIFT
CN108734180B (en) SIFT feature point gradient generation method based on calculation mode optimization
WO2021000471A1 (en) High-resolution image matching method and system
CN114926659B (en) Deformation target positioning algorithm based on SIFT and CM
Chang et al. Lens distortion correction by analysing peak shape in Hough transform space
CN116416251B (en) Method and related device for detecting quality of whole-core flame-retardant conveying belt based on image processing
CN109902555B (en) Object-based change detection method for multi-scale hierarchical expression learning

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