JP2021022028A - Image processing system, image processing method and image processing program - Google Patents

Image processing system, image processing method and image processing program Download PDF

Info

Publication number
JP2021022028A
JP2021022028A JP2019136639A JP2019136639A JP2021022028A JP 2021022028 A JP2021022028 A JP 2021022028A JP 2019136639 A JP2019136639 A JP 2019136639A JP 2019136639 A JP2019136639 A JP 2019136639A JP 2021022028 A JP2021022028 A JP 2021022028A
Authority
JP
Japan
Prior art keywords
image
image processing
interest
region
value
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.)
Pending
Application number
JP2019136639A
Other languages
Japanese (ja)
Inventor
池田 雄一
Yuichi Ikeda
雄一 池田
肇 坂上
Hajime Sakagami
肇 坂上
優 勝井
Masaru Katsui
優 勝井
金子 英司
Eiji Kaneko
英司 金子
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.)
M Soft Kk
Obayashi Corp
M Soft Co Ltd
Original Assignee
M Soft Kk
Obayashi Corp
M Soft 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 M Soft Kk, Obayashi Corp, M Soft Co Ltd filed Critical M Soft Kk
Priority to JP2019136639A priority Critical patent/JP2021022028A/en
Publication of JP2021022028A publication Critical patent/JP2021022028A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

To provide an image processing system, an image processing method, and an image processing program that identify an area of an object (for example, a reinforcing bar) with high accuracy from an image photographed by a camera.SOLUTION: An image processing system 10 of present invention includes: area of interest determination means 13 that calculates, for a processing object image 22 extracted from an image, a representative value 24 of pixels in each column direction and determines, based on a feature point 26 in a row direction of the representative value 24, an area of interest 30 for the object OB; threshold determination means 17 that determines thresholds for each area of interest 30; and generation means 19 that generates, based on the threshold value, a binary image 35 of the area of the object OB and an area excluding the object OB. The area of the object OB is identified from the photographed image of the object OB.SELECTED DRAWING: Figure 4

Description

本発明は、対象物の撮影画像から当該対象物の領域を特定する画像処理装置、画像処理方法及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program for identifying an area of the object from a captured image of the object.

従来、様々な分野において、対象物を撮影した画像から当該対象物の領域を特定する方法が採用されている。 Conventionally, in various fields, a method of identifying an area of an object from an image of the object has been adopted.

一例を挙げると、建築工事の現場などにおいては、鉄筋コンクリート造建物の鉄筋に関する施工ミスや検査ミスを防止するために配筋検査を行っている。配筋検査では、使用されている鉄筋の本数、径、ピッチなどを把握する必要があるが、全箇所についての記録は多くの手間がかかるため、配筋検査を支援する手段として、画像解析処理により配筋本数、径などを自動計測する鉄筋領域抽出装置が開発されている。従来の鉄筋領域抽出装置は例えば、鉄筋を見やすくするために鉄筋の背景に背景バー(白色のシート)を設置して、カメラで撮影し、画像解析処理によって鉄筋と背景の境界(エッジ)を特定することで鉄筋の領域を抽出するようにしている(例えば、特許文献1、2参照)。 As an example, at construction sites, bar arrangement inspections are conducted to prevent construction mistakes and inspection mistakes related to the reinforcing bars of reinforced concrete buildings. In the bar arrangement inspection, it is necessary to grasp the number, diameter, pitch, etc. of the reinforcing bars used, but since it takes a lot of time and effort to record all the parts, image analysis processing is used as a means to support the bar arrangement inspection. Has developed a reinforcing bar area extraction device that automatically measures the number of reinforcing bars, diameter, and the like. In the conventional reinforcing bar area extraction device, for example, a background bar (white sheet) is installed on the background of the reinforcing bar to make it easier to see, the image is taken with a camera, and the boundary (edge) between the reinforcing bar and the background is specified by image analysis processing. By doing so, the region of the reinforcing bar is extracted (see, for example, Patent Documents 1 and 2).

特許第5841760号公報Japanese Patent No. 5841760 特許第5412092号公報Japanese Patent No. 5412092

しかしながら、特許文献1等に記載の技術は、画像解析処理の元になる画像の撮影時の問題によって、正確に鉄筋を抽出できないケースがある。 However, the technique described in Patent Document 1 and the like may not be able to accurately extract the reinforcing bar due to a problem at the time of taking an image which is the basis of image analysis processing.

具体的には、鉄筋の領域を明瞭にするために鉄筋の背景に白色の背景バーを配置するのであるが、カメラ(例えば、コンパクトデジタルカメラ)で鉄筋を撮影する場合に太陽光やカメラのフラッシュが鉄筋に照射されると、鉄筋の一部に白とびが発生したり、鉄筋の影が映り込んだ画像となってしまう。そうなると、画像解析処理において鉄筋の領域であるのに背景と認識したり、影の部分を鉄筋と認識するなど、正確に鉄筋を抽出できない問題があった。 Specifically, a white background bar is placed on the background of the reinforcing bar to clarify the area of the reinforcing bar, but when shooting the reinforcing bar with a camera (for example, a compact digital camera), sunlight or a flash of the camera When the reinforcing bar is irradiated with, overexposure occurs in a part of the reinforcing bar, or the image shows the shadow of the reinforcing bar. In that case, there is a problem that the reinforcing bar cannot be extracted accurately, such as recognizing the area of the reinforcing bar as the background or recognizing the shadow part as the reinforcing bar in the image analysis process.

本発明は、斯かる課題に鑑みてなされ、カメラで撮影された画像から高精度に対象物(例えば、鉄筋)の領域を特定する画像処理装置、画像処理方法及び画像処理プログラムを提供するものである。 The present invention has been made in view of such a problem, and provides an image processing device, an image processing method, and an image processing program for identifying an area of an object (for example, a reinforcing bar) with high accuracy from an image taken by a camera. is there.

本発明は、対象物を撮影した画像から、該対象物の領域を特定する画像処理装置であって、前記画像から抽出した第1配列方向および、該第1配列方向に直交する第2配列方向の複数の画素を含む処理対象画像について、前記第1配列方向毎に画素の代表値を算出し、該代表値の前記第2配列方向における特徴点に基づき、前記対象物についての関心領域を決定する関心領域決定手段と、前記関心領域毎に閾値を決定する閾値決定手段と、前記閾値に基づき、前記対象物の領域と該対象物を除く領域との2値画像を生成する生成手段と、を有することを特徴とする画像処理装置にかかるものである。 The present invention is an image processing device that identifies a region of an object from an image of the object, and is a first array direction extracted from the image and a second array direction orthogonal to the first array direction. For the image to be processed containing the plurality of pixels of, the representative value of the pixel is calculated for each of the first array directions, and the region of interest for the object is determined based on the feature points of the representative value in the second array direction. A region of interest determining means, a threshold determining means for determining a threshold for each region of interest, and a generating means for generating a binary image of a region of the object and a region excluding the object based on the threshold. It is related to an image processing apparatus characterized by having.

また、本発明は、対象物を撮影した画像から、該対象物の領域を特定する画像処理方法であって、前記画像から抽出した第1配列方向および、該第1配列方向に直交する第2配列方向の複数の画素を含む処理対象画像について、前記第1配列方向毎にの画素の代表値を算出し、該代表値の前記第2配列方向における特徴点に基づき、前記対象物についての関心領域を決定する関心領域決定ステップと、前記関心領域毎に閾値を決定する閾値決定ステップと、前記閾値に基づき、前記対象物の領域と該対象物を除く領域との2値画像を生成する生成ステップと、を有することを特徴とする画像処理方法にかかるものである。 Further, the present invention is an image processing method for identifying a region of an object from an image obtained by photographing the object, and is a second arrangement direction extracted from the image and a second array orthogonal to the first arrangement direction. For a processing target image including a plurality of pixels in the arrangement direction, a representative value of pixels for each of the first arrangement directions is calculated, and based on the feature points of the representative value in the second arrangement direction, interest in the object. Generation of generating a binary image of the region of the object and the region excluding the object based on the threshold, the step of determining the region of interest that determines the region, the step of determining the threshold for each region of interest. It relates to an image processing method characterized by having steps.

また、本発明は、コンピュータに、上記の画像処理方法を実行させるための画像処理プログラムにかかるものである。 The present invention also relates to an image processing program for causing a computer to execute the above image processing method.

本発明によれば、カメラで撮影された画像から高精度に対象物(例えば、鉄筋)の領域を特定する画像処理装置、画像処理方法及び画像処理プログラムを提供することができる。 According to the present invention, it is possible to provide an image processing device, an image processing method, and an image processing program that identify a region of an object (for example, a reinforcing bar) with high accuracy from an image taken by a camera.

本実施形態に係る画像処理装置の概要を示す図であり、(A)がハードウエア構成の概略の一例を示すブロック図であり、(B)が機能構成の概略の一例を示すブロック図である。It is a figure which shows the outline of the image processing apparatus which concerns on this embodiment, (A) is a block diagram which shows an outline example of a hardware configuration, (B) is a block diagram which shows an outline example of a functional configuration. .. (A)本実施形態に係る撮影画像を示す図であり、(B)処理対象画像を示す図である。(A) It is a figure which shows the photographed image which concerns on this Embodiment, and (B) is a figure which shows the image to be processed. 関心領域の決定方法を示す概要図であり、(A)は、処理対象画像の一例を示す図であり、(B)は、代表値の行方向における変化(推移)を示すグラフである。It is a schematic diagram which shows the method of determining the region of interest, (A) is the figure which shows an example of the image to be processed, and (B) is the graph which shows the change (transition) of the representative value in the row direction. 関心領域の決定方法を示す概要図であり、(A)は処理対象画像の一つの対象物付近を抜き出して示す図であり、(B)は(A)の複数の画素群を示す概要図であり、(C)は処理対象画像の一つの対象物付近を抜き出して示す図であり、(D)は、(C)に対応する代表値の行方向における変化の一例を示す図である。It is a schematic diagram which shows the method of determining the region of interest, (A) is the figure which shows by extracting the vicinity of one object of the processing target image, (B) is the schematic diagram which shows the plurality of pixel groups of (A). Yes, (C) is a diagram showing the vicinity of one object of the processing target image extracted, and (D) is a diagram showing an example of a change in the row direction of the representative value corresponding to (C). (A)は、関心領域決定後の処理対象画像の一例を示す図であり、(B)は、関心領域30に含まれる画素の輝度分布を示すヒストグラムである。(A) is a diagram showing an example of the image to be processed after the region of interest is determined, and (B) is a histogram showing the luminance distribution of the pixels included in the region of interest 30. (A)は、撮影画像の一例であり、(B)は関心領域30の一例を示す図であり、(C)は2値画像の一例である。(A) is an example of a photographed image, (B) is a diagram showing an example of an area of interest 30, and (C) is an example of a binary image. 本実施形態に係る画像処理方法の処理の流れの一例を示すフロー図である。It is a flow figure which shows an example of the processing flow of the image processing method which concerns on this embodiment. 本実施形態の関心領域決定処理の流れの一例を示すフロー図である。It is a flow figure which shows an example of the flow of interest area determination processing of this embodiment. 本実施形態の閾値決定処理の流れの一例を示すフロー図である。It is a flow figure which shows an example of the flow of the threshold value determination process of this embodiment. 本実施形態の生成処理の流れの一例を示すフロー図である。It is a flow figure which shows an example of the flow of the generation process of this embodiment.

