Bar counting method
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- DAIDO STEEL CO LTD
- Filing Date
- 2024-03-27
- Publication Date
- 2026-07-30
AI Technical Summary
Existing methods struggle to accurately count the number of bundled rods due to variations in brightness caused by paint or heat treatment, making it difficult to reliably determine the end face diameter and count the rods.
Utilizing a depth image to visualize distance information, scanning areas corresponding to the known size of the end face, and identifying regions with minimal depth value variation to determine the number of bundled rods.
Enables reliable counting of bundled rods regardless of brightness variations, ensuring accurate determination of the number of rods.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a method for counting rods that count the number of rods bundled together. [Background technology]
[0002] As an example of this type of bar counting method, Patent Document 1 describes a method in which end face images of a bundle of bars are taken with a CCD camera, and the bar shape models are sequentially matched to the end face images, and the number of matches is calculated to count the bars. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 2018-22395 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the brightness of the end faces of bars, especially steel bars, varies widely depending on the degree of paint or heat treatment, or whether or not labels are attached, making it difficult to accurately determine the end face diameter of each bar on the image, and there was a problem in that it was not possible to reliably count the number of bundled bars.
[0005] SUMMARY OF THE INVENTION The present invention is intended to solve such problems, and has as its object to provide a method for counting rods that can reliably count the number of bundled rods. [Means for solving the problem]
[0006] In order to achieve the above object, in the first invention, a depth image (Fd) is obtained that visualizes the distance information to each end face (11) of multiple bundled rods (1) of the same diameter, and an area (C, Cre) in the depth image (Fd) corresponding to the known size of the end face (11) of the rod (1) is scanned within the depth image, and the area with the smallest variation in depth values within the area (C, Cre) is determined to be the image area (Co, Cne) of the end face of each rod (1), and the number of image areas (Co, Cne) is calculated to determine the number of bundled rods (1).
[0007] According to the first invention, the image area of the end face can be reliably identified by taking advantage of the fact that the variation in depth values is small in the area corresponding to the end face of the rod in the depth image, and the number of bundled rods can be reliably counted regardless of variations in the brightness of the end face due to painting, etc.
[0008] In the second invention, a depth image (Fd) is acquired that visualizes distance information to each end face (11) of a plurality of bundled rods (1) of the same diameter, and an area (C) corresponding to a known size of the end face (11) of the rod (1) is scanned within the depth image (Fd). When the variation in depth values within the area (C) is minimized, this is designated as an initial rod area (Co). A certain image area adjacent to the initial rod area (Co) is designated as a search area (C1). Within the search area (C1), an area (Cre) corresponding to the known size of the end face (11) of the rod (1) is scanned to minimize the variation in depth values within the area (Cre). The area with the smallest amount of sticking is designated as the nearby bar area (Cne), and a certain image area adjacent to the nearby bar area (Cne) is set as a new search area (C1). Within the new search area (C1), an area (Cre) corresponding to the known size of the bar (1) is scanned, and the area within the area (Cre) with the smallest depth value variation is designated as the new nearby bar area (Cne). The procedure for identifying these nearby bar areas (Cne) is repeated within the depth image (Fd), and the sum of the number of the initial bar areas (Co) and the number of the nearby bar areas (Cne) is designated as the number of bundled bars (1).
[0009] According to the second invention, by identifying the initial bar region and the neighboring bar regions by a repetitive procedure, in addition to the effect of the first invention, the number of bars can be counted more efficiently.
[0010] 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]
[0011] As described above, according to the bar counting method of the present invention, the number of bundled bar materials can be reliably counted. [Brief explanation of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram showing the configuration of an apparatus for carrying out the method of the present invention. [Figure 2] FIG. 10 is a diagram illustrating an example of a depth image. [Figure 3] FIG. 10 is a diagram showing an image of an approximate rectangular region. [Figure 4] 10 is a flowchart of a number counting process. [Figure 5] 10 is a flowchart of an initial circle search routine. [Figure 6] 10 is a flowchart of a neighborhood circle search routine. [Figure 7] 10 is a flowchart of a neighboring circle identification routine. [Figure 8] 10 is a flowchart of a global region processing routine. [Figure 9] 10 is a flowchart of a local region processing routine. [Figure 10] 10 is a flowchart of a routine for searching circles within a region. [Figure 11] FIG. 10 is a diagram illustrating a process of searching for an initial circle within a rectangular approximation region. [Figure 12] FIG. 10 is a diagram showing the initial circular region removed from the rectangular approximation region. [Figure 13] FIG. 10 is a diagram showing a global region set to the left of the initial circular region within a rectangular approximation region. [Figure 14]FIG. 10 illustrates a process of searching for nearby circles within a global region. [Figure 15] This is a diagram showing a local region set to the left of the initial circular region. [Figure 16] FIG. 10 is a diagram illustrating a process of searching for nearby circles within a local area. [Figure 17] FIG. 10 is a diagram showing a rectangular approximation region in which the neighboring circular region has been removed. [Figure 18] FIG. 10 is a diagram illustrating a procedure for identifying an initial circle and neighboring circles. [Figure 19] FIG. 10 is a diagram showing the process of removing a neighboring circular area from a rectangular approximation area. [Figure 20] FIG. 10 is a diagram showing a state in which the initial circle and all neighboring circle areas have been excluded from the rectangular approximation area. DETAILED DESCRIPTION OF THE INVENTION
[0013] 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.
[0014] 1 shows the configuration of an apparatus for carrying out the method of the present invention, in which a TOF camera 2 is installed facing the end face 11 of a plurality of bundled round steel bars (bars) 1, and the image captured by the TOF camera 2 is sent to a processing device 3. The TOF camera 2 is equipped with a light-emitting unit and an image sensor, and by irradiating a subject with pulsed light from the light-emitting unit and measuring the time of flight for each pixel, a two-dimensional image containing depth distance information is obtained.
[0015] The image captured by the TOF camera 2, including the area around the bar 1, is sent to a processing device 3 incorporating a computer, where preprocessing such as distance thresholding and noise removal is performed to obtain a depth image that visualizes the distance near the end face 11 of the bar 1. An example of the depth image Fd is shown in Figure 2. Each pixel in the depth image Fd has a depth value, which is a depth distance value. The depth image Fd shown in Figure 2 is a grayscale image in which the depth value of each pixel is converted to a predetermined brightness level for visualization. Because the end face 11 of the bar 1 is approximately flat, the distance from the TOF camera 2 to each end face 11 of the bar 1 is approximately equal, and therefore the variation in the depth values of the pixels that make up the image of the end face 11 is small.
[0016] The processing device 3 creates a rectangular approximation region RoI-S as shown in Fig. 3. This is obtained by approximating and binarizing the depth image Fd as a collection of many small rectangular pieces. This rectangular approximation region RoI-S is a region in which the circular regions C and Cre are moved to search for an initial circle (initial bar region) and nearby circles (neighboring bar regions), as will be described later. In this embodiment, the bar 1 is a round steel bar, so the initial bar region is the initial circle and the nearby bar region is the nearby circle.
[0017] The following describes the process of counting the number of bars 1 executed by the processing device 3. As shown in Fig. 4, the process of counting the number of bars 1 is made up of an initial circle search routine Rou1 and a nearby circle search routine Rou2.
[0018] (Initial circle search routine) Figure 5 shows the details of the initial circle search routine Rou1. In Figure 5, in step 101, the circular area C at the start of the search is set to the lowest position of the approximation area RoI-S (see Figure 11). Here, Ymax is the maximum y coordinate of the rectangular approximation area RoI-S, and R is the radius of the circular area C, which is the known radius of the bar 1. Next, in step 102, the x coordinate at the start of the search is set to 0, and the value of the standard deviation std is initialized to an appropriate value +Inf.
[0019] In steps 103 to 109, the circular area C with center (x, y) and radius R is moved in the X-axis direction at the lowest position (arrow in Figure 11), and during the movement process, the standard deviation stdc of the depth values within the depth image area corresponding to the circular area C is calculated, and the circular area C with the center position (xc, yc) with the smallest standard deviation, i.e., the smallest variation in depth values, is stored as the initial circle Co of circle number 1 (step 110), and in the subsequent step 111, the area of the initial circle Co is excluded from the rectangular approximation area RoI-S (Figure 12).
[0020] (Nearby circle search routine) Fig. 6 shows the details of the nearby circle search routine Rou2. In step 201 of Fig. 6, n is set to 1 to specify the circle number to be used as the reference circle in the following step 202, and the reference circle Cst is read in step 202. That is, the circle with circle number n (the initial circle Co with circle number 1 the first time) is read and used as the reference circle Cst. The center coordinates (xb, yb) of the reference circle Cst are the center coordinates (xc, yc) of the initial circle Co the first time. After the first time, the center coordinates (xb, yb) of the reference circle Cst become the center coordinates (xd, yd) of the nearby circle Cne, which will be described later.
[0021] After step 202, a nearby circle identification processing routine Rou3 is performed. Details of the nearby circle identification processing routine Rou3 are shown in Fig. 7. In the nearby circle identification processing routine Rou3, the procedures from the global area processing routine Rou4 onwards are executed for the left side (x≦xb) of the reference circle Cst, then the procedures from the global area processing routine Rou7 onwards are executed for the right side (x≧xb) of the reference circle Cst, and then the procedures from the global area processing routine Rou8 onwards are executed for the upper side (y≧yb) of the reference circle Cst.
[0022] Taking the global region processing routine Rou4 on the left side of the reference circle Cst as an example, in step 401 in Figure 8, a segmented circular region of radius R1 is generated with center (xb, yb) (initial search is (xc, yc)), and this is stored as the global region C1, the first search region (step 402, Figure 13). The radius R1 is set to about 3.5R. This is based on the assumption that a rod with a radius of R is in contact with a rod with a diameter of 2R, with an additional margin of 0.5R around the periphery.
[0023] In the subsequent region circle search routine Rou6 (Figure 7), as shown in detail in Figure 10, the global region C1 is read (step 601), and it is confirmed that a circular region Cre of radius R can be generated within the global region C1 (step 602).The circular region Cre is then repeatedly moved in the X-axis direction while being shifted in the Y-axis direction within the global region C1 (arrows in Figure 14).During this movement process, the standard deviation of the depth values within the depth image region corresponding to the circular region Cre is calculated, and if a circular region Cre with the smallest standard deviation is found, its center coordinates (xd, yd) are stored (step 603).
[0024] Thereafter, if it is confirmed in step 301 of Figure 7 that the circular region Cre exists, the local region processing routine Rou5 is executed. In this routine Rou5, as shown in step 501 of Figure 9, a segmented circular region with a radius R2 and center coordinates at (xd, yd) is generated and stored as a local region C2, which is the second search region (step 502, Figure 15). The radius R2 is set to about 2.5R. This means that a segmented circular region with a diameter of 2R is set centered at (xd, yd), and an additional margin of 0.5R is provided around the periphery.
[0025] In the subsequent region-inside-circle search routine Rou6, a circular region Cre of radius R is repeatedly moved in the X-axis direction while being shifted in the Y-axis direction within the local region C2 (arrows in FIG. 16) using the same procedure as previously described (see FIG. 10). During this movement, the standard deviation of the depth values within the depth image region corresponding to the circular region Cre is calculated, and the center coordinates (xd, yd) of the circular region Cre with the smallest standard deviation are stored. Then, in step 302 of FIG. 7, the circular region Cre is identified as the neighboring circle Cne, and the circle number Nmax (initial value 1) for storing the circle number is incremented to 2, and the coordinates (xd, yd) are stored as the center coordinates of the neighboring circle Cne. The region of the neighboring circle Cne is then excluded from the rectangular approximation region RoI-S (step 303, FIG. 17). The above procedure is similarly performed in the global region processing routines Rou7, Rou8, and subsequent procedures.
[0026] When the neighboring circle identification processing routine Rou3 is completed, the process proceeds to step 203 in FIG. 6, and if the value of n specifying the circle number is equal to or less than the value of Nmax, n is counted up (step 204).
[0027] 18(1) to (5) show an example of the identification procedure for the initial circle (circle number 1) and neighboring circles (circle numbers 2 to 5) in this order until the circle number of the neighboring circle Cne specified by Nmax becomes 5, and the value of Nmax at that time. In FIGS. 18(1) and (5), the initial circle with circle number 1 specified by n and the neighboring circle with circle number 2 are read as reference circles, respectively, and become the basis for identifying new neighboring circles in the next stage.
[0028] The above-described neighboring circle search routine Rou2 (FIG. 6) is repeated until the value of n exceeds the value of Nmax (step 203 in FIG. 6), and the process ends when the value of n exceeds the value of Nmax. The value of n exceeds the value of Nmax when no new neighboring circles Cne are found in the neighboring circle identification processing routine Rou3, which means that the image portions of all the bar end faces 11 in the depth image Fd (FIG. 2) have been counted.
[0029] By this processing, the areas of the neighboring circles Cne are successively excluded from the rectangular approximation area RoI-S as shown in Figure 19, and the processing is continued until finally there are no neighboring circles Cne (Figure 20), and the circle number Nmax at this time indicates the number of bundled rods 1.
[0030] (Other embodiments) Although the above embodiment is directed to a round steel bar, the present invention is not limited to a round bar, and does not necessarily have to be a steel bar. The procedure for identifying the initial circle and the neighboring circles described in the above embodiment is an example for efficiently performing this by a computer, and is not limited to this. Although the initial circle and the neighboring circles are identified by setting a rectangular approximation region and scanning a circular region within this region, the present invention is not limited to this interpolation method. In addition, although a global region and a local region are set as search regions for the neighboring circles, only the global region may be set. Furthermore, the setting of the left, right, and upper global regions is merely an example and is not limited to this. [Explanation of symbols]
[0031] 1...bar material, 11...end surface, 2...TOF camera, 3...processing device, Co...initial circle, Cne...neighboring circle, C1...global region, C2...local region, Fd...depth image, RoI-S...rectangular approximation region.
Claims
1. A rod counting method in which a depth image is obtained that visualizes the distance information to each end face of multiple rods of the same diameter that are bundled together, an area in the depth image that corresponds to the known size of the end face of the rod is scanned, and the area with the smallest variation in depth values within that area is considered to be the image area of the end face of each of the rods, and the number of such image areas is calculated to determine the number of rods bundled together.
2. A bar counting method in which a depth image is obtained that visualizes distance information to each end face of multiple bundled rods of the same diameter, an area in the depth image corresponding to the known size of the end faces of the rods is scanned, and if the variation in depth values within that area is the smallest, this is designated as an initial bar area, a fixed image area adjacent to the initial bar area is designated as a search area, an area within that search area corresponding to the known size of the end faces of the rods is scanned, and the area within that search area with the smallest variation in depth values is designated as a neighboring bar area, a fixed image area adjacent to the neighboring bar area is set as a new search area, an area within the new search area corresponding to the known size of the rods is scanned, and the area within that new search area with the smallest variation in depth values is designated as a new neighboring bar area, and the procedure of identifying these neighboring bar areas is repeated within the depth image, and the sum of the number of the initial bar areas and the number of the neighboring bar areas is calculated to be the number of bundled rods.