Method for counting the number of round bars.

JP2026168922APending Publication Date: 2026-10-16DAIDO STEEL CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025062483
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-04-04
Publication Date
2026-10-16

AI Technical Summary

Benefits of technology

【0013】 丸棒材の背景からの反射光の影響を受けることなく正確に本数を計数できる丸棒材の本数計数方法を提供する

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026168922000001_ABST
    Figure 2026168922000001_ABST
Patent Text Reader

Abstract

This invention provides a method for counting round bar materials that can accurately count the number of bars without being affected by reflected light from the background. [Solution] Line light L is shone from a lighting device 2 across round bar materials B arranged on a plane, and an image 3a including the line light illumination area is acquired by a camera 3. A brightness change curve X1 of each pixel in the line light direction is obtained from the acquired image 3b of the line light illumination area, and a differential curve X2 is obtained by performing differential processing on the brightness change curve X1. The differential curve X2 is scanned from one end to the other, and the area from the position where the magnitude of the differential value exceeds a predetermined value is defined as the bar material area R. A quadratic approximation curve y is calculated by connecting the brightness values ​​of the brightness change curve X1 from the one end to the bar material area R, and the quadratic approximation curve y is offset by an appropriate amount d in the brightness-high direction. The number of peaks detected by the peak detection curve X3 obtained by subtracting the corresponding values ​​of the quadratic approximation curve y from each brightness value of the brightness change curve X1 is defined as the number of round bars.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for counting the number of round bar materials, and more particularly to a method for counting the number of round bar materials that can accurately count the number of round bar materials by eliminating the influence of reflection from a jig or the like located behind the round bar materials.

Background Art

[0002] Patent Document 1 discloses a method for counting round bar materials arranged on a plane, in which reflected light reflected from the surfaces of the round bars is photographed by a digital imaging means, the reflected light included in the captured image is extracted with a plurality of extraction sensitivities, and the maximum value among the numbers of the reflected light at the respective extraction sensitivities is determined as the number of the round bars.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] However, the above conventional method has a problem that reflected light from the background of the round bar materials is erroneously detected as light originating from the round bar materials, leading to an incorrect count of the number of the round bar materials.

[0005] Accordingly, the present invention is made to solve such a problem, and an object of the present invention is to provide a method for counting the number of round bar materials, which can accurately count the number of the round bar materials without being affected by reflected light from the background of the round bar materials.

Means for Solving the Problems

[0006] To achieve the above objective, in this first invention, line light (L) is irradiated by a lighting device (2) across round bar materials (B) arranged on a plane, an image (3a) including the line light irradiated area is acquired by a camera (3), a brightness change curve (X1) of each pixel in the direction of the line light is obtained in the acquired image (3b) of the line light irradiated area, a differential curve (X2) is obtained by performing differential processing on the brightness change curve (X1), and the magnitude of the differential value is obtained by scanning from one end to the other of the differential curve (X2). The area from the position where the value exceeds a predetermined value is defined as the rod region (R), and a quadratic approximation curve (y) is calculated by connecting the luminance values ​​of the luminance change curve (X1) from one end to the rod region (R). Then, the quadratic approximation curve (y) is offset by an appropriate amount (d) in the direction of increasing luminance, and the corresponding values ​​of the quadratic approximation curve (y) are subtracted from each luminance value of the luminance change curve (X1) to obtain a peak detection curve (X3). A peak detection process is performed on the peak detection curve (X3), and the number of detected peaks is determined as the number of round rods.

[0007] According to this first invention, the number of round bars can be accurately counted without being affected by the influence of reflected light from the background of the round bars, the number of round bars, the degree of reflectivity of the round bars, or the brightness of the image due to differences in the surface texture when the round bars are made of steel.

[0008] In this second invention, the luminance change curve (X1) is defined as the curve of change of the median value of luminance in the line light width direction.

[0009] According to this second invention, by adopting the median value of luminance, the system is less susceptible to the influence of outliers, thus enabling more accurate counting of the number of round bar materials.

[0010] In this third invention, a single wide-angle monocular camera is used as the camera (2).

[0011] According to this third invention, the camera equipment is simplified.

[0012] The reference signs in the parentheses above are provided for reference to show the correspondence with specific means described in the embodiments to be described later. [Effects of the Invention]

[0013] To provide a method for counting the number of round bars that can accurately count the number of round bars without being affected by reflected light from the background of the round bars [Brief Description of the Drawings]

