Disclosure of Invention
In order to solve the problem that a square billet is missed to be counted when a proximity switch is used for counting the square billet, so that a counting result is wrong, the application discloses a square billet counting method and device applied to continuous casting through the following embodiments.
The application discloses in a first aspect a billet counting method applied to continuous casting, the method comprising:
the method comprises the steps of obtaining square billet images shot by a camera, wherein the camera is used for shooting square billets on a plurality of billet splitting devices when a control system sends in-place signals each time;
aiming at the square billet image, selecting a rectangular counting area, wherein the length of the rectangular counting area is the distance between two adjacent iron teeth in the billet separating device, the width of the rectangular counting area is the sum of the maximum allowable billet merging width between the two adjacent iron teeth in the billet separating device, the central point of the rectangular counting area is positioned at one half of the position between the two adjacent iron teeth in a target billet separating device, and the target billet separating device is the billet separating device positioned at the middle of the tail end of a cooling bed transportation;
extracting all square billet outlines in the rectangular counting area;
acquiring the gravity center of each square billet contour in the rectangular counting area;
re-dividing a circular counting area by taking the gravity center of a target square billet contour as the center of a circle and the width of the rectangular counting area as the radius, wherein the target square billet contour is any one square billet contour in the rectangular counting area;
extracting all square billet outlines in the circular counting area;
setting the square billet contour with the largest area in the circular counting area as the square billet contour to be counted;
and acquiring the number of square billets contained in the square billet profile to be counted according to the area of the square billet profile to be counted and a preset standard area value.
Optionally, the standard area value is an area value of a maximum profile of a target side surface of a single square billet in the circular counting area.
Optionally, the obtaining the number of square billets included in the square billet profile to be counted according to the area of the square billet profile to be counted and a preset standard area value includes:
acquiring an area interval to which the outline area of the square billet to be counted belongs, wherein the area interval is preset according to the standard area value;
and judging the number of square billets contained in the square billet profile to be counted according to the area interval to which the area of the square billet profile to be counted belongs.
Optionally, the determining, according to the area interval to which the area of the square billet profile to be counted belongs, the number of square billets included in the square billet profile to be counted includes:
if the area interval of the area of the square billet contour to be counted belongs to is [ (n-b) S0,nS0]The contour of the square billet to be counted comprises n square billets, wherein S0Represents the standard area value, and b represents a preset coefficient.
Optionally, the extracting all the square billet contours in the rectangular counting area includes:
extracting all image outlines in the rectangular counting area, and acquiring the area of each image outline;
and screening all image outlines according to a preset first area threshold value to obtain all square billet outlines in the rectangular counting area, wherein the area of any square billet outline in the rectangular counting area is not less than the first area threshold value.
Optionally, the extracting all the square billet profiles in the circular counting area includes:
extracting all image contours in the circular counting area, and acquiring the area of each image contour;
and screening all image outlines according to a preset second area threshold value to obtain all square billet outlines in the circular counting area, wherein the area of any square billet outline in the circular counting area is not less than the second area threshold value.
A second aspect of the present application discloses a billet counting apparatus for continuous casting, which is used for performing the billet counting method for continuous casting according to the first aspect of the present application, the apparatus comprising:
the device comprises an image acquisition module, a control system and a control module, wherein the image acquisition module is used for acquiring square billet images shot by a camera, and the camera is used for shooting square billets on a plurality of billet splitting devices when the control system sends in-place signals each time;
a rectangular counting area selecting module, configured to select a rectangular counting area for the square billet image, where the length of the rectangular counting area is a distance between two adjacent iron teeth in the billet splitting device, and the width of the rectangular counting area is a sum of widths of the most allowed combined billets between two adjacent iron teeth in the billet splitting device, a center point of the rectangular counting area is located at one-half of a distance between two adjacent iron teeth in a target billet splitting device, and the target billet splitting device is a billet splitting device located at the middle of a cold bed transportation end;
the first square billet contour extraction module is used for extracting all square billet contours in the rectangular counting area;
the gravity center acquisition module is used for acquiring the gravity center of each square billet contour in the rectangular counting area;
the circular counting area selecting module is used for re-dividing a circular counting area by taking the gravity center of a target square billet contour as a circle center and the width of the rectangular counting area as a radius, wherein the target square billet contour is any one square billet contour in the rectangular counting area;
the second square billet contour extraction module is used for extracting all square billet contours in the circular counting area;
the square billet outline acquisition module is used for setting the square billet outline with the largest area in the circular counting area as the square billet outline to be counted;
and the counting module is used for acquiring the number of square billets contained in the square billet outline to be counted according to the area of the square billet outline to be counted and a preset standard area value.
Optionally, the counting module includes:
an area interval obtaining unit, configured to obtain an area interval to which the square billet outline area to be counted belongs, where the area interval is preset according to the standard area value;
and the root number acquisition unit is used for judging the root number of the square billets contained in the square billet outline to be counted according to the area section to which the area of the square billet outline to be counted belongs.
Optionally, when the number of square billets included in the square billet profile to be counted is determined according to the area interval to which the area of the square billet profile to be counted belongs, the number obtaining unit determines the number of square billets included in the square billet profile to be counted if the area of the square billet profile to be counted belongs to the areaIs (n-b) S0,nS0]The contour of the square billet to be counted comprises n square billets, wherein S0Represents the standard area value, and b represents a preset coefficient.
Optionally, the first billet contour extraction module includes:
the first image contour acquisition unit is used for extracting all image contours in the rectangular counting area and acquiring the area of each image contour;
and the first screening unit is used for screening all image outlines according to a preset first area threshold value to obtain all square billet outlines in the rectangular counting area, wherein the area of any square billet outline in the rectangular counting area is not less than the first area threshold value.
Optionally, the second square billet contour extraction module includes:
the second image contour acquisition unit is used for extracting all image contours in the circular counting area and acquiring the area of each image contour;
and the second screening unit is used for screening all the image outlines according to a preset second area threshold value to obtain all the square billet outlines in the circular counting area, wherein the area of any square billet outline in the circular counting area is not less than the second area threshold value.
The application discloses a square billet counting method and device applied to continuous casting, and the method comprises the following steps: acquiring a square billet image shot by a camera, selecting a rectangular counting area aiming at the square billet image, and extracting all square billet outlines in the rectangular counting area; acquiring the gravity center of each square billet contour in the rectangular counting area; the center of gravity of the target square billet contour is used as the center of a circle, the width of the rectangular counting area is used as the radius, the circular counting area is newly defined, and all square billet contours in the circular counting area are extracted; setting the square billet contour with the largest area in the circular counting area as the square billet contour to be counted; and acquiring the number of square billets contained in the square billet profile to be counted according to the area of the square billet profile to be counted and a preset standard area value. The counting method is based on image processing, can accurately count the number of square billets with combined billets, and does not have the problem of square billet missing.
Detailed Description
In order to solve the problem that a square billet is missed to be counted when a proximity switch is used for counting the square billet, so that a counting result is wrong, the application discloses a square billet counting method and device applied to continuous casting through the following embodiments.
The first embodiment of the present application discloses a billet counting method applied to continuous casting, referring to a work flow diagram shown in fig. 3, the method includes:
and S101, acquiring square billet images shot by a camera, wherein the camera is used for shooting square billets on a plurality of billet splitting devices each time the control system sends an in-place signal.
Fig. 4 is a schematic structural diagram of a continuous casting square billet transportation system disclosed in an embodiment of the application, wherein a camera 4 is mounted on the side of the whole transportation chain bed through a camera support 5 and is used for shooting square billets on a billet splitting device. The square billet 3 can temporarily stay when being transported to the billet separating device 2 from the cooling bed 1, the control system sends a signal in place, the camera 4 shoots the square billet 3, then an image obtained by shooting is sent to the control system, and the control system processes the image.
Step S102, aiming at the square billet image, selecting a rectangular counting area, wherein the length of the rectangular counting area is the distance between two adjacent iron teeth in the billet separating device, the width of the rectangular counting area is the sum of the widths of the most allowable billets combined between the two adjacent iron teeth in the billet separating device, the central point of the rectangular counting area is positioned at one half of the position between the two adjacent iron teeth in a target billet separating device, and the target billet separating device is the billet separating device positioned at the middle of the tail end of cooling bed transportation.
In actual conditions, the square billet can be inclined, but the inclination angle of the square billet at the most central position is the smallest and the square billet almost rotates around the axis, so that a rectangular counting area is selected for the target billet splitting device, and the inclined billet can be prevented from exceeding the range of the counting area to the greatest extent. The distance between two adjacent iron teeth in the blank splitting device is a known parameter, and if the distance between two adjacent iron teeth can only allow three blanks to appear at most, the width of the rectangular counting area can be set as the sum of the widths of the three square blanks.
Specifically, the square billet is a square billet, and the end surface (i.e., the cross section) of the square billet is rectangular and comprises a long side and a short side. In the process of conveying the square billets on the cooling bed, rolling may occur, so in the image shot by the camera, the outlines shot for different square billets may be the wider side where the long side is located or the narrower side where the short side is located. In this embodiment, when setting the width of the rectangular counting area, the width of the long side of the cross section of the square billet is taken as a reference, if the distance between two adjacent iron teeth can only allow three parallel billets to appear, the width of the rectangular counting area is set as the sum of the widths of the long sides of the cross sections of the three square billets.
Fig. 5 is a schematic diagram of an image of a billet after a rectangular counting area is selected, wherein a reference line is a central line perpendicular to a long side in the rectangular counting area.
And step S103, extracting all square billet outlines in the rectangular counting area.
In some embodiments, the following steps are taken to extract all billet contours within the rectangular count region:
and extracting all image outlines in the rectangular counting area, and acquiring the area of each image outline.
And screening all image outlines according to a preset first area threshold value to obtain all square billet outlines in the rectangular counting area, wherein the area of any square billet outline in the rectangular counting area is not less than the first area threshold value.
Wherein each contour within the rectangular count area is easily extracted using existing image processing techniques. However, in actual working conditions, iron scales appear on the surface of the square billet, and the degrees of the iron scales are different, so that the area size of the outline is influenced by the condition. As shown in fig. 6, it can be seen that the square billet contour in the rectangular counting area is split into a plurality of image contours, in order to accurately obtain the number of the square billet contours in the rectangular counting area, a first area threshold is set, the image contour larger than the area threshold is set as one square billet contour, the image contour smaller than the area threshold is discarded, and all the square billet contours in the rectangular counting area are extracted accordingly to obtain the number of the square billet contours.
And step S104, acquiring the gravity center of each square billet contour in the rectangular counting area. The center of gravity position of each square billet contour can be calculated by moment calculation in the conventional image processing technology.
And S105, re-defining a circular counting area by taking the gravity center of the target square billet contour as the center of a circle and the width of the rectangular counting area as the radius, wherein the target square billet contour is any one square billet contour in the rectangular counting area.
And step S106, extracting all square billet outlines in the circular counting area.
In some embodiments, the following steps are taken to extract all billet profiles within the circular count region:
and extracting all image contours in the circular counting area, and acquiring the area of each image contour.
And screening all image outlines according to a preset second area threshold value to obtain all square billet outlines in the circular counting area, wherein the area of any square billet outline in the circular counting area is not less than the second area threshold value.
No matter how many angles the square billet inclines, the outline area of the square billet is always a fixed value in a circular counting area defined by the gravity center as a dot and a fixed radius.
And step S107, setting the square billet contour with the largest area in the circular counting area as the square billet contour to be counted.
And setting the square billet contour with the largest area in the circular counting area as the square billet contour to be counted, wherein the rest contours belong to interference contours and are discarded completely. Referring to fig. 7, the area of square billet profile a is larger than that of square billet profile B, and square billet profile a is set as the square billet profile to be counted in the circular counting area.
And S108, acquiring the number of square billets contained in the square billet contour to be counted according to the area of the square billet contour to be counted and a preset standard area value.
The standard area value is the area value of the maximum outline of the target side face of the single square billet in the circular counting area. Specifically, the square billet is a square billet, the cross section of the square billet is rectangular, so that two area sizes can exist in four side faces of the square billet, one is a side face where the long side of the cross section is located, and the other is a side face where the short side of the cross section is located.
Further, the obtaining the number of square billets contained in the square billet profile to be counted according to the area of the square billet profile to be counted and a preset standard area value includes:
and acquiring an area interval to which the outline area of the square billet to be counted belongs, wherein the area interval is preset according to the standard area value.
And judging the number of square billets contained in the square billet profile to be counted according to the area interval to which the area of the square billet profile to be counted belongs.
Further, the determining the number of square billets included in the square billet profile to be counted according to the area section to which the area of the square billet profile to be counted belongs includes:
if the area interval of the area of the square billet contour to be counted belongs to is [ (n-b) S0,nS0]The contour of the square billet to be counted comprises n square billets, wherein S0Represents the standard area value, and b represents a preset coefficient. In actual working conditions, iron scales appear on the surface of the square billet, and the area size of the outline in the image is influenced. The more severe the scale, the smaller the area of the profile will be. In this case, the coefficient b disclosed in this embodiment may be set in advance according to the specific scale degree, and may be set to a numerical value such as 0.9, 0.8, or 0.7, for example, where the more severe the scale degree is, the larger the value of the coefficient b is.
Specifically, if S < S0, 1 square billet is obtained; if 2S0> S >1.1S0, 2 square billets are formed; if 3S0> S >2.1S0 are 3 square billets, the distance between two iron teeth in the splitting device is limited, and the condition that four square billets are simultaneously combined does not exist.
And accumulating the number of square billets contained in the outline of the square billet to be counted in each circular counting area to the total number of the square billets so as to realize accurate counting of the square billets.
The application discloses a square billet counting method and device applied to continuous casting, and the method comprises the following steps: acquiring a square billet image shot by a camera, selecting a rectangular counting area aiming at the square billet image, and extracting all square billet outlines in the rectangular counting area; acquiring the gravity center of each square billet contour in the rectangular counting area; the center of gravity of the target square billet contour is used as the center of a circle, the width of the rectangular counting area is used as the radius, the circular counting area is newly defined, and all square billet contours in the circular counting area are extracted; setting the square billet contour with the largest area in the circular counting area as the square billet contour to be counted; and acquiring the number of square billets contained in the square billet profile to be counted according to the area of the square billet profile to be counted and a preset standard area value. The counting method is based on image processing, can accurately count the number of the square billets with combined billets, does not have the problem of square billet missing, and can also realize accurate counting even under the condition that the surfaces of the square billets are seriously oxidized.
The following are embodiments of the apparatus disclosed herein for performing the above-described method embodiments. For details which are not disclosed in the device embodiments, reference is made to the method embodiments.
The second embodiment of the present application discloses a square billet counting device applied to continuous casting, which is used for executing the square billet counting method applied to continuous casting according to the first embodiment of the present application, and the device comprises:
the image acquisition module is used for acquiring square billet images shot by the camera, and the camera is used for shooting square billets on the plurality of billet splitting devices when the control system sends in-place signals each time.
And the rectangular counting area selecting module is used for selecting a rectangular counting area according to the square billet image, the length of the rectangular counting area is the distance between two adjacent iron teeth in the billet separating device, the width of the rectangular counting area is the sum of the widths of the most allowed combined billets between the two adjacent iron teeth in the billet separating device, the central point of the rectangular counting area is positioned at one half of the distance between the two adjacent iron teeth in the target billet separating device, and the target billet separating device is the billet separating device positioned at the middle of the tail end of the cold bed transportation.
And the first square billet contour extraction module is used for extracting all square billet contours in the rectangular counting area.
And the gravity center acquisition module is used for acquiring the gravity center of each square billet contour in the rectangular counting area.
And the circular counting area selecting module is used for re-dividing the circular counting area by taking the gravity center of the target square billet outline as the center of a circle and the width of the rectangular counting area as the radius, wherein the target square billet outline is any one square billet outline in the rectangular counting area.
And the second square billet contour extraction module is used for extracting all square billet contours in the circular counting area.
And the square billet outline to be counted acquiring module is used for setting the square billet outline with the largest area in the circular counting area as the square billet outline to be counted.
And the counting module is used for acquiring the number of square billets contained in the square billet outline to be counted according to the area of the square billet outline to be counted and a preset standard area value.
Further, the counting module comprises:
and the area interval acquisition unit is used for acquiring an area interval to which the outline area of the square billet to be counted belongs, and the area interval is preset according to the standard area value.
And the root number acquisition unit is used for judging the root number of the square billets contained in the square billet outline to be counted according to the area section to which the area of the square billet outline to be counted belongs.
Further, when the number of square billets included in the square billet contour to be counted is determined according to the area section to which the area of the square billet contour to be counted belongs, the number obtaining unit determines that the area section to which the area of the square billet contour to be counted belongs is [ (n-b) S)0,nS0]The contour of the square billet to be counted comprises n square billets, wherein S0Represents the standard area value, and b represents a preset coefficient.
Further, the first billet contour extraction module comprises:
and the first image contour acquisition unit is used for extracting all image contours in the rectangular counting area and acquiring the area of each image contour.
And the first screening unit is used for screening all image outlines according to a preset first area threshold value to obtain all square billet outlines in the rectangular counting area, wherein the area of any square billet outline in the rectangular counting area is not less than the first area threshold value.
Further, the second square billet contour extraction module comprises:
and the second image contour acquisition unit is used for extracting all image contours in the circular counting area and acquiring the area of each image contour.
And the second screening unit is used for screening all the image outlines according to a preset second area threshold value to obtain all the square billet outlines in the circular counting area, wherein the area of any square billet outline in the circular counting area is not less than the second area threshold value.
The present application has been described in detail with reference to specific embodiments and illustrative examples, but the description is not intended to limit the application. Those skilled in the art will appreciate that various equivalent substitutions, modifications or improvements may be made to the presently disclosed embodiments and implementations thereof without departing from the spirit and scope of the present disclosure, and these fall within the scope of the present disclosure. The protection scope of this application is subject to the appended claims.