JP5788367B2 - Long object number measuring device, long object number measuring method, and computer program - Google Patents

Long object number measuring device, long object number measuring method, and computer program Download PDF

Info

Publication number
JP5788367B2
JP5788367B2 JP2012173112A JP2012173112A JP5788367B2 JP 5788367 B2 JP5788367 B2 JP 5788367B2 JP 2012173112 A JP2012173112 A JP 2012173112A JP 2012173112 A JP2012173112 A JP 2012173112A JP 5788367 B2 JP5788367 B2 JP 5788367B2
Authority
JP
Japan
Prior art keywords
color
image
grayscale
face
group
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
JP2012173112A
Other languages
Japanese (ja)
Other versions
JP2014032553A (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.)
Nippon Steel Corp
Nippon Steel Texeng Co Ltd
Original Assignee
Nippon Steel Corp
Nippon Steel Texeng 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 Nippon Steel Corp, Nippon Steel Texeng Co Ltd filed Critical Nippon Steel Corp
Priority to JP2012173112A priority Critical patent/JP5788367B2/en
Publication of JP2014032553A publication Critical patent/JP2014032553A/en
Application granted granted Critical
Publication of JP5788367B2 publication Critical patent/JP5788367B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、長尺物本数測定装置、長尺物本数測定方法、及びコンピュータプログラムに関し、特に、長尺物の画像を撮像し、撮像した画像に基づいて長尺物の本数を測定するために用いて好適なものである。   The present invention relates to a long object number measuring device, a long object number measuring method, and a computer program, and in particular, for capturing an image of a long object and measuring the number of long objects based on the captured image. It is suitable for use.

従来から、鉄鋼業では、棒鋼や鋼管等、製造された長尺物の本数を計数することが行われている。例えば、出荷前に出荷ロットの荷揃え等のために、製造された鋼管を、同一の仕様の鋼管毎に、スタックと呼ばれる保管場所に保管することが行われている。そして、出荷する鋼管の本数の確認等のために、スタックに保管されている鋼管の本数を出荷前に測定することが必要になる。そこで、従来は、スタックに保管されている鋼管を作業員が目視で計数するようにしていた。1つのロットに含められる鋼管の数が多くなると、多数の鋼管が1つのスタックに段積みされることになるので、このように作業員が目視で鋼管を計数すると、ヒューマンエラーが発生し、出荷すべき本数の鋼管を出荷できなくなる虞がある。そこで、このような長尺物の計数を人手によらずに自動的に計数する技術が望まれていた。この種の技術として、特許文献1に記載の技術がある。   Conventionally, in the steel industry, counting the number of manufactured long objects such as steel bars and steel pipes has been performed. For example, the manufactured steel pipes are stored in a storage place called a stack for each steel pipe having the same specification for the purpose of assembling a shipping lot before shipping. In order to confirm the number of steel pipes to be shipped, etc., it is necessary to measure the number of steel pipes stored in the stack before shipping. Therefore, conventionally, an operator visually counts the steel pipes stored in the stack. When the number of steel pipes included in one lot increases, a large number of steel pipes are stacked in a single stack, so if an operator visually counts steel pipes in this way, a human error occurs and the shipment There is a risk that the required number of steel pipes cannot be shipped. Therefore, there has been a demand for a technique for automatically counting such a long object without manually. As this type of technology, there is a technology described in Patent Document 1.

特許文献1に記載の技術では、まず、棒鋼材の端面を撮像した端面画像と、棒鋼材の側面を撮像した側面画像とを取得し、端面画像に基づいて、棒鋼材が積み重なっているか否かを判定する。そして、棒鋼材が積み重なっている場合には、端面画像に基づく棒鋼材の計数値と、側面画像に基づく計数値とのうち、大きい方を棒鋼材の本数とする。   In the technique described in Patent Document 1, first, an end surface image obtained by imaging the end surface of the steel bar and a side image obtained by imaging the side surface of the steel bar are obtained, and whether or not the steel bars are stacked based on the end surface image. Determine. When the steel bars are stacked, the larger one of the count values of the steel bars based on the end face images and the count values based on the side images is set as the number of the steel bars.

特開2003−99755号公報JP 2003-99755 A

前述したように、1つのロットに含められる長尺物の数が多くなると、多数の長尺物が段積みされることになる。しかしながら、特許文献1に記載の技術では、棒鋼材が段積みされている場合には、棒鋼材を正確に計数することができないという問題があった。
また、段積みされている長尺物は、通常、相互に隣接している長尺物の少なくとも1つと接触している。このため、特許文献1に記載の技術では、段積みされている長尺物の端面の撮像画像から、個々の長尺物を抽出することができない。特に、端面が開口していない状態の長尺物については、当該端面を照明したときの当該端面における輝度差が小さいため、段積みされている長尺物が1つの大きな領域として認識されてしまう。よって、端面が開口していない状態の複数の長尺物が段積みされている場合に、当該複数の長尺物の端面の撮像画像から、個々の長尺物を抽出する技術が望まれている。
As described above, when the number of long objects included in one lot increases, a large number of long objects are stacked. However, the technique described in Patent Document 1 has a problem that the steel bars cannot be accurately counted when the steel bars are stacked.
In addition, the stacked long objects are usually in contact with at least one of the adjacent long objects. For this reason, with the technique described in Patent Document 1, individual long objects cannot be extracted from the captured images of the end surfaces of the stacked long objects. In particular, for a long object whose end face is not open, the luminance difference at the end face when the end face is illuminated is small, so that the stacked long object is recognized as one large area. . Therefore, when a plurality of long objects whose end faces are not open are stacked, a technique for extracting individual long objects from the captured images of the end faces of the plurality of long objects is desired. Yes.

また、出荷後に鋼管の中に異物が混入することを防止すること等の理由から、鋼管の端面に、顧客から指定された色で着色されたキャップが付けられることがある。また、ロットを識別すること等の理由から、棒鋼の端面が着色されていることがある。このように、端面が着色された状態の長尺物の端面の画像を撮像した場合、特許文献1に記載の技術では、当該長尺物の端面の色と、その背景の色との関係によっては、当該長尺物を認識することができない。
以上のように、端面が開口していない状態であり且つ着色されている状態の複数の長尺物が段積みされている場合に、当該複数の長尺物の端面の撮像画像から、個々の長尺物を抽出して、それらの本数を測定する技術が望まれている。
In addition, a cap colored with a color designated by the customer may be attached to the end surface of the steel pipe in order to prevent foreign matters from entering the steel pipe after shipment. In addition, the end face of the steel bar may be colored for reasons such as identifying a lot. Thus, when the image of the end surface of the long object in which the end surface is colored is captured, according to the technique described in Patent Document 1, the relationship between the color of the end surface of the long object and the color of the background is used. Cannot recognize the long object.
As described above, when a plurality of long objects in a state where the end surfaces are not open and colored are stacked, individual images are taken from the captured images of the end surfaces of the plurality of long objects. A technique for extracting long objects and measuring their number is desired.

本発明は、以上の事情に鑑みてなされたものであり、端面が開口していない状態であり且つ着色されている状態の複数の長尺物が段積みされている場合であっても、当該段積みされている複数の長尺物の本数を自動的に且つ正確に測定できるようにすることを目的とする。   The present invention has been made in view of the above circumstances, even when a plurality of elongated objects in a state where the end face is not open and colored are stacked. It is an object to enable automatic and accurate measurement of the number of a plurality of long objects stacked.

本発明の長尺物本数測定装置は、端面が開口していない状態であり且つ所定の色で着色されている状態である複数の長尺物の本数であって、相互に隣接する長尺物の少なくとも一部の領域に隙間が形成されるように段積みされている複数の長尺物の本数を測定する長尺物本数測定装置であって、前記複数の長尺物の端面を撮像することにより得られたカラー画像である元画像を取得する元画像取得手段と、前記元画像取得手段により取得された元画像から、前記端面の色に応じて予め設定された第1の色空間要素の値を導出し、それぞれの画素が、当該第1の色空間要素の値に応じた画素値を有する第1のグレースケール画像を作成する第1のグレースケール画像作成手段と、前記第1のグレースケール画像作成手段により作成された第1のグレースケール画像を2値化してグレースケール2値化画像を作成するグレースケール2値化画像作成手段と、前記グレースケール2値化画像作成手段により作成されたグレースケール2値化画像に基づいて、前記端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離する領域分離手段と、前記領域分離手段により分離された領域の数に基づいて、前記複数の長尺物を計数する計数手段と、前記計数手段により計数された前記複数の長尺物の数を含む情報を出力する出力手段と、を有し、前記第1の色空間要素は、前記段積みされている複数の長尺物の端面の色である場合と、前記段積みされている複数の長尺物の端面の背景の色である場合とで異なる値をとる要素であることを特徴とする。   The long object number measuring device of the present invention is the number of a plurality of long objects in which the end face is not open and is colored in a predetermined color, and is adjacent to each other. A long object number measuring apparatus for measuring the number of a plurality of long objects stacked so that a gap is formed in at least a part of a region, and imaging an end face of the plurality of long objects An original image acquisition unit that acquires an original image that is a color image obtained by the above, and a first color space element that is preset according to the color of the end face from the original image acquired by the original image acquisition unit A first grayscale image creating means for creating a first grayscale image in which each pixel has a pixel value corresponding to the value of the first color space element; The first created by the gray scale image creating means Based on the grayscale binarized image creating means for binarizing the grayscale image to create a grayscale binarized image, and the grayscale binarized image created by the grayscale binarized image creating means, By identifying a group of areas having pixel values corresponding to the color of the end face, and moving the outer edge and the inner edge of the identified group of areas in the direction in which the group of areas exists. A region separating unit that separates the group of regions into a plurality of regions, a counting unit that counts the plurality of long objects based on the number of regions separated by the region separating unit, and the counting unit. Output means for outputting information including the counted number of the plurality of long objects, and the first color space element is a color of the end faces of the plurality of long objects stacked. And wherein the coupling and an element varies accordingly in the case of the color of the background of the end faces of the plurality of elongated article being stacked the stage.

本発明の長尺物本数測定方法は、端面が開口していない状態であり且つ所定の色で着色されている状態である複数の長尺物の本数であって、相互に隣接する長尺物の少なくとも一部の領域に隙間が形成されるように段積みされている複数の長尺物の本数を測定する長尺物本数測定方法であって、前記複数の長尺物の端面を撮像することにより得られたカラー画像である元画像を取得する元画像取得工程と、前記元画像取得工程により取得された元画像から、前記端面の色に応じて予め設定された第1の色空間要素の値を導出し、それぞれの画素が、当該第1の色空間要素の値に応じた画素値を有する第1のグレースケール画像を作成する第1のグレースケール画像作成工程と、前記第1のグレースケール画像作成工程により作成された第1のグレースケール画像を2値化してグレースケール2値化画像を作成するグレースケール2値化画像作成工程と、前記グレースケール2値化画像作成工程により作成されたグレースケール2値化画像に基づいて、前記端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離する領域分離工程と、前記領域分離工程により分離された領域の数に基づいて、前記複数の長尺物を計数する計数工程と、前記計数工程により計数された前記複数の長尺物の数を含む情報を出力する出力工程と、を有し、前記第1の色空間要素は、前記段積みされている複数の長尺物の端面の色である場合と、前記段積みされている複数の長尺物の端面の背景の色である場合とで異なる値をとる要素であることを特徴とする。   The method for measuring the number of long objects of the present invention is the number of a plurality of long objects that are in a state where the end face is not open and is colored in a predetermined color, and are adjacent to each other. A method for measuring the number of a plurality of long objects stacked so that a gap is formed in at least a part of a region, wherein the end faces of the plurality of long objects are imaged. An original image acquisition step of acquiring an original image which is a color image obtained by the above, and a first color space element set in advance according to the color of the end face from the original image acquired by the original image acquisition step A first grayscale image creating step of creating a first grayscale image in which each pixel has a pixel value corresponding to the value of the first color space element; The first created by the grayscale image creation process Based on the grayscale binarized image creating step for binarizing the grayscale image to create a grayscale binarized image, and the grayscale binarized image created by the grayscale binarized image creating step, By identifying a group of areas having pixel values corresponding to the color of the end face, and moving the outer edge and the inner edge of the identified group of areas in the direction in which the group of areas exists. A region separation step of separating the group of regions into a plurality of regions, a counting step of counting the plurality of long objects based on the number of regions separated by the region separation step, and the counting step. An output step for outputting information including the counted number of the plurality of long objects, wherein the first color space element is a color of an end face of the plurality of long objects stacked. And wherein the coupling and an element varies accordingly in the case of the color of the background of the end faces of the plurality of elongated article being stacked the stage.