<画像処理装置>
以下、図面を参照しながら、本発明を実施するための最良の形態を説明する。本発明の実施の形態に係る画像処理装置10は、対象物を撮影した画像から、該対象物の領域を特定するものである。本実施形態の画像処理装置10は、様々な分野で利用可能であり、本実施形態の対象物とは、例えば、カメラ(例えば、コンパクトデジタルカメラなど)で静止画として撮影可能な物体である。一例として、画像処理装置10は、建築(建設)現場などにおける配筋検査を支援する手段の一部に適用すると好適であり、以下、対象物が鉄筋である場合を例に具体的に説明する。
<Image processing device>
Hereinafter, the best mode for carrying out the present invention will be described with reference to the drawings. The image processing device 10 according to the embodiment of the present invention identifies a region of the object from an image obtained by photographing the object. The image processing device 10 of the present embodiment can be used in various fields, and the object of the present embodiment is, for example, an object that can be photographed as a still image by a camera (for example, a compact digital camera). As an example, the image processing device 10 is preferably applied to a part of means for supporting a bar arrangement inspection at a construction (construction) site or the like, and a case where the object is a reinforcing bar will be specifically described below. ..

図1は、本実施形態の画像処理装置10の概要を示す図であり、同図(A)がハードウエア構成の概略の一例を示すブロック図であり、同図(B)が機能構成の概略の一例を示すブロック図である。 1A and 1B are diagrams showing an outline of the image processing apparatus 10 of the present embodiment, FIG. 1A is a block diagram showing an outline of a hardware configuration, and FIG. 1B is an outline of a functional configuration. It is a block diagram which shows an example.

図1(A)を参照して、画像処理装置10は、本実施の形態に係る画像処理方法を実施することができる装置である。画像処理装置10は例えば、制御手段1と、記憶手段3と、入力手段(入力インターフェイス)5と、出力手段(出力インターフェイス)7と、通信手段9などを有するコンピュータである。より具体的には、画像処理装置10は、例えば、スタンドアロンタイプのパーソナルコンピュータ(personal computer:PC)の他、サーバ装置とネットワークを介して接続するクライアント端末装置(PC)や、移動通信網や近距離通信網と接続可能なスマートフォンやタブレット、あるいはPDA(personal digital assistant(personal data assistant))などの携帯端末であってもよい。 With reference to FIG. 1A, the image processing apparatus 10 is an apparatus capable of carrying out the image processing method according to the present embodiment. The image processing device 10 is, for example, a computer having a control means 1, a storage means 3, an input means (input interface) 5, an output means (output interface) 7, a communication means 9, and the like. More specifically, the image processing device 10 includes, for example, a stand-alone personal computer (PC), a client terminal device (PC) that connects to a server device via a network, a mobile communication network, or a nearby device. It may be a smartphone or tablet that can be connected to a distance communication network, or a mobile terminal such as a PDA (personal digital assistant (personal data assistant)).

制御手段1は、演算処理装置(CPU;central processing unit、MPU;microprocessor unit等))を備え、各種の演算処理及びハードウェアに対する各種の制御処理を行う。また、制御手段1は、記憶手段3に記憶(インストール)されたオペレーティングシステム(OS;Operating System)、各種アプリケーションプログラム、ブラウザソフトウェアを実行する。また、制御手段1は、記憶手段3に記憶されている本実施形態の画像処理プログラムを読み出して実行することで、本実施形態の画像処理を実行する。つまり制御手段1の一部は画像処理手段として機能する。 The control means 1 includes an arithmetic processing unit (CPU; central processing unit, MPU; microprocessor unit, etc.) and performs various arithmetic processes and various control processes for hardware. Further, the control means 1 executes an operating system (OS; Operating System) stored (installed) in the storage means 3, various application programs, and browser software. Further, the control means 1 executes the image processing of the present embodiment by reading and executing the image processing program of the present embodiment stored in the storage means 3. That is, a part of the control means 1 functions as an image processing means.

記憶手段3は、主記憶装置(メインメモリ(RAM;Random Access Memory)、ストレージ、ROM(Read Only Memory)など)であるが、外部記憶装置を含んでもよい。記憶手段3には、OS、ファームウェア、ブラウザソフトウェア、各種アプリケーションプログラム、各種ドライバの他、各種データ(対象物を撮影した画像(撮像)データや当該画像データを加工した画像データ、その他の画像データ、テキストデータなど各種アプリケーションプログラムで処理可能なデータ、ドキュメント)などが記憶、保存可能である。 The storage means 3 is a main storage device (main memory (RAM; Random Access Memory), storage, ROM (Read Only Memory), etc.), but may include an external storage device. The storage means 3 includes OS, firmware, browser software, various application programs, various drivers, and various data (image (imaging) data obtained by photographing an object, image data obtained by processing the image data, and other image data. Data that can be processed by various application programs such as text data, documents) can be stored and saved.

入力手段5は例えば、画像処理装置10を操作するユーザからの命令等を受け付ける手段であり、キーボード、マウス、タッチパネルなどの操作手段を含む。また、入力手段(入力インターフェイス)5は、例えば、通信手段9や外部入力手段(不図示)を介して、対象物を撮影した画像(撮像)データや当該画像データを加工した画像データ(以下、画像データは単に「画像」ともいう)の入力を受け付ける。 The input means 5 is, for example, a means for receiving a command or the like from a user who operates the image processing device 10, and includes an operation means such as a keyboard, a mouse, and a touch panel. Further, the input means (input interface) 5 is, for example, an image (imaging) data obtained by photographing an object or image data obtained by processing the image data (hereinafter, not shown) via a communication means 9 or an external input means (not shown). Image data simply accepts input (also referred to as "image").

出力手段(出力インターフェイス)7は、画像処理結果の出力などを行う手段であり、例えば、ディスプレイなどの表示手段および/またはプリンターなどに出力するためのインターフェイスである。 The output means (output interface) 7 is a means for outputting an image processing result or the like, and is, for example, an interface for outputting to a display means such as a display and / or a printer.

通信手段9は、通信回線(例えば、インターネットや移動体通信網など)を介して外部の装置と通信を行なう手段であるが、通信手段9を有していなくても良い。 The communication means 9 is a means for communicating with an external device via a communication line (for example, the Internet or a mobile communication network), but the communication means 9 may not be provided.

同図(B)を参照して、本実施形態に係る画像処理装置10の機能について説明する。画像処理装置10は、画像取得手段11と、関心領域決定手段13と、補正手段15と、閾値決定手段17と、生成手段19などを有し、対象物を撮影した画像(撮影画像)から、該対象物の領域を特定する。 The function of the image processing apparatus 10 according to the present embodiment will be described with reference to FIG. The image processing device 10 includes an image acquisition means 11, a region of interest determination means 13, a correction means 15, a threshold value determination means 17, a generation means 19, and the like, and is obtained from an image (captured image) obtained by photographing an object. Identify the area of the object.

画像取得手段11は、対象物の画像を含む処理対象画像を取得する。処理対象画像とは、本実施形態の画像処理装置10で行なう画像処理の入力データとなる画像である。より具体的には、対象物(例えば、鉄筋)を撮影した画像(撮影画像)をグレースケール画像に変換し、解析すべき対象物を例えば複数含む所定の範囲を抽出(切り出し)した画像である。 The image acquisition means 11 acquires a processing target image including an image of the object. The image to be processed is an image that is input data for image processing performed by the image processing device 10 of the present embodiment. More specifically, it is an image obtained by converting an image (photographed image) of an object (for example, a reinforcing bar) into a grayscale image and extracting (cutting out) a predetermined range including a plurality of objects to be analyzed, for example. ..

図2は撮影画像21と処理対象画像22の一例を示す図である。同図(A)が撮影画像21であり、同図(B)が処理対象画像22である。 FIG. 2 is a diagram showing an example of a captured image 21 and a processing target image 22. FIG. 2A is a captured image 21, and FIG. 2B is a processing target image 22.

同図(A)に示すように、撮影画像21は、例えば建築(建設)現場等において、対象物OBである鉄筋の背景にバー状のシート(背景バー)BSを設置して、カメラで撮影した画像である。背景バーBSは対象物OBを見やすくするためのシートであり、対象物OBとの色調差、明暗差(コントラスト差)のある単色であることが望ましく、ここでは白色のシートである。 As shown in FIG. 2A, the photographed image 21 is photographed by a camera, for example, at a construction (construction) site or the like, in which a bar-shaped sheet (background bar) BS is installed in the background of a reinforcing bar which is an object OB. It is an image that was made. The background bar BS is a sheet for making the object OB easier to see, and is preferably a single color having a color tone difference and a contrast difference (contrast difference) with the object OB, and is a white sheet here.

同図(B)に示すように処理対象画像22は、撮影画像21をグレースケール画像に変換した後、背景BG(背景バーBSの一部)と少なくとも1つの対象物(鉄筋)OBを含むように、一部(同図(A)に太線で示す)を矩形状に抜き出し(切り出し)た画像である。また、処理対象画像22は、第1配列方向および、該第1配列方向に直交する第2配列方向の複数の画素を含む。ここで第1配列方向は例えば列方向(同一列の方向、紙面縦方向、垂直方向)であり、第2配列方向は行方向(同一行の方向、紙面横方向、水平方向)である。すなわち、処理対象画像22は例えば、列方向にn個(n≧2)、行方向(紙面横方向、水平方向)にm個(m≧2)の複数の画素(n行m列の画素)が集合した画像である。また、対象物OBである鉄筋はその軸が例えば第1配列方向(垂直方向)に沿い、処理対象画像22に少なくとも1つ含まれる。この例では、処理対象画像22には対象物OBとして、軸が垂直方向に沿う(軸が第1配列方向に沿う)ように配置された5本の鉄筋の画像が含まれるとともに、実際の対象物OBに隣接してその影SDが写り込み、対象物OBと背景BGの間の輝度を有する領域が存在している場合を例示している。屋外や屋内の不規則な光源の下で撮影された撮影画像21の場合、同図(B)に示すように対象物OBに隣接してその影SDが生じる場合が多く、その場合撮影画像21をグレースケール画像に変換すると同図(B)に示すように対象物OBの周囲に、背景BGの白色よりも輝度値の低い意図しない領域が存在してしまう。 As shown in FIG. 2B, the processed image 22 includes a background BG (a part of the background bar BS) and at least one object (reinforcing bar) OB after converting the captured image 21 into a grayscale image. In addition, it is an image obtained by extracting (cutting out) a part (indicated by a thick line in the figure (A)) in a rectangular shape. Further, the image to be processed 22 includes a plurality of pixels in the first array direction and the second array direction orthogonal to the first array direction. Here, the first arrangement direction is, for example, the column direction (the direction of the same column, the vertical direction of the paper surface, the vertical direction), and the second arrangement direction is the row direction (the direction of the same row, the horizontal direction of the paper surface, the horizontal direction). That is, for example, the image to be processed 22 has n (n ≧ 2) pixels in the column direction and m (m ≧ 2) pixels in the row direction (horizontal and horizontal directions) (pixels in n rows and m columns). Is a collection of images. Further, the reinforcing bar which is the object OB has at least one axis thereof along the first arrangement direction (vertical direction) and is included in the processing target image 22. In this example, the image to be processed 22 includes an image of five reinforcing bars arranged so that the axes are along the vertical direction (the axes are along the first arrangement direction) as the object OB, and is an actual object. The case where the shadow SD is reflected adjacent to the object OB and there is a region having brightness between the object OB and the background BG is illustrated. In the case of the photographed image 21 taken outdoors or indoors under an irregular light source, the shadow SD is often generated adjacent to the object OB as shown in FIG. (B), and in that case, the photographed image 21 Is converted into a grayscale image, and as shown in FIG. 3B, an unintended region having a brightness value lower than the white color of the background BG exists around the object OB.