[0014] [Figure 1] It is a perspective view showing the configuration of an apparatus for implementing the method of the present invention. [Figure 2] It is a diagram showing camera images of round bars with different brightness and darkness. [Figure 3] It is a diagram showing camera images of round bars with different numbers. [Figure 4] It is a diagram showing camera images of round bars with different bar diameters. [Figure 5] It is a diagram showing a camera image of round bars in which gaps are formed. [Figure 6] It is a diagram showing a camera image in which the luminance at both end portions is reduced and the entire image is distorted. [Figure 7] It is a diagram showing a camera image in which a luminance change has occurred in the image portion of the jig. [Figure 8] It is a diagram showing a processing flowchart. [Figure 9] It is a diagram showing a camera image and a luminance change image obtained by extracting a part thereof. [Figure 10] It is a diagram showing a luminance median change curve and a differential processing curve. [Figure 11] It is an enlarged view of the luminance median change curve in the bar material region. [Figure 12] It is a diagram showing a process of obtaining a peak detection curve from the luminance median change curve. [Figure 13] It is a diagram of the peak detection curve after peak detection processing is completed. [Mode for Carrying Out the Invention]

[0015] Note that the embodiments described below are merely examples, and various design improvements made by those skilled in the art within the scope not departing from the gist of the present invention are also included in the scope of the present invention.

[0016] Figure 1 shows the configuration of an apparatus for implementing the method of the present invention. In Figure 1, steel round bars B that have completed spark inspection are supplied onto a workbench 1, and an illuminating device 2 that irradiates line light L over the entire length of the workbench 1 so as to traverse these round bars B is installed above the workbench 1. A wide-angle monocular camera 3 is also provided above the workbench 1, which acquires an image including the area irradiated with the line light L, and the image data is sent to a processing device 4 that performs each process described later to count the number of the round bars B. Behind (below) the round bars B irradiated with the line light L, as a jig 5 that prevents background reflection and homogenizes the background, a black long plate with a constant width is installed obliquely over the entire length of the workbench 1.

[0017] As characteristics of the above round bars B, the surface texture and steel type vary from lot to lot, and the brightness and darkness of the image change as shown in Figures 2(1) and (2). Note that the horizontally long high-brightness region in the image is the region irradiated with the line light L (the same applies to the images shown below).

[0018] In addition, the number of supplied round bars B varies greatly from about 1 to about 60 as shown in Figures 3(1) and (2). The bar diameter also varies greatly, for example from 14mm to 35mm, as shown in Figures 4(1) and (2).

[0019] Furthermore, the timing at which the round bars B are supplied is not continuous, and gaps (the regions enclosed by white lines in the figure) as shown in Figure 5 are generated between the round bars B on the workbench 1, and the jig 5 is exposed during this period.

[0020] In addition, since the round bars B have a circumferential surface, the reflection of illumination light is strong at the central round bar and the reflection becomes weaker closer to both ends of the image, which combined with the use of the wide-angle monocular camera 3 for simplification of the apparatus, as shown in Figure 6, the image brightness decreases closer to both ends of the image, and image distortion (trapezoidalization) as indicated by the white lines in Figure 6 also occurs.

[0021] Furthermore, ambient light, dirt, etc., can cause changes in brightness in the image portion of the jig 5, as shown in Figure 7.

[0022] Therefore, a method for reliably counting the round bar material B even when the brightness of the image obtained by camera 3 changes in various ways due to the above causes will be explained below with reference to the flowchart in Figure 8.

[0023] In step 101 of Figure 8, a brightness change image 3b is extracted from the camera image 3a (Figure 9(1)) of the band-shaped region (the area enclosed by the white line in Figure 9(1)) where the jig 5 is positioned behind the line light illumination area and the background is stable (Figure 9(2)). In step 102, the brightness change image 3b is smoothed using a Gaussian filter or the like, and then the median brightness in the image width direction at each point in the longitudinal direction of image 3b is calculated to obtain a brightness median change curve X1 (Figure 10(1)). The reason for using the brightness median is that it is less affected by outliers.

[0024] In the following step 103, the luminance median change curve X1 is differentiated. As shown in Figure 10(2), the differentiated curve X2 rises sharply where the change in the luminance median is large. Therefore, the differentiated curve X2 is scanned from one end (the left end in this embodiment) to the other end, and the area from the point where the magnitude of the derivative exceeds a predetermined value is determined to be the bar material region R where the round bar materials B exist. Figure 11 shows an enlarged view of the bar material region R of the luminance median change curve X1. If we consider that the part of the luminance median change curve X1 in the bar material region R that shows the peak value (maximum value) corresponds to each round bar material B, then the number of round bar materials B can be counted.