本発明のコンピュータプログラムは、前記長尺物本数測定装置の各手段としてコンピュータを機能させることを特徴とする。   The computer program according to the present invention causes a computer to function as each means of the long object number measuring apparatus.

本発明によれば、段積みされている複数の長尺物の端面を撮像することにより得られたカラー画像である元画像から、端面の色であるときの値が可及的に大きくなる又は小さくなる要素である第1の色空間要素の値に応じた画素値を有する第1のグレースケール画像を生成し、当該第1のグレースケール画像を2値化してグレースケール2値化画像を生成する。そして、当該グレースケール2値化画像に基づいて、端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離し、分離した領域の数に基づいて、複数の長尺物を計数する。したがって、端面が開口していない状態であり且つ着色されている状態の長尺物が段積みされている場合であっても、当該段積みされている長尺物の本数を自動的に且つ正確に測定することができる。   According to the present invention, from the original image, which is a color image obtained by imaging the end faces of a plurality of stacked long objects, the value at the end face color becomes as large as possible. A first grayscale image having a pixel value corresponding to a value of a first color space element that is a smaller element is generated, and the first grayscale image is binarized to generate a grayscale binarized image To do. Then, based on the grayscale binarized image, a group of areas having pixel values corresponding to the color of the end face is identified, and the positions of the outer edge and the inner edge of the identified group of areas are respectively determined. By moving the region in the direction in which the region exists, the group of regions is separated into a plurality of regions, and a plurality of long objects are counted based on the number of separated regions. Therefore, even when a long object having an end face that is not open and colored is stacked, the number of the stacked long objects is automatically and accurately determined. Can be measured.

複数の鋼管と、撮像装置と、照明装置の配置の一例を示す図である。It is a figure which shows an example of arrangement | positioning of a some steel pipe, an imaging device, and an illuminating device. 長尺物本数測定装置の機能的な構成の一例を示すブロック図である。It is a block diagram which shows an example of a functional structure of a long thing number measuring apparatus. 色空間要素選択テーブルの一例を示す図である。It is a figure which shows an example of a color space element selection table. 元画像の一例を示す図である。It is a figure which shows an example of an original image. 第1のグレースケール画像の一例を示す図である。It is a figure which shows an example of a 1st gray scale image. グレースケール2値化画像の一例を示す図である。It is a figure which shows an example of a gray scale binarized image. 隙間補完後2値化画像の一例を示す図である。It is a figure which shows an example of the binarized image after gap complement. 第2のグレースケール画像の一例を示すである。It is an example of a 2nd gray scale image. 計数対象領域抽出画像の一例を示す図である。It is a figure which shows an example of a count object area | region extraction image. 計数対象領域2値化画像の一例を示す図である。It is a figure which shows an example of a count object area | region binarized image. 領域分離2値化画像の一例を示す図である。It is a figure which shows an example of an area separation binarized image. 計数対象領域2値化画像を複数の領域に分離する様子の一例を概念的に示す図である。It is a figure which shows notionally an example of a mode that a count object area | region binarized image is isolate | separated into a some area | region. 出力画像の一例を示す図である。It is a figure which shows an example of an output image. 長尺物本数測定装置の動作の一例を説明するフローチャートである。It is a flowchart explaining an example of operation | movement of a long thing number measuring apparatus.

以下、図面を参照しながら、本発明の一実施形態を説明する。尚、各図では、表記の都合上、一部の構成を簡略化又は省略化している。
(撮像される長尺物の配置と長尺物を撮像するための装置の構成)
図1は、スタック10に保管されている複数の鋼管20a〜20tと、当該複数の鋼管20a〜20tの端面の画像を撮像するための撮像装置30と、当該複数の鋼管20a〜20tの端面を照明するための照明装置41、42の配置の一例を示す図である。図1(a)は、スタック10をその上方から見た図であり、図1(b)、図1(c)は、それぞれ図1(a)に示すA方向(鋼管20の端面方向)、B方向(鋼管20の側面方向)から見た図である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In each drawing, some components are simplified or omitted for convenience of description.
(Arrangement of long object to be imaged and configuration of apparatus for imaging long object)
FIG. 1 shows a plurality of steel pipes 20a to 20t stored in a stack 10, an imaging device 30 for taking images of end faces of the plurality of steel pipes 20a to 20t, and end faces of the plurality of steel pipes 20a to 20t. It is a figure which shows an example of arrangement | positioning of the illuminating devices 41 and 42 for illuminating. FIG. 1A is a view of the stack 10 as viewed from above, and FIG. 1B and FIG. 1C are directions A (the end face direction of the steel pipe 20) shown in FIG. It is the figure seen from B direction (side surface direction of the steel pipe 20).

図1に示す例では、鋼管20a〜20tは、同一の仕様のものある。また、鋼管20a〜20tのそれぞれの端部には、同じ色で着色されたキャップ50a〜50tが取り付けられている。このように、本実施形態では、鋼管20a〜20tの端面は、キャップ50a〜50tにより閉塞されている。また、本実施形態では、キャップ50a〜50tの色が赤色であるとする。
本実施形態では、撮像装置30は、デジタルスチルカメラであり、スタック10に段積みで保管されている全ての鋼管20a〜20tの端面のカラー静止画像を、鋼管20a〜20tの端面と略正対する位置から撮像する。前述したように、鋼管20a〜20tのそれぞれの端部には、同じ色で着色されたキャップ50a〜50tが取り付けられている。よって、鋼管20a〜20tの端面の画像を撮像することは、鋼管20a〜20tの端面に位置するキャップ50a〜50tを撮像することと等価となる。以下の説明では、撮像装置30により撮像された「鋼管20a〜20tの端面(キャップ50a〜50t)の画像」を必要に応じて「元画像」と称する。
In the example shown in FIG. 1, the steel pipes 20a to 20t have the same specifications. Moreover, the caps 50a-50t colored with the same color are attached to each edge part of the steel pipes 20a-20t. Thus, in this embodiment, the end surfaces of the steel pipes 20a to 20t are closed by the caps 50a to 50t. In the present embodiment, it is assumed that the color of the caps 50a to 50t is red.
In the present embodiment, the imaging device 30 is a digital still camera, and the color still images of the end faces of all the steel pipes 20a to 20t stored in a stack in the stack 10 are substantially opposed to the end faces of the steel pipes 20a to 20t. Take an image from the position. As described above, caps 50a to 50t colored with the same color are attached to the respective ends of the steel pipes 20a to 20t. Therefore, capturing images of the end faces of the steel pipes 20a to 20t is equivalent to capturing caps 50a to 50t located on the end faces of the steel pipes 20a to 20t. In the following description, “images of the end faces (caps 50a to 50t) of the steel pipes 20a to 20t” captured by the imaging device 30 are referred to as “original images” as necessary.

照明装置41、42は、それぞれ撮像装置30の左、右から、スタック10に保管されている全ての鋼管20a〜20tの端面(キャップ50a〜50t)を可及的に一様に照明できる位置に配置されている。   The illuminating devices 41 and 42 are located at positions where the end surfaces (caps 50a to 50t) of all the steel pipes 20a to 20t stored in the stack 10 can be illuminated as uniformly as possible from the left and right of the imaging device 30, respectively. Has been placed.

(長尺物本数測定装置の構成)
図2は、長尺物本数測定装置100の機能的な構成の一例を示すブロック図である。
長尺物本数測定装置100は、照明装置41、42により照明された複数の鋼管20a〜20tの端面(キャップ50a〜50t)を、当該端面と正対する位置から撮像装置30によって撮像されることにより得られた画像(元画像)を画像処理して、複数の鋼管20a〜20tを自動的に計数するものである。
図2に示す長尺物本数測定装置100は、例えば、CPU、ROM、RAM、HDD、及び各種のインターフェースを備えたコンピュータ(例えばPC)を用いることにより実現することができる。以下に、長尺物本数測定装置100が有する機能の一例を説明する。尚、長尺物本数測定装置100と撮像装置30は、USBケーブル等により、相互に通信可能に接続されている。
(Configuration of long object number measuring device)
FIG. 2 is a block diagram illustrating an example of a functional configuration of the long object number measuring apparatus 100.
The long object number measuring apparatus 100 captures images of the end surfaces (caps 50a to 50t) of the plurality of steel pipes 20a to 20t illuminated by the illuminating devices 41 and 42 from the position facing the end surfaces by the imaging device 30. The obtained image (original image) is subjected to image processing, and the plurality of steel pipes 20a to 20t are automatically counted.
2 can be realized by using, for example, a computer (for example, a PC) provided with a CPU, a ROM, a RAM, an HDD, and various interfaces. Below, an example of the function which long object number measuring device 100 has is explained. The long object number measuring device 100 and the imaging device 30 are connected to each other by a USB cable or the like so as to be able to communicate with each other.

(端面色情報取得部101)
端面色情報取得部101は、オペレータによる操作に基づいて、計数対象となる長尺物(鋼管20)の端面の色を示す情報を、上位コンピュータ200に要求し、上位コンピュータ200から取得する。尚、以下の説明では、「計数対象となる長尺物(鋼管20)の端面の色を示す情報」を必要に応じて「端面色情報」と称する。
(End color information acquisition unit 101)
The end face color information acquisition unit 101 requests the host computer 200 for information indicating the color of the end face of the long object (steel pipe 20) to be counted, and acquires the information from the host computer 200 based on the operation by the operator. In the following description, “information indicating the color of the end face of the long object (steel pipe 20) to be counted” is referred to as “end face color information” as necessary.

尚、端面色情報取得部101は、上位コンピュータ200が自発的に送信した端面色情報を取得してもよい。このようにした場合、端面色情報取得部101は、端面色情報と、スタック10を識別する情報との一組の情報を取得する。そして、端面色情報取得部101は、取得した当該一組の情報を記憶しておき、オペレータによる操作に基づいて入力されたスタックの情報に合致した端面色情報を読み出す。
この他、端面色情報取得部101は、オペレータによる操作に基づいて、端面色情報を直接取得してもよい(すなわち、オペレータが端面色情報を指定してもよい)。
Note that the end face color information acquisition unit 101 may acquire end face color information spontaneously transmitted by the host computer 200. In this case, the end face color information acquisition unit 101 acquires a set of information of end face color information and information for identifying the stack 10. Then, the end face color information acquisition unit 101 stores the acquired set of information, and reads end face color information that matches the input stack information based on the operation by the operator.
In addition, the end face color information acquisition unit 101 may directly acquire end face color information based on an operation by the operator (that is, the operator may specify the end face color information).

前述したように、本実施形態では、キャップ50の色は赤色である。よって、端面色情報取得部101は、端面色情報として赤色であることを示す情報を取得する。
端面色情報取得部101は、例えば、CPU、ROM、RAM、ユーザインターフェース、及び通信インターフェースを用いることにより実現できる。
As described above, in this embodiment, the color of the cap 50 is red. Therefore, the end face color information acquisition unit 101 acquires information indicating red as the end face color information.
The end face color information acquisition unit 101 can be realized by using, for example, a CPU, a ROM, a RAM, a user interface, and a communication interface.

(色空間要素選択部102)
色空間要素選択部102は、端面色情報取得部101により取得された端面色情報により特定される色に対応する「色空間の要素」を色空間要素選択テーブルから選択する。
図3は、色空間要素選択テーブルの一例を示す図である。
図3に示すように、色空間要素選択テーブル300には、色と、第1の色空間要素と、第2の色空間要素とが相互に関連付けられて登録されている。
(Color space element selection unit 102)
The color space element selection unit 102 selects a “color space element” corresponding to the color specified by the end face color information acquired by the end face color information acquisition unit 101 from the color space element selection table.
FIG. 3 is a diagram illustrating an example of a color space element selection table.
As shown in FIG. 3, the color, the first color space element, and the second color space element are registered in the color space element selection table 300 in association with each other.

色空間要素選択テーブル300における「色」は、端面色情報により特定される色を指す。よって、色空間要素選択テーブル300における「色」として、端面色情報により特定される色として想定される色が予め設定される。
また、「第1の色空間要素」、「第2の色空間要素」は、後述するようにして元画像取得部103により取得される画像から選択する「色空間の要素」を示す。
「第1の色空間要素」としては、鋼管20の端面(キャップ50)の領域の色(端面色情報により特定される色)である場合と、鋼管20(キャップ50)の背景の色である場合とで(可及的に大きく)異なる値をとる要素が予め設定される。
「第2の色空間要素」としては、鋼管20の端面(キャップ50)の領域の色(端面色情報により特定される色)であるときの値と、それらの間の隙間の領域の色(ここでは黒色)であるときの値との差が第1の色空間要素におけるものよりも大きくなる要素が予め設定される。また、「第2の色空間要素」としては、鋼管20の端面(キャップ50)の色のムラによって値が大きく変化しない要素が好ましい。
“Color” in the color space element selection table 300 indicates a color specified by the end face color information. Therefore, a color assumed as a color specified by the end face color information is set in advance as “color” in the color space element selection table 300.
Also, “first color space element” and “second color space element” indicate “color space elements” selected from images acquired by the original image acquisition unit 103 as described later.
The “first color space element” is the color of the region of the end face (cap 50) of the steel pipe 20 (the color specified by the end face color information) and the background color of the steel pipe 20 (cap 50). Elements that take different values depending on the case (as large as possible) are preset.
As the “second color space element”, the value when the color is the color of the region of the end face (cap 50) of the steel pipe 20 (the color specified by the end face color information) and the color of the region of the gap between them ( In this case, an element whose difference from the value when it is black) is larger than that in the first color space element is preset. The “second color space element” is preferably an element whose value does not change greatly due to unevenness of the color of the end face (cap 50) of the steel pipe 20.