本実施形態ではこのような場合でも影SDをできる限り排除して対象物OBの位置の特定が可能であるので、同図(B)に示す例を用いているが、影SDが生じていない場合であっても同様に実施ができ、同様の効果が得られることはもちろんである。 In the present embodiment, even in such a case, the shadow SD can be eliminated as much as possible to specify the position of the object OB. Therefore, the example shown in FIG. 3B is used, but the shadow SD does not occur. Of course, it can be carried out in the same manner even in the case, and the same effect can be obtained.

ここで、画像取得手段11は、同図(B)に示すような処理対象画像22(対象物OBの特定が容易なグレースケール画像)を取得できればよく、撮影画像21は、同図(A)に示すような画像に限らない。また、画像取得手段11は、外部の装置等から入力手段5を介して受け付けた(記憶手段3に記憶された)撮影画像21を取得し、処理対象画像22を抽出(加工)してもよいし、外部の装置等から入力手段5を介して直接的に受け付けた(記憶手段3に記憶された、加工済みの)処理対象画像22を取得してもよい。また、処理対象画像22に含まれる対象物(鉄筋)の数は複数でなく単数でもよい。また、処理対象画像22は、グレースケール画像に限らず、R・G・Bの1または複数の階調で表現された画像であってもよいが、グレースケール画像の方が対象物の特定が容易で好適である。 Here, the image acquisition means 11 only needs to be able to acquire the processing target image 22 (grayscale image in which the object OB can be easily identified) as shown in the figure (B), and the captured image 21 is the photographed image (A). It is not limited to the image shown in. Further, the image acquisition means 11 may acquire a captured image 21 (stored in the storage means 3) received from an external device or the like via the input means 5, and extract (process) the image to be processed 22. Then, the processed target image 22 (stored in the storage means 3 and processed) directly received from an external device or the like via the input means 5 may be acquired. Further, the number of objects (reinforcing bars) included in the processing target image 22 may be singular rather than plural. Further, the processing target image 22 is not limited to the gray scale image, and may be an image expressed by one or a plurality of gradations of R, G, and B, but the gray scale image can specify the target object. Easy and suitable.

再び図1(B)を参照して、関心領域決定手段13は、画像取得手段11が取得した処理対象画像22について、各第1配列方向(例えば、各列方向)毎に画素の代表値を算出する。そして代表値の第2配列方向(例えば、行方向)における特徴点に基づき、対象物についての関心領域(Region Of Interest:ROI)30を決定する。 With reference to FIG. 1B again, the region of interest determination means 13 sets a representative value of pixels for each first arrangement direction (for example, each column direction) of the processing target image 22 acquired by the image acquisition means 11. calculate. Then, the region of interest (ROI) 30 for the object is determined based on the feature points in the second arrangement direction (for example, the row direction) of the representative values.

図3および図4は、関心領域30の決定方法を説明する概要図である。図3(A)は、処理対象画像22の一例を示す図であり、同図(B)は、代表値の行方向における変化(推移)を示すグラフである。また図4は、図3における一つの対象物OB部分を拡大して示す図であり、同図(A)および同図(C)が図3(A)に示す処理対象画像22の一つの対象物OB付近を抜き出して示す図であり、同図(B)は同図(A)の複数の画素群23を示す概要図であり、同図(D)は、同図(C)の対象物OBとそれに対応する代表値(平均輝度値)24の行方向(横方向、水平方向)における変化の一例を示す図である。
なお、図4(B)は説明の便宜上、1画素を拡大して示している。
3 and 4 are schematic views illustrating a method for determining the region of interest 30. FIG. 3A is a diagram showing an example of the image 22 to be processed, and FIG. 3B is a graph showing a change (transition) of a representative value in the row direction. Further, FIG. 4 is an enlarged view showing an OB portion of one object in FIG. 3, and FIG. 4A and FIG. 4C are one object of the processing target image 22 shown in FIG. 3A. It is a figure which shows by extracting the vicinity of object OB, FIG. (B) is a schematic view which shows a plurality of pixel groups 23 of FIG. (A), and FIG. (D) is an object of FIG. It is a figure which shows an example of the change in the row direction (horizontal direction, horizontal direction) of OB and the corresponding representative value (average luminance value) 24.
Note that FIG. 4B shows one pixel enlarged for convenience of explanation.

まず関心領域決定手段13は、処理対象画像22について、各列方向の代表値を算出する。具体的にはまず、図3(A),図4(A)および同図(B)に示すように、n行m列の画素の集合である処理対象画像22について、最も左端の1列目から順次、各列方向(縦方向、垂直方向)に複数の画素群23(23A,23B…23X…23m)を切り出す。切り出した各画素群23にはそれぞれ、図4(B)に示すように列方向にn個の画素Pxが含まれている。 First, the region of interest determination means 13 calculates a representative value in each column direction for the image 22 to be processed. Specifically, first, as shown in FIGS. 3 (A), 4 (A), and (B), the leftmost first column of the processing target image 22, which is a set of pixels in n rows and m columns. A plurality of pixel groups 23 (23A, 23B ... 23X ... 23m) are sequentially cut out in each column direction (vertical direction, vertical direction). Each of the cut out pixel groups 23 includes n pixels Px in the column direction as shown in FIG. 4 (B).

そして、「各列方向の代表値」とは、、各列毎に抽出した画素群23(23A,23B…23X…23m)ごとの代表値であり、例えば、各画素群23を構成するn個の画素の輝度を平均した値(各列の画素Px(画素群23)の平均輝度値)である。 The "representative value in each column direction" is a representative value for each pixel group 23 (23A, 23B ... 23X ... 23m) extracted for each column, and for example, n elements constituting each pixel group 23. It is a value obtained by averaging the brightness of the pixels of (the average brightness value of the pixels Px (pixel group 23) in each column).

関心領域決定手段13は、処理対象画像22を横(水平)方向に一端から他端まで(1列目からm列目まで)の画素群23のそれぞれについて代表値(平均輝度値24(24A、24B…24X…24m))を算出し、得られた平均輝度値24の行方向(横方向、水平方向)における変化を示すグラフ(図3(B)、図4(D))を取得する。図3(B)は同図(A)に,図4(D)は同図(C)に対応する処理対象画像22(対象物OB)と対応させて示している。 The region of interest 13 determines representative values (average luminance value 24 (24A, 24A,) for each of the pixel groups 23 from one end to the other end (from the first row to the mth row) of the image 22 to be processed in the horizontal (horizontal) direction. 24B ... 24X ... 24m))) is calculated, and graphs (FIGS. 3B and 4D) showing changes in the obtained average luminance value 24 in the row direction (horizontal direction, horizontal direction) are acquired. FIG. 3 (B) is shown in FIG. 3 (A), and FIG. 4 (D) is shown in correspondence with the processing target image 22 (object OB) corresponding to FIG. 3 (C).

図4(A),同図(B)を参照して、例えば、画素群23Aは、背景BG部分の画素群であり、n個の画素はいずれも最大輝度(白色)であるため平均輝度値24Aは最大輝度(白色)となる。また、画素群23Xは、対象物(鉄筋)OBの中心付近の画素群23であり、n個の画素はいずれも比較的輝度が小さく、平均輝度値24Xは、最小輝度(黒色)に近い値となる。また、画素群23Bは、背景BG部分と対象物OBの境界付近の画素群であり、n個の画素には輝度の大きいものと小さいものが混在し、平均輝度値24Xは、中間程度の輝度(グレー)となる。 With reference to FIGS. 4 (A) and 4 (B), for example, the pixel group 23A is a pixel group of the background BG portion, and all n pixels have the maximum luminance (white), so that the average luminance value is obtained. 24A has the maximum brightness (white). Further, the pixel group 23X is a pixel group 23 near the center of the object (reinforcing bar) OB, all of the n pixels have relatively low brightness, and the average brightness value 24X is a value close to the minimum brightness (black). It becomes. Further, the pixel group 23B is a pixel group near the boundary between the background BG portion and the object OB, and the n pixels are a mixture of high-luminance and low-luminance, and the average brightness value 24X is an intermediate brightness. It becomes (gray).

このようにして、処理対象画像22の全ての列について代表値(平均輝度値)24を算出し、プロットすると同図(D)に示す代表値24の変化が得られる。この代表値の変化は、行方向(水平方向)における輝度の傾向を示すものとなる。 In this way, the representative value (average luminance value) 24 is calculated for all the columns of the image to be processed 22 and plotted to obtain a change in the representative value 24 shown in FIG. This change in the representative value indicates the tendency of the brightness in the row direction (horizontal direction).