[0025] However, as mentioned above, changes in brightness can occur even in the image portion of jig 5 where no round bar material B exists. Therefore, when scanning from one end to the other, if there is a point where the magnitude of the differential value exceeds a predetermined value, the area from that point onward is determined to be the bar material region R. If there is a part within the determined region that shows a peak value, the counting of the number of round bar materials B will be incorrect.

[0026] This means that even if the bar material area R is correctly determined, if a gap occurs between the round bar materials B as described above (see Figure 5), the brightness change in the image portion of the jig 5 that occurs in this gap will cause a peak value to appear, resulting in a similar error in counting the number of bars.

[0027] Therefore, in step 104, a quadratic approximation curve y (y = ax^2 + bx + c) (Figure 12(1)) is calculated for the luminance median change curve X1 outside the rod material region R, and the calculated quadratic approximation curve y is offset in the luminance upward direction by an appropriate amount d greater than the expected luminance change amount of the jig 5 image (Figure 12(2)). Then, in step 105, the corresponding values ​​of the offset quadratic approximation curve y are subtracted from each luminance value of the luminance median change curve X1 to obtain a peak detection curve X3 from which peaks occurring in the image portion of the jig 5 other than the round rod material B have been removed (Figure 12(3)).

[0028] Furthermore, the reason why the curve of change in the median luminance outside the bar material region R1 (and the line connecting the local minimums of the curve of change in the median luminance within the bar material region R1) is a curved curve approximated by a quadratic curve is, as mentioned above, because the round bar material B has a circumferential surface, the reflection of illumination light is strong at the central round bar material B, and the reflection weakens and the luminance decreases as you get closer to both ends of the image.

[0029] After the above processing, in step 106, a peak detection process is performed on the peak detection curve X3, and the number of detected peaks is accumulated to determine the number of round bar materials B (step 107). In this embodiment, this peak detection process is performed using the find_peaks function of the Python scipy library.

[0030] The `find_peaks` function described above allows you to detect only peaks exceeding a specific threshold by setting the `height` parameter appropriately, and to prevent over-detection of closely spaced peaks by specifying the minimum distance between peaks by setting the `distance` parameter appropriately. Furthermore, by setting the `prominence` parameter appropriately, you can detect peaks that stand out higher than their surroundings, and by setting the `width` parameter appropriately, you can detect only peaks with a specific width.

[0031] Figure 13 shows the peak detection process applied to the peak detection curve X3 described above, with the × marks in Figure 13 indicating peaks. By accumulating the number of these peaks, the exact number of round bar materials B can be counted.

[0032] In the above embodiment, the camera does not necessarily have to be a single wide-angle monocular camera. Also, if the brightness of the round bar material is stable, it is not necessarily required to use the median brightness value. Furthermore, if the background of the round bar material is stable, a jig is not necessary. Also, the round bar material is not limited to steel. [Explanation of Symbols]

[0033] 1...Workbench, 2...Lighting fixture, 3...Camera, 3a...Camera image, 3b...Brightness change image, 4...Processing device, L...Line light, R...Rod material area, X1...Brightness change curve, X2...Differentiation processing curve, X3...Peak detection curve, y...Quadratic approximation curve.

Claims

1. A method for counting round bars, comprising: illuminating round bars arranged on a plane with a light source so as to cross the line light illumination area; acquiring an image including the line light illumination area with a camera; obtaining a brightness change curve for each pixel in the line light direction in the acquired image of the line light illumination area; performing differential processing on the brightness change curve to obtain a differential curve; scanning the differential curve from one end to the other and defining the area from the position where the magnitude of the differential value exceeds a predetermined value as the bar area; calculating a quadratic approximation curve that connects the brightness values ​​of the brightness change curve from the one end to the bar area; then offsetting the quadratic approximation curve by an appropriate amount in the brightness-high direction; subtracting the corresponding values ​​of the quadratic approximation curve from each brightness value of the brightness change curve to obtain a peak detection curve; and performing peak detection processing on the peak detection curve, with the number of detected peaks being the number of round bars.

2. The method for counting the number of round bar materials according to claim 1, wherein the brightness change curve is obtained by smoothing the image of the line light irradiation area and then using the curve of change of the median brightness in the line light width direction of the smoothed image.

3. The method for counting the number of round bar materials according to claim 1, wherein a wide-angle monocular camera is used as the camera.

Citation Information

Patent Citations

  • Round bar number counting device, round bar number counting method, and round bar number counting program

    JP2010003255A