図3に示す色空間要素選択テーブル300では、端面色情報により特定される色が赤色である場合には、第1の色空間要素として、CIE Lab色空間のa*が選択され、第2の色空間要素として、RGB色空間のRが選択される。また、端面色情報により特定される色が緑色である場合には、第1の色空間要素として、CIE Lab色空間のa*が選択され、第2の色空間要素として、RGB色空間のGが選択される。また、端面色情報により特定される色が黄色である場合には、第1の色空間要素として、HSV色空間のV(明度)が選択され、第2の色空間要素として、RGB色空間のRが選択される。また、端面色情報により特定される色が白色である場合には、第1の色空間要素として、HSV色空間のV(明度)が選択され、第2の色空間要素として、RGB色空間のRが選択される。
前述したように、本実施形態では、キャップ50の色が赤色であるので、端面色情報により特定される色は赤色である。よって、色空間要素選択部102は、色空間要素選択テーブル300から、第1の色空間要素としてCIE Lab色空間のa*を、第2の色空間要素としてRGB色空間のRを、それぞれ選択する。
色空間要素選択部102は、例えば、CPU、ROM、RAM、及びHDDを用いることにより実現できる。
In the color space element selection table 300 shown in FIG. 3, when the color specified by the end face color information is red, a * of the CIE Lab color space is selected as the first color space element, and the second R of the RGB color space is selected as the color space element. When the color specified by the end face color information is green, a * in the CIE Lab color space is selected as the first color space element, and G in the RGB color space is selected as the second color space element. Is selected. When the color specified by the end face color information is yellow, V (brightness) of the HSV color space is selected as the first color space element, and the RGB color space is selected as the second color space element. R is selected. When the color specified by the end face color information is white, V (brightness) of the HSV color space is selected as the first color space element, and the RGB color space is selected as the second color space element. R is selected.
As described above, in the present embodiment, since the color of the cap 50 is red, the color specified by the end face color information is red. Therefore, the color space element selection unit 102 selects a CIE Lab color space a * as a first color space element and an RGB color space R as a second color space element from the color space element selection table 300, respectively. To do.
The color space element selection unit 102 can be realized by using, for example, a CPU, ROM, RAM, and HDD.

(元画像取得部103)
元画像取得部103は、撮像装置30で撮像された元画像を入力して記憶する。本実施形態では、撮像装置30で元画像が撮像されると、元画像のデータが元画像取得部103に自動的に入力されるものとする。ただし、必ずしもこのようにする必要はなく、撮像装置30は、元画像取得部103からの要求に応じて元画像のデータを元画像取得部103に送信するようにしてもよい。
図4は、元画像の一例を示す図である。前述したように元画像400はカラー画像である。また、本実施形態では、元画像は、RGB色空間で表現される画像であるものとする。
元画像取得部103は、例えば、CPU、RAM、ROM、HDD、及び通信インターフェースを用いることにより実現できる。
(Original image acquisition unit 103)
The original image acquisition unit 103 inputs and stores the original image captured by the imaging device 30. In the present embodiment, it is assumed that when an original image is captured by the imaging device 30, the original image data is automatically input to the original image acquisition unit 103. However, the imaging apparatus 30 may transmit the original image data to the original image acquisition unit 103 in response to a request from the original image acquisition unit 103.
FIG. 4 is a diagram illustrating an example of an original image. As described above, the original image 400 is a color image. In the present embodiment, the original image is an image expressed in the RGB color space.
The original image acquisition unit 103 can be realized by using, for example, a CPU, RAM, ROM, HDD, and communication interface.

(第1のグレースケール画像作成部104)
第1のグレースケール画像作成部104は、元画像取得部103により取得された元画像のそれぞれの画素のデータから、色空間要素選択部102により選択された第1の色空間要素の値を導出し、それぞれの画素が、当該第1の色空間要素の値に応じた画素値を有するグレースケールの画像を作成する。第1のグレースケール画像作成部104により作成されるグレースケールの画像を、以下の説明では必要に応じて「第1のグレースケール画像」と称する。
(First grayscale image creation unit 104)
The first grayscale image creation unit 104 derives the value of the first color space element selected by the color space element selection unit 102 from the data of each pixel of the original image acquired by the original image acquisition unit 103. Then, each pixel creates a grayscale image having a pixel value corresponding to the value of the first color space element. The gray scale image created by the first gray scale image creation unit 104 is referred to as “first gray scale image” as necessary in the following description.

図5は、第1のグレースケール画像の一例を示す図である。図5に示す第1のグレースケール画像500は、図4に示した元画像400から得られたものである。
前述したように、第1の色空間要素は、鋼管20の端面(キャップ50)の領域の色(端面色情報により特定される色)である場合と、鋼管20(キャップ50)の背景の色である場合とで異なる値をとる要素である。よって、図5に示すように、赤色であるキャップ50の領域(キャップ50が写し出されている領域)の画素値が、他の赤色以外の色の領域の画素値と(大きく)異なる第1のグレースケール画像500が得られる。
第1のグレースケール画像作成部104は、例えば、CPU、RAM、ROM、及びHDDを用いることにより実現できる。
FIG. 5 is a diagram illustrating an example of the first grayscale image. The first grayscale image 500 shown in FIG. 5 is obtained from the original image 400 shown in FIG.
As described above, the first color space element is the color of the region of the end face (cap 50) of the steel pipe 20 (the color specified by the end face color information) and the background color of the steel pipe 20 (cap 50). It is an element that takes a different value in the case of. Therefore, as shown in FIG. 5, the pixel value of the red cap 50 region (the region where the cap 50 is projected) is different from the pixel values of the other non-red color regions. A grayscale image 500 is obtained.
The first grayscale image creation unit 104 can be realized by using, for example, a CPU, RAM, ROM, and HDD.

(グレースケール2値化画像作成部105)
グレースケール2値化画像作成部105は、第1のグレースケール画像作成部104により作成された第1のグレースケール画像の各画素の画素値を、予め設定された閾値に基づいて2値化する。具体例を説明すると、グレースケール2値化画像作成部105は、第1のグレースケール画像の各画素について、画素値が閾値以上(又は閾値未満)である画素に論理「1」を割り当て、画素値が当該閾値未満(又は閾値以上)である画素に論理「0」を割り当てることにより第1のグレースケール画像を2値化する。また、色空間要素選択部102により選択された第1の色空間要素に応じて、グレースケール2値化画像作成部105は、第1のグレースケール画像の各画素について、画素値が所定の範囲内(又は所定の範囲外)である画素に論理「1」を割り当て、画素値が当該所定の範囲外(又は所定の範囲内)である画素に論理「0」を割り当てることにより第1のグレースケール画像を2値化することもできる。本実施形態では、端面色情報により特定される色(ここでは赤色)に応じた画素値を有する画素に可及的に論理「1」が割当てられ、それ以外の色に応じた画素値を有する画素に可及的に論理「0」が割当てられるようにするための閾値が、オペレータによる操作に基づいて予め設定されている。以下の説明では、グレースケール2値化画像作成部105により作成される2値化された画像を、必要に応じて「グレースケール2値化画像」と称する。
(Grayscale binary image creation unit 105)
The grayscale binarized image creation unit 105 binarizes the pixel value of each pixel of the first grayscale image created by the first grayscale image creation unit 104 based on a preset threshold value. . To describe a specific example, the grayscale binarized image creation unit 105 assigns a logic “1” to a pixel having a pixel value equal to or greater than (or less than) a threshold for each pixel of the first grayscale image. The first grayscale image is binarized by assigning logic “0” to pixels whose value is less than (or greater than) the threshold. Further, according to the first color space element selected by the color space element selection unit 102, the grayscale binarized image creation unit 105 has a pixel value within a predetermined range for each pixel of the first grayscale image. The first gray is assigned by assigning a logic “1” to a pixel within (or outside a predetermined range) and assigning a logic “0” to a pixel whose pixel value is outside the predetermined range (or within a predetermined range). The scale image can also be binarized. In this embodiment, logic “1” is assigned to a pixel having a pixel value corresponding to the color (here, red) specified by the end face color information as much as possible, and has a pixel value corresponding to the other color. A threshold value for assigning a logic “0” to a pixel as much as possible is set in advance based on an operation by an operator. In the following description, the binarized image created by the grayscale binarized image creating unit 105 is referred to as a “grayscale binarized image” as necessary.

図6は、グレースケール2値化画像の一例を示す図である。図6に示すグレースケール2値化画像600は、図5に示した第1のグレースケール画像500から得られたものである。
図6に示すように、グレースケール2値化画像600では、概ね、キャップ50の領域に論理「1」が割当てられ(図6のグレーで塗りつぶされている領域を参照)、且つ、それ以外の領域に論理「0」が割当てられる(図6の白色の領域を参照)。
グレースケール2値化画像作成部105は、例えば、CPU、RAM、ROM、及びユーザインターフェースを用いることにより実現できる。尚、2値化処理の前にシェーディング補正を行うようにしてもよい。
FIG. 6 is a diagram illustrating an example of a grayscale binarized image. A grayscale binarized image 600 shown in FIG. 6 is obtained from the first grayscale image 500 shown in FIG.
As shown in FIG. 6, in the grayscale binarized image 600, logic “1” is generally assigned to the area of the cap 50 (see the area filled with gray in FIG. 6), and other than that The area is assigned a logic “0” (see white area in FIG. 6).
The grayscale binarized image creating unit 105 can be realized by using, for example, a CPU, RAM, ROM, and user interface. Note that shading correction may be performed before the binarization process.

(隙間補完後2値化画像作成部106)
隙間補完後2値化画像作成部106は、グレースケール2値化画像作成部105により作成されたグレースケール2値化画像において、画素値が「1」である領域に囲まれている「画素値が「0」である領域」の画素値を「1」に変更する。本実施形態では、隙間補完後2値化画像作成部106は、グレースケール2値化画像において、画素値が「1」である画素と、当該画素に対し縦、横及び斜めの何れかで隣接する画素であって、画素値が「1」である画素とを1つの領域とすることを、グレースケール2値化画像のそれぞれの画素について行う。隙間補完後2値化画像作成部106は、このようにして得られた領域の内側にある画素の画素値を全て「1」にする。
(Binary image creation unit 106 after gap compensation)
The binarized image creation unit 106 after gap complementation includes a “pixel value” surrounded by an area having a pixel value “1” in the grayscale binarized image created by the grayscale binarized image creation unit 105. The pixel value of “region where is“ 0 ”” is changed to “1”. In the present embodiment, the binarized image creation unit 106 after gap interpolation is adjacent to a pixel having a pixel value of “1” in the grayscale binarized image, either vertically, horizontally, or diagonally. The pixel having the pixel value “1” is set as one region for each pixel of the grayscale binarized image. The binarized image creation unit 106 after gap complementation sets all the pixel values of the pixels inside the region thus obtained to “1”.

ただし、必ずしもこのようにする必要はない。例えば、次のようにしてもよい。すなわち、グレースケール2値化画像において、画素値が「0」である画素と、当該画素に対し縦、横及び斜めの何れかで隣接する画素であって、画素値が「0」である画素とを1つの領域とすることを、グレースケール2値化画像のそれぞれの画素について行い、このようにして得られた領域のうち、外縁の全ての画素が、画素値が「1」の画素と接している領域の画素値を全て「1」にするようにしてもよい。   However, this is not always necessary. For example, it may be as follows. That is, in a grayscale binarized image, a pixel having a pixel value “0” and a pixel adjacent to the pixel in any one of vertical, horizontal, and diagonal directions, and having a pixel value “0” For each pixel of the grayscale binarized image, and all the pixels at the outer edge of the region obtained in this way are pixels having a pixel value of “1”. All the pixel values in the contact area may be set to “1”.