次に関心領域決定手段13は、代表値24における特徴点26を決定する。この特徴点26とは、輝度の傾向が大か小か(白色・黒色)を振り分ける特徴となる代表値24であり、具体的には輝度の大小の境界(以下、「輝度振り分け閾値25」という。)となる輝度と同じ値を有する代表値24である。 Next, the region of interest determination means 13 determines the feature point 26 at the representative value 24. The feature point 26 is a representative value 24 which is a feature of allocating whether the tendency of the luminance is large or small (white / black), and specifically, the boundary between the magnitude of the luminance (hereinafter referred to as “luminance distribution threshold 25””. It is a representative value 24 having the same value as the brightness of (.).

ここでは一例として、図3(B)に示す全ての代表値(平均輝度値)24のうち、最大の平均輝度値(最大平均輝度値)24MAXと、最小の平均輝度値(最小平均輝度値)24MINの中間の輝度値(平均値)を、輝度振り分け閾値25とする。なお、図4(D)では説明の便宜上、一つの対象物OB内で最大平均輝度値24MAXと、最小平均輝度値24MINを示しているが、実際には図3(B)に示すように処理対象画像22内の最大平均輝度値24MAXと、最小平均輝度値24MINである。 Here, as an example, of all the representative values (average brightness values) 24 shown in FIG. 3 (B), the maximum average brightness value (maximum average brightness value) 24MAX and the minimum average brightness value (minimum average brightness value) The brightness value (average value) in the middle of 24MIN is set as the brightness distribution threshold 25. In FIG. 4D, for convenience of explanation, the maximum average luminance value 24MAX and the minimum average luminance value 24MIN are shown in one object OB, but the processing is actually performed as shown in FIG. 3B. The maximum average luminance value 24MAX and the minimum average luminance value 24MIN in the target image 22.

関心領域決定手段13は、図3(B),図4(D)に示すように輝度振り分け閾値25と代表値24の交点を特徴点26とする。本実施形態のように、対象物OBの両側に背景BGが配置されている画像の場合、理論上は、輝度が大きい領域から特徴点26(26A)を通過して輝度が小さい領域になり、再び特徴点26(26B)を通過して輝度が大きい領域になる。つまり、処理対象画像22を例えば左端部から走査(トレース)した場合、最初の特徴点26Aと次の特徴点26Bの間は、輝度が小さい領域となり対象物OBの存在が推定される領域となる。なお、実際上は2つの特徴点26A,26B以外にも、意図しない特徴点26が含まれる場合があるが、それについては後述する。 As shown in FIGS. 3 (B) and 4 (D), the region of interest 13 has a feature point 26 at the intersection of the luminance distribution threshold value 25 and the representative value 24. In the case of an image in which background BGs are arranged on both sides of the object OB as in the present embodiment, theoretically, the area where the brightness is high changes to the area where the brightness is low after passing through the feature point 26 (26A). It passes through the feature point 26 (26B) again and becomes a region having high brightness. That is, when the image 22 to be processed is scanned (traced) from the left end, for example, the area between the first feature point 26A and the next feature point 26B is a region where the brightness is low and the presence of the target object OB is estimated. .. In practice, in addition to the two feature points 26A and 26B, an unintended feature point 26 may be included, which will be described later.

関心領域決定手段13は、処理対象画像22の例えば左端部から順次、隣り合う2つの特徴点26を一組として輝度が大きい傾向の区間と小さい傾向の区間とを振り分けるマスク27を設定する。つまり、図3(B)に示すように、行方向(水平方向、横方向)に沿って、例えば左から1番目の特徴点26Aと2番目の特徴点26Bを用いて1つのマスク27(27A)を設定し、3番目の特徴点26Cと4番目の特徴点26Dを用いて1つのマスク27Bを設定する。 The region of interest 13 determines a mask 27 that sequentially sets two adjacent feature points 26, for example, from the left end of the image 22 to be processed, as a set and divides a section having a tendency of high brightness and a section having a tendency to have low brightness. That is, as shown in FIG. 3B, one mask 27 (27A) using, for example, the first feature point 26A and the second feature point 26B from the left along the row direction (horizontal direction, horizontal direction). ) Is set, and one mask 27B is set using the third feature point 26C and the fourth feature point 26D.

マスク27は、図4(D)に一点鎖線で示すように、一組の特徴点26を含む垂直方向の線分を長辺とする矩形領域であり、理論的には対象物OBと対応している。つまり、図3(B)に示すように、対象物OB1、OB2、OB3…のそれぞれに対応してマスク27A、27B、27C…が設定される。 As shown by the alternate long and short dash line in FIG. 4D, the mask 27 is a rectangular region having a long side of a vertical line segment including a set of feature points 26, and theoretically corresponds to an object OB. ing. That is, as shown in FIG. 3B, masks 27A, 27B, 27C ... Are set corresponding to the objects OB1, OB2, OB3 ..., respectively.

以下、説明の便宜上、行方向に並ぶ代表値24の変化のグラフにおいて、輝度振り分け閾値25以下の区間(輝度が小さい傾向の区間)を「ON区間」といい、輝度振り分け閾値25を超える区間(輝度が大きい傾向の区間)を「OFF区間」という。つまり、マスク27は、ON区間とOFF区間を振り分けるマスクといえる。 Hereinafter, for convenience of explanation, in the graph of changes in the representative values 24 arranged in the row direction, a section having a luminance distribution threshold value of 25 or less (a section having a tendency to have low luminance) is referred to as an “ON section” and a section exceeding the luminance distribution threshold value 25 (a section having a tendency to have low luminance) The section where the brightness tends to be high) is called an "OFF section". That is, the mask 27 can be said to be a mask that divides the ON section and the OFF section.

ここで、図3を参照すると、対象物(鉄筋)OBの内部(中心付近)はいずれも連続してON区間となっている。しかしながら、例えば、建設現場の配筋検査などの場合は特に、対象物である鉄筋OBは屋外や、屋内の不規則な周辺光の中で固定された状態にあり、画像処理に最適な状態での撮影が困難である場合が多い。 Here, referring to FIG. 3, the inside (near the center) of the object (reinforcing bar) OB is continuously turned on. However, for example, especially in the case of bar arrangement inspection at a construction site, the reinforcing bar OB, which is the object, is in a fixed state outdoors or indoors in irregular ambient light, and is in an optimum state for image processing. It is often difficult to shoot.

具体的には、鉄筋OBに強い太陽光やカメラのフラッシュが照射される場合などがあると、鉄筋OBの表面が明るくなって(光って)しまい、その結果対象物OBの内部にOFF区間が生じてしまう場合がある。この場合、本来対象物(鉄筋)OBとして画像処理すべきところ、意図しない特徴点26およびOFF区間の発生により、鉄筋OBが実物より細いものと誤認識されるなど、問題が生じる。 Specifically, when the reinforcing bar OB is irradiated with strong sunlight or a camera flash, the surface of the reinforcing bar OB becomes bright (shining), and as a result, an OFF section is formed inside the object OB. It may occur. In this case, although the image should be processed as the object (reinforcing bar) OB, there is a problem that the reinforcing bar OB is erroneously recognized as thinner than the actual object due to the occurrence of the unintended feature point 26 and the OFF section.

そこで、関心領域決定手段13は、意図しないOFF区間が発生しないように、すなわち意図しない特徴点26が存在している場合には、それを排除する補正手段(白とびの補正処理を行う手段)15(図1(B)参照)を有している。これにより、本実施形態では、屋外や屋内の不規則な周辺光の中で撮影された画像であっても、対象物OBの領域を連続したON区間と認識することが可能となり(対象物OB毎に1つのマスク27を設定可能となり)、対象物OBの領域を特定する精度が高まる。なお、補正手段15の補正処理の詳細については、後述する。 Therefore, the region of interest determination means 13 is a correction means (means for performing overexposure correction processing) for preventing an unintended OFF section from occurring, that is, eliminating an unintended feature point 26 when it exists. It has 15 (see FIG. 1 (B)). Thereby, in the present embodiment, it is possible to recognize the region of the object OB as a continuous ON section even if the image is taken in irregular ambient light outdoors or indoors (object OB). One mask 27 can be set for each), and the accuracy of identifying the area of the object OB is improved. The details of the correction process of the correction means 15 will be described later.

そして、関心領域決定手段13は、対象物OB毎に設定されたマスク27に基づき、一つの対象物OBについて行方向に並ぶ一組の関心領域30を決定する。図4(D)を参照して詳細に説明すると、まず1つのマスク27について行方向(水平方向)の幅L1と、その例えば1/2の幅L2を算出する。その後、2つの特徴点26(26A,26B)をそれぞれ中心として、行方向(水平方向)にマスク27の1/2の幅L2をそれぞれ確保した矩形の領域を処理対象画像22において特定し、これを関心領域30と決定する。つまり図4(C)に示すように、1つの対象物OBに対して、左右一対(一組)の関心領域30(30A,30B)が決定され、図3(A)に示すように処理対象画像22の全ての対象物OBについて一組の関心領域30が決定される。 Then, the area of interest determination means 13 determines a set of areas of interest 30 arranged in the row direction for one object OB based on the mask 27 set for each object OB. Explaining in detail with reference to FIG. 4D, first, the width L1 in the row direction (horizontal direction) and the width L2 of 1/2, for example, are calculated for one mask 27. After that, a rectangular area having a width L2 of 1/2 of the mask 27 secured in the row direction (horizontal direction) with the two feature points 26 (26A and 26B) as centers is specified in the image 22 to be processed. Is determined as the region of interest 30. That is, as shown in FIG. 4C, a pair of left and right interest regions 30 (30A, 30B) are determined for one object OB, and as shown in FIG. 3A, the processing target is determined. A set of regions of interest 30 is determined for all object OBs in image 22.

このように決定した関心領域30のそれぞれにつき、閾値決定手段17によって対象物OBの領域を解析し、生成手段19によって対象物OBとそれ以外の領域の2値化を行なう。 For each of the regions of interest 30 determined in this way, the region of the object OB is analyzed by the threshold value determining means 17, and the target OB and the other regions are binarized by the generating means 19.

図5を参照して閾値決定手段17について説明する。同図(A)は、関心領域30決定後の処理対象画像22の一例を示す図であり、同図(B)は、ある1つの関心領域30(30A)に含まれる画素の輝度分布を示すヒストグラム(平滑処理済み)の一例であり、横軸が輝度値[nt]、縦軸が画素数[個]である。 The threshold value determining means 17 will be described with reference to FIG. FIG. (A) is a diagram showing an example of the processing target image 22 after the region of interest 30 is determined, and FIG. (B) shows the brightness distribution of pixels included in a certain region of interest 30 (30A). This is an example of a histogram (smoothed), where the horizontal axis is the luminance value [nt] and the vertical axis is the number of pixels [pieces].

閾値決定手段17は、関心領域30毎に当該関心領域30内の全画素についての輝度のヒストグラム(以下の説明では単に「ヒストグラム」ともいう。)を算出して、平滑処理を行う。なお、平滑処理については後述する。このようにして得られたヒストグラムを同図(B)に示している。 The threshold value determining means 17 calculates a luminance histogram (also simply referred to as “histogram” in the following description) for all the pixels in the interest region 30 for each interest region 30, and performs smoothing processing. The smoothing process will be described later. The histogram obtained in this way is shown in FIG.

閾値決定手段17は、このヒストグラムに基づき、対象物OBと、対象物OB以外の部分とを2値化画像で表現するための閾値(以下、「2値化閾値」という。)を決定する。ここで、対象物OB以外の部分には、対象物OBの影SDも含まれる。同図(B)を例に説明すると、閾値決定手段17は、関心領域30ごとのヒストグラムについて、最小輝度値側から1つ目の山を対象物OB(鉄筋)と推定し、2つ目の山を対象物OBの影と推定し、3つ目の山を背景BGと推定する。このように撮影画像21に対象物OBとその影SDが存在しており、処理対象画像22(グレースケール画像)において対象物OBとその影SDの境界が明確でない場合であっても、図5(B)に示すような関心領域30のヒストグラムを作成することで、対象物OBとその影SDを明確に分離することができ、すなわち対象物OBのエッジ部分を特定することができる。 Based on this histogram, the threshold value determining means 17 determines a threshold value (hereinafter, referred to as “binarization threshold value”) for expressing the object OB and a portion other than the object OB in a binarized image. Here, the shadow SD of the object OB is also included in the portion other than the object OB. Explaining the figure (B) as an example, the threshold value determining means 17 estimates that the first peak from the minimum luminance value side is the object OB (reinforcing bar) in the histogram for each region of interest 30, and the second The mountain is estimated to be the shadow of the object OB, and the third mountain is estimated to be the background BG. In this way, even when the object OB and its shadow SD exist in the captured image 21 and the boundary between the object OB and its shadow SD is not clear in the processing target image 22 (grayscale image), FIG. By creating a histogram of the region of interest 30 as shown in (B), the object OB and its shadow SD can be clearly separated, that is, the edge portion of the object OB can be specified.

