How to detect bar material
By irradiating a line of light and processing images with a reference figure to detect local minima, the method overcomes brightness and blurring issues in bar stock detection, ensuring accurate and rapid counting.
Patent Information
- Application Number
- JP2021172761
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2025-10-01
- Estimated Expiration
- 2041-10-22
AI Technical Summary
Existing methods for detecting bar stock face challenges in image processing due to changes in brightness, discontinuities, or blurring of transverse contour lines, which complicates reliable and quick counting of bars.
Irradiate a line of light across multiple bars, capture images, and process them using a reference figure to calculate deviation, masking areas to detect local minima, and exclude large errors, ensuring accurate and rapid detection.
Enables reliable and quick detection of bars despite changes in brightness or contour line quality, providing accurate counting.
Smart Images

Figure 0007746799000001 
Figure 0007746799000002 
Figure 0007746799000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a method for detecting bar stock, and more particularly to a method for detecting bar stock that is suitable for confirming whether the required number of bar stocks are being transported when multiple bar stocks are being transported in parallel. [Background technology]
[0002] In Patent Document 1, for example, a method for detecting this type of bar material involves irradiating a linear laser beam across the bar material being transported, and capturing an image of the laser trajectory (transverse contour line) of the irradiated linear laser beam that is repeated in approximately the same shape along the shape of the outer periphery of the bar material (for example, if the bar material is round, the transverse contour line that is repeated in an arc shape), and processing the image to detect the presence of the bar material and count the number of bar material. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 9-305737 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the transverse contour lines that appear on the bar stock change in brightness or become "discontinuous" or "blurred" as the relative position of the bar stock and the imaging device changes, or the surface reflectance changes depending on the material of the bar stock, making image processing difficult. In addition, there is the problem that image processing cannot keep up with the line cycle time due to correction processing, etc.
[0005] Therefore, the present invention aims to solve such problems and provide a method for detecting bars that can reliably and quickly detect bars and count them even if there are changes in brightness, ``interruptions,'' or ``blurring'' in the cross-sectional contour line. [Means for solving the problem]
[0006] In order to solve the above problem, in the first invention, a line of light (L1) is irradiated across a plurality of rods (P1 to P3) having the same cross section, which are conveyed in parallel in the longitudinal direction, to obtain a cross-sectional outline (F) including a portion along the shape of the outer periphery top of each of the rods (P1 to P3). image of With camera (1A, 1B) Get The acquired image is input to a computer (3) and processed within the computer (3), A reference figure (Sc) having the same cross section as the bar material (P1 to P3) is moved from one side to the other in the direction of extension of the transverse contour line (F) so as to intersect with the transverse contour line (F), and the deviation between the reference figure (Sc) and the transverse contour line (F) at each moving position is calculated, and each bar material (P1 to P3) is deemed to be located at a position where the deviation is locally minimum.
[0007] In the first invention, the deviation between the reference figure and the crossing contour line is calculated, and each bar is assumed to be located at the position where the deviation is locally minimum. This makes it possible to reliably and quickly detect and count the bars even if there are changes in brightness, breaks, or blurs in the crossing contour line.
[0008] In the second invention, the calculation of the amount of deviation is performed only between the crossing contour line (F) and the apex range (Tp) of the reference figure (Sc).
[0009] In the second invention, the illumination range of the line light is mostly near the top of the bar, and most of the transverse contour line appears along the outer periphery of the bar, so by calculating the deviation from the transverse contour line only within the top range of the reference figure, bar detection can be performed more quickly.
[0010] In the third invention, the deviation amount is expressed as an error mean value (Ev) obtained by averaging multiple error absolute values (Ea) between the reference figure (Sc) and the transverse contour line (F) obtained at each moving position of the reference figure (Sc), and the error absolute values (Ev) larger than a predetermined value are excluded from the calculation of the error mean value (Ev).
[0011] In the third invention, errors with absolute values greater than a predetermined value are excluded, so that the average error value is calculated only between the apex range of the reference figure and the portion along the outer apex shape of the crossing contour line, allowing for more accurate and rapid bar detection.
[0012] In the fourth invention, the error average value (Ev) is multiplied by a coefficient (k) that increases as the number of error absolute values (Ea) used to calculate the error average value (Ev) decreases.
[0013] In the fourth aspect of the present invention, if the reference figure and the transverse contour line deviate significantly, the number of absolute error values used to calculate the average error value will be reduced, which will lead to an underestimation of the error. In addition, since the average error value may be significantly affected by a small absolute error value that occurs by chance, multiplying the average error value by the coefficient described above will prevent the average error value from becoming too small and resulting in a false detection of the presence of a bar.
[0014] In the fifth invention, In the processing performed in the computer (3), After detecting the first minimum of the deviation amount in the movement direction of the reference figure (Sc), an area determined according to the diameter of the bar material (P1 to P3) is masked before and after the position of the minimum, and then the first minimum of the deviation amount in the movement direction in the area excluded from the masking is detected repeatedly, thereby detecting the local minimum of the deviation amount.
[0015] In the fifth aspect of the present invention, by masking and detecting the first minimum of the deviation amount after masking, it is possible to detect a local minimum without requiring complex calculations.
[0016] The symbols in parentheses above indicate, for reference, the correspondence with specific means described in the embodiments to be described later. [Effects of the Invention]
[0017] As described above, according to the bar detection method of the present invention, it is possible to reliably and quickly detect and count bars even if there are changes in brightness, breaks, or blurs in the cross-sectional contour line. [Brief explanation of the drawings]
[0018] [Figure 1] 1 is a side view and a partial cross-sectional view showing the configuration of an apparatus for carrying out the method of the present invention. [Figure 2] FIG. 1 is a perspective view of a round bar material with a transverse profile line. [Figure 3] FIG. 1 conceptually illustrates a transverse contour generated in a computer. [Figure 4] FIG. 10 is a diagram conceptually illustrating a processing procedure for a crossing contour line. [Figure 5] FIG. 10 shows the curve of change in the error mean value in the direction across the bar. [Figure 6] FIG. 10 is a diagram conceptually showing a processing procedure for a change curve of an error average value. [Figure 7] FIG. 10 is a diagram showing another example of a change curve of an error average value. [Figure 8] FIG. 10 is a diagram conceptually illustrating another example of a processing procedure for a crossing contour line. [Figure 9] FIG. 10 is a diagram showing another example of a change curve of an error average value. DETAILED DESCRIPTION OF THE INVENTION
[0019] The embodiments described below are merely examples, and various design improvements made by those skilled in the art without departing from the gist of the present invention are also included in the scope of the present invention.
[0020] (Embodiment) Figure 1 shows the configuration of an apparatus for carrying out the method of the present invention. Here, Figure 1(1) is a side view of the apparatus, and Figure 1(2) is a partial cross-sectional view of Figure 1(1) viewed from a direction perpendicular to the direction of Figure 1(1). In Figure 1, a plurality of bars P1 to P3 (round bars in this embodiment) are transported in parallel on rollers R (in the direction of the arrow in Figure 1(1)). CCD cameras 1A and 1B are provided above the transported round bars P1 to P3 at positions before and after them in the transport direction, respectively, and a laser device 2 is provided intermediate the two CCD cameras 1A and 1B, which emits a linear laser beam L1 as a line beam downward.
[0021] The image signals obtained by each CCD camera 1A, 1B are input to a computer 3. The linear laser beam L is irradiated so as to cross the round bar materials P1 to P3 in an orthogonal direction (Fig. 1(2)), and a crossing contour line F is generated on the surface of the round bar materials P1 to P3 irradiated with the linear laser beam L1, the crossing contour line F being a repeated arc of the same shape that follows the shape of the outer periphery top (Fig. 2).
[0022] Images of the multiple round bars P1-P3 on the roller R, including each apex where a transverse contour line F is formed, are captured by each CCD camera 1A, 1B, and three-dimensional shape data of the transverse contour line F is generated in a computer 3 from the image signals of these CCD cameras 1A, 1B. From this three-dimensional shape data, cross-sectional shape data of the transverse contour line F in the XZ plane of FIG. 1, which is an orthogonal cross section of each of the round bars R1-R3, is obtained. This is shown in FIG. 3. FIG. 3 shows, as an example, a case where three 50 mm diameter round bars P1-P3 are conveyed side by side in the roller width direction (X direction), and the transverse contour line F is a line connecting portions F1-F3 that curve in an approximately arc shape along the outer periphery of each of the three round bars P1-P3.
[0023] 4 is a conceptual diagram illustrating the processing performed in the computer 3 for the transverse contour line F. A reference circle (reference figure) Sc equal to the diameter (50 mm in this embodiment) of the round bar materials P1 to P3 is set, and this circle is moved from one side to the other in the left-right direction of the transverse contour line F by a predetermined amount (for example, per image resolution) based on the bottom surfaces of the round bar materials P1 to P3 so as to intersect with the transverse contour line F.
[0024] This movement process is shown in sequence in Figures 4(1) to 4(3), and for each movement position of the reference circle Sc, the absolute value Ea of the error between the reference circle Sc and the transverse contour line F is calculated as shown by the arrows in Figures 4(1) and 4(3), and the average value Ev (average error value: deviation amount) is calculated. In this case, the calculation interval for the absolute error value Ea is arbitrary, but may be set to the interval of the measurement resolution, for example.
[0025] When calculating the error average value Ev, the irradiation range of the linear laser beam L1 is mostly near the top of the round bar materials P1 to P3, and the crossing contour line F mostly appears in this range, so calculation is only performed in the top range Tp (Fig. 4) with a central angle of about 90 degrees of the reference circle Sc. In addition, at this time, the error absolute value Eao (Fig. 4(1)) that is equal to or larger than the radius of the reference circle Sc is excluded from the calculation of the error average value Ev.
[0026] In this way, the number of absolute error values Ea required to calculate the error average value is reduced when there is a large deviation between the reference circle Sc and the transverse contour line F. Therefore, when the number of absolute error values Ea required for calculation is small, for example, when only an absolute error value Ea of 30% or less of the reference circle diameter divided by the measurement resolution can be obtained, the error average value Ev is not calculated.
[0027] Furthermore, if the number of obtained error absolute values Ea becomes small, the error average value Ev may appear small even if there is a large deviation between the reference circle Sc and the transverse contour line F. Therefore, in this embodiment, as an example, the number Nd obtained by dividing the diameter of the reference circle Sc by the drawing resolution is divided by the number Nm of obtained error absolute values Ea, and Nd / Nm is used as the coefficient k, and the error average value Ev is multiplied by the coefficient k to prevent the error average value Ev from appearing small.
[0028] As shown in Fig. 4(2), the error average value Ev calculated in this manner becomes locally minimum when the outer periphery of the moving reference circle Sc and each of the approximately arc-shaped curved portions of the transverse contour line F nearly coincide with each other. In this embodiment, there are three approximately arc-shaped curved portions of the transverse contour line F, corresponding to the number of parallel round bars P1 to P3 (see Fig. 3). Therefore, as shown in Fig. 5, the change curve Xe of the error average value Ev calculated at each moving position of the reference circle becomes locally minimum at three locations (arrows in Fig. 5).
[0029] Here, peak detection using differentiation is a common method for detecting local minima, but in this embodiment, local minima can be detected without the need for complex calculations by detecting local minima as follows: When the first minimum of the error average value Ev in the movement direction (X direction) of the reference circle Sc is detected, an area, for example, 1.3 times the diameter of the round bars P1 to P3, is masked (M1 in Figure 6(1)) around the position where the minimum was detected, and the next minimum in the movement direction is detected in this state.
[0030] At the detected position, an area, for example, 1.3 times the diameter of the round bar material P1-P3 is masked (M2 in Figure 6(2)) to detect the next minimum, and so on. By repeating this process of masking and detecting the next minimum in the direction of movement of the reference circle Sc, local minimum values can be detected stably and quickly. This method is possible because the vertices of adjacent round bar materials P1-P3 do not exist within a range of 1.3 bars before or after the vertex of the round bar material P1-P3.
[0031] In this way, the positions of the round bars P1 to P3 are detected by detecting the local minimum values, and the number of round bars P1 to P3 being transported in parallel can be reliably confirmed. According to the above method, even if there is a missing part in the change curve Xe of the error average value Ev and no local minimum value exists, as in part A of Figure 7, the positions of the round bars P1 to P3 can be detected by detecting the minimum value through masking.
[0032] According to the bar detection method of this embodiment, even if the position of the reference circle Sc deviates to some extent above or below the transverse contour line F as shown in Figure 8 (Figure 8 shows the case where it deviates upward), the change curve Xe of the error average value Ev simply fluctuates overall as shown in Figure 9, so there is no problem in detecting the positions of the round bar materials P1 to P3.
[0033] (Other embodiments) In the above embodiment, an example has been described in which round bar materials are detected and the number of pieces thereof is confirmed, but this is not limited to round bar materials, and square bar materials and irregular cross-section materials may also be used. [Explanation of symbols]
[0034] 1A, 1B...CCD camera, 2...laser device, 3...computer, Ea...error absolute value, Ev...error average value, F...transverse contour line, L1...line light, P1, P2, P3...round bar material (rod material), Sc...reference figure.
Claims
1. A method for detecting bars in which a line of light is shone across a plurality of bars of the same cross section that are transported in parallel in the longitudinal direction, an image of the transverse contour line including the portion that follows the shape of the outer periphery top of each bar is obtained by a camera, the obtained image is input into a computer, and processing is performed within the computer to move a reference figure of the same cross section as the bar from one side to the other in the direction of the extension of the transverse contour line so that it intersects with the transverse contour line, the amount of deviation between the reference figure and the transverse contour line at each movement position is calculated, and each bar is deemed to be located at a position where the amount of deviation is locally minimum.
2. 2. The method for detecting a bar material according to claim 1, wherein the calculation of the amount of deviation is performed only between the crossing contour line and the top range of the reference figure.
3. 3. A method for detecting a bar material according to claim 1, wherein the deviation amount is expressed as an average error value obtained by averaging a plurality of absolute error values between the reference figure and the transverse contour line obtained at each moving position of the reference figure, and the absolute error values larger than a predetermined value are excluded from the calculation of the average error value.
4. 4. The method for detecting a bar material according to claim 3, wherein the error average value is multiplied by a coefficient that increases as the absolute value of the error used to calculate the error average value decreases.
5. A method for detecting a bar material as described in any one of claims 1 to 4, in which, in processing performed within the computer, after detecting the first minimum of the deviation amount in the direction of movement of the reference figure, an area determined according to the diameter of the bar material is masked before and after the position where the deviation amount is the minimum, and then the first minimum of the deviation amount in the direction of movement in the area excluded from the masking is detected, thereby detecting a local minimum of the deviation amount.
Citation Information
Patent Citations
Laser number counter
JP1997305737A
Counting method for bar
JP2012226676A