以下の説明では、隙間補完後2値化画像作成部106により画素値が変更されたグレースケール2値化画像を、必要に応じて「隙間補完後2値化画像」と称する。
図7は、隙間補完後2値化画像の一例を示す図である。図7に示す隙間補完後2値化画像700は、図6に示したグレースケール2値化画像600から得られたものである。
図7に示すように、図6に示したグレースケール2値化画像600において、グレーで塗りつぶされている領域(画素値が「1」の領域)に囲まれている白色の領域(画素値が「0」の領域)がグレーで塗りつぶされる(画素値が「0」から「1」に変更される)。このようにすることによって、端面色情報により特定される色(ここでは赤色)が存在する領域(すなわちキャップ50が存在する一纏まりの領域)を他の領域と明確に区別することができる。
隙間補完後2値化画像作成部106は、例えば、CPU、RAM、及びROMを用いることにより実現できる。
In the following description, a grayscale binarized image whose pixel value has been changed by the gap-compensated binarized image creation unit 106 is referred to as a “gap-compensated binarized image” as necessary.
FIG. 7 is a diagram illustrating an example of a binarized image after gap complementation. A binarized image 700 after gap interpolation shown in FIG. 7 is obtained from the grayscale binarized image 600 shown in FIG.
As shown in FIG. 7, in the grayscale binarized image 600 shown in FIG. 6, a white area (pixel value is the pixel value) surrounded by a gray area (area where the pixel value is “1”). “0” area) is painted in gray (the pixel value is changed from “0” to “1”). By doing in this way, the area | region (namely, a group of area | region where the cap 50 exists) in which the color (here red) specified by end surface color information exists can be distinguished clearly from another area | region.
The post-gap complement binarized image creation unit 106 can be realized by using, for example, a CPU, a RAM, and a ROM.

(第2のグレースケール画像作成部107)
第2のグレースケール画像作成部107は、元画像取得部103により取得された元画像のそれぞれの画素のデータから、色空間要素選択部102により選択された第2の色空間要素の値を導出し、それぞれの画素が、当該第2の色空間要素の値に応じた画素値を有するグレースケールの画像を作成する。第2のグレースケール画像作成部107により作成されるグレースケールの画像を、以下の説明では必要に応じて「第2のグレースケール画像」と称する。
(Second grayscale image creation unit 107)
The second grayscale image creation unit 107 derives the value of the second color space element selected by the color space element selection unit 102 from the data of each pixel of the original image acquired by the original image acquisition unit 103. Then, each pixel creates a grayscale image having a pixel value corresponding to the value of the second color space element. The grayscale image created by the second grayscale image creation unit 107 is referred to as a “second grayscale image” as necessary in the following description.

図8は、第2のグレースケール画像の一例を示すである。図8に示す第2のグレースケール画像800は、図4に示した元画像400から得られたものである。
前述したように、第2の色空間要素は、色のムラによって値が大きく変化せず、且つ、鋼管20の端面(キャップ50)の領域の色(端面色情報により特定される色)であるときの値と、それらの間の隙間の領域の色(ここでは黒色)であるときの値との差が第1の色空間要素におけるものよりも大きくなる要素である。よって、図8に示すように、第2のグレースケール画像800では、元画像400に対し、赤色であるキャップ50の領域の画素値の差が小さくなり(色むらが低減され)、且つ、キャップ50の領域の画素値とそれらの隙間の領域の画素値との差が大きくなる。
第2のグレースケール画像作成部107は、例えば、CPU、RAM、ROM、及びHDDを用いることにより実現できる。
FIG. 8 shows an example of the second grayscale image. A second grayscale image 800 shown in FIG. 8 is obtained from the original image 400 shown in FIG.
As described above, the value of the second color space element is a color of the region of the end surface (cap 50) of the steel pipe 20 (the color specified by the end surface color information) that does not change greatly due to color unevenness. This is an element in which the difference between the time value and the value when the color is the color of the gap region between them (here, black) is larger than that in the first color space element. Therefore, as shown in FIG. 8, in the second grayscale image 800, the difference in pixel value in the region of the cap 50 that is red is smaller than the original image 400 (color unevenness is reduced), and the cap The difference between the pixel values in the 50 areas and the pixel values in the gap area increases.
The second grayscale image creation unit 107 can be realized by using, for example, a CPU, RAM, ROM, and HDD.

(計数対象領域抽出画像作成部108)
計数対象領域抽出画像作成部108は、第2のグレースケール画像作成部107により作成された第2のグレースケール画像から、領域補完後2値化画像作成部106により作成された隙間補完後2値化画像の画素値が「1」である領域を抽出する。以下の説明では、このようにして計数対象領域抽出画像作成部108により得られる画像を、必要に応じて「計数対象領域抽出画像」と称する。
図9は、計数対象領域抽出画像900の一例を示す図である。図9に示す計数対象領域抽出画像900は、図7に示した隙間補完後2値化画像700と、図8に示した第2のグレースケール画像800とから得られたものである。
(Counter area extraction image creation unit 108)
The counting target region extraction image creation unit 108 uses the second grayscale image created by the second grayscale image creation unit 107 and the binary after gap interpolation created by the binarized image creation unit 106 after region complementation. A region where the pixel value of the digitized image is “1” is extracted. In the following description, the image obtained by the counting target region extraction image creation unit 108 in this way is referred to as a “counting target region extraction image” as necessary.
FIG. 9 is a diagram illustrating an example of the count target region extraction image 900. The count target region extraction image 900 shown in FIG. 9 is obtained from the gap-compensated binarized image 700 shown in FIG. 7 and the second grayscale image 800 shown in FIG.

前述したように、第2のグレースケール画像800では、第1のグレースケール画像500に比べて、赤色であるキャップ50の領域の画素値の差が小さくなり、且つ、キャップ50の領域の画素値とそれらの隙間の領域の画素値との差が大きくなる。よって、第2のグレースケール画像800から、計数対象領域抽出画像900に基づき、キャップ50の領域を抽出すると、キャップ50の領域を、当該キャップ50を際立たせた状態で抽出することができる。
計数対象領域抽出画像作成部108は、例えば、CPU、RAM、ROM、及びHDDを用いることにより実現できる。
As described above, the second grayscale image 800 has a smaller pixel value difference in the cap 50 region that is red than the first grayscale image 500, and the pixel value in the cap 50 region. And the difference between the pixel values in the gap area increases. Therefore, when the area of the cap 50 is extracted from the second grayscale image 800 based on the count target area extraction image 900, the area of the cap 50 can be extracted in a state where the cap 50 stands out.
The count target region extraction image creation unit 108 can be realized by using, for example, a CPU, RAM, ROM, and HDD.

(計数対象領域2値化画像作成部109)
計数対象領域2値化画像作成部109は、計数対象領域抽出画像作成部108により作成された計数対象領域抽出画像の各画素の画素値を、予め設定された閾値に基づいて2値化する。具体的に説明すると、計数対象領域2値化画像作成部109は、計数対象領域抽出画像の各画素について、画素値が閾値以上(又は未満)である画素に論理「1」を割り当て、画素値が当該閾値未満(又は以上)である画素に論理「0」を割り当てることにより計数対象領域抽出画像を2値化する。また、色空間要素選択部102により選択された第2の色空間要素に応じて、計数対象領域2値化画像作成部109は、計数対象領域抽出画像の各画素について、画素値が所定の範囲内(又は所定の範囲外)である画素に論理「1」を割り当て、画素値が当該所定の範囲外(又は所定の範囲内)である画素に論理「0」を割り当てることにより計数対象領域抽出画像を2値化することもできる。本実施形態では、端面色情報により特定される色(ここでは赤色)に応じた画素値を有する画素に可及的に論理「1」が割当てられ、それ以外の色に応じた画素値を有する画素に可及的に論理「0」が割当てられるようにするための閾値が、オペレータによる操作に基づいて予め設定されている。以下の説明では、計数対象領域2値化画像作成部109により作成される2値化された画像を、必要に応じて「計数対象領域2値化画像」と称する。
図10は、計数対象領域2値化画像の一例を示す図である。図10に示す計数対象領域2値化画像1000は、図9に示した計数対象領域抽出画像900から得られたものである。前述したように、計数対象領域抽出画像900では、キャップ50の領域の画素値の差が小さくなり、且つ、キャップ50の領域の画素値とそれらの隙間の領域の画素値との差が大きくなる。よって、計数対象領域抽出画像900を2値化すると、キャップ50の領域と、それらの間の領域とを明確に区別することができる。
計数対象領域2値化画像作成部109は、例えば、CPU、RAM、ROM、及びHDDを用いることにより実現できる。
(Counting target region binarized image creation unit 109)
The count target area binarized image creating unit 109 binarizes the pixel value of each pixel of the count target area extracted image created by the count target area extracted image creating unit 108 based on a preset threshold value. More specifically, the count target area binarized image creating unit 109 assigns a logical “1” to a pixel whose pixel value is equal to or greater than (or less than) a threshold for each pixel of the count target area extraction image, By assigning a logic “0” to pixels that are less than (or more than) the threshold value, the count target region extraction image is binarized. In addition, according to the second color space element selected by the color space element selection unit 102, the counting target region binarized image creating unit 109 has a pixel value within a predetermined range for each pixel of the counting target region extraction image. Counting target region extraction by assigning logic “1” to pixels that are inside (or outside a predetermined range) and assigning logic “0” to pixels that have a pixel value outside (or within a predetermined range) The image can also be binarized. In this embodiment, logic “1” is assigned to a pixel having a pixel value corresponding to the color (here, red) specified by the end face color information as much as possible, and has a pixel value corresponding to the other color. A threshold value for assigning a logic “0” to a pixel as much as possible is set in advance based on an operation by an operator. In the following description, the binarized image created by the count target area binarized image creating unit 109 is referred to as “count target area binarized image” as necessary.
FIG. 10 is a diagram illustrating an example of the count target region binarized image. A count target area binarized image 1000 shown in FIG. 10 is obtained from the count target area extracted image 900 shown in FIG. As described above, in the count target region extraction image 900, the difference between the pixel values in the cap 50 region is small, and the difference between the pixel value in the cap 50 region and the pixel value in the gap region is large. . Therefore, when the count target region extraction image 900 is binarized, the region of the cap 50 and the region between them can be clearly distinguished.
The count target area binarized image creation unit 109 can be realized by using, for example, a CPU, a RAM, a ROM, and an HDD.

(領域分離部110)
領域分離部110は、計数対象領域2値化画像作成部109により作成された計数対象領域2値化画像の画素値が「1」である画素と、当該画素に対し縦、横及び斜めの何れかで隣接する画素であって、画素値が「1」である画素とを1つの領域とすることを計数対象領域2値化画像のそれぞれの画素について行うことにより得られた領域を縮小させることにより、計数対象領域2値化画像を複数の領域(個々のキャップ50の領域)に分離する。以下の説明では、複数の領域に分離された状態の計数対象領域2値化画像を、必要に応じて「領域分離2値化画像」と称する。
図11は、領域分離2値化画像の一例を示す図である。図11に示す領域分離2値化画像1100は、図10に示した計数対象領域2値化画像1000から得られたものである。
(Region separation unit 110)
The region separating unit 110 includes a pixel whose pixel value is “1” in the counting target region binarized image created by the counting target region binarized image creating unit 109 and any of vertical, horizontal, and diagonal with respect to the pixel. The region obtained by performing each pixel of the count target region binarized image to set a pixel having a pixel value of “1” as one region. Thus, the count target area binarized image is separated into a plurality of areas (areas of individual caps 50). In the following description, the count target area binarized image that is separated into a plurality of areas is referred to as an “area separated binarized image” as necessary.
FIG. 11 is a diagram illustrating an example of a region separation binarized image. An area separation binarized image 1100 shown in FIG. 11 is obtained from the count target area binarized image 1000 shown in FIG.

図12は、計数対象領域2値化画像を複数の領域に分離する様子の一例を概念的に示す図である。
まず、領域分離部110は、画素値が「1」である画素と、当該画素に対し縦、横及び斜めの何れかで隣接する画素であって、画素値が「1」である画素とを1つの領域とすることを計数対象領域2値化画像のそれぞれの画素について行う。これにより、画素値が「1」である画素により構成される閉領域であって、当該外縁の画素に接する画素の少なくとも1つが、画素値が「0」である画素となる閉領域(所謂ブロブ)が導出される。図10に示す例では、計数対象領域2値化画像1000において、グレーで表示されている領域が導出される。
FIG. 12 is a diagram conceptually illustrating an example of a state where the count target region binarized image is separated into a plurality of regions.
First, the region separation unit 110 calculates a pixel having a pixel value “1” and a pixel adjacent to the pixel in any one of vertical, horizontal, and diagonal directions and having a pixel value “1”. One pixel is set for each pixel of the binarized image to be counted. As a result, a closed region composed of pixels having a pixel value of “1”, and at least one of the pixels in contact with the outer edge pixel becomes a pixel having a pixel value of “0” (so-called blob). ) Is derived. In the example illustrated in FIG. 10, a region displayed in gray in the count target region binarized image 1000 is derived.