そして閾値決定手段17は、1つ目の山(対象物OB)のピークPK1と、2つ目の山(影)のピークPK2の間、詳細には両者の中間点CNTを、2値化閾値と決定する。この例では当該関心領域30(30A)の2値化閾値は130ntである。2値化閾値は他方の関心領域30Bおよび他の全ての関心領域30について決定する。 Then, the threshold value determining means 17 sets the CNT at the midpoint between the peak PK1 of the first mountain (object OB) and the peak PK2 of the second mountain (shadow), in detail, the binarization threshold value. To decide. In this example, the binarization threshold of the region of interest 30 (30A) is 130 nt. The binarization threshold is determined for the other region of interest 30B and all other regions of interest 30.

次に図6を参照して生成手段19について説明する。同図(A)は、元になる撮影画像21の一例であり、同図(B)は決定された関心領域30の一例を示す図であり、同図(C)は生成手段19によって生成された2値画像35の一例である。 Next, the generation means 19 will be described with reference to FIG. FIG. (A) is an example of the original captured image 21, FIG. (B) is a diagram showing an example of the determined region of interest 30, and FIG. (C) is generated by the generation means 19. This is an example of the binary image 35.

生成手段19は、2値化閾値に基づき、対象物OBの領域と該対象物OBを除く領域との2値画像を生成する。具体的には、まずそれぞれの関心領域30内の各画素を2値化する。つまり、2値化閾値よりも小さい輝度値の画素を白を示す輝度値とし、2値化閾値よりも大きい輝度値の画素を黒を示す輝度値とする。 The generation means 19 generates a binary image of the region of the object OB and the region excluding the object OB based on the binarization threshold value. Specifically, first, each pixel in each region of interest 30 is binarized. That is, a pixel having a brightness value smaller than the binarization threshold value is defined as a brightness value indicating white, and a pixel having a brightness value larger than the binarization threshold value is defined as a brightness value indicating black.

そして、処理対象画像22の例えば左端部から2個ずつ関心領域30の組みを特定し、一組の関心領域30で挟まれた領域については対象物OBと推定して2値化する。具体的にはON区間の画素は白を示す輝度値とし、OFF区間の画素は黒を示す輝度値として2値化する。 Then, for example, two sets of interest regions 30 are specified from the left end of the processing target image 22, and the region sandwiched between the pair of interest regions 30 is estimated to be the object OB and binarized. Specifically, the pixels in the ON section have a luminance value indicating white, and the pixels in the OFF section have a luminance value indicating black.

同図(B)の場合、左から順に2つの関心領域30によって関心領域の組301、302…を特定し、各組301、302…のそれぞれについて関心領域30で挟まれた領域C1、C2…を、隣接する該関心領域30の2値化された画素値と同じ画素値にする。また各組301、302…の間の領域G1、G2…は、背景と推定して、隣接する関心領域30の2値化された他方の画素値と同じ画素値にする。つまり、対象物OBのエッジ部分と同一色に塗りつぶす。 In the case of FIG. 3B, the pairs 301, 302 ... Of the regions of interest are specified by the two regions of interest 30 in order from the left, and the regions C1, C2 ... Of the regions of interest 30 sandwiched between the groups 301, 302 ... Is set to the same pixel value as the binarized pixel value of the adjacent region of interest 30. Further, the regions G1, G2 ... Between the sets 301, 302 ... Are presumed to be the background and have the same pixel value as the other binarized pixel value of the adjacent region of interest 30. That is, it is painted in the same color as the edge portion of the object OB.

詳細には同図(B)の一番左の関心領域の組301を参照すると、左側の関心領域30Aについて、同図(C)に示すように白を示す画素値W(例えば「1」)と黒を示す画素値B(例えば、「0」)からなる2値画像を生成し、右側の関心領域30Bについて、同図(C)に示すように白を示す画素値Wと黒を示す画素値Bからなる2値画像を生成する。そして、関心領域30A,30Bで挟まれた領域C1を、隣接する関心領域30Aの2値化された画素値W、および隣接する関心領域30Bの2値化された画素値Wと同じ白を示す画素値Wとする。 For details, referring to the leftmost set 301 of the region of interest in FIG. (B), the pixel value W (for example, “1”) indicating white for the region of interest 30A on the left side is shown in FIG. A binary image consisting of a pixel value B (for example, “0”) indicating black and black is generated, and for the region of interest 30B on the right side, a pixel value W indicating white and a pixel indicating black are shown in FIG. Generate a binary image consisting of the value B. Then, the region C1 sandwiched between the regions of interest 30A and 30B shows the same white as the binarized pixel value W of the adjacent region of interest 30A and the binarized pixel value W of the adjacent regions of interest 30B. Let the pixel value be W.

また、関心領域の組301と関心領域の組302の間の領域G1について、隣接する関心領域30Bの2値化された他方の画素値(黒を示す画素値B)および隣接する関心領域30Cの2値化された他方の画素値(黒を示す画素値B)と同じ画素値Bにする。 Further, with respect to the region G1 between the set 301 of the region of interest and the set 302 of the region of interest, the other binarized pixel value (pixel value B indicating black) of the adjacent region of interest 30B and the adjacent region of interest 30C. The same pixel value B as the other binarized pixel value (pixel value B indicating black) is set.

このようにして、対象物OBの領域が白を示す画素値Wで現され、それ以外の領域が黒を示す画素値Bで現された2値画像35(同図(C))を生成する。この2値画像35は、対象物OBの影SDなどが生じていた場合であっても、対象物OBの領域のみを白を示す画素値Wで現せることができ、対象物OBの領域を特定する精度を高めることができる。 In this way, a binary image 35 (FIG. (C)) in which the region of the object OB is represented by the pixel value W indicating white and the other region is represented by the pixel value B indicating black is generated. .. In this binary image 35, even when the shadow SD of the object OB is generated, only the area of the object OB can be represented by the pixel value W indicating white, and the area of the object OB can be displayed. The accuracy of identification can be improved.

このように、本実施形態では、まず対象物OBと背景BGの境界(近傍)と推定される特徴点を含み行方向に所定幅を有する関心領域30を特定して大まかな絞込みを行う。そして関心領域30のそれぞれについて詳細な解析を行なう。 As described above, in the present embodiment, first, the region of interest 30 including the feature points presumed to be the boundary (neighborhood) between the object OB and the background BG and having a predetermined width in the row direction is specified and roughly narrowed down. Then, detailed analysis is performed for each of the regions of interest 30.

従来の方法(例えば、特許文献1に記載の方法)では、対象物OBの撮影画像21(およびそのグレースケール画像22)を行方向(水平方向)に走査して(具体的には例えば、行方向の1画素の輝度の濃淡を検知しながら)、対象物OBのエッジ(対象物OBと背景BGの境界)を検出(推定)するものであり、対象物OBの影SDなどが生じた場合に対象物OBの特定が十分でない問題があった。しかしながら本実施形態では、対象物OBの影SDが生じるなどして、撮影画像21上では実際よりも輝度の低い領域が大きく存在している場合などであっても対象物OBのみの位置を特定する精度を高めることができる。 In the conventional method (for example, the method described in Patent Document 1), the captured image 21 (and its grayscale image 22) of the object OB is scanned in the row direction (horizontal direction) (specifically, for example, the row). It detects (estimates) the edge of the object OB (the boundary between the object OB and the background BG) while detecting the brightness of one pixel in the direction), and when the shadow SD of the object OB occurs. There was a problem that the identification of the object OB was not sufficient. However, in the present embodiment, the position of only the object OB is specified even when a region having a lower brightness than the actual one is present on the captured image 21 due to the shadow SD of the object OB. It is possible to improve the accuracy of the operation.

具体的には、複数の撮影画像21について、従来の方法によって対象物OBを特定した場合の正答率は、51.8%であったのに対し、本実施形態によって対象物OBを特定した場合の正答率は、79.3%と、大幅に精度を向上させることができた。 Specifically, for a plurality of captured images 21, the correct answer rate when the object OB was specified by the conventional method was 51.8%, whereas the correct answer rate was 51.8%, whereas the object OB was specified by the present embodiment. The correct answer rate was 79.3%, and the accuracy could be greatly improved.

<画像処理方法>
次に、図7から図10を参照して、本実施形態の画像処理方法について説明する。図7は、本実施形態に係る画像処理方法の処理の流れの一例を示すフロー図である。
<Image processing method>
Next, the image processing method of the present embodiment will be described with reference to FIGS. 7 to 10. FIG. 7 is a flow chart showing an example of the processing flow of the image processing method according to the present embodiment.

本実施形態の画像処理方法は、まず、ステップS01で画像取得処理を行う。画像取得処理は、対象物OBの画像を含む処理対象画像22を取得する処理である。この処理では、例えば、外部の装置等から入力手段5を介して撮影画像21を受け付け、あるいは記憶手段3に記憶された撮影画像21を取得する。撮影画像21は例えば、対象物OB(例えば、鉄筋)の背景に例えば白色の背景バーBSを配置して対象物OBとともに撮影した画像である。本ステップでは撮影画像21をグレースケール画像に変換した後、必要な領域を切り出して処理対象画像22を生成する。ここで必要な領域とは例えば、背景BG(背景バーBSの一部)と少なくとも1つの対象物(鉄筋)OBを含む矩形状の領域であり、行方向(紙面横方向、水平方向)にm個(m≧2)、列方向(紙面縦方向、垂直方向)にn個(n≧2)の複数の画素(n行m列の画素)が集合した領域である(図2参照)。 In the image processing method of the present embodiment, first, the image acquisition process is performed in step S01. The image acquisition process is a process of acquiring a process target image 22 including an image of the object OB. In this process, for example, the captured image 21 is received from an external device or the like via the input means 5, or the captured image 21 stored in the storage means 3 is acquired. The captured image 21 is, for example, an image captured together with the object OB by arranging, for example, a white background bar BS on the background of the object OB (for example, a reinforcing bar). In this step, after converting the captured image 21 into a grayscale image, a necessary area is cut out to generate a processing target image 22. The area required here is, for example, a rectangular area including a background BG (a part of the background bar BS) and at least one object (reinforcing bar) OB, and is m in the row direction (horizontal direction on the paper surface, horizontal direction). This is an area in which a plurality of (n ≧ 2) pixels (n rows and m columns) are gathered in the column direction (vertical direction and vertical direction of the paper surface) (m ≧ 2) (see FIG. 2).