次に、領域分離部110は、導出した閉領域の外縁の画素に対し、当該外縁の画素を接点とする接線に垂直な方向であって、当該閉領域が存在している方向に、所定の画素数分だけ離隔した位置を、当該閉領域の外縁の位置に変更することを、当該閉領域の外縁の画素について行う(図12の一番上の図において塗りつぶされている領域の外縁に付されている矢印線を参照)。ここで、導出した閉領域の外縁の位置の変更は、変更前の閉領域の外縁の画素と変更後の閉領域の外側との間に位置する画素の画素値を「1」から「0」に変更することにより行うことができる。   Next, the region separation unit 110 performs a predetermined process on a pixel at the outer edge of the derived closed region in a direction perpendicular to a tangent line with the pixel on the outer edge as a contact and in the direction in which the closed region exists. Changing the position separated by the number of pixels to the position of the outer edge of the closed region is performed for the pixels of the outer edge of the closed region (attached to the outer edge of the filled region in the top diagram of FIG. 12). See the arrow line). Here, the derived change in the position of the outer edge of the closed region is performed by changing the pixel value of the pixel located between the outer edge pixel of the closed region before the change and the outside of the closed region after the change from “1” to “0”. This can be done by changing to

このような処理と共に、領域分離部110は、導出した閉領域の内縁の画素に対し、当該外縁の画素を接点とする接線に垂直な方向であって、当該閉領域が存在している方向に、所定の画素数分だけ離隔した位置を、当該閉領域の内縁の位置に変更することを、当該閉領域の内縁の画素について行う(図12の一番上の図において塗りつぶされている領域の内縁に付されている矢印線を参照)。ここで、閉領域の内縁の位置の変更は、変更前の閉領域の外縁の画素と変更後の閉領域の外側との間に位置する画素の画素値を「1」から「0」に変更することにより行うことができる。また、変更前の閉領域の内縁と変更後の閉領域の内縁との間隔(画素数)と、変更前の閉領域の外縁と変更後の閉領域の外縁との間隔(画素数)は(すなわち、前記所定の画素数は)、同じ値となる。   Along with such processing, the region separation unit 110 is directed to the inner edge pixel of the derived closed region in a direction perpendicular to a tangent line having the outer edge pixel as a contact, and in the direction in which the closed region exists. Then, changing the position separated by a predetermined number of pixels to the position of the inner edge of the closed area is performed for the pixels of the inner edge of the closed area (the area of the area filled in the top diagram of FIG. 12). (See arrow line on inner edge). Here, the change of the position of the inner edge of the closed region is performed by changing the pixel value of the pixel located between the outer edge pixel of the closed region before the change and the outside of the closed region after the change from “1” to “0”. This can be done. Further, the interval (number of pixels) between the inner edge of the closed region before the change and the inner edge of the closed region after the change, and the interval (number of pixels) between the outer edge of the closed region before the change and the outer edge of the closed region after the change are ( That is, the predetermined number of pixels) has the same value.

尚、例えば、ある鋼管20がずれた状態で段積みされている場合には、撮像装置30により撮像される鋼管20の端面側において、当該鋼管20が他の鋼管20と接触していないこと(又は少しの領域でしか接触していないこと)が生じ得る。そうすると、計数対象領域2値化画像作成部109により作成された計数対象領域2値化画像において、内縁が存在しない閉領域が孤立して存在することがある。このような場合、当該内縁が存在しない閉領域については、例えば、当該閉領域の外縁の位置だけを前述したようにして変更することができる。   For example, when a certain steel pipe 20 is stacked in a shifted state, the steel pipe 20 is not in contact with another steel pipe 20 on the end face side of the steel pipe 20 imaged by the imaging device 30 ( Or contact only in a small area). Then, in the counting target region binarized image created by the counting target region binarized image creating unit 109, there may be an isolated closed region having no inner edge. In such a case, for the closed region where the inner edge does not exist, for example, only the position of the outer edge of the closed region can be changed as described above.

以上のような処理を、図12に示すように段階的に行うことにより、1つの閉領域となっているキャップ50の領域を(図12の一番上に示す図を参照)、個々のキャップ50の領域に分離することができる(図12の一番下に示す図を参照)。
以上のようにして、図11に示す領域分離2値化画像1100が作成される。この領域分離2値化画像1100により、個々のキャップ50の領域(20個の領域)が他のキャップ50の領域と明確に区別される(すなわち、個々のキャップ50の領域(20個の領域)が単独で存在するようになる)。
領域分離部110は、例えば、CPU、RAM、及びROMを用いることにより実現できる。
By performing the above processing step by step as shown in FIG. 12, the region of the cap 50 which is one closed region (see the diagram shown at the top of FIG. 12) It can be divided into 50 regions (see the diagram shown at the bottom of FIG. 12).
As described above, the region separation binary image 1100 shown in FIG. 11 is created. The area separation binarized image 1100 clearly distinguishes the areas of the individual caps 50 (20 areas) from the areas of the other caps 50 (that is, the areas of the individual caps 50 (20 areas)). Will be present alone).
The area separation unit 110 can be realized by using, for example, a CPU, a RAM, and a ROM.

(ブロブ処理部111)
ブロブ処理部111は、領域分離部110により作成された領域分離2値化画像から、画素値が「1」である画素により構成される閉領域であって、当該外縁の画素に接する画素の少なくとも1つが、画素値が「0」である画素となる閉領域(所謂ブロブ)を導出する。具体的に説明すると、ブロブ処理部111は、領域分離部110により作成された領域分離2値化画像において、画素値が「1」である画素と、当該画素に対し縦、横及び斜めの何れかで隣接する画素であって、画素値が「1」である画素とを1つの領域とすることを、領域分離2値化画像のそれぞれの画素について行うことにより、ブロブを導出する。
(Blob processing unit 111)
The blob processing unit 111 is a closed region composed of pixels having a pixel value “1” from the region-separated binarized image created by the region separating unit 110, and at least pixels that are in contact with the outer edge pixels. One derives a closed region (so-called blob) that becomes a pixel having a pixel value of “0”. More specifically, the blob processing unit 111 includes a pixel having a pixel value “1” in the region-separated binarized image created by the region separating unit 110 and any of vertical, horizontal, and diagonal with respect to the pixel. The blob is derived by performing, for each pixel of the region-separated binarized image, a pixel adjacent to each other and having a pixel value of “1” as one region.

次に、ブロブ処理部111は、導出した各ブロブに対してラベリング処理(番号の割り振り)を行う。図11に示す例では、導出した各ブロブに対して20個の番号が個別に割り振られる。
ブロブ処理部111は、例えば、CPU、RAM、及びROMを用いることにより実現できる。
Next, the blob processing unit 111 performs a labeling process (number allocation) on each derived blob. In the example shown in FIG. 11, 20 numbers are individually assigned to each derived blob.
The blob processing unit 111 can be realized by using, for example, a CPU, a RAM, and a ROM.

(本数導出部112)
本数導出部112は、ブロブ処理部111により各ブロブに対して割り振られた番号の総数を、計測対象物の本数として導出する。図11に示す例では、(スタック10において段積みされた)鋼管20の本数として「20」が導出される。
本数導出部112は、例えば、CPU、RAM、及びROMを用いることにより実現できる。
(Number deriving unit 112)
The number deriving unit 112 derives the total number of numbers assigned to each blob by the blob processing unit 111 as the number of measurement objects. In the example shown in FIG. 11, “20” is derived as the number of steel pipes 20 (stacked in the stack 10).
The number deriving unit 112 can be realized by using, for example, a CPU, a RAM, and a ROM.

(出力画像作成部113)
出力画像作成部113は、本数導出部112により導出された計測対象物(ここでは鋼管20)の本数を含む画像を表示するための表示データを作成する。
本実施形態では、出力画像作成部113は、元画像取得部103により取得された元画像と、本数導出部112により導出された鋼管20の本数とを含む画像を表示するための表示データを作成する。さらに、本実施形態では、元画像におけるキャップ50の部分の領域を所定の色で塗りつぶした状態で元画像を表示する。このために、出力画像作成部113は、以下の処理を行う。
(Output Image Creation Unit 113)
The output image creation unit 113 creates display data for displaying an image including the number of measurement objects (here, the steel pipes 20) derived by the number deriving unit 112.
In the present embodiment, the output image creating unit 113 creates display data for displaying an image including the original image acquired by the original image acquiring unit 103 and the number of steel pipes 20 derived by the number deriving unit 112. To do. Furthermore, in this embodiment, the original image is displayed in a state where the area of the cap 50 in the original image is filled with a predetermined color. For this purpose, the output image creation unit 113 performs the following processing.

まず、出力画像作成部113は、領域分離部110により作成された領域分離2値化画像(図11を参照)の画素値が「1」の閉領域(所謂ブロブ)を抽出する。次に、出力画像作成部113は、抽出した閉領域の外縁の画素に対し、当該外縁の画素を接点とする接線に垂直な方向であって、当該閉領域が存在していない方向に、所定の画素数分だけ離隔した位置を、当該閉領域の外縁の位置に変更することを、当該閉領域の外縁の画素について行う。ここで、抽出した閉領域の外縁の位置の変更は、変更前の閉領域の外縁の画素と変更後の閉領域の外側との間に位置する画素の画素値を「0」から「1」に変更することにより行うことができる。また、所定の画素数は、領域分離部110における閉領域の外縁・内縁の位置の変更分の1/n倍(nは1以上の数、例えば、「1.25」)した画素数(前記所定の間隔(画素数)×1/n)である。尚、このようにして得られた所定の画素数が整数でない場合には、例えば、小数点以下の値を切り捨てたり切り上げたりすることにより、前記所定の画素数を整数にする。これにより、領域分離部110により作成された個々の閉領域(所謂ブロブ)の大きさを、個々の閉領域が相互に隣接しない範囲で拡大することができる。   First, the output image creation unit 113 extracts a closed region (so-called blob) in which the pixel value of the region separation binarized image (see FIG. 11) created by the region separation unit 110 is “1”. Next, the output image creation unit 113 determines a predetermined value in a direction perpendicular to a tangent line with the pixel at the outer edge as a contact point and a direction where the closed area does not exist with respect to the outer edge pixel of the extracted closed region. The position separated by the number of pixels is changed to the position of the outer edge of the closed region with respect to the pixels of the outer edge of the closed region. Here, the change in the position of the outer edge of the extracted closed region is performed by changing the pixel value of the pixel located between the outer edge pixel of the closed region before the change and the outside of the closed region after the change from “0” to “1”. This can be done by changing to Further, the predetermined number of pixels is 1 / n times the change in the position of the outer edge / inner edge of the closed region in the region separation unit 110 (n is a number of 1 or more, for example, “1.25”) The predetermined interval (number of pixels) × 1 / n). If the predetermined number of pixels obtained in this way is not an integer, for example, the predetermined number of pixels is made an integer by rounding down or rounding up the value after the decimal point. Thereby, the size of each closed region (so-called blob) created by the region separation unit 110 can be enlarged in a range where the individual closed regions are not adjacent to each other.

次に、出力画像作成部113は、元画像のデータと、元画像取得部103により取得された元画像の領域のうち、以上のようにして得られた領域が所定の色に変更されるようにすることを示す情報を、表示データに含める。更に、出力画像作成部113は、本数導出部112により導出された鋼管20の本数を示す情報が、所定の領域に所定の態様で表示されるようにすることを示す情報も表示データに含める。
出力画像作成部113は、例えば、CPU、RAM、及びROMを用いることにより実現できる。
Next, the output image creation unit 113 changes the region obtained as described above from the original image data and the original image region acquired by the original image acquisition unit 103 to a predetermined color. Information indicating that the display is to be included is included in the display data. Furthermore, the output image creation unit 113 also includes information indicating that the information indicating the number of steel pipes 20 derived by the number deriving unit 112 is displayed in a predetermined manner in a predetermined area.
The output image creation unit 113 can be realized by using, for example, a CPU, a RAM, and a ROM.

(出力画像出力部114)
出力画像出力部114は、出力画像作成部113により作成された表示データを、表示装置に出力する。これにより、長尺物本数測定装置100に接続された表示装置(コンピュータディスプレイ)に鋼管20の本数を含む出力画像が表示される。
図13は、出力画像の一例を示す図である。図13に示す出力画像1300は、図4に示した元画像に基づいて得られたものである。
前述したように、出力画像1300には、キャップ50の領域が所定の色に変更された状態の元画像と、鋼管20の本数の情報が表示される。図13に示す出力画像1300では、鋼管20の本数が左上の領域に表示され(図13において「20」と示されている領域を参照)、キャップ50の領域が緑色に変更された状態で元画像が表示される。尚、キャップ50の領域が所定の色に変更された状態にするのは、キャップ50の領域をオペレータに識別させ易くするためである。
出力画像作成部113は、例えば、CPU、RAM、ROM、HDD、及び通信インターフェースを用いることにより実現できる。
(Output image output unit 114)
The output image output unit 114 outputs the display data created by the output image creation unit 113 to the display device. Thereby, an output image including the number of the steel pipes 20 is displayed on the display device (computer display) connected to the long object number measuring device 100.
FIG. 13 is a diagram illustrating an example of an output image. An output image 1300 shown in FIG. 13 is obtained based on the original image shown in FIG.
As described above, the output image 1300 displays the original image in a state where the area of the cap 50 is changed to a predetermined color and information on the number of the steel pipes 20. In the output image 1300 shown in FIG. 13, the number of the steel pipes 20 is displayed in the upper left area (see the area indicated as “20” in FIG. 13), and the area of the cap 50 is changed to green. An image is displayed. The reason why the area of the cap 50 is changed to a predetermined color is to make it easier for the operator to identify the area of the cap 50.
The output image creation unit 113 can be realized by using, for example, a CPU, RAM, ROM, HDD, and communication interface.

(動作フローチャート)
次に、図14のフローチャートを参照しながら、長尺物本数測定装置100の動作の一例を説明する。
まず、ステップS1401において、端面色情報取得部101は、端面色情報を取得する。前述したように、端面色情報は、計数対象となる長尺物(鋼管20)の端面の色を示す情報である。
次に、ステップS1402において、色空間要素選択部102は、ステップS1401で取得された端面色情報により特定される色に対応する「第1の色空間要素と第2の色空間要素」を色空間要素選択テーブル300から選択する。
(Operation flowchart)
Next, an example of the operation of the long object number measuring apparatus 100 will be described with reference to the flowchart of FIG.
First, in step S1401, the end face color information acquisition unit 101 acquires end face color information. As described above, the end face color information is information indicating the color of the end face of the long object (steel pipe 20) to be counted.
Next, in step S1402, the color space element selection unit 102 sets “first color space element and second color space element” corresponding to the color specified by the end face color information acquired in step S1401 to the color space. Select from the element selection table 300.

次に、ステップS1403において、元画像取得部103は、撮像装置30で撮像された元画像を取得する(図4を参照)。前述したように、元画像は、段積みされている鋼管20の端面(キャップ50)の画像である。
次に、ステップS1404において、第1のグレースケール画像作成部104は、ステップS1403で取得された元画像のそれぞれの画素のデータが、ステップS1402で選択された第1の色空間要素の値に応じた画素値になるように各画素値を変更して第1のグレースケールの画像を作成する(図5を参照)。
Next, in step S1403, the original image acquisition unit 103 acquires the original image captured by the imaging device 30 (see FIG. 4). As described above, the original image is an image of the end face (cap 50) of the steel pipes 20 stacked.
Next, in step S1404, the first grayscale image creation unit 104 determines that the data of each pixel of the original image acquired in step S1403 corresponds to the value of the first color space element selected in step S1402. The first grayscale image is created by changing each pixel value so that the pixel value becomes the same (see FIG. 5).

次に、ステップS1405において、グレースケール2値化画像作成部105は、ステップS1404で作成された第1のグレースケール画像の各画素の画素値を、予め設定された閾値に基づいて2値化してグレースケール2値化画像を作成する(図6を参照)。
次に、ステップS1406において、隙間補完後2値化画像作成部106は、ステップS1405で作成されたグレースケール2値化画像において、画素値が「1」である領域に囲まれている「画素値が「0」である領域」の画素値を「1」に変更して隙間補完後2値化画像を作成する(図7を参照)。
Next, in step S1405, the grayscale binarized image creation unit 105 binarizes the pixel value of each pixel of the first grayscale image created in step S1404 based on a preset threshold value. A gray scale binarized image is created (see FIG. 6).
Next, in step S1406, the gap-compensated binarized image creation unit 106 creates a “pixel value” surrounded by an area having a pixel value “1” in the grayscale binarized image created in step S1405. The pixel value of “region where is“ 0 ”” is changed to “1” to create a binarized image after gap interpolation (see FIG. 7).

次に、ステップS1407において、第2のグレースケール画像作成部107は、ステップS1403で取得された元画像のそれぞれの画素のデータが、ステップS1402で選択された第2の色空間要素の値に応じた画素値になるように各画素値を変更して第2のグレースケールの画像を作成する(図8を参照)。
尚、ステップS1407の処理は、ステップS1403の処理が終了してから、ステップS1408の処理が開始するまでの間であれば、いつ行ってもよい。
次に、ステップS1408において、計数対象領域抽出画像作成部108は、ステップS1407で作成された第2のグレースケール画像から、ステップS1406で作成された隙間補完後2値化画像の画素値が「1」である領域を抽出して計数対象領域抽出画像を作成する(図9を参照)。
Next, in step S1407, the second grayscale image creation unit 107 determines that the data of each pixel of the original image acquired in step S1403 corresponds to the value of the second color space element selected in step S1402. Each pixel value is changed so that the pixel value becomes the same, and a second grayscale image is created (see FIG. 8).
Note that the process of step S1407 may be performed at any time from the end of the process of step S1403 to the start of the process of step S1408.
Next, in step S1408, the count target region extraction image creation unit 108 sets the pixel value of the post-gap interpolation binarized image created in step S1406 to “1” from the second grayscale image created in step S1407. ”Is extracted to create a count target region extraction image (see FIG. 9).

次に、ステップS1409において、計数対象領域2値化画像作成部109は、ステップS1408で作成された計数対象領域抽出画像の各画素の画素値を、予め設定された閾値に基づいて2値化して計数対象領域2値化画像を作成する(図10を参照)。
次に、ステップS1410において、領域分離部110は、ステップS1409で作成された計数対象領域2値化画像の画素値が「1」である画素と、当該画素に対し縦、横及び斜めの何れかで隣接する画素であって、画素値が「1」である画素とを1つの領域とすることを当該計数対象領域2値化画像のそれぞれの画素について行うことにより得られた領域を縮小させることにより領域分離2値化画像1100を作成する(図11、図12を参照)。
Next, in step S1409, the count target region binarized image creating unit 109 binarizes the pixel value of each pixel of the count target region extracted image created in step S1408 based on a preset threshold value. A count target area binarized image is created (see FIG. 10).
Next, in step S1410, the region separation unit 110 selects a pixel whose pixel value is “1” in the count target region binarized image created in step S1409 and any of vertical, horizontal, and diagonal with respect to the pixel. The region obtained by performing each pixel of the count target region binarized image to make a pixel adjacent to each other and having a pixel value “1” as one region is reduced. Thus, a region-separated binary image 1100 is created (see FIGS. 11 and 12).

次に、ステップS1411において、ブロブ処理部111は、ステップS1410で作成された領域分離2値化画像から、画素値が「1」である画素により構成される閉領域であって、当該外縁の画素に接する画素の少なくとも1つが、画素値が「0」である画素となる閉領域(所謂ブロブ)を導出し、各ブロブに対してラベリング処理(番号の割り振り)を行う。
次に、ステップS1412において、本数導出部112は、ステップS1411で各ブロブに対して割り振られた番号の総数を、計測対象物の本数として導出する。
Next, in step S1411, the blob processing unit 111 is a closed region composed of pixels having a pixel value “1” from the region-separated binarized image created in step S1410, and the outer edge pixel. A closed region (a so-called blob) in which at least one of the pixels in contact with the pixel is a pixel having a pixel value “0” is derived, and a labeling process (number allocation) is performed on each blob.
Next, in step S1412, the number deriving unit 112 derives the total number of numbers assigned to each blob in step S1411 as the number of measurement objects.

次に、ステップS1413において、出力画像作成部113は、ステップS1403で取得された元画像と、ステップS1410で作成された領域分離2値化画像と、ステップS1412で導出された計測対象物の本数とに基づいて、計測対象物の本数を含む画像を表示するための表示データを作成する。
最後に、ステップS1414において、出力画像出力部114は、ステップS1413で作成された表示データを、表示装置に表示する(図13を参照)。
Next, in step S1413, the output image creation unit 113, the original image acquired in step S1403, the region separation binarized image created in step S1410, and the number of measurement objects derived in step S1412. Based on the above, display data for displaying an image including the number of measurement objects is created.
Finally, in step S1414, the output image output unit 114 displays the display data created in step S1413 on the display device (see FIG. 13).

(まとめ)
以上のように本実施形態では、元画像から、CIE Lab色空間のa*の値に応じた画素値を有する第1のグレースケールの画像と、RGB色空間のRの値に応じた画素値を有する第2のグレースケールの画像とを作成する。そして、第1のグレースケールの画像を2値化したグレースケール2値化画像を作成し、当該グレースケール2値化画像を用いて、鋼管20の端面(キャップ50)の領域を、第2のグレースケールの画像から抽出し計数対象領域2値化画像を作成する。そして、計数対象領域2値化画像の画素値が「1」である一纏まりの領域の外縁と内縁を当該領域が存在している方向に移動させることにより、計数対象領域2値化画像における、個々のキャップ50の領域を分離する。このように、CIE Lab色空間のa*の値に応じた画素値を有する第1のグレースケールの画像を作成することにより、キャップ50を表す画素の画素値と背景を表す画素の画素値とに差をつけることができ、キャップ50が存在している領域を正確に識別することができる。また、計数対象領域2値化画像の画素値が「1」である一纏まりの領域の外縁と内縁を当該領域の内側に移動させることにより、段積みされている長尺物が存在している領域を分離することができる。よって、端面が開口していない状態であり且つ着色されている状態の複数の長尺物が段積みされている場合であっても、当該段積みされている複数の長尺物の本数を自動的に且つ正確に測定することができる。
(Summary)
As described above, in the present embodiment, from the original image, the first grayscale image having a pixel value corresponding to the value of a * in the CIE Lab color space, and the pixel value corresponding to the R value in the RGB color space. And a second gray scale image. And the gray scale binarized image which binarized the 1st gray scale image is created, The area | region of the end surface (cap 50) of the steel pipe 20 is made into 2nd using the said gray scale binarized image. A binarized image to be counted is created by extracting from the gray scale image. Then, by moving the outer edge and the inner edge of a group of areas in which the pixel value of the count target area binarized image is “1” in the direction in which the area exists, in the count target area binarized image, Separate the cap regions. Thus, by creating a first grayscale image having a pixel value corresponding to the value of a * in the CIE Lab color space, the pixel value of the pixel representing the cap 50 and the pixel value of the pixel representing the background And the region where the cap 50 is present can be accurately identified. In addition, there are long objects stacked by moving the outer edge and inner edge of a group of areas whose pixel values of the count target area binarized image are “1” to the inside of the area. Regions can be separated. Therefore, even when a plurality of long objects in a state where the end face is not open and colored are stacked, the number of the plurality of long objects stacked is automatically determined. Can be measured automatically and accurately.

(変形例)
本実施形態では、本数を計測する対象となる長尺物が、端面にキャップが付けられた鋼管である場合を例に挙げて説明した。しかしながら、本数を計測する対象となる長尺物は、端面が開口していない状態であり、且つ、長尺物(の地色)と異なる所定の色で着色されている状態の長尺物であればよい。本数を計測する対象となる長尺物は、例えば、端面が地色と異なる所定の色で着色された棒鋼等であってもよい。
また、本実施形態では、本数を計測する対象となる長尺物の端面の形状が円形である場合を例に挙げて説明した。しかしながら、本数を計測する対象となる長尺物の端面の形状は、撮像を行う端面側において、相互に隣接する長尺物の間の少なくとも一部に隙間が形成されるように段積みされる長尺物であればよい。本数を計測する対象となる長尺物の端面の形状は、例えば、楕円形、多角形等であってもよい。
また、第1の色空間要素、第2の色空間要素は、前述したものに限定されない。長尺物の端面の色に応じて、例えば、CIE 1976 L***色空間の要素や、CIE XYZ色空間の要素を第1の色空間要素、第2の色空間要素として採用することができる。
(Modification)
In this embodiment, the case where the long object used as the object which measures a number is the steel pipe with which the cap was attached to the end surface was mentioned as an example, and was demonstrated. However, the long object for which the number is to be measured is a long object in which the end face is not open and is colored in a predetermined color different from the long object (ground color). I just need it. The long object that is the object of measuring the number may be, for example, a steel bar whose end face is colored with a predetermined color different from the ground color.
Moreover, in this embodiment, the case where the shape of the end surface of the elongate object used as the object which measures the number was circular was mentioned as an example, and was demonstrated. However, the shape of the end face of the long object whose number is to be measured is stacked so that a gap is formed in at least a part between the adjacent long objects on the end face side where imaging is performed. What is necessary is just a long thing. The shape of the end face of the long object that is the object of measuring the number may be, for example, an ellipse or a polygon.
Further, the first color space element and the second color space element are not limited to those described above. Depending on the color of the end face of the long object, for example, an element in the CIE 1976 L * u * v * color space or an element in the CIE XYZ color space is adopted as the first color space element or the second color space element. be able to.