あるいは、本ステップでは、外部の装置等から入力手段5を介して直接的に(上記加工済みの)処理対象画像22を取得する。また記憶手段3に記憶された処理対象画像22を取得してもよい。 Alternatively, in this step, the processed target image 22 (processed above) is directly acquired from an external device or the like via the input means 5. Further, the processing target image 22 stored in the storage means 3 may be acquired.

ステップS01に続くステップS03では関心領域決定処理を行い、続くステップS05で閾値決定処理を行い、続くステップS07で生成処理を行う。関心領域決定処理、閾値決定処理、生成処理の詳細は後述する。 In step S03 following step S01, an area of interest determination process is performed, in subsequent step S05, a threshold value determination process is performed, and in subsequent step S07, a generation process is performed. Details of the region of interest determination process, the threshold value determination process, and the generation process will be described later.

図8を参照して、図7に示すステップS03の関心領域決定処理について説明する。同図は、関心領域決定処理の流れの一例を示すフロー図である。 The region of interest determination process in step S03 shown in FIG. 7 will be described with reference to FIG. The figure is a flow chart showing an example of the flow of the region of interest determination process.

まず、ステップS301では、処理対象画像22について、各列方向の画素の代表値を算出する。具体的には、処理対象画像22の横(水平)方向の一端から他端まで、m列の画素群23の各列について、列方向(縦方向、垂直方向)に並ぶ複数の画素の平均輝度値24を算出し、行方向の位置(横軸)に対する平均輝度値24(縦軸)をグラフ化する(図3(A)参照)。このグラフは、平均輝度値24の行方向における変化を示す。 First, in step S301, the representative values of the pixels in each column direction are calculated for the image 22 to be processed. Specifically, from one end to the other end of the image 22 to be processed in the horizontal (horizontal) direction, the average brightness of a plurality of pixels arranged in the column direction (vertical direction, vertical direction) for each row of the m-th row pixel group 23. The value 24 is calculated, and the average brightness value 24 (vertical axis) with respect to the position in the row direction (horizontal axis) is graphed (see FIG. 3 (A)). This graph shows the change in the average luminance value 24 in the row direction.

続くステップS303では、輝度振り分け閾値25を得る。具体的には、ステップS301で算出した、処理対象画像22の全ての列の画素群23の代表値(平均輝度値24)のうち、最大平均輝度値24MAXと、最小平均輝度値24MINを取得し、その中間の輝度値(平均値)を算出し、これを輝度振り分け閾値25とする(図4(D)参照)。 In the following step S303, the luminance distribution threshold value 25 is obtained. Specifically, among the representative values (average luminance value 24) of the pixel group 23 of all the columns of the image to be processed 22 calculated in step S301, the maximum average luminance value 24MAX and the minimum average luminance value 24MIN are acquired. , The brightness value (average value) in the middle is calculated, and this is set as the brightness distribution threshold 25 (see FIG. 4 (D)).

続くステップS305では、行方向に並ぶ平均輝度値(代表値)24の変化のグラフ(図3(B)、図4(D))において、ON区間(輝度が小さい傾向の区間)とOFF区間(輝度が大きい傾向の区間)を振り分けるマスク27を作成する。具体的には、輝度振り分け閾値25と平均輝度値24の交点を特徴点26とし、行方向に沿って、例えば左から1番目の特徴点26(26A)と2番目の特徴点26(26B)で1つのマスク27(27A)を設定し、3番目の特徴点26(26C)と4番目の特徴点26(26D)で1つのマスク27(27B)を設定する(図3(B)参照)。 In the following step S305, in the graphs of changes in the average luminance value (representative value) 24 arranged in the row direction (FIGS. 3 (B) and 4 (D)), an ON section (a section in which the brightness tends to be small) and an OFF section (a section in which the brightness tends to be small) ( A mask 27 for allocating (a section in which the brightness tends to be large) is created. Specifically, the intersection of the luminance distribution threshold value 25 and the average luminance value 24 is set as the feature point 26, and for example, the first feature point 26 (26A) and the second feature point 26 (26B) from the left along the row direction. Set one mask 27 (27A) with, and set one mask 27 (27B) with the third feature point 26 (26C) and the fourth feature point 26 (26D) (see FIG. 3B). ..

マスク27は、図4(D)に一点鎖線で示すように、処理対象画像22の左端部側から順次隣り合う2つの特徴点26を含む垂直方向の線分を長辺とする矩形領域であり、理論的には(意図しない特徴点26を除き)対象物OB毎に設定される。 As shown by the alternate long and short dash line in FIG. 4D, the mask 27 is a rectangular region having a long side of a vertical line segment including two feature points 26 that are sequentially adjacent to each other from the left end side of the image to be processed 22. Theoretically, it is set for each object OB (except for the unintended feature point 26).

次に、図8のステップS307からステップS317において、白とびの補正処理を行う。この補正処理は、図1(B)に示す補正手段15によって実行される処理である。例えば、建設現場の配筋検査などの場合は特に、対象物である鉄筋OBは屋外や、屋内の不規則な周辺光の中で固定された状態にあり、画像処理に最適な状態での撮影が困難である場合が多い。具体的には、鉄筋OBに強い太陽光やカメラのフラッシュが照射される場合などがあると、鉄筋OBの表面が明るくなって(光って)しまい、その結果対象物OBの内部に意図しないOFF区間が生じてしまう場合がある。この場合、本来対象物(鉄筋)Oとして画像処理すべきところ、意図しないOFF区間の発生により、鉄筋OBが実物より細いものと誤認識されるなど、問題が生じる。 Next, in steps S307 to S317 of FIG. 8, overexposure correction processing is performed. This correction process is a process executed by the correction means 15 shown in FIG. 1 (B). For example, especially in the case of bar arrangement inspection at a construction site, the reinforcing bar OB, which is the object, is fixed in the irregular ambient light outdoors or indoors, and is taken in the optimum state for image processing. Is often difficult. Specifically, when the reinforcing bar OB is irradiated with strong sunlight or a camera flash, the surface of the reinforcing bar OB becomes bright (shining), and as a result, the inside of the object OB is unintentionally turned off. There may be a section. In this case, although the image should be processed as the object (reinforcing bar) O, there is a problem that the reinforcing bar OB is erroneously recognized as thinner than the actual object due to the occurrence of an unintended OFF section.

そこで、白とびの補正処理では、意図しないOFF区間が発生しないように、すなわち意図しない特徴点26が存在している場合には、それを排除する処理を行う。これにより、屋外や屋内の不規則な周辺光の中で撮影された画像(撮影画像21)に基づく処理対象画像22であっても、対象物OBの領域をON区間と認識することが可能となり、対象物OBの領域を特定する精度が高まる。 Therefore, in the overexposure correction process, a process is performed so that an unintended OFF section does not occur, that is, if an unintended feature point 26 exists, it is eliminated. As a result, even if the processing target image 22 is based on the image (captured image 21) taken in the irregular ambient light outdoors or indoors, the region of the target object OB can be recognized as the ON section. , The accuracy of identifying the region of the object OB is improved.

まずステップS307では、図3(B)において各OFF区間の幅(行方向、横方向、水平方向の幅、以下同様)L3を算出する。続くステップS309では、ON区間のうち、最大の幅(ON区間最大幅)L4を算出する。 First, in step S307, the width (row direction, lateral direction, horizontal direction width, the same applies hereinafter) L3 of each OFF section is calculated in FIG. 3B. In the following step S309, the maximum width (ON section maximum width) L4 of the ON sections is calculated.

続くステップS311では、ON区間最大幅L4よりも小さい幅L3を有するOFF区間(以下、「小OFF区間」という。)の全てについてそれらの幅の平均値Av1を算出する。続くステップS313では、小OFF区間以外のOFF区間(幅L3が最大のON区間の幅L4以上のOFF区間、以下「大OFF区間」という。)の全てについてそれらの幅の平均値Av2と標準偏差S2とを算出する。続くステップS315では、全てのON区間についてそれらの幅の平均値Av3と標準偏差S3とを算出する。 In the following step S311, the average value Av1 of the widths of all the OFF sections having a width L3 smaller than the maximum width L4 of the ON section (hereinafter, referred to as “small OFF section”) is calculated. In the following step S313, the average value Av2 and the standard deviation of the widths of all the OFF sections other than the small OFF section (the OFF section having the width L4 or more of the ON section having the maximum width L3, hereinafter referred to as "large OFF section"). Calculate with S2. In the following step S315, the average value Av3 and the standard deviation S3 of the widths of all the ON sections are calculated.

そして続くステップS317では、以下の式(1)の判定を行い、右辺が左辺より大きい場合に、小OFF区間をON区間に置き換える補正を行なう。 Then, in the following step S317, the following equation (1) is determined, and when the right side is larger than the left side, the small OFF section is replaced with the ON section.

Av2−S2−Av1 > Av3+S3−Av1 (式1) Av2-S2-Av1> Av3 + S3-Av1 (Equation 1)

この補正処理により、複数の対象物OB間の実際の背景BGよりも幅が狭く、且つ対象物OB(及びその影)よりも幅が狭いOFF区間については、対象物OB上で白とびが発生している領域と推定し、当該白とび領域を対象物OB(及びその影)と置き換えることができる。 By this correction process, overexposure occurs on the object OB in the OFF section which is narrower than the actual background BG between the plurality of object OBs and narrower than the object OB (and its shadow). It is possible to presume that the area is covered and replace the overexposed area with the object OB (and its shadow).

これらの補正処理に続くステップS319では、関心領域30を決定する。詳細には、マスク27の2つの特徴点26をそれぞれ中心として、処理対象画像22についてマスク27の行方向(水平方向)の幅L1の1/2の幅L2を行方向(水平方向)にそれぞれ確保した矩形領域を特定し、関心領域30と決定する(図4(D)参照)。上述の補正処理によって意図しないOFF区間はON区間に補正されており、マスク27も補正後のON区間に対応して設けられ、マスク27に基づいて関心領域30が決定される。また、処理対象画像22の例えば左端部から順次行方向に並ぶ2つの関心領域30を一組として、関関心領域の組301、302・・・を決定する。 In step S319 following these correction processes, the region of interest 30 is determined. Specifically, with the two feature points 26 of the mask 27 as the center, the width L2 of 1/2 of the width L1 in the row direction (horizontal direction) of the mask 27 is set in the row direction (horizontal direction) for the image 22 to be processed. The secured rectangular area is specified and determined as the area of interest 30 (see FIG. 4D). The unintended OFF section is corrected to the ON section by the above-mentioned correction process, the mask 27 is also provided corresponding to the corrected ON section, and the region of interest 30 is determined based on the mask 27. Further, the sets 301, 302, ... Of the related areas of interest are determined by combining the two areas of interest 30 that are sequentially arranged in the row direction from the left end of the image 22 to be processed, for example.

図9を参照して、図7に示すステップS05の閾値決定処理について説明する。同図は、閾値決定処理の流れの一例を示すフロー図である。 The threshold value determination process in step S05 shown in FIG. 7 will be described with reference to FIG. The figure is a flow chart showing an example of the flow of the threshold value determination process.

まずステップS501では、関心領域30毎に当該関心領域30内の全画素のヒストグラムを算出する。続くステップS503からステップS511では、算出したヒストグラムの平滑化(平滑処理)を行なう。 First, in step S501, a histogram of all the pixels in the region of interest 30 is calculated for each region of interest 30. In the following steps S503 to S511, the calculated histogram is smoothed (smoothed).

以下、ヒストグラムの平滑処理の一例について具体的に説明する。ステップS503では、区間数を例えば11として、ステップS501で算出したヒストグラムに移動平均を数回(例えば3回)行なう。 Hereinafter, an example of histogram smoothing processing will be specifically described. In step S503, the number of sections is set to 11, for example, and the moving average is performed several times (for example, 3 times) on the histogram calculated in step S501.

続くステップS505では、上記のヒストグラム中のそれぞれの山について傾きを算出する。そしてステップS507では、区間数を例えば3として、傾きに移動平均を、例えば1回行なう。 In the following step S505, the slope is calculated for each peak in the above histogram. Then, in step S507, the number of sections is set to 3, for example, and the moving average is performed on the slope, for example, once.

続くステップS509では、傾きの移動平均を求めた結果得られたデータ数列について左から順に走査し、前が正(+)、後ろが負(−)となる箇所の中間を求めるため、数値が「0」のデータ数列を削除する。 In the following step S509, the data sequence obtained as a result of finding the moving average of the slope is scanned in order from the left, and the middle of the points where the front is positive (+) and the back is negative (-) is found. Delete the data sequence of "0".

ステップS511では、前が正(+)、後ろが負(−)となる箇所の中間を頂点(ピーク)として当該山(ヒストグラム)を描画する。 In step S511, the mountain (histogram) is drawn with the middle of the points where the front is positive (+) and the back is negative (−) as the apex (peak).

これにより、各関心領域30について、図5(B)に示すようなヒストグラム(平滑処理済み)が生成される。なお、上記の平滑処理(例えば、移動平均の区間数や回数等)は一例である。 As a result, a histogram (smoothed) as shown in FIG. 5B is generated for each region of interest 30. The above smoothing process (for example, the number of moving average sections, the number of times, etc.) is an example.

続くステップS513では、各関心領域30について2値化の閾値を決定する。具体的には、各関心領域30についてヒストグラムの山が複数存在する場合、1つ目の山を対象物OBと推定し、2つ目の山を影SDと推定する。そして左から1番目のピークPA1と、2番目のピークPK2の中間点CNTに位置する輝度値(この例では、例えば130ntを、当該関心領域30内の2値化閾値に決定する(図5(B)参照)。 In the following step S513, the binarization threshold is determined for each region of interest 30. Specifically, when there are a plurality of histogram peaks for each region of interest 30, the first peak is estimated as the object OB, and the second peak is estimated as the shadow SD. Then, the brightness value located at the midpoint CNT of the first peak PA1 and the second peak PK2 from the left (in this example, for example, 130 nt is determined as the binarization threshold value in the region of interest 30 (FIG. 5 (Fig. 5)). B) See).

次に、図10を参照して、図7に示すステップS07の関心領域決定処理について説明する。同図は、生成処理の流れの一例を示すフロー図である。 Next, the region of interest determination process in step S07 shown in FIG. 7 will be described with reference to FIG. The figure is a flow chart showing an example of the flow of the generation process.

まず、ステップS701では、それぞれの関心領域30において、決定された2値化閾値に基づき、対象物OBの領域と該対象物OBを除く領域との2値画像を生成する。具体的には、まずそれぞれの関心領域30内の各画素を2値化する。つまり、2値化閾値よりも小さい輝度値の画素を白を示す画素値Wとし、2値化閾値よりも大きい輝度値の画素を黒を示す画素値Bとする。 First, in step S701, in each region of interest 30, a binary image of the region of the target object OB and the region excluding the target object OB is generated based on the determined binarization threshold value. Specifically, first, each pixel in each region of interest 30 is binarized. That is, a pixel having a brightness value smaller than the binarization threshold value is defined as a pixel value W indicating white, and a pixel having a brightness value larger than the binarization threshold value is defined as a pixel value B indicating black.

その後、関心領域30のノイズを除去する。具体的には、ステップS703では膨張処理を行い、2値画像の白色領域を増加させ、ステップS705では収縮処理を行って白色領域を減少させる。 After that, the noise in the region of interest 30 is removed. Specifically, in step S703, expansion processing is performed to increase the white region of the binary image, and in step S705, contraction processing is performed to decrease the white region.

続くステップS707では、各関心領域30の内部について、対象物OBと推定して2値化する。具体的にはON区間の画素について白を示す画素値Wとし、OFF区間の画素について黒を示す画素値Bとして2値化し、処理を終了する。 In the following step S707, the inside of each region of interest 30 is estimated to be an object OB and binarized. Specifically, the pixel value W indicating white is set for the pixel in the ON section, and the pixel value B indicating black is used for the pixel in the OFF section, and the process is terminated.

<画像処理プログラム>
本実施形態の画像処理プログラムは、上述の図7〜図10に一例を示す画像処理方法をコンピュータに実行させるプログラムである。
<Image processing program>
The image processing program of the present embodiment is a program that causes a computer to execute the image processing method shown in FIGS. 7 to 10 described above.

以上、本発明の一実施形態について説明したが、本発明に係る画像処理装置、画像処理方法及び画像処理プログラムは、上記した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。 Although one embodiment of the present invention has been described above, the image processing apparatus, image processing method, and image processing program according to the present invention are not limited to the above-described embodiments and do not deviate from the gist of the present invention. Of course, various changes can be made within the range.

例えば、関心領域30は学習により決定してもよい。具体的には、記憶手段3の所定領域に、ある対象物OBのエッジとその付近のサンプル画像(グレースケール画像)を複数記憶しておき、処理対象画像22とサンプル画像をのパターンマッチングによって関心領域30を決定してもよい。 For example, the region of interest 30 may be determined by learning. Specifically, a plurality of sample images (grayscale images) of the edge of a certain object OB and its vicinity are stored in a predetermined area of the storage means 3, and the processing target image 22 and the sample image are of interest by pattern matching. Region 30 may be determined.

また、代表値は、列方向の画素群23の平均輝度値に限らず、列方向の画素群23を構成する複数の画素の輝度値のばらつきを示す標準偏差値としてもよく、その場合特徴点は分散ピークとしてもよい。また、特徴点は、分散のピークと上述した輝度振り分け閾値25と平均輝度値24との交点を組合わせて決定してもよい。 Further, the representative value is not limited to the average luminance value of the pixel group 23 in the column direction, and may be a standard deviation value indicating variation in the luminance values of a plurality of pixels constituting the pixel group 23 in the column direction. May be a dispersion peak. Further, the feature point may be determined by combining the peak of the dispersion and the intersection of the above-mentioned luminance distribution threshold value 25 and the average luminance value 24.

また、白とびの補正だけでなく、例えば対象物OBが鉄筋の場合には、錆による変色の補正を行なう補正手段を設けてもよい。錆の発生箇所は鉄筋であるにもかかわらず、輝度値として明るい(高い)方に偏りがちである。このため錆の補正では例えば撮影画像21においてR・G・Bのヒストグラムを確認し、赤(R)が多い部分については青(B)に変換するなどの補正を行なうようにするとよい。 Further, in addition to the correction of overexposure, for example, when the object OB is a reinforcing bar, a correction means for correcting discoloration due to rust may be provided. Although the rust is generated on the reinforcing bar, the brightness value tends to be biased toward the brighter (higher) side. Therefore, in the correction of rust, for example, it is advisable to check the histogram of R, G, and B in the captured image 21 and perform correction such as converting a portion having a large amount of red (R) to blue (B).

更に、画像処理装置10は、撮像手段を備える構成でもよく、例えばカメラ機能付きタブレット端末などであってもよい。その場合、撮像手段によって撮影画像21を取得(撮影)し、記憶手段3に記憶して、処理対象画像22に加工してもよい。 Further, the image processing device 10 may be configured to include an image pickup means, and may be, for example, a tablet terminal with a camera function. In that case, the captured image 21 may be acquired (photographed) by the imaging means, stored in the storage means 3, and processed into the processing target image 22.

以上、本実施形態では処理対象画像22として、軸が垂直方向に沿うように配置された対象物OB(鉄筋)を複数含む場合を例示した。しかしこれに限らず、処理対象画像22は、軸が水平方向に沿うように配置された対象物OB(鉄筋)を少なくとも1つ含むものであってもよい。 As described above, in the present embodiment, the case where the processed target image 22 includes a plurality of target objects OB (reinforcing bars) whose axes are arranged along the vertical direction has been illustrated. However, the present invention is not limited to this, and the processing target image 22 may include at least one object OB (reinforcing bar) whose axis is arranged along the horizontal direction.

具体的には、本実施形態の処理対象画像22は、例えば図2(B)に示す処理対象画像22を90度回転させた画像(列方向(縦方向)に並ぶ複数の対象物OBを含む画像)であってもよい。その場合、第1配列方向(対象物OBの軸に沿う方向)は、行方向(同一行の方向、紙面横方向、水平方向)となり、第2配列方向は列方向(同一列の方向、紙面縦方向、垂直方向)となる。そして、関心領域決定手段13は、第1配列方向(行方向)毎に画素の代表値(平均輝度値24)を算出し、該代表値の第2配列方向(列方向)における特徴点26に基づき、一つの対象物OBについて第2配列方向に並ぶ一組の関心領域30を決定する。 Specifically, the processing target image 22 of the present embodiment includes, for example, a plurality of object OBs arranged in a column direction (vertical direction) of the processing target image 22 shown in FIG. 2B rotated by 90 degrees. Image). In that case, the first arrangement direction (direction along the axis of the object OB) is the row direction (direction of the same row, horizontal direction of the paper surface, horizontal direction), and the second arrangement direction is the column direction (direction of the same column, paper surface). Vertical direction, vertical direction). Then, the region of interest determination means 13 calculates a representative value (average brightness value 24) of the pixels for each first arrangement direction (row direction), and sets the representative value at the feature point 26 in the second arrangement direction (column direction). Based on this, a set of regions of interest 30 arranged in the second arrangement direction for one object OB is determined.

このように、本発明の第1配列方向は、行方向(同一行の方向、紙面横方向、水平方向)であり、第2配列方向は、列方向(同一列の方向、紙面縦方向、垂直方向)であってもよい。 As described above, the first arrangement direction of the present invention is the row direction (direction of the same row, horizontal direction of the paper surface, horizontal direction), and the second arrangement direction is the column direction (direction of the same column, vertical direction of the paper surface, vertical direction). Direction).

また、対象物OBは鉄筋に限らない。 Further, the object OB is not limited to the reinforcing bar.