また、本実施形態のように、グレースケール2値化画像において、画素値が「1」である領域に囲まれている「画素値が「0」である領域」の画素値を「1」に変更して隙間補完後2値化画像を作成すれば、第2のグレースケール画像から抽出する領域を、キャップ50の領域に、より確実に一致させることができるので好ましい。しかしながら、必ずしも隙間補完後2値化画像を作成する必要はない。例えば、端面の色のムラが小さい場合には、グレースケール2値化画像600における、画素値が「1」である一纏まりの領域は明瞭であるので、このような場合には、当該一纏まりの領域を、第2のグレースケール画像から抽出する領域とすることができる。   Further, as in this embodiment, in the grayscale binarized image, the pixel value of the “region where the pixel value is“ 0 ”” surrounded by the region where the pixel value is “1” is set to “1”. It is preferable to change and create a binarized image after gap complementation, because the region extracted from the second grayscale image can be more reliably matched with the region of the cap 50. However, it is not always necessary to create a binarized image after gap compensation. For example, when the color unevenness of the end face is small, a group of regions having a pixel value of “1” in the grayscale binarized image 600 is clear. This region can be a region extracted from the second grayscale image.

また、本実施形態では、第1のグレースケール画像と第2のグレースケール画像とを作成し、第1のグレースケール画像からグレースケール2値化画像を、グレースケール2値化画像から隙間補完後2値化画像を、それぞれ作成し、隙間補完後2値化画像に基づいて定められる領域を第2のグレースケール画像から抽出して計数対象領域抽出画像を作成した。しかしながら、少なくとも、第2のグレースケール画像、隙間補完後2値化画像、及び計数対象領域抽出画像については必ずしも作成する必要はない。鋼管20の端面(キャップ50)の領域の色(端面色情報により特定される色)である場合と、鋼管20(キャップ50)の背景の色である場合とで(可及的に大きく)異なる値をとり、鋼管20の端面(キャップ50)の領域の色であるときの値と、それらの間の隙間の領域の色であるときの値との差が大きく、且つ、色のムラによって値が大きく変化しない要素として1つの要素を選択できる場合には、第1の色空間要素と第2の色空間要素とを同じ要素にすることができる。すなわち、第1の色空間要素と第2の色空間要素とが同じ要素になる場合には、グレースケール2値化画像した段階で、計数対象領域2値化画像と同等の2値化画像を得ることができる。よって、このような場合には、第2のグレースケール画像、隙間補完後2値化画像、及び計数対象領域抽出画像は不要となる。また、このことから明らかなように、本実施形態のようにして第1のグレースケール画像と第2のグレースケール画像を生成する場合には、第1の色空間要素と第2の色空間要素とが異なる要素であるのことが好ましい。   In the present embodiment, a first grayscale image and a second grayscale image are created, a grayscale binarized image is created from the first grayscale image, and a gap is compensated from the grayscale binarized image. A binarized image was created, and a region defined based on the binarized image after gap complementation was extracted from the second grayscale image to create a count target region extracted image. However, it is not always necessary to create at least the second gray scale image, the binarized image after gap interpolation, and the count target region extraction image. The color of the region of the end face (cap 50) of the steel pipe 20 (the color specified by the end face color information) differs from the case of the background color of the steel pipe 20 (cap 50) (as large as possible). The difference between the value when the color is in the region of the end face (cap 50) of the steel pipe 20 and the value when the color is in the region of the gap between them is large, and the value is due to color unevenness. When one element can be selected as an element that does not change greatly, the first color space element and the second color space element can be made the same element. That is, when the first color space element and the second color space element are the same element, a binarized image equivalent to the count target region binarized image is obtained at the stage of the grayscale binarized image. Can be obtained. Therefore, in such a case, the second gray scale image, the binarized image after gap interpolation, and the count target region extraction image are not necessary. Further, as apparent from this, when the first grayscale image and the second grayscale image are generated as in the present embodiment, the first color space element and the second color space element are generated. Are preferably different elements.

尚、以上説明した本発明の実施形態は、コンピュータがプログラムを実行することによって実現することができる。また、前記プログラムを記録したコンピュータ読み取り可能な記録媒体及び前記プログラム等のコンピュータプログラムプロダクトも本発明の実施形態として適用することができる。記録媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
また、以上説明した本発明の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。
The embodiment of the present invention described above can be realized by a computer executing a program. Further, a computer-readable recording medium in which the program is recorded and a computer program product such as the program can also be applied as an embodiment of the present invention. As the recording medium, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
In addition, the embodiments of the present invention described above are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. Is. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

10 スタック
20 鋼管
30 撮像装置
41、42 照明装置
50 キャップ
100 長尺物本数測定装置
200 上位コンピュータ
300 色空間要素選択テーブル
400 元画像
500 第1のグレースケール画像
600 グレースケール2値化画像
700 隙間補完後2値化画像
800 第2のグレースケール画像
900 計数対象領域抽出画像
1000 計数対象領域2値化画像
1100 領域分離2値化画像
1300 出力画像
DESCRIPTION OF SYMBOLS 10 Stack 20 Steel pipe 30 Imaging device 41, 42 Illumination device 50 Cap 100 Long object number measuring device 200 Host computer 300 Color space element selection table 400 Original image 500 First gray scale image 600 Gray scale binarized image 700 Gap complement Later binarized image 800 Second grayscale image 900 Count target area extraction image 1000 Count target area binarized image 1100 Area separation binarized image 1300 Output image

Claims (11)