1 制御手段
3 記憶手段
5 入力手段
9 通信手段
10 画像処理装置
11 画像取得手段
13 関心領域決定手段
15 補正手段
17 閾値決定手段
19 生成手段
21 撮影画像
22 処理対象画像(グレースケール画像)
23 画素群
24 代表値(平均輝度値)
24MAX 最大平均輝度値
24MIN 最小平均輝度値
25 閾値
26 特徴点
27 マスク
30 関心領域
OB 対象物
1 Control means 3 Storage means 5 Input means 9 Communication means 10 Image processing device 11 Image acquisition means 13 Interest area determination means 15 Correction means 17 Threshold determination means 19 Generation means 21 Captured image 22 Image to be processed (grayscale image)
23 Pixel group 24 Representative value (average brightness value)
24MAX Maximum average brightness value 24MIN Minimum average brightness value 25 Threshold 26 Feature point 27 Mask 30 Area of interest OB Object

Claims (17)

対象物を撮影した画像から、該対象物の領域を特定する画像処理装置であって、
前記画像から抽出した第1配列方向および、該第1配列方向に直交する第2配列方向の複数の画素を含む処理対象画像について、前記第1配列方向毎に画素の代表値を算出し、該代表値の前記第2配列方向における特徴点に基づき、前記対象物についての関心領域を決定する関心領域決定手段と、
前記関心領域毎に閾値を決定する閾値決定手段と、
前記閾値に基づき、前記対象物の領域と該対象物を除く領域との2値画像を生成する生成手段と、
を有することを特徴とする画像処理装置。
An image processing device that identifies an area of an object from an image of the object.
For the processing target image including a plurality of pixels in the first arrangement direction extracted from the image and the second arrangement direction orthogonal to the first arrangement direction, a representative value of the pixels is calculated for each of the first arrangement directions. An area of interest determining means for determining an area of interest for the object based on the feature points of the representative values in the direction of the second arrangement.
A threshold value determining means for determining a threshold value for each region of interest, and
A generation means for generating a binary image of a region of the object and a region excluding the object based on the threshold value, and
An image processing device characterized by having.
前記代表値は、各前記第1配列方向に並ぶ画素の平均輝度値である、
ことを特徴とする請求項1に記載の画像処理装置。
The representative value is an average luminance value of pixels arranged in each of the first array directions.
The image processing apparatus according to claim 1.
前記関心領域決定手段は、一つの前記対象物について前記第2配列方向に並ぶ一組の前記関心領域を決定する、
ことを特徴とする請求項1または請求項2に記載の画像処理装置。
The region of interest determining means determines a set of regions of interest arranged in the second arrangement direction for one object.
The image processing apparatus according to claim 1 or 2.
前記生成手段は、前記閾値に基づきそれぞれの前記関心領域内の各画素を2値化し、前記一組の関心領域で挟まれた領域を、隣接する該関心領域の2値化された画素値と同じ画素値にすることで前記2値画像を生成する、
ことを特徴とする請求項3に記載の画像処理装置。
The generation means binarizes each pixel in each of the interest regions based on the threshold value, and the region sandwiched between the set of interest regions is combined with the binarized pixel value of the adjacent interest region. The binary image is generated by using the same pixel value.
The image processing apparatus according to claim 3.
前記閾値決定手段は、前記関心領域内のヒストグラムを算出し、該ヒストグラムに基づき前記閾値を決定する、
ことを特徴とする請求項1乃至請求項4のいずれか一項に記載の画像処理装置。
The threshold value determining means calculates a histogram in the region of interest and determines the threshold value based on the histogram.
The image processing apparatus according to any one of claims 1 to 4, wherein the image processing apparatus is characterized by the above.
前記閾値決定手段は、前記ヒストグラムの2つの頂点の間に位置する輝度値を前記閾値と決定する、
ことを特徴とする請求項5に記載の画像処理装置。
The threshold value determining means determines the luminance value located between the two vertices of the histogram as the threshold value.
The image processing apparatus according to claim 5.
前記関心領域決定手段は、意図しない前記特徴点を排除する補正手段を有する、
ことを特徴とする請求項1乃至請求項6のいずれか一項に記載の画像処理装置。
The region of interest determining means has a correction means for eliminating the unintended feature points.
The image processing apparatus according to any one of claims 1 to 6, wherein the image processing apparatus is characterized by the above.
前記処理対象画像は、グレースケール画像である、
ことを特徴とする請求項1乃至請求項7のいずれか一項に記載の画像処理装置。
The image to be processed is a grayscale image.
The image processing apparatus according to any one of claims 1 to 7, wherein the image processing apparatus is characterized by the above.
対象物を撮影した画像から、該対象物の領域を特定する画像処理方法であって、
前記画像から抽出した第1配列方向および、該第1配列方向に直交する第2配列方向の複数の画素を含む処理対象画像について、前記第1配列方向毎に画素の代表値を算出し、該代表値の前記第2配列方向における特徴点に基づき、前記対象物についての関心領域を決定する関心領域決定ステップと、
前記関心領域毎に閾値を決定する閾値決定ステップと、
前記閾値に基づき、前記対象物の領域と該対象物を除く領域との2値画像を生成する生成ステップと、
を有することを特徴とする画像処理方法。
An image processing method for identifying an area of an object from an image obtained by photographing the object.
For the processing target image including a plurality of pixels in the first arrangement direction extracted from the image and the second arrangement direction orthogonal to the first arrangement direction, a representative value of the pixels is calculated for each of the first arrangement directions. A region of interest determination step for determining the region of interest for the object based on the feature points of the representative values in the direction of the second arrangement, and
A threshold determination step for determining a threshold value for each region of interest, and
A generation step of generating a binary image of a region of the object and a region excluding the object based on the threshold value, and
An image processing method characterized by having.
前記代表値は、各前記第1配列方向に並ぶ画素の平均輝度値である、
ことを特徴とする請求項9に記載の画像処理方法。
The representative value is an average luminance value of pixels arranged in each of the first array directions.
The image processing method according to claim 9, wherein the image processing method is characterized by the above.
一つの前記対象物について前記第2配列方向に並ぶ一組の前記関心領域を決定する、
ことを特徴とする請求項9または請求項10に記載の画像処理方法。
A set of said regions of interest aligned in the second arrangement direction for one said object is determined.
The image processing method according to claim 9 or 10.
前記閾値に基づきそれぞれの前記関心領域内の各画素を2値化し、前記一組の関心領域で挟まれた領域を、隣接する該関心領域の2値化された画素値と同じ画素値にすることで前記2値画像を生成する、
ことを特徴とする請求項11に記載の画像処理方法。
Each pixel in each of the interest regions is binarized based on the threshold value, and the region sandwiched between the set of interest regions is set to the same pixel value as the binarized pixel value of the adjacent interest region. By doing so, the binary image is generated.
The image processing method according to claim 11, wherein the image processing method is characterized.
前記関心領域内のヒストグラムを算出し、該ヒストグラムに基づき前記閾値を決定する、
ことを特徴とする請求項9乃至請求項12のいずれか一項に記載の画像処理方法。
A histogram in the region of interest is calculated, and the threshold value is determined based on the histogram.
The image processing method according to any one of claims 9 to 12, wherein the image processing method is characterized.
前記ヒストグラムの2つの頂点の間に位置する輝度値を前記閾値と決定する、
ことを特徴とする請求項13に記載の画像処理方法。
A luminance value located between two vertices of the histogram is determined as the threshold value.
The image processing method according to claim 13, wherein the image processing method is characterized.
意図しない前記特徴点を排除する補正を行う、
ことを特徴とする請求項9乃至請求項14のいずれか一項に記載の画像処理方法。
Make corrections to eliminate unintended feature points.
The image processing method according to any one of claims 9 to 14, wherein the image processing method is characterized.
前記処理対象画像は、グレースケール画像である、
ことを特徴とする請求項9乃至請求項15のいずれか一項に記載の画像処理方法。
The image to be processed is a grayscale image.
The image processing method according to any one of claims 9 to 15, characterized in that.
コンピュータに、請求項9乃至請求項16のいずれか一項に記載の画像処理方法を実行させるための画像処理プログラム。 An image processing program for causing a computer to execute the image processing method according to any one of claims 9 to 16.
JP2019136639A 2019-07-25 2019-07-25 Image processing system, image processing method and image processing program Pending JP2021022028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019136639A JP2021022028A (en) 2019-07-25 2019-07-25 Image processing system, image processing method and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019136639A JP2021022028A (en) 2019-07-25 2019-07-25 Image processing system, image processing method and image processing program

Publications (1)

Publication Number Publication Date
JP2021022028A true JP2021022028A (en) 2021-02-18

Family

ID=74575176

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019136639A Pending JP2021022028A (en) 2019-07-25 2019-07-25 Image processing system, image processing method and image processing program

Country Status (1)

Country Link
JP (1) JP2021022028A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114638830A (en) * 2022-05-18 2022-06-17 安徽数智建造研究院有限公司 Training method of tunnel reinforcing steel bar recognition model and tunnel reinforcing steel bar recognition method
JP2022164949A (en) * 2021-04-19 2022-10-31 三菱電機エンジニアリング株式会社 Bar arrangement inspection device, bar arrangement inspection method and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022164949A (en) * 2021-04-19 2022-10-31 三菱電機エンジニアリング株式会社 Bar arrangement inspection device, bar arrangement inspection method and program
JP7186821B2 (en) 2021-04-19 2022-12-09 三菱電機エンジニアリング株式会社 Bar arrangement inspection device, bar arrangement inspection method and program
CN114638830A (en) * 2022-05-18 2022-06-17 安徽数智建造研究院有限公司 Training method of tunnel reinforcing steel bar recognition model and tunnel reinforcing steel bar recognition method

Similar Documents

Publication Publication Date Title
JP6088792B2 (en) Image detection apparatus, control program, and image detection method
US8331670B2 (en) Method of detection document alteration by comparing characters using shape features of characters
EP1330111A2 (en) Automatic image quality evaluation and correction technique
CN106920245B (en) Boundary detection method and device
CN112740267A (en) Learning data collection device, learning data collection method, and program
CN105718931B (en) System and method for determining clutter in acquired images
JP2021022028A (en) Image processing system, image processing method and image processing program
JP2018128309A (en) Crack detection method
JP2018006981A5 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
JP2013117409A (en) Crack detection method
KR20150059302A (en) Method for recognizing character by fitting image shot, and information processing device for executing it
JP2017521011A (en) Symbol optical detection method
CN112997217A (en) Document detection from video images
US20190019059A1 (en) Method and apparatus for identifying target
JP2020021314A (en) Image processing system and image processing method
US11915445B2 (en) System and method for counting aquatic creatures
JP2018160024A (en) Image processing device, image processing method and program
JP7305509B2 (en) Information processing device, its control method, program, and storage medium
JP2005310053A (en) Illegal dumping spot detection device, method and program
US8355582B2 (en) Image processing apparatus and image processing method
CN110766671A (en) Image processing method based on machine vision software
JP3252574B2 (en) Image processing device
JP2007249836A (en) Image-processing device, image-processing method, and image-processing program
CN113382134B (en) Focusing debugging method of linear array industrial camera
JP4741289B2 (en) Image processing apparatus and image processing method