端面が開口していない状態であり且つ所定の色で着色されている状態である複数の長尺物の本数であって、相互に隣接する長尺物の少なくとも一部の領域に隙間が形成されるように段積みされている複数の長尺物の本数を測定する長尺物本数測定装置であって、
前記複数の長尺物の端面を撮像することにより得られたカラー画像である元画像を取得する元画像取得手段と、
前記元画像取得手段により取得された元画像から、前記端面の色に応じて予め設定された第1の色空間要素の値を導出し、それぞれの画素が、当該第1の色空間要素の値に応じた画素値を有する第1のグレースケール画像を作成する第1のグレースケール画像作成手段と、
前記第1のグレースケール画像作成手段により作成された第1のグレースケール画像を2値化してグレースケール2値化画像を作成するグレースケール2値化画像作成手段と、
前記グレースケール2値化画像作成手段により作成されたグレースケール2値化画像に基づいて、前記端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離する領域分離手段と、
前記領域分離手段により分離された領域の数に基づいて、前記複数の長尺物を計数する計数手段と、
前記計数手段により計数された前記複数の長尺物の数を含む情報を出力する出力手段と、を有し、
前記第1の色空間要素は、前記段積みされている複数の長尺物の端面の色である場合と、前記段積みされている複数の長尺物の端面の背景の色である場合とで異なる値をとる要素であることを特徴とする長尺物本数測定装置。
The number of a plurality of long objects in which the end face is not open and is colored with a predetermined color, and a gap is formed in at least a partial region of the long objects adjacent to each other. A long object number measuring device for measuring the number of a plurality of long objects stacked in a stack,
Original image acquisition means for acquiring an original image which is a color image obtained by imaging the end faces of the plurality of long objects;
A value of a first color space element set in advance according to the color of the end face is derived from the original image acquired by the original image acquisition unit, and each pixel has a value of the first color space element. First grayscale image creating means for creating a first grayscale image having a pixel value according to
Grayscale binarized image creating means for binarizing the first grayscale image created by the first grayscale image creating means to create a grayscale binarized image;
Based on the grayscale binarized image created by the grayscale binarized image creating means, a group of regions having pixel values corresponding to the color of the end face is identified, and an outer edge of the identified group of regions And a region separating means for separating the group of regions into a plurality of regions by moving the positions of the inner edges in a direction in which the group of regions exists,
Counting means for counting the plurality of long objects based on the number of areas separated by the area separating means;
Output means for outputting information including the number of the plurality of long objects counted by the counting means,
When the first color space element is a color of an end face of the plurality of stacked long objects and a color of a background of the end faces of the plurality of long objects stacked A device for measuring the number of long objects characterized by having different values.
前記領域分離手段は、前記端面の色に対応する画素値を有する一纏まりの領域の外縁と内縁に位置する画素の位置を、当該画素を接点とする接線に垂直な方向であって、当該当該一纏まりの領域が存在している方向にそれぞれ移動させることにより、当該一纏まりの領域を複数の領域に分離することを特徴とする請求項1に記載の長尺物本数測定装置。   The region separating means is configured to determine the positions of pixels located at the outer edge and inner edge of a group of regions having pixel values corresponding to the color of the end face in a direction perpendicular to a tangent line with the pixel as a contact, The long object number measuring apparatus according to claim 1, wherein the group of areas is separated into a plurality of areas by moving each group in a direction in which the group of areas exists. 前記元画像取得手段により取得された元画像から、前記端面の色に応じて予め設定された第2の色空間要素の値を導出し、それぞれの画素が、当該第2の色空間要素の値に応じた画素値を有する第2のグレースケール画像を作成する第2のグレースケール画像作成手段と、
前記グレースケール2値化画像作成手段により作成されたグレースケール2値化画像に基づいて、前記端面の色に対応する画素値を有する領域を、前記第2のグレースケール画像作成手段により作成された第2のグレースケール画像から抽出して計数対象領域抽出画像を作成する計数対象領域抽出画像作成手段と、
前記計数対象領域抽出画像作成手段により作成された計数対象領域抽出画像を2値化して計数対象領域2値化画像を作成する計数対象領域2値化画像作成手段と、を更に有し、
前記領域分離手段は、前記計数対象領域2値化画像作成手段により作成された計数対象領域2値化画像から、前記端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離し、
前記第2の色空間要素は、前記段積みされている複数の長尺物の端面の色である場合の値と、それらの間の隙間の領域の色である場合の値との差が前記第1の色空間要素におけるものよりも大きくなる要素であることを特徴とする請求項1又は2に記載の長尺物本数測定装置。
A value of a second color space element set in advance according to the color of the end face is derived from the original image acquired by the original image acquisition unit, and each pixel has a value of the second color space element. Second grayscale image creating means for creating a second grayscale image having pixel values according to
Based on the grayscale binarized image created by the grayscale binarized image creating means, an area having a pixel value corresponding to the color of the end face is created by the second grayscale image creating means. Counting target area extraction image creating means for creating a counting target area extraction image by extracting from the second grayscale image;
Counting object area binarized image creating means for binarizing the counting object area extraction image created by the counting object area extraction image creating means to create a counting object area binarized image;
The region separation unit identifies and identifies a group of regions having pixel values corresponding to the color of the end face from the count target region binarized image created by the count target region binarized image creation unit. By separating the positions of the outer edge and inner edge of the group of areas in the direction in which the group of areas exists, the group of areas is separated into a plurality of areas,
The second color space element has a difference between a value when the color is an end face color of the plurality of stacked long objects and a value when the color is a color of a gap between them. The long object number measuring apparatus according to claim 1, wherein the element is larger than that in the first color space element.
前記グレースケール2値化画像作成手段により作成されたグレースケール2値化画像における、前記端面の色に対応しない画素値を有する画素からなる一纏まりの領域の画素値のうち、前記端面の色に対応する画素値を有する画素からなる一纏まりの領域に囲まれた領域の画素値を、前記端面の色に対応する画素値に変更して隙間補完後2値化画像を作成する隙間補完後2値化画像作成手段を更に有し、
前記計数対象領域抽出画像作成手段は、前記隙間補完後2値化画像作成手段により作成された隙間補完後2値化画像における、前記端面の色に対応する画素値を有する領域を、前記第2のグレースケール画像作成手段により作成された第2のグレースケール画像から抽出して計数対象領域抽出画像を作成することを特徴とする請求項3に記載の長尺物本数測定装置。
In the grayscale binarized image created by the grayscale binarized image creating means, the color of the end face among the pixel values of a group of pixels having pixel values not corresponding to the color of the end face. After gap complementation 2 for creating a binarized image after gap complementation by changing pixel values of a region surrounded by a group of pixels having corresponding pixel values to pixel values corresponding to the color of the end face It further has a value image creating means,
The counting target region extraction image creation unit is configured to extract a region having a pixel value corresponding to the color of the end face in the binarized image after gap complementation created by the gap complemented binary image creation unit. The long object count measuring apparatus according to claim 3, wherein a count target region extraction image is created by extracting from the second grayscale image created by the grayscale image creation means.
前記長尺物は、所定の色で着色されたキャップが端面に取り付けられた鋼管であることを特徴とする請求項1〜4の何れか1項に記載の長尺物本数測定装置。   The long object number measuring device according to any one of claims 1 to 4, wherein the long object is a steel pipe having a cap colored with a predetermined color attached to an end surface thereof. 端面が開口していない状態であり且つ所定の色で着色されている状態である複数の長尺物の本数であって、相互に隣接する長尺物の少なくとも一部の領域に隙間が形成されるように段積みされている複数の長尺物の本数を測定する長尺物本数測定方法であって、
前記複数の長尺物の端面を撮像することにより得られたカラー画像である元画像を取得する元画像取得工程と、
前記元画像取得工程により取得された元画像から、前記端面の色に応じて予め設定された第1の色空間要素の値を導出し、それぞれの画素が、当該第1の色空間要素の値に応じた画素値を有する第1のグレースケール画像を作成する第1のグレースケール画像作成工程と、
前記第1のグレースケール画像作成工程により作成された第1のグレースケール画像を2値化してグレースケール2値化画像を作成するグレースケール2値化画像作成工程と、
前記グレースケール2値化画像作成工程により作成されたグレースケール2値化画像に基づいて、前記端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離する領域分離工程と、
前記領域分離工程により分離された領域の数に基づいて、前記複数の長尺物を計数する計数工程と、
前記計数工程により計数された前記複数の長尺物の数を含む情報を出力する出力工程と、を有し、
前記第1の色空間要素は、前記段積みされている複数の長尺物の端面の色である場合と、前記段積みされている複数の長尺物の端面の背景の色である場合とで異なる値をとる要素であることを特徴とする長尺物本数測定方法。
The number of a plurality of long objects in which the end face is not open and is colored with a predetermined color, and a gap is formed in at least a partial region of the long objects adjacent to each other. A long object number measuring method for measuring the number of a plurality of long objects stacked in such a manner,
An original image acquisition step of acquiring an original image that is a color image obtained by imaging the end surfaces of the plurality of long objects;
A value of a first color space element set in advance according to the color of the end face is derived from the original image acquired by the original image acquisition step, and each pixel has a value of the first color space element. A first grayscale image creating step of creating a first grayscale image having a pixel value according to
A grayscale binarized image creating step of binarizing the first grayscale image created by the first grayscale image creating step to create a grayscale binarized image;
Based on the grayscale binarized image created by the grayscale binarized image creating step, a group of regions having pixel values corresponding to the color of the end face is identified, and an outer edge of the identified group of regions And a region separation step of separating the group of regions into a plurality of regions by moving the positions of the inner edges in the direction in which the group of regions exists,
A counting step of counting the plurality of long objects based on the number of regions separated by the region separation step;
An output step of outputting information including the number of the plurality of long objects counted in the counting step,
When the first color space element is a color of an end face of the plurality of stacked long objects and a color of a background of the end faces of the plurality of long objects stacked A method for measuring the number of long objects, which is an element having different values.
前記領域分離工程は、前記端面の色に対応する画素値を有する一纏まりの領域の外縁と内縁に位置する画素の位置を、当該画素を接点とする接線に垂直な方向であって、当該当該一纏まりの領域が存在している方向にそれぞれ移動させることにより、当該一纏まりの領域を複数の領域に分離することを特徴とする請求項6に記載の長尺物本数測定方法。   In the region separation step, the positions of pixels located on the outer edge and the inner edge of a group of regions having pixel values corresponding to the color of the end face are in a direction perpendicular to a tangent line with the pixel as a contact, The long object count measuring method according to claim 6, wherein the group of areas is separated into a plurality of areas by moving each group in a direction in which the group of areas exists. 前記元画像取得工程により取得された元画像から、前記端面の色に応じて予め設定された第2の色空間要素の値を導出し、それぞれの画素が、当該第2の色空間要素の値に応じた画素値を有する第2のグレースケール画像を作成する第2のグレースケール画像作成工程と、
前記グレースケール2値化画像作成工程により作成されたグレースケール2値化画像に基づいて、前記端面の色に対応する画素値を有する領域を、前記第2のグレースケール画像作成工程により作成された第2のグレースケール画像から抽出して計数対象領域抽出画像を作成する計数対象領域抽出画像作成工程と、
前記計数対象領域抽出画像作成工程により作成された計数対象領域抽出画像を2値化して計数対象領域2値化画像を作成する計数対象領域2値化画像作成工程と、を更に有し、
前記領域分離工程は、前記計数対象領域2値化画像作成工程により作成された計数対象領域2値化画像から、前記端面の色に対応する画素値を有する一纏まりの領域を識別し、識別した一纏まりの領域の外縁と内縁の位置を、それぞれ当該一纏まりの領域が存在している方向に移動させることにより、当該一纏まりの領域を複数の領域に分離し、
前記第2の色空間要素は、前記段積みされている複数の長尺物の端面の色である場合の値と、それらの間の隙間の領域の色である場合の値との差が前記第1の色空間要素におけるものよりも大きくなる要素であることを特徴とする請求項6又は7に記載の長尺物本数測定方法。
A value of a second color space element set in advance according to the color of the end face is derived from the original image acquired by the original image acquisition step, and each pixel has a value of the second color space element. A second grayscale image creating step of creating a second grayscale image having a pixel value according to
Based on the grayscale binarized image created by the grayscale binarized image creating step, an area having a pixel value corresponding to the color of the end face was created by the second grayscale image creating step. A counting target region extraction image creating step of creating a counting target region extraction image by extracting from the second grayscale image;
A counting target region binarized image creating step of binarizing the counting target region extracting image created by the counting target region extracting image creating step to create a counting target region binarized image;
The region separation step identifies and identifies a group of regions having pixel values corresponding to the color of the end face from the count target region binarized image created by the count target region binarized image creation step. By separating the positions of the outer edge and inner edge of the group of areas in the direction in which the group of areas exists, the group of areas is separated into a plurality of areas,
The second color space element has a difference between a value when the color is an end face color of the plurality of stacked long objects and a value when the color is a color of a gap between them. The method for measuring the number of long objects according to claim 6 or 7, wherein the element is larger than that in the first color space element.
前記グレースケール2値化画像作成工程により作成されたグレースケール2値化画像における、前記端面の色に対応しない画素値を有する画素からなる一纏まりの領域の画素値のうち、前記端面の色に対応する画素値を有する画素からなる一纏まりの領域に囲まれた領域の画素値を、前記端面の色に対応する画素値に変更して隙間補完後2値化画像を作成する隙間補完後2値化画像作成工程を更に有し、
前記計数対象領域抽出画像作成工程は、前記隙間補完後2値化画像作成工程により作成された隙間補完後2値化画像における、前記端面の色に対応する画素値を有する領域を、前記第2のグレースケール画像作成工程により作成された第2のグレースケール画像から抽出して計数対象領域抽出画像を作成することを特徴とする請求項8に記載の長尺物本数測定方法。
In the grayscale binarized image created by the grayscale binarized image creating step, the color of the end face among the pixel values of a group of pixels having pixel values not corresponding to the color of the end face. After gap complementation 2 for creating a binarized image after gap complementation by changing pixel values of a region surrounded by a group of pixels having corresponding pixel values to pixel values corresponding to the color of the end face It further has a value image creation process,
In the counting target region extraction image creation step, a region having a pixel value corresponding to the color of the end face in the binarized image after gap complementation created by the gap complemented binary image creation step 9. The method for measuring the number of long objects according to claim 8, wherein a count target region extraction image is created by extracting from the second gray scale image created by the gray scale image creation step.
前記長尺物は、所定の色で着色されたキャップが端面に取り付けられた鋼管であることを特徴とする請求項6〜9の何れか1項に記載の長尺物本数測定方法。   The method for measuring the number of long objects according to any one of claims 6 to 9, wherein the long object is a steel pipe having a cap colored with a predetermined color attached to an end surface thereof. 請求項1〜5の何れか1項に記載の長尺物本数測定装置の各手段としてコンピュータを機能させることを特徴とするコンピュータプログラム。   A computer program for causing a computer to function as each means of the long object number measuring apparatus according to any one of claims 1 to 5.
JP2012173112A 2012-08-03 2012-08-03 Long object number measuring device, long object number measuring method, and computer program Active JP5788367B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012173112A JP5788367B2 (en) 2012-08-03 2012-08-03 Long object number measuring device, long object number measuring method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012173112A JP5788367B2 (en) 2012-08-03 2012-08-03 Long object number measuring device, long object number measuring method, and computer program

Publications (2)

Publication Number Publication Date
JP2014032553A JP2014032553A (en) 2014-02-20
JP5788367B2 true JP5788367B2 (en) 2015-09-30

Family

ID=50282328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012173112A Active JP5788367B2 (en) 2012-08-03 2012-08-03 Long object number measuring device, long object number measuring method, and computer program

Country Status (1)

Country Link
JP (1) JP5788367B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104992222B (en) * 2015-07-21 2017-09-29 梧州学院 A kind of fast automatic method of counting of jewel based on image
CN107730448B (en) * 2017-10-31 2020-11-27 北京小米移动软件有限公司 Beautifying method and device based on image processing
CN108109133B (en) * 2017-10-31 2021-10-12 青岛大学 Silkworm egg automatic counting method based on digital image processing technology
CN108010076B (en) * 2017-11-23 2020-03-31 南通大学 End face appearance modeling method for intensive industrial bar image detection

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5228583B2 (en) * 1972-06-10 1977-07-27
JPS5315864A (en) * 1976-07-28 1978-02-14 Mitsubishi Electric Corp Automatic counting system for round particles
JPH04238592A (en) * 1991-01-23 1992-08-26 Kobe Steel Ltd Automatic bundled bar steel tally device
JP3022145B2 (en) * 1994-04-08 2000-03-15 三洋電機株式会社 Tablet inspection apparatus and tablet inspection method provided with image recognition means
US7570786B2 (en) * 2004-08-30 2009-08-04 Antoun Ateya Automatic digital object counting and verification system and associated method
JP2007206843A (en) * 2006-01-31 2007-08-16 Central Res Inst Of Electric Power Ind Method and device for counting moving body underwater or on water surface and its program
JP5077093B2 (en) * 2008-06-23 2012-11-21 大同特殊鋼株式会社 Round bar number counting device and round bar number counting method

Also Published As

Publication number Publication date
JP2014032553A (en) 2014-02-20

Similar Documents

Publication Publication Date Title
US9807280B2 (en) Image processing apparatus, method, and storage medium
JP5207719B2 (en) Label with color code, color code extraction means, and three-dimensional measurement system
EP3563345B1 (en) Automatic detection, counting, and measurement of lumber boards using a handheld device
WO2018179559A1 (en) Defect detection system for aircraft component and defect detection method for aircraft component
JP5788367B2 (en) Long object number measuring device, long object number measuring method, and computer program
US20120207379A1 (en) Image Inspection Apparatus, Image Inspection Method, And Computer Program
CN107609546A (en) A kind of caption recognition methods and device
JP5337563B2 (en) Form recognition method and apparatus
CN101261682B (en) Image processing apparatus, image processing method
CN103852034B (en) A kind of method for measuring perendicular
CN105991882B (en) Image processing apparatus and method for detecting area
KR101549495B1 (en) An apparatus for extracting characters and the method thereof
US11216905B2 (en) Automatic detection, counting, and measurement of lumber boards using a handheld device
US9628659B2 (en) Method and apparatus for inspecting an object employing machine vision
JP6395895B1 (en) Video inspection recognition device
JP6100602B2 (en) Long object number measuring device, long object number measuring method, and computer program
JP2010008159A (en) Visual inspection processing method
US11367266B2 (en) Image recognition system, image recognition method, and storage medium
JP5887242B2 (en) Image processing apparatus, image processing method, and program
JP5825226B2 (en) Pipe number counting method, pipe number counting device, and computer program
CN110084117B (en) Document table line detection method and system based on binary image segmentation projection
JP2011087144A (en) Telop character area detection method, telop character area detection device, and telop character area detection program
JP2012185810A (en) Image processing system and image processing program
KR101015646B1 (en) Face detecting apparatus and face detection using the same
KR101012729B1 (en) The system for extracting character using marker

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20140116

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140210

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140919

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150611

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150630

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150729

R150 Certificate of patent or registration of utility model

Ref document number: 5788367

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350