JP5824278B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP5824278B2
JP5824278B2 JP2011171628A JP2011171628A JP5824278B2 JP 5824278 B2 JP5824278 B2 JP 5824278B2 JP 2011171628 A JP2011171628 A JP 2011171628A JP 2011171628 A JP2011171628 A JP 2011171628A JP 5824278 B2 JP5824278 B2 JP 5824278B2
Authority
JP
Japan
Prior art keywords
image
area
partial
unit
camera
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.)
Expired - Fee Related
Application number
JP2011171628A
Other languages
Japanese (ja)
Other versions
JP2013036796A (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.)
Panasonic Industrial Devices SUNX Co Ltd
Original Assignee
Panasonic Industrial Devices SUNX 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 Panasonic Industrial Devices SUNX Co Ltd filed Critical Panasonic Industrial Devices SUNX Co Ltd
Priority to JP2011171628A priority Critical patent/JP5824278B2/en
Publication of JP2013036796A publication Critical patent/JP2013036796A/en
Application granted granted Critical
Publication of JP5824278B2 publication Critical patent/JP5824278B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Description

本発明は、検査対象物の画像の検査に用いられる画像処理装置に関するものである。   The present invention relates to an image processing apparatus used for inspecting an image of an inspection object.

従来より、工業製品の製造、組立、検査等の工程において、撮像された検査対象物の画像を検査員が目視で確認する方法では検査精度が悪く効率もよくないため、画像処理によって良品・不良品を自動的に判定する画像処理装置が用いられている。この種の画像処理装置としては、ライン状の固体撮像素子を用いたラインセンサに接続され、画素が一列に並んだ一次元の画像(以下、「ライン画像」という)を取り込む装置がある。   Conventionally, inspecting an image of an object to be inspected visually by an inspector in the process of manufacturing, assembling, or inspecting an industrial product has a poor inspection accuracy and is not efficient. An image processing apparatus that automatically determines non-defective products is used. As this type of image processing apparatus, there is an apparatus that is connected to a line sensor using a line-shaped solid-state imaging device and captures a one-dimensional image in which pixels are arranged in a line (hereinafter referred to as “line image”).

この画像処理装置は、検査対象物をラインセンサに対して相対的に移動させながらライン画像を複数取り込み、取り込んだ複数のライン画像を時系列に並べることにより画素が二次元配置された二次元画像を生成する。この二次元画像は、たとえば検査対象物の良品・不良品の検査に用いられる。   This image processing apparatus captures a plurality of line images while moving the inspection object relative to the line sensor, and arranges the captured plurality of line images in time series to form a two-dimensional image in which pixels are arranged two-dimensionally Is generated. This two-dimensional image is used, for example, for inspection of non-defective / defective products of the inspection object.

ところで、エリアセンサを用い、特定の走査ラインのデータのみを取り込むことによりライン画像を取得する技術が提案されている(たとえば特許文献1参照)。この技術を用いれば、画像処理装置は、カメラにて画素が二次元配置された二次元画像、ライン画像のどちらでも取得することが可能となる。   By the way, a technique has been proposed in which an area sensor is used to acquire a line image by taking in only specific scanning line data (see, for example, Patent Document 1). If this technology is used, the image processing apparatus can acquire either a two-dimensional image in which pixels are two-dimensionally arranged by a camera or a line image.

特開2004−108828号公報JP 2004-108828 A

しかし、上述した画像処理装置は、1回の撮像につき1ライン分のライン画像をカメラから取得するので、たとえば検査対象物の複数箇所の画像を用いた検査を行うためには、検査対象物を複数回撮像する必要があり検査時間が長くなる。あるいは、画像処理装置は、1回の撮像で検査対象物の複数箇所の画像を取得するためには、複数台のカメラ(またはラインセンサ)が必要になる。   However, since the above-described image processing apparatus acquires a line image for one line for each imaging from the camera, for example, in order to perform an inspection using images of a plurality of locations of the inspection target, It is necessary to image a plurality of times, and the inspection time becomes long. Alternatively, the image processing apparatus requires a plurality of cameras (or line sensors) in order to acquire images at a plurality of locations on the inspection object with one imaging.

本発明は上記事由に鑑みて為されており、1台のカメラで検査対象物の複数箇所の画像を取得しながらも、検査時間の短縮が可能な画像処理装置を提供することを目的とする。   The present invention has been made in view of the above-described reasons, and an object thereof is to provide an image processing apparatus capable of reducing the inspection time while acquiring images of a plurality of locations of an inspection object with a single camera. .

本発明の画像処理装置は、検査対象物の画像を画素が二次元配置されたエリア画像として撮像可能なエリアイメージセンサを撮像素子に用いたカメラから、前記エリア画像内に予め設定されている抽出領域の画像を部分画像として、前記検査対象物と前記カメラとの相対的な位置関係が時間経過に伴い変化する状態で順次取り込む画像取込部と、前記部分画像を複数記憶する記憶部と、前記記憶部内の複数の前記部分画像を時系列に沿って並べることにより画素が二次元配置された二次元画像を生成する画像生成部と、前記エリア画像内での前記抽出領域の位置および範囲を示すデータであって前記画像取込部における前記部分画像の取込条件を決める設定データを記憶する設定記憶部と、操作装置からの入力に従って前記設定データを決定して前記設定記憶部に書き込む制御部とを備え、前記制御部は、前記エリア画像内において前記検査対象物の移動方向と交差する方向に互いに離間した複数の領域を前記抽出領域とするように前記設定データを決定し、前記記憶部は、前記抽出領域ごとに前記部分画像を記憶し、前記画像生成部は、前記抽出領域ごとに前記二次元画像を生成することを特徴とする。 The image processing apparatus according to the present invention extracts a preset image in an area image from a camera that uses an area image sensor that can capture an image of an inspection object as an area image in which pixels are two-dimensionally arranged. An image capturing unit that sequentially captures an image of a region as a partial image, in which the relative positional relationship between the inspection object and the camera changes with time, and a storage unit that stores a plurality of the partial images; An image generation unit that generates a two-dimensional image in which pixels are two-dimensionally arranged by arranging the plurality of partial images in the storage unit in time series, and a position and a range of the extraction region in the area image A setting storage unit that stores setting data for determining the partial image capturing condition in the image capturing unit, and the setting data is determined according to an input from an operating device And a control unit for writing the setting storage unit Te, the control unit, said plurality of regions spaced from each other in the moving direction intersecting the direction of the test object within said area image to said extraction region Setting data is determined, the storage unit stores the partial image for each extraction region, and the image generation unit generates the two-dimensional image for each extraction region.

この画像処理装置において、前記抽出領域はライン状であって、前記部分画像はライン画像を構成することが望ましい。   In this image processing apparatus, it is desirable that the extraction region is in a line shape and the partial image constitutes a line image.

この画像処理装置において、前記制御部は、前記エリア画像内に矩形状の領域が指定領域として前記操作装置にて複数指定されることにより、前記指定領域ごとに対応した前記二次元画像を構成する前記部分画像を取り込むための前記設定データを自動的に決定することが望ましい。   In this image processing apparatus, the control unit configures the two-dimensional image corresponding to each designated area by designating a plurality of rectangular areas as designated areas by the operating device in the area image. It is desirable to automatically determine the setting data for capturing the partial image.

この画像処理装置において、前記カメラから取り込んだ前記エリア画像を設定画面として表示装置に表示する表示部をさらに備え、前記制御部は、前記設定画面上に表示される前記指定領域の位置および範囲を前記操作装置からの入力に従って調節することにより、前記指定領域を指定することがより望ましい。   The image processing apparatus further includes a display unit that displays the area image captured from the camera as a setting screen on a display device, and the control unit is configured to determine a position and a range of the designated area displayed on the setting screen. More preferably, the designated area is designated by adjusting according to the input from the operating device.

本発明は、1台のカメラで検査対象物の複数箇所の画像を取得しながらも、検査時間の短縮が可能になるという利点がある。   The present invention has an advantage that the inspection time can be shortened while acquiring images of a plurality of locations of the inspection object with a single camera.

実施形態1に係る画像処理装置の構成を示す概略ブロック図である。1 is a schematic block diagram illustrating a configuration of an image processing apparatus according to a first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の設定画面の説明図である。6 is an explanatory diagram of a setting screen of the image processing apparatus according to the first embodiment. FIG. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置の動作説明図である。FIG. 4 is an operation explanatory diagram of the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置を用いた検査システムの概略構成図である。1 is a schematic configuration diagram of an inspection system using an image processing apparatus according to a first embodiment. 実施形態1に係る画像処理装置を用いた検査システムの配置図である。1 is a layout diagram of an inspection system using an image processing apparatus according to Embodiment 1. FIG. 実施形態1に係る画像処理装置を用いた検査システムの動作説明図である。FIG. 2 is an operation explanatory diagram of an inspection system using the image processing apparatus according to the first embodiment. 実施形態2に係る画像処理装置の動作説明図である。FIG. 9 is an operation explanatory diagram of the image processing apparatus according to the second embodiment.

(実施形態1)
本実施形態の画像処理装置は、検査対象物の画像を撮像するカメラに接続されており、検査対象物の良品・不良品の判定に用いられる。
(Embodiment 1)
The image processing apparatus according to the present embodiment is connected to a camera that captures an image of an inspection object, and is used to determine whether the inspection object is a non-defective product or a defective product.

画像処理装置1は、図1に示すように、カメラ2に接続される前置処理部11を具備し、カメラ2から画像を取り込む画像取込部111と、画像取込部111で取り込まれた画像を記憶する記憶部112とを前置処理部11に備えている。さらに、画像処理装置1は、前置処理部11で取り込んだ画像に対して画像処理を実行する主処理部12と、各種パラメータを記憶する設定記憶部13と、表示装置(図示せず)へ出力を行う表示部14と、各部位を制御する制御部15とを備えている。   As shown in FIG. 1, the image processing apparatus 1 includes a front processing unit 11 connected to the camera 2. The image capturing unit 111 captures an image from the camera 2, and the image capturing unit 111 captures the image. The pre-processing unit 11 includes a storage unit 112 that stores images. Further, the image processing apparatus 1 is connected to a main processing unit 12 that performs image processing on an image captured by the preprocessing unit 11, a setting storage unit 13 that stores various parameters, and a display device (not shown). A display unit 14 that performs output and a control unit 15 that controls each part are provided.

ここでは、画像処理装置1は、CPUやメモリを備えたコンピュータからなり、カメラ2のほか、専用のキーパッドやマウス等の操作装置(図示せず)および表示装置を具備するコンソール3や、後述のエンコーダ等からなる外部装置4を接続可能に構成されている。   Here, the image processing apparatus 1 includes a computer having a CPU and a memory. In addition to the camera 2, an operation device (not shown) such as a dedicated keypad and a mouse, and a console 3 having a display device, as will be described later. The external device 4 composed of an encoder or the like can be connected.

カメラ2は、画素が二次元配置された二次元の画像(以下、「エリア画像」という)を撮像可能なエリアイメージセンサが撮像素子に用いられている。本実施形態では、カメラ2の撮像素子にはCMOS(Complementary Metal Oxide Semiconductor)イメージセンサが用いられるが、これに限らずたとえばCCD(Charge Coupled Devices)等の他の固体撮像素子が用いられていてもよい。なお、カメラ2はカラー画像を撮像するカラーカメラとするが、濃淡値を画素値とする濃淡画像を撮像するカメラであってもよい。
As the camera 2, an area image sensor capable of capturing a two-dimensional image (hereinafter referred to as “area image”) in which pixels are two-dimensionally arranged is used as an image sensor. In the present embodiment, a CMOS (Complementary) is included in the image sensor of the camera 2. Metal Oxide Semiconductor (Image Oxide Semiconductor) image sensor is used, but not limited to this, for example, CCD (Charge Coupled) Other solid-state imaging devices such as Devices) may be used. The camera 2 is a color camera that captures a color image, but may be a camera that captures a grayscale image having a grayscale value as a pixel value.

このカメラ2は、エリア画像を出力する機能だけでなく、撮像素子の所定範囲の画素のみから映像信号(画素値)を取り込むことにより、エリア画像内に設定された抽出領域の画像(以下、「部分画像」という)を出力する機能も有している。ここで、抽出領域は所定幅のライン状に設定されており、部分画像は1ないし複数の画素幅で画素が直線状に並んだライン画像を構成する。すなわち、カメラ2は、通常のエリア画像全体を出力するエリア撮像モードと、エリア画像の一部であるライン状の部分画像を出力する部分撮像モードとの2つの動作モードを切替可能な制御回路(図示せず)を有している。   The camera 2 not only has a function of outputting an area image, but also captures a video signal (pixel value) from only a predetermined range of pixels of the image sensor, thereby extracting an image of an extraction region set in the area image (hereinafter, “ It also has a function of outputting a “partial image”. Here, the extraction region is set in a line shape having a predetermined width, and the partial image constitutes a line image in which pixels are arranged in a straight line with one or a plurality of pixel widths. That is, the camera 2 is a control circuit that can switch between two operation modes: an area imaging mode that outputs an entire normal area image, and a partial imaging mode that outputs a line-shaped partial image that is a part of the area image ( (Not shown).

制御回路は、画像処理装置1からの信号に応じて動作モードの切り替えを行う。また、カメラ2は、部分撮像モードにおいて、映像信号を取り込む画素の指定を画像処理装置1からの信号に応じて行う。つまり、カメラ2は、エリア画像のうち部分画像として画像を取り込む抽出領域の設定を、画像処理装置1からの信号に応じて行う。具体的には、画像取込部111が、制御部15からの指示を受けてカメラ2の動作モード(エリア撮像モード・部分撮像モード)の切り替えを指示する信号をカメラ2に対して送信する。   The control circuit switches the operation mode according to the signal from the image processing apparatus 1. In the partial imaging mode, the camera 2 performs designation of a pixel for capturing a video signal in accordance with a signal from the image processing apparatus 1. That is, the camera 2 sets an extraction area for capturing an image as a partial image in the area image in accordance with a signal from the image processing apparatus 1. Specifically, in response to an instruction from the control unit 15, the image capturing unit 111 transmits a signal instructing switching of the operation mode (area imaging mode / partial imaging mode) of the camera 2 to the camera 2.

本実施形態の画像処理装置1は、基本的に部分撮像モードでカメラ2を動作させるので、以下では、特に断りがない限りカメラ2は部分撮像モードで動作していると仮定する。   Since the image processing apparatus 1 of the present embodiment basically operates the camera 2 in the partial imaging mode, hereinafter, it is assumed that the camera 2 operates in the partial imaging mode unless otherwise specified.

画像処理装置1の制御部15は、画像処理装置1に接続される外部装置4またはコンソール3から、検査開始の指示を受けると、前置処理部11へ画像を取得するように指示する。制御部15は、前置処理部11で画像が取得されたことを認識すると、取得された画像に対する画像処理を主処理部12に指示する。主処理部12は、検査パラメータに準じて画像の特徴量(たとえば欠陥部分の面積)を抽出して数値化し、検査対象物の良否を自動的に判定して、その結果を表示部14または制御部15から、外部装置4あるいはコンソール3に出力する。   When the control unit 15 of the image processing apparatus 1 receives an instruction to start inspection from the external device 4 or the console 3 connected to the image processing apparatus 1, the control unit 15 instructs the pre-processing unit 11 to acquire an image. When recognizing that an image has been acquired by the preprocessing unit 11, the control unit 15 instructs the main processing unit 12 to perform image processing on the acquired image. The main processing unit 12 extracts and digitizes the image feature amount (for example, the area of the defective portion) according to the inspection parameter, automatically determines the quality of the inspection object, and displays the result on the display unit 14 or the control unit. The data is output from the unit 15 to the external device 4 or the console 3.

設定記憶部13は、前置処理部11での画像取得時に用いられる撮像条件パラメータや、主処理部12での画像処理に用いられる検査パラメータ、主処理部12での画像処理結果に対する動作パラメータなど、画像処理装置1の動作に必要な情報を記憶している。ここでいう撮像条件パラメータは、エリア画像内での抽出領域の位置および範囲を示すデータであって画像取込部111における部分画像の取込条件を決める設定データを少なくとも含んでいる。   The setting storage unit 13 includes imaging condition parameters used at the time of image acquisition by the front processing unit 11, inspection parameters used for image processing by the main processing unit 12, operation parameters for image processing results by the main processing unit 12, and the like. Information necessary for the operation of the image processing apparatus 1 is stored. The imaging condition parameter here is data indicating the position and range of the extraction region in the area image, and includes at least setting data for determining the partial image capturing condition in the image capturing unit 111.

前置処理部11は、画像取込部111および記憶部112の他、図1に示すように同期処理部113と、画像生成部114と、画像記憶部115と、最適化処理部116とを備えている。   In addition to the image capturing unit 111 and the storage unit 112, the preprocessing unit 11 includes a synchronization processing unit 113, an image generation unit 114, an image storage unit 115, and an optimization processing unit 116 as shown in FIG. I have.

画像取込部111は、検査対象物とカメラ2との相対的な位置関係が時間経過に伴い変化する状態で、抽出領域の画像を部分画像として順次取り込む。つまり、検査対象物とカメラ2との少なくとも一方を移動させながら、画像取込部111は、抽出領域の画像を部分画像として順次取り込み、記憶部112に書き込んでいく。   The image capturing unit 111 sequentially captures the images of the extraction region as partial images in a state where the relative positional relationship between the inspection object and the camera 2 changes with time. That is, while moving at least one of the inspection object and the camera 2, the image capturing unit 111 sequentially captures the image of the extraction area as a partial image and writes it in the storage unit 112.

このとき、画像取込部111は、設定記憶部13内の設定データにより決まる取込条件の下で、カメラ2から部分画像の取り込みを行う。具体的には、画像取込部111はカメラ2との通信機能を有しており、設定記憶部13内の設定データに従って、エリア画像のどの位置および範囲の領域を抽出領域とするのかをカメラ2に対して指示する。これにより、カメラ2は、設定記憶部13内の設定データに従い、抽出領域として指定された領域の画像を部分画像として画像処理装置1に出力する。なお、設定記憶部13はカメラ2内に設けられていてもよい。   At this time, the image capturing unit 111 captures a partial image from the camera 2 under a capturing condition determined by setting data in the setting storage unit 13. Specifically, the image capturing unit 111 has a communication function with the camera 2, and according to the setting data in the setting storage unit 13, the camera determines which position and range of the area image is the extraction region. 2 is instructed. Thereby, the camera 2 outputs the image of the area designated as the extraction area to the image processing apparatus 1 as a partial image according to the setting data in the setting storage unit 13. The setting storage unit 13 may be provided in the camera 2.

同期処理部113は、画像取込部111が画像(部分画像)を取り込むタイミングを決定するためのトリガ信号を生成する。同期処理部113は、コンソール3や外部装置4からの信号を受け、これらの信号に同期して画像取込部111での部分画像の取り込みが可能となるように画像取込部111にトリガ信号を出力する。ここでは、同期処理部113は、先頭トリガと部分トリガとの2種類のトリガ信号を生成しており、部分トリガによって画像取込部111での部分画像の取込タイミングを決定する。つまり、画像取込部111は、同期処理部113で生成されたトリガ信号(部分トリガ)をカメラ2に対して送信し、このトリガ信号(部分トリガ)を受けてカメラ2から出力される部分画像の画像データを記憶部112に記憶する。   The synchronization processing unit 113 generates a trigger signal for determining the timing at which the image capturing unit 111 captures an image (partial image). The synchronization processing unit 113 receives signals from the console 3 and the external device 4, and sends a trigger signal to the image capturing unit 111 so that the image capturing unit 111 can capture a partial image in synchronization with these signals. Is output. Here, the synchronization processing unit 113 generates two types of trigger signals, a head trigger and a partial trigger, and determines the partial image capture timing in the image capture unit 111 by the partial trigger. That is, the image capturing unit 111 transmits the trigger signal (partial trigger) generated by the synchronization processing unit 113 to the camera 2, and receives the trigger signal (partial trigger) to output the partial image from the camera 2. Are stored in the storage unit 112.

画像生成部114は、記憶部112に記憶された複数の部分画像を時系列に沿って並べることにより、これら複数の部分画像を連結して、画素が二次元配置された二次元画像を生成する。具体的には、画像生成部114は、同期処理部113で生成される先頭トリガと部分トリガとを監視しており、先頭トリガを検知すると、部分画像を書き込むための画像記憶部115の書込アドレスを初期アドレスに設定する。   The image generation unit 114 arranges a plurality of partial images stored in the storage unit 112 in time series, and connects the plurality of partial images to generate a two-dimensional image in which pixels are two-dimensionally arranged. . Specifically, the image generation unit 114 monitors the start trigger and the partial trigger generated by the synchronization processing unit 113, and when detecting the start trigger, the image generation unit 114 writes the partial image. Set the address to the initial address.

その後、画像生成部114は、部分トリガを検知すると、記憶部112に保存されている部分画像の画像データを読み出して、書込アドレスに従って画像記憶部115へ書き込みを行い、書込アドレスを部分画像の画像サイズの分だけシフトさせる。それから、画像生成部114は、部分トリガを検知する度に、画像記憶部115への部分画像の書き込みと、書込アドレスをシフトさせる処理とを繰り返し実行し、画像記憶部115内に部分画像を並べて、画像記憶部115内に二次元画像を生成する。画像生成部114は、画像記憶部115内の二次元画像が、予め設定されている画像サイズに達すると、同期処理部113へ信号を出力して二次元画像の生成完了を通知する。   Thereafter, when detecting the partial trigger, the image generation unit 114 reads the image data of the partial image stored in the storage unit 112, writes the image data in the image storage unit 115 according to the write address, and sets the write address to the partial image. Shift by the image size of. Then, each time the partial generation is detected, the image generation unit 114 repeatedly executes the writing of the partial image to the image storage unit 115 and the process of shifting the write address, and the partial image is stored in the image storage unit 115. A two-dimensional image is generated in the image storage unit 115 side by side. When the two-dimensional image in the image storage unit 115 reaches a preset image size, the image generation unit 114 outputs a signal to the synchronization processing unit 113 to notify the completion of the generation of the two-dimensional image.

なお、設定記憶部13には、二次元画像を構成する部分画像の数、部分画像の画像サイズ、画像記憶部115の書込領域を表す初期アドレス、二次元画像のサイズ等の情報が予め登録されており、画像生成部114は、これらの情報を用いて二次元画像を生成する。二次元画像を構成する部分画像の数は、取込数として設定記憶部13内の設定データにて指定されており、画像生成部114は、取込数分の部分画像により二次元画像を生成する。同期処理部113は、取込数分の部分トリガを出力する度に、先頭トリガを出力する。   In the setting storage unit 13, information such as the number of partial images constituting the two-dimensional image, the image size of the partial image, the initial address indicating the writing area of the image storage unit 115, and the size of the two-dimensional image are registered in advance. The image generation unit 114 generates a two-dimensional image using these pieces of information. The number of partial images constituting the two-dimensional image is specified in the setting data in the setting storage unit 13 as the number of captures, and the image generation unit 114 generates a two-dimensional image from the partial images for the number of captures. To do. The synchronization processing unit 113 outputs a leading trigger every time it outputs partial triggers for the number of acquisitions.

最適化処理部116は、画像取込部111で取り込まれた部分画像に対し、設定に応じてサイズ変更やノイズ除去などの各種の変換処理を施すことにより、主処理部12での画像処理に適した部分画像を生成する最適化処理を行う。最適化処理は必ずしも必要ではないが、最適化処理部116で最適化処理が行われる場合には、画像生成部114は、最適化処理後の部分画像を用いて二次元画像を生成する。つまり、画像生成部114は、記憶部112にてバッファリングされた部分画像の画像データを、最適化処理部116で最適化処理が行われた後、画像記憶部115の書込アドレスに転送することで二次元画像を生成する。   The optimization processing unit 116 performs image processing in the main processing unit 12 by performing various conversion processes such as resizing and noise removal on the partial image captured by the image capturing unit 111 according to the setting. An optimization process for generating a suitable partial image is performed. Although optimization processing is not necessarily required, when the optimization processing unit 116 performs the optimization processing, the image generation unit 114 generates a two-dimensional image using the partial image after the optimization processing. That is, the image generation unit 114 transfers the image data of the partial image buffered in the storage unit 112 to the write address of the image storage unit 115 after the optimization processing unit 116 performs optimization processing. Thus, a two-dimensional image is generated.

このように、前置処理部11は、カメラ2から取り込んだ部分画像を用いて、二次元画像を再構成する。前置処理部11の各部(画像取込部111、同期処理部113、画像生成部114、最適化処理部116)の具体的な動作は、設定記憶部13に記憶されている撮像条件パラメータにより決定され、検査対象物の検査条件ごとに切り替えられる。同期処理部113、画像生成部114、最適化処理部116の具体的な動作については後述する。   Thus, the pre-processing unit 11 reconstructs a two-dimensional image using the partial image captured from the camera 2. The specific operation of each part of the pre-processing unit 11 (the image capturing unit 111, the synchronization processing unit 113, the image generation unit 114, and the optimization processing unit 116) depends on the imaging condition parameters stored in the setting storage unit 13. It is determined and switched for each inspection condition of the inspection object. Specific operations of the synchronization processing unit 113, the image generation unit 114, and the optimization processing unit 116 will be described later.

なお、前置処理部11は、画像生成部114で生成された二次元画像に対し、部分画像の長手方向(水平方向)における輝度むらを抑えるようにシェーディング補正を施すシェーディング補正部(図示せず)をさらに備えていてもよい。要するに、カメラ2で撮像される部分画像には、撮像素子の特性やレンズ収差などの影響により、長手方向において輝度にばらつきが生じることがあるので、シェーディング補正部は、この輝度のばらつきを補正し輝度むらを抑えることができる。   The pre-processing unit 11 performs a shading correction unit (not shown) that performs shading correction on the two-dimensional image generated by the image generation unit 114 so as to suppress luminance unevenness in the longitudinal direction (horizontal direction) of the partial image. ) May be further provided. In short, since the partial image captured by the camera 2 may vary in luminance in the longitudinal direction due to the influence of the characteristics of the image sensor, lens aberration, and the like, the shading correction unit corrects this luminance variation. Uneven brightness can be suppressed.

ところで、本実施形態においては、抽出領域は1つのエリア画像内における複数箇所に設定されており、画像取込部111は、これら複数の抽出領域の全てについて部分画像を取り込み、抽出領域ごとに記憶部112に記憶する。そのため、記憶部112には、各抽出領域について、時間経過に伴って取り込まれた複数の部分画像が記憶されることになる。   By the way, in this embodiment, the extraction area is set at a plurality of locations in one area image, and the image capturing unit 111 captures partial images for all of the plurality of extraction areas and stores them for each extraction area. Store in the unit 112. For this reason, the storage unit 112 stores a plurality of partial images captured with time for each extraction region.

また、画像生成部114は、エリア画像内に複数設定された抽出領域ごとに、上述したように複数の部分画像を時系列に沿って並べて二次元画像を生成する処理を行う。そのため、画像記憶部115には、部分画像を時系列に沿って並べることにより再構成された二次元画像が、抽出領域ごとに記憶されることになる。   Further, the image generation unit 114 performs a process of generating a two-dimensional image by arranging a plurality of partial images in time series as described above for each of a plurality of extraction regions set in the area image. Therefore, the image storage unit 115 stores a two-dimensional image reconstructed by arranging the partial images in time series for each extraction region.

結果的に、前置処理部11では複数の画像(二次元画像)が取得されるので、主処理部12での画像処理についても、二次元画像ごとに実行されることになる。つまり、主処理部12は、どのような画像処理を施すかが抽出領域ごとに対応付けられており、前置処理部11で抽出領域ごとに取得された各二次元画像について、それぞれ対応する画像処理を実行する。   As a result, since a plurality of images (two-dimensional images) are acquired in the pre-processing unit 11, the image processing in the main processing unit 12 is also executed for each two-dimensional image. That is, the main processing unit 12 associates with each extraction region what kind of image processing is performed, and each of the two-dimensional images acquired for each extraction region by the preprocessing unit 11 corresponds to each image. Execute the process.

次に、図2(a)に示すように、エリア画像100において第1領域101と第2領域102との2つの領域が抽出領域として設定されている場合を例に、前置処理部11の動作について説明する。図2の例では、第1領域101と第2領域102とは、いずれもエリア画像100の上端寄りの位置に、エリア画像100の水平ライン(水平走査線)に沿って設定されている。これら第1領域101と第2領域102とは、エリア画像100内において水平方向に互いに離間している。   Next, as shown in FIG. 2A, in the case where two areas of the first area 101 and the second area 102 are set as extraction areas in the area image 100, the pre-processing unit 11 The operation will be described. In the example of FIG. 2, both the first area 101 and the second area 102 are set along the horizontal line (horizontal scanning line) of the area image 100 at a position near the upper end of the area image 100. The first area 101 and the second area 102 are separated from each other in the horizontal direction in the area image 100.

この場合、前置処理部11は、画像取込部111における画像取込のタイミングを同期処理部113にて決定し、このタイミングで取り込まれた複数の部分画像を使って画像生成部114にて二次元画像を再構成する。ここでは、検査対象物はカメラ2に対して図2(a)の上方に向かって搬送されており、同期処理部113は、カメラ2に対して検査対象物が所定量移動する度に部分トリガを発生する。そのため、前置処理部11は、図2(b)に示すように、第1領域101と第2領域102との2箇所の抽出領域の部分画像を検査対象物の移動に同期して順次取り込み、抽出領域ごとに区分して部分画像を記憶部112に記憶する。   In this case, the preprocessing unit 11 determines the timing of image capture in the image capture unit 111 at the synchronization processing unit 113, and the image generation unit 114 uses a plurality of partial images captured at this timing. Reconstruct a two-dimensional image. Here, the inspection object is conveyed toward the upper side of FIG. 2A with respect to the camera 2, and the synchronization processing unit 113 triggers a partial trigger every time the inspection object moves relative to the camera 2. Is generated. Therefore, as shown in FIG. 2B, the pre-processing unit 11 sequentially captures partial images of the two extraction areas of the first area 101 and the second area 102 in synchronization with the movement of the inspection object. Then, the partial image is stored in the storage unit 112 for each extraction region.

さらに、前置処理部11は、画像生成部114にて第1領域101と第2領域102とを区別して、抽出領域ごとに画像記憶部115への部分画像の書き込みを繰り返すことにより、抽出領域ごとに二次元画像を生成する。要するに、前置処理部11は、図2(c)に示すように、第1領域101の部分画像を連結した第1の二次元画像103と、第2領域102の部分画像を連結した第2の二次元画像104との2つの二次元画像を生成する。なお、図2(c)では、複数の部分画像(図中、破線で区切られた範囲)が垂直方向(図の上下方向)に並べられることにより、二次元画像103,104を構成している。   Further, the preprocessing unit 11 distinguishes the first region 101 and the second region 102 by the image generation unit 114 and repeats the writing of the partial image to the image storage unit 115 for each extraction region, thereby extracting the extraction region. A two-dimensional image is generated every time. In short, as shown in FIG. 2C, the pre-processing unit 11 connects the first two-dimensional image 103 obtained by connecting the partial images of the first area 101 and the second image obtained by connecting the partial images of the second area 102. Two two-dimensional images with the two-dimensional image 104 are generated. In FIG. 2C, two-dimensional images 103 and 104 are configured by arranging a plurality of partial images (in the figure, a range separated by a broken line) in the vertical direction (up and down direction in the figure). .

このように、前置処理部11は、検査対象物が移動する間に画像取込部111にて取り込んだ複数の部分画像を、抽出領域ごとに時系列に並べて二次元画像103,104を生成する。その結果、前置処理部11は、エリア画像100中の矩形状の指定領域105,106(図2(a)参照)に対応した二次元画像103,104を得ることができる。   As described above, the front processing unit 11 generates the two-dimensional images 103 and 104 by arranging a plurality of partial images captured by the image capturing unit 111 in time series for each extraction region while the inspection object moves. To do. As a result, the preprocessing unit 11 can obtain the two-dimensional images 103 and 104 corresponding to the rectangular designated areas 105 and 106 (see FIG. 2A) in the area image 100.

ここにおいて、画像取込部11は、カメラ2から部分画像のみを取り込むことにより、エリア画像全体を取り込む場合に比べて、1回の撮像ごとにカメラ2から画像処理装置1へのデータ転送に要する時間を短縮できる。要するに、たとえば面積Sのエリア画像に対して、面積Saの第1領域と面積Sbの第2領域とが抽出領域として設定されている場合(S>Sa+Sb)、画像処理装置1は、部分画像のみ取り込むことで画像データの取込時間を短縮できる。具体的には、エリア画像全体のデータ転送に要する時間Tsと、第1領域および第2領域の部分画像のデータ転送に要する時間TaおよびTbとの関係は、上記面積を用いて「S:Sa+Sb≒Ts:Ta+Tb」の関係で表される。したがって、画像処理装置1は、部分画像のみを取り込むことにより、エリア画像全体を取り込む場合に比べて、エリア画像と部分画像の面積比の分だけ高速のサンプリングが可能になる。   Here, the image capturing unit 11 captures only a partial image from the camera 2 and requires data transfer from the camera 2 to the image processing apparatus 1 for each imaging as compared to capturing the entire area image. You can save time. In short, for example, when the first region of area Sa and the second region of area Sb are set as the extraction regions for the area image of area S (S> Sa + Sb), the image processing apparatus 1 is only for partial images. By taking in, the time for taking in the image data can be shortened. Specifically, the relationship between the time Ts required for data transfer of the entire area image and the times Ta and Tb required for data transfer of the partial images in the first region and the second region is expressed as “S: Sa + Sb ≈Ts: Ta + Tb ”. Therefore, the image processing apparatus 1 can sample at a high speed by capturing only the partial image, as compared with the case of capturing the entire area image, by the area ratio between the area image and the partial image.

ところで、本実施形態の画像処理装置1は、エリア画像内での抽出領域の位置および範囲をユーザが任意に設定できるように、つまり部分画像の取込条件を決める設定データをユーザが任意に設定できるように、以下の構成を採用している。   By the way, the image processing apparatus 1 of the present embodiment allows the user to arbitrarily set the position and range of the extraction region in the area image, that is, the user arbitrarily sets setting data for determining the partial image capturing condition. The following configuration is adopted so that it is possible.

すなわち、設定記憶部13に記憶されている撮像条件パラメータ、検査パラメータ、動作パラメータの情報は、画像処理装置1に接続されるコンソール(操作装置)3を用いてユーザが入力し、制御部15を介して設定記憶部13に登録される。言い換えれば、制御部15は、コンソール3の操作装置からの入力に従って設定データ等を決定し、設定記憶部13に書き込む機能を有している。   That is, information on imaging condition parameters, inspection parameters, and operation parameters stored in the setting storage unit 13 is input by a user using a console (operation device) 3 connected to the image processing apparatus 1, and the control unit 15 is Via the setting storage unit 13. In other words, the control unit 15 has a function of determining setting data and the like according to an input from the operation device of the console 3 and writing the setting data in the setting storage unit 13.

本実施形態では、上述したように抽出領域は1つのエリア画像内における複数箇所に設定されるので、制御部15は、エリア画像内において互いに離間した複数の領域を抽出領域とするように設定データを決定する。   In the present embodiment, as described above, since the extraction areas are set at a plurality of locations in one area image, the control unit 15 sets the setting data so that a plurality of areas separated from each other in the area image are set as the extraction areas. To decide.

ここで、画像処理装置1は、カメラ2から画像(部分画像)を取り込む検査モードと、設定データの設定が行われる設定モードとの2つの動作モードを有しており、コンソール3からの入力に応じて動作モードの切り替えを行う。   Here, the image processing apparatus 1 has two operation modes of an inspection mode for capturing an image (partial image) from the camera 2 and a setting mode in which setting data is set. The operation mode is switched accordingly.

設定モードにおいては、制御部15は、カメラ2の動作モードをエリア撮像モードに切り替えるように画像取込部111に指示し、カメラ2の動作モードをエリア撮像モードに切り替える。この状態で、制御部15は、前置処理部11にてカメラ2から取り込んだ検査対象物のエリア画像を設定画面としてコンソール3の表示装置に表示するよう表示部14を制御する。このとき、表示部14は、設定画面上に抽出領域として選択中の領域を設定画面上に表示する。つまり、表示装置は、図3に示すようにエリア画像を設定画面107として表示し、この設定画面107上に抽出領域(図中の斜線部)の候補として第1領域101および第2領域102を表示する。   In the setting mode, the control unit 15 instructs the image capturing unit 111 to switch the operation mode of the camera 2 to the area imaging mode, and switches the operation mode of the camera 2 to the area imaging mode. In this state, the control unit 15 controls the display unit 14 to display the area image of the inspection object captured from the camera 2 by the front processing unit 11 on the display device of the console 3 as a setting screen. At this time, the display unit 14 displays the area being selected as the extraction area on the setting screen on the setting screen. In other words, the display device displays the area image as the setting screen 107 as shown in FIG. 3, and the first region 101 and the second region 102 are displayed on the setting screen 107 as candidates for the extraction region (shaded portion in the figure). indicate.

さらに、制御部15は、コンソール3からの入力に従って、設定画面107上で第1領域101および第2領域102の位置並びに範囲を調節する。つまり、制御部15は、コンソール3に対するユーザの操作を受けて、設定画面107における第1領域101および第2領域102について、座標位置並びに縦方向、横方向の幅寸法を調節することにより、各抽出領域の位置および範囲を調節する。このとき、制御部15は、第1領域101、第2領域102のうち、設定の対象としている側の領域をたとえば点滅表示させ、ユーザによるコンソール3の操作に応じて設定の対象とする領域を切り替える。   Further, the control unit 15 adjusts the positions and ranges of the first area 101 and the second area 102 on the setting screen 107 in accordance with the input from the console 3. That is, the control unit 15 receives a user operation on the console 3 and adjusts the coordinate position and the vertical and horizontal width dimensions of the first area 101 and the second area 102 on the setting screen 107 to Adjust the position and range of the extraction area. At this time, the control unit 15 blinks, for example, the area on the setting target side of the first area 101 and the second area 102 and sets the area to be set according to the operation of the console 3 by the user. Switch.

制御部15は、このようにして調節された抽出領域(第1領域101、第2領域102)の位置および範囲を、設定データとして設定記憶部13に登録する。これにより、設定画面107上で調節された抽出領域(第1領域101、第2領域102)の位置が、設定記憶部13内の設定データに反映される。   The control unit 15 registers the position and range of the extraction region (the first region 101 and the second region 102) adjusted in this way in the setting storage unit 13 as setting data. Thereby, the position of the extraction area (first area 101, second area 102) adjusted on the setting screen 107 is reflected in the setting data in the setting storage unit 13.

ここにおいて、本実施形態では検査対象物は複数種類(複数品種)あって、設定記憶部13は、設定データ(抽出領域の位置および範囲)を検査対象物の種類ごとに記憶する。検査モードにおいては、前置処理部11は、コンソール3からの入力に従って検査対象物の種類を特定し、この種類に対応する設定データを設定記憶部13から読み出すことにより、検査対象物の種類に応じた設定データを適用する。   Here, in this embodiment, there are a plurality of types (a plurality of types) of inspection objects, and the setting storage unit 13 stores setting data (extraction region position and range) for each type of inspection object. In the inspection mode, the pre-processing unit 11 specifies the type of the inspection object in accordance with the input from the console 3, and reads the setting data corresponding to this type from the setting storage unit 13, thereby changing the type of the inspection object. Apply the appropriate setting data.

以下、上述した構成の画像処理装置1において、ユーザが設定データを設定する方法について簡単に説明する。   Hereinafter, a method for the user to set the setting data in the image processing apparatus 1 configured as described above will be briefly described.

まず、ユーザは、コンソール3を操作して画像処理装置1の動作モードを設定モードに切り替える。これにより、表示装置にはたとえば図3に示すような設定画面107が表示される。この状態で、ユーザはコンソール3を操作して、設定画面107上での第1領域101と第2領域102との各々を個別に移動させ、抽出領域の位置を調節する。抽出領域の位置が決まれば、ユーザは操作装置3を操作して抽出領域の範囲を設定し、その後、制御部15は、調節された第1領域101および第2領域102の位置および範囲を設定データとして設定記憶部13に登録する。   First, the user operates the console 3 to switch the operation mode of the image processing apparatus 1 to the setting mode. Thereby, for example, a setting screen 107 as shown in FIG. 3 is displayed on the display device. In this state, the user operates the console 3 to individually move the first area 101 and the second area 102 on the setting screen 107 and adjust the position of the extraction area. When the position of the extraction region is determined, the user operates the operation device 3 to set the range of the extraction region, and then the control unit 15 sets the adjusted positions and ranges of the first region 101 and the second region 102. The data is registered in the setting storage unit 13 as data.

以上説明した本実施形態の画像処理装置1によれば、制御部15は、エリア画像内において互いに離間した複数の領域を抽出領域とするように設定データを決定するので、1回の撮像につきエリア画像内の複数箇所の部分画像をカメラ2から取得することができる。さらに、記憶部112は、抽出領域ごとに部分画像を記憶し、画像生成部114は、抽出領域ごとに二次元画像を生成するので、主処理部12は、個々の抽出領域に対応する画像処理を抽出領域ごとに実行することができる。したがって、画像処理装置1は、1台のカメラ2で検査対象物の複数箇所の画像を取得しながらも、1回の撮像で検査対象物の複数箇所の画像を取得できるので、検査時間の短縮が可能である。   According to the image processing apparatus 1 of the present embodiment described above, the control unit 15 determines the setting data so that a plurality of areas separated from each other in the area image are the extraction areas. A plurality of partial images in the image can be acquired from the camera 2. Furthermore, since the storage unit 112 stores partial images for each extraction region, and the image generation unit 114 generates a two-dimensional image for each extraction region, the main processing unit 12 performs image processing corresponding to each extraction region. Can be executed for each extraction region. Accordingly, the image processing apparatus 1 can acquire images at a plurality of locations on the inspection object with one camera 2 while acquiring images at a plurality of locations on the inspection target, thereby reducing the inspection time. Is possible.

また、制御部15は、操作装置(コンソール3)からの入力に従って、抽出領域の位置および範囲を示す設定データを決定するので、部分画像は、1画素幅のライン画像に限らず、複数画素分の幅を持つ矩形状の画像であってもよい。つまり、抽出領域はライン状に限らず、たとえば矩形状などであってもよい。部分画像がある程度の幅を持つことにより、カメラ2と検査対象物との相対位置が連続的に変化する場合にも、画像処理装置1は、検査対象物の全体について部分画像を抜けなく取り込むことができ、検査対象物の全体についての検査が可能になる。   Further, since the control unit 15 determines setting data indicating the position and range of the extraction region in accordance with an input from the operation device (console 3), the partial image is not limited to a line image having a width of one pixel, but a plurality of pixels. It may be a rectangular image having a width of. That is, the extraction region is not limited to a line shape, and may be a rectangular shape, for example. Even when the relative position between the camera 2 and the inspection object continuously changes due to the partial image having a certain width, the image processing apparatus 1 captures the partial image without omission in the entire inspection object. Thus, the entire inspection object can be inspected.

ところで、制御部15は、エリア画像内に矩形状の領域が指定領域としてコンソール3の操作装置にて複数指定されることにより、指定領域ごとに対応した二次元画像を構成する部分画像を取り込むための設定データを自動的に決定してもよい。この場合、制御部15は、抽出領域の位置および範囲が直接指定される代わりに、二次元画像を取得すべき領域が指定領域として指定されることにより、その二次元画像を構成するのに必要な部分画像を取り込むための抽出領域の位置および範囲を決定する。   By the way, the control unit 15 captures a partial image constituting a two-dimensional image corresponding to each designated area by designating a plurality of rectangular areas as designated areas in the operation device of the console 3 in the area image. The setting data may be automatically determined. In this case, instead of directly specifying the position and range of the extraction region, the control unit 15 is required to construct the two-dimensional image by specifying the region from which the two-dimensional image is to be acquired as the specified region. The position and range of the extraction region for taking in a partial image are determined.

たとえば、図2(a)のエリア画像100において、左半分に対応する指定領域105が指定され、右半分に対応する指定領域106が指定された場合、制御部15は、これら指定領域105,106の二次元画像を再構成できるように設定データを決定する。つまり、制御部15は、一方の指定領域105を構成する部分画像を取得するための第1領域101と、他方の指定領域106を構成する部分画像を取得するための第2領域102とを抽出領域とするように、設定データを決定する。これにより、前置処理部11は、最終的に、エリア画像100中の矩形状の指定領域105,106に対応した二次元画像103,104を得ることができる。   For example, in the area image 100 of FIG. 2A, when the designated area 105 corresponding to the left half is designated and the designated area 106 corresponding to the right half is designated, the control unit 15 specifies these designated areas 105 and 106. The setting data is determined so that the two-dimensional image can be reconstructed. That is, the control unit 15 extracts the first area 101 for acquiring a partial image constituting one designated area 105 and the second area 102 for obtaining a partial image constituting the other designated area 106. The setting data is determined so as to be an area. Thereby, the pre-processing unit 11 can finally obtain the two-dimensional images 103 and 104 corresponding to the rectangular designated areas 105 and 106 in the area image 100.

このように矩形状の指定領域によって設定データを決定する場合、制御部15は、抽出領域として選択中の領域に代えて、矩形状の指定領域が設定画面上に表示されるように、表示部14を制御する。この場合、制御部15は、設定画面上に表示される指定領域の位置および範囲をコンソール3からの入力に従って調節することにより、指定領域を決定する。   When determining the setting data based on the rectangular designated area in this way, the control unit 15 displays the rectangular designated area on the setting screen in place of the area selected as the extraction area. 14 is controlled. In this case, the control unit 15 determines the designated area by adjusting the position and range of the designated area displayed on the setting screen according to the input from the console 3.

この構成によれば、ユーザは、二次元画像の取得範囲を指定領域として指定することにより、所望の二次元画像を検査対象とすることができる。すなわち、ユーザは、抽出領域の位置および範囲を直接的に決めなくても、指定領域を指定することで抽出領域の位置および範囲を間接的に決めることができ、設定データの設定が簡単になるという利点がある。   According to this configuration, the user can specify a desired two-dimensional image as an inspection target by designating the acquisition range of the two-dimensional image as the designated region. That is, the user can indirectly determine the position and range of the extraction region by designating the designated region without directly determining the position and range of the extraction region, and setting data can be easily set. There is an advantage.

以下、同期処理部113、画像生成部114、最適化処理部116の具体的な動作について説明する。   Hereinafter, specific operations of the synchronization processing unit 113, the image generation unit 114, and the optimization processing unit 116 will be described.

同期処理部113の動作は、検査対象物の形態や、検査対象物の搬送速度などにより異なる。   The operation of the synchronization processing unit 113 differs depending on the form of the inspection object, the conveyance speed of the inspection object, and the like.

まず、流体や帯状のように、個々の検査対象物の区切りがなく、連続的な検査を必要とする検査対象物を検査する場合について説明する。この場合、画像取込部111は、図4に示すように、外部装置4またはコンソール3から与えられる開始信号と終了信号との間の期間に、カメラ2から検査対象物5の画像を取得する。   First, a case will be described in which an inspection object that does not have a separation between individual inspection objects and requires continuous inspection, such as a fluid or a band, is described. In this case, as illustrated in FIG. 4, the image capturing unit 111 acquires an image of the inspection object 5 from the camera 2 during a period between the start signal and the end signal given from the external device 4 or the console 3. .

ここで、検査対象物が等速で搬送されていると、同期処理部113は、図5(a)に示すように、部分画像を取り込むタイミングを決定する部分トリガを一定の時間間隔Tで発生する。画像取込部111は、部分トリガの立ち上がりを検出しカメラ2に対してトリガ信号(部分トリガ)を出力しており、カメラ2は、画像取込部111からトリガ信号を受けると所定の露光時間に亘って撮像を行う。ここで、部分トリガの時間間隔Tは、少なくとも部分画像を取り込むのに要する時間tよりも長くなるように、設定記憶部13の撮像条件パラメータにて設定されている。これにより、画像取込部111は部分画像を抜けなく取り込むことができる。   Here, when the inspection object is transported at a constant speed, the synchronization processing unit 113 generates a partial trigger for determining the timing for capturing a partial image at a constant time interval T as shown in FIG. To do. The image capturing unit 111 detects the rising edge of the partial trigger and outputs a trigger signal (partial trigger) to the camera 2. When the camera 2 receives the trigger signal from the image capturing unit 111, a predetermined exposure time is obtained. The imaging is performed over the period. Here, the time interval T of the partial trigger is set in the imaging condition parameter of the setting storage unit 13 so as to be longer than at least the time t required to capture the partial image. Thereby, the image capturing unit 111 can capture the partial image without missing.

また、検査対象物の搬送速度が加減速する場合、検査対象物を搬送する搬送装置(図示せず)に設けられ検査対象物の搬送速度と同期するパルス信号を発生するエンコーダの出力に基づいて、同期処理部113は部分トリガを発生する。つまり、同期処理部113は、外部装置4としてのエンコーダの出力するパルスをカウントし、図5(b)に示すように、パルスのカウント値が規定値Cに達する度に、部分トリガを発生する。ここで、規定値Cは、搬送速度が最大のときにカウント値が規定値Cに達する周期CTが、少なくとも部分画像を取り込むのに要する時間tよりも長くなるように設定されている。   Further, when the inspection object conveyance speed is accelerated or decelerated, based on the output of an encoder that is provided in a conveyance device (not shown) that conveys the inspection object and generates a pulse signal that is synchronized with the inspection object conveyance speed. The synchronization processing unit 113 generates a partial trigger. That is, the synchronization processing unit 113 counts the pulses output from the encoder as the external device 4 and generates a partial trigger every time the pulse count value reaches the specified value C as shown in FIG. . Here, the specified value C is set such that the period CT at which the count value reaches the specified value C when the conveyance speed is maximum is longer than at least the time t required to capture the partial image.

なお、連続的な検査を必要とする検査対象物の場合、部分画像の取込数を、たとえば検査対象物が単位長さだけ移動する間に取り込まれる部分画像の数、あるいは単位時間当たりに取り込まれる部分画像の数とすることにより、検査対象物の情報を管理しやすくなる。   In the case of an inspection object that requires continuous inspection, the number of partial images to be captured is, for example, the number of partial images captured while the inspection object moves by a unit length, or the number of partial images captured per unit time. By setting the number of partial images to be checked, it becomes easy to manage information on the inspection object.

また、同期処理部113は、連続する検査対象物を抜けなく撮像するため、2回目以降の先頭トリガについては、画像生成部114による二次元画像の生成処理を監視し、二次元画像の生成完了を検出したタイミングで先頭トリガを発生する。これにより、同期処理部113は、画像処理装置1の外部から別の信号を入力することなく、連続した検査を行うことが可能になる。   In addition, since the synchronization processing unit 113 captures a continuous inspection object without missing, for the second and subsequent head triggers, the generation processing of the two-dimensional image by the image generation unit 114 is monitored, and the generation of the two-dimensional image is completed. The first trigger is generated at the timing when is detected. Accordingly, the synchronization processing unit 113 can perform continuous inspection without inputting another signal from the outside of the image processing apparatus 1.

前置処理部11は、外部装置4またはコンソール3から終了信号を受けると、同期処理部113によるトリガの生成を停止して、カメラ2からの画像(部分画像)の取り込みを終了する。   Upon receiving an end signal from the external device 4 or the console 3, the preprocessing unit 11 stops generating a trigger by the synchronization processing unit 113 and ends capturing an image (partial image) from the camera 2.

次に、ランダムに搬送されるパネルや電子部品など、互いに独立した不連続の検査対象物を検査する場合について説明する。この場合、検査対象物を検知するセンサ(図示せず)を搬送装置に設け、同期処理部113は、図6に示すように、このセンサからの信号を外部トリガ信号として用い、外部トリガ信号に合わせて先頭トリガを発生する。なお、検査対象物の移動が搬送装置のエンコーダの出力と同期しており、エンコーダの1回転ごとに1個の検査対象物が撮像される場合、同期処理部113は、センサの代わりにエンコーダの1回転ごとに発生するZ相のパルスを用いて検査対象物を検知してもよい。   Next, a description will be given of the case of inspecting discontinuous inspection objects that are independent from each other, such as panels and electronic components that are transported randomly. In this case, a sensor (not shown) for detecting the inspection object is provided in the transport device, and the synchronization processing unit 113 uses a signal from this sensor as an external trigger signal as shown in FIG. At the same time, the top trigger is generated. In addition, when the movement of the inspection object is synchronized with the output of the encoder of the transport apparatus, and one inspection object is imaged for each rotation of the encoder, the synchronization processing unit 113 uses the encoder instead of the sensor. The inspection object may be detected by using a Z-phase pulse generated every rotation.

ただし、同期処理部113が、センサからの外部トリガ信号を直接、先頭トリガとして用いると、センサの設置位置によって、二次元画像を構成する部分画像の取込開始タイミングが固定されることになる。これにより、画像生成部114は、たとえば図7(a)に示すように、検査対象物5の全体が含まれず、検査対象物5の一部が欠損した二次元画像を生成してしまうことがある。   However, when the synchronization processing unit 113 directly uses the external trigger signal from the sensor as the head trigger, the capture start timing of the partial image constituting the two-dimensional image is fixed depending on the installation position of the sensor. Accordingly, the image generation unit 114 may generate a two-dimensional image in which the entire inspection object 5 is not included and a part of the inspection object 5 is missing, as illustrated in FIG. 7A, for example. is there.

このような問題を回避するため、同期処理部113は、センサからの信号を検知したタイミングから遅延時間だけ遅れて先頭トリガを生成するタイミングを生成するオフセット機能を有している。オフセット量(遅延時間)は、検査対象物が等速で搬送されている場合には一定時間に設定され、検査対象物の搬送速度が加減速されている場合にはエンコーダのパルス数にて設定される。このオフセット機能により、前置処理部11は、図7(b)に示すように、二次元画像の先頭位置を任意に調整でき、検査対象物5の全体を含む二次元画像を生成することができる。   In order to avoid such a problem, the synchronization processing unit 113 has an offset function for generating a timing for generating the head trigger with a delay time from the timing at which the signal from the sensor is detected. The offset amount (delay time) is set to a certain time when the inspection object is being conveyed at a constant speed, and is set by the number of pulses of the encoder when the conveyance speed of the inspection object is being accelerated / decelerated. Is done. With this offset function, the pre-processing unit 11 can arbitrarily adjust the head position of the two-dimensional image and generate a two-dimensional image including the entire inspection object 5 as shown in FIG. it can.

なお、同期処理部113が部分トリガを発生する動作については、独立した検査対象物の場合でも、連続的な検査を必要とする検査対象物の場合と同じである。すなわち、検査対象物が等速で搬送されていると、同期処理部113は、先頭トリガから一定の時間間隔で部分トリガを発生する。また、検査対象物の搬送速度が加減速する場合、同期処理部113は、搬送装置のエンコーダの出力に基づいて部分トリガを発生する。   Note that the operation in which the synchronization processing unit 113 generates a partial trigger is the same as that in the case of an inspection object that requires continuous inspection, even in the case of an independent inspection object. That is, when the inspection object is conveyed at a constant speed, the synchronization processing unit 113 generates a partial trigger at a constant time interval from the head trigger. Further, when the conveyance speed of the inspection object is accelerated or decelerated, the synchronization processing unit 113 generates a partial trigger based on the output of the encoder of the conveyance device.

また、連続的な検査を必要とする検査対象物の場合、画像生成部114は、二次元画像を生成するタイミングによっては、生成される二次元画像において欠陥(特徴点)が分断されてしまう可能性がある。たとえば、図8に示すように、帯状の検査対象物5の表面の汚れ50を欠陥として検出する場合、汚れ50が2つの二次元画像103に分割されることにより、各々の二次元画像103から検出される汚れ50のサイズは、本来の汚れ50のサイズの半分程度になる。   In the case of an inspection object that requires continuous inspection, the image generation unit 114 may cause a defect (feature point) to be divided in the generated two-dimensional image depending on the timing of generating the two-dimensional image. There is sex. For example, as shown in FIG. 8, when the dirt 50 on the surface of the strip-shaped inspection object 5 is detected as a defect, the dirt 50 is divided into two two-dimensional images 103, so that each two-dimensional image 103 The size of the detected dirt 50 is about half the size of the original dirt 50.

そこで、この問題を回避するため、画像生成部114は、先頭トリガを受けてフレームを更新する際、直前に生成した二次元画像の末尾部分(最後に取り込んだ部分画像)を、更新後の二次元画像の先頭部分にコピーする。これにより、図9に示すように、連続して生成される2つの二次元画像103のいずれか一方には、必ず欠陥(ここでは「汚れ50」)が分断されることなく含まれ、主処理部12は、欠陥の正確なサイズを求めることが可能になる。   Therefore, in order to avoid this problem, when the image generation unit 114 updates the frame in response to the head trigger, the last part of the two-dimensional image generated immediately before (the last partial image captured) is updated. Copy to the beginning of the dimensional image. As a result, as shown in FIG. 9, one of the two two-dimensional images 103 generated in succession always includes a defect (here, “dirt 50”) without being divided, and the main process The part 12 can determine the exact size of the defect.

また、最適化処理部116は、複数種類の最適化処理を実行可能であって、検査対象物の検査条件に応じて設定された検査パラメータに準じて最適化処理を実行する。本実施形態においては、最適化処理部116は、縮小処理(圧縮処理)、拡大処理、分割処理の3種類の処理を最適化処理として実行可能である。   The optimization processing unit 116 can execute a plurality of types of optimization processing, and performs the optimization processing according to the inspection parameters set according to the inspection condition of the inspection object. In the present embodiment, the optimization processing unit 116 can execute three types of processing as reduction processing (compression processing), enlargement processing, and division processing as optimization processing.

縮小処理は、M×Nサイズの部分画像に対して、予め設定されているm×nサイズのブロック内で画素値(輝度値)の平均値や中央値、最大値や最小値を求める処理であり、求まった値を配列し直すことにより、部分画像のサイズを縮小する処理である。つまり、最適化処理部116は、たとえば部分画像に対して検査対象物の搬送方向に並ぶn画素についての輝度値の中央値をとることにより、検査対象物の搬送方向においてノイズ成分を除去することができる。この場合、部分画像は検査対象物の搬送方向におけるサイズが1/nに縮小される。   The reduction process is a process for obtaining an average value, a median value, a maximum value, and a minimum value of pixel values (luminance values) in a preset m × n size block for an M × N size partial image. Yes, it is a process of reducing the size of the partial image by rearranging the obtained values. That is, the optimization processing unit 116 removes a noise component in the conveyance direction of the inspection object by, for example, taking the median luminance value for n pixels arranged in the inspection object conveyance direction with respect to the partial image. Can do. In this case, the size of the partial image in the conveyance direction of the inspection object is reduced to 1 / n.

拡大処理は、部分画像を構成する各画素について、注目画素の周囲の画素の輝度値を用いて新たに画素値を求める処理であり、求まった画素値を配列し直すことにより、部分画像のサイズを拡大する処理である。つまり、最適化処理部116は、たとえば図10(a)に示すようにカラーカメラから取り込んだベイヤ配列の部分画像について、注目画素の周囲の画素の輝度値を用いて新たな画素値を求めることにより、図10(b)に示すRGBデータに変換することができる。この場合、部分画像はサイズが3倍に拡大されることになる。   The enlargement process is a process for obtaining a new pixel value for each pixel constituting the partial image using the luminance values of the pixels around the target pixel. By rearranging the obtained pixel values, the size of the partial image is determined. It is a process to enlarge. That is, for example, as shown in FIG. 10A, the optimization processing unit 116 obtains a new pixel value for the partial image of the Bayer array captured from the color camera using the luminance values of the pixels around the target pixel. Thus, the RGB data shown in FIG. 10B can be converted. In this case, the partial image is enlarged three times in size.

分割処理は、部分画像に何らかのフィルタ処理を施すことにより、1つの部分画像から、別々のフィルタ処理が施された複数の部分画像、あるいはフィルタ処理が施されていない部分画像と施された部分画像とを生成する処理である。つまり、最適化処理部116は、たとえば部分画像に対してSobelフィルタにて微分処理を施し、この部分画像を、微分画像と元の部分画像との2つの画像に分割する。なお、ここでいうフィルタ処理は、画像処理技術におけるフィルタ処理であって、画素値の微分値(変化量)を抽出する微分フィルタや、方向微分値を抽出する方向微分フィルタなどを含む。   The division processing is performed by performing some filtering process on the partial image, so that one partial image is subjected to a plurality of partial images that have been subjected to different filtering processes, or a partial image that has not been subjected to the filtering process and a partial image that has been subjected to the filtering process. It is a process which produces | generates. That is, the optimization processing unit 116 performs a differentiation process on the partial image using a Sobel filter, for example, and divides the partial image into two images, the differential image and the original partial image. The filter processing here is filter processing in an image processing technique, and includes a differential filter that extracts a differential value (change amount) of a pixel value, a directional differential filter that extracts a directional differential value, and the like.

次に、本実施形態の画像処理装置1を用いて検査対象物の検査を行う検査システムについて説明する。ここでは、検査対象物が建築板などのパネルであって、パネル表面の傷(凹凸)の有無と、パネルにおける白濁や色むらの有無とを検査項目とする検査システムを例示する。   Next, an inspection system that inspects an inspection object using the image processing apparatus 1 of the present embodiment will be described. Here, an inspection system is exemplified in which the inspection object is a panel such as a building board, and the inspection items include the presence or absence of scratches (irregularities) on the panel surface and the presence or absence of white turbidity or uneven color in the panel.

検査システムは、図11に示すように画像処理装置1およびカメラ2の他、検査対象物5を搬送する搬送装置6と、搬送装置6の上方から検査対象物5を照明する照明装置7とを備えている。   As shown in FIG. 11, the inspection system includes, in addition to the image processing apparatus 1 and the camera 2, a transport apparatus 6 that transports the inspection object 5 and an illumination apparatus 7 that illuminates the inspection object 5 from above the transport apparatus 6. I have.

搬送装置6は、たとえばローラコンベアからなり、インダクションモータ61によって駆動され、搬送面60(図12参照)に載置された検査対象物5を一方向(図11では右方向)に搬送する。この搬送装置6は、搬送面60の上方に配置され検査対象物5を検知するセンサ62と、ローラの回転軸に取り付けられ検査対象物5の移動量を検出するエンコーダ63とを有している。これらセンサ62およびエンコーダ63の出力信号が画像処理装置1に入力されるように、搬送装置6は画像処理装置1に接続されている(図11では接続線の図示を省略する)。   The conveyance device 6 is composed of, for example, a roller conveyor, and is driven by an induction motor 61 to convey the inspection object 5 placed on the conveyance surface 60 (see FIG. 12) in one direction (right direction in FIG. 11). The transport device 6 includes a sensor 62 that is disposed above the transport surface 60 and detects the inspection object 5, and an encoder 63 that is attached to the rotating shaft of the roller and detects the amount of movement of the inspection object 5. . The conveying device 6 is connected to the image processing device 1 so that the output signals of the sensor 62 and the encoder 63 are input to the image processing device 1 (the connection lines are not shown in FIG. 11).

搬送装置6は、インダクションモータ61に電力供給するインバータ(図示せず)の制御により、最大速度Vmax(m/min)以下の範囲で検査対象物5の移動速度が調整される。搬送装置6のエンコーダ63は、検査対象物5の移動量L(mm)に対してP(pulse)の信号を出力する。   In the transport device 6, the moving speed of the inspection object 5 is adjusted within a range of the maximum speed Vmax (m / min) or less by control of an inverter (not shown) that supplies power to the induction motor 61. The encoder 63 of the transport device 6 outputs a P (pulse) signal with respect to the movement amount L (mm) of the inspection object 5.

この検査システムでは、図12に示すように、カメラ2は搬送装置6の搬送面60の上方において、光軸が搬送面60の法線と平行になるように固定されている。これにより、カメラ2は、搬送装置6の搬送面60上においてカメラ2の真下を中心とした一定範囲を検査領域とし、この検査領域の画像をエリア画像として撮像する。このようにして撮像されるエリア画像は、搬送装置6の上流側を上方とし、左上の隅をカメラ座標の原点、つまり座標位置(H,V)=(0,0)とする(Hは水平軸の座標値、Vは垂直軸の座標値)。   In this inspection system, as shown in FIG. 12, the camera 2 is fixed above the transport surface 60 of the transport device 6 so that the optical axis is parallel to the normal line of the transport surface 60. As a result, the camera 2 takes a fixed area centered directly below the camera 2 on the transport surface 60 of the transport device 6 as an inspection area, and captures an image of this inspection area as an area image. In the area image captured in this way, the upstream side of the transport device 6 is the upper side, and the upper left corner is the origin of the camera coordinates, that is, the coordinate position (H, V) = (0, 0) (H is horizontal) The coordinate value of the axis, V is the coordinate value of the vertical axis).

照明装置7は、それぞれ搬送面60に沿う面内で搬送方向と直交する方向に延長された直線形状(ライン状)の発光面を持つ第1の照明71と第2の照明72とを有している。第1の照明71は、カメラ2よりも搬送方向の下流側であって、且つカメラ2よりも搬送面60からの高さが低い位置に配置されている。第1の照明71は、カメラ2の視野(検査領域)のうち主に搬送方向の下流側半分を照明するように、搬送面60に向けて拡散光を照射する。   The illumination device 7 includes a first illumination 71 and a second illumination 72 each having a linear (line-shaped) light emitting surface extended in a direction orthogonal to the conveyance direction within a plane along the conveyance surface 60. ing. The first illumination 71 is disposed downstream of the camera 2 in the transport direction and at a position lower than the camera 2 from the transport surface 60. The 1st illumination 71 irradiates diffused light toward the conveyance surface 60 so that the downstream half of a conveyance direction may mainly be illuminated among the visual fields (inspection area | region) of the camera 2. FIG.

一方、第2の照明72は、カメラ2の略真下であって、且つ第1の照明71よりもさらに搬送面60からの高さが低くなる位置に配置されている。第2の照明72は、光軸と搬送面60とが成す角度θが鋭角となるように搬送面60に対して傾けられ、カメラ2の視野(検査領域)のうち主に搬送方向の上流側を照明するように、搬送面60に向けて比較的指向性の強い光を照射する。   On the other hand, the second illumination 72 is disposed substantially directly below the camera 2 and at a position where the height from the conveyance surface 60 is lower than that of the first illumination 71. The second illumination 72 is tilted with respect to the transport surface 60 so that the angle θ formed by the optical axis and the transport surface 60 is an acute angle, and mainly upstream in the transport direction in the field of view (inspection region) of the camera 2. Is irradiated with light having a relatively high directivity toward the transport surface 60.

上記構成によれば、第1の照明71から照射され検査対象物5で反射された光を受けてカメラ2が撮像した画像(主にエリア画像の下半分)は、検査対象物5の白濁や色むらに対してコントラストの高い画像となる。一方、第2の照明72から照射され検査対象物5で反射された光を受けてカメラ2が撮像した画像(主にエリア画像の上半分)は、検査対象物5表面の傷(凹凸)に対してコントラストの高い画像となる。すなわち、カメラ2がエリア撮像モードで検査対象物5を撮像すると、上半分は検査対象物5表面の傷に対してコントラストが高く、下半分は検査対象物5の白濁や色むらに対してコントラストの高いエリア画像が得られることになる。   According to the above configuration, the image (mainly the lower half of the area image) captured by the camera 2 by receiving the light emitted from the first illumination 71 and reflected by the inspection object 5 is the cloudiness of the inspection object 5. The image has a high contrast against uneven color. On the other hand, an image (mainly the upper half of the area image) captured by the camera 2 by receiving light irradiated from the second illumination 72 and reflected by the inspection object 5 is a scratch (unevenness) on the surface of the inspection object 5. On the other hand, the image has a high contrast. That is, when the camera 2 images the inspection object 5 in the area imaging mode, the upper half has high contrast with respect to the scratch on the surface of the inspection object 5, and the lower half has contrast with respect to white turbidity and color unevenness of the inspection object 5. A high area image can be obtained.

このようにして得られるエリア画像は、垂直方向(搬送方向)にグラデーションを持つ画像となり、垂直方向の一部において、上述した欠陥(表面の傷、白濁や色むら)に対するコントラストが最も高くなる。そこで、検査対象物5の検査を高精度で安定して行うため、画像処理装置1は、図13に示すように、エリア画像100のうち欠陥に対するコントラストが最も高い領域を抽出領域として設定する。具体的には、第2領域102は、エリア画像100の上半分の中で欠陥(検査対象物5表面の傷)に対するコントラストが最も高い水平ライン上に設定される。第1領域101は、エリア画像100の下半分の中で欠陥(白濁や色むら)に対するコントラストが最も高い水平ライン上に設定される。   The area image obtained in this way is an image having gradation in the vertical direction (conveying direction), and the contrast with respect to the above-described defects (surface scratches, white turbidity, uneven color) is the highest in a part of the vertical direction. Therefore, in order to stably inspect the inspection object 5 with high accuracy, the image processing apparatus 1 sets, as the extraction region, a region having the highest contrast with respect to the defect in the area image 100 as illustrated in FIG. Specifically, the second region 102 is set on a horizontal line having the highest contrast with respect to a defect (a scratch on the surface of the inspection object 5) in the upper half of the area image 100. The first area 101 is set on a horizontal line having the highest contrast with respect to a defect (white turbidity or uneven color) in the lower half of the area image 100.

画像生成部114は、第2領域102の部分画像からは、検査対象物5表面の傷の検査を行うための二次元画像を生成し、第1領域101の部分画像からは、白濁や色むらの検査を行うための二次元画像を生成する。主処理部12は、これらの二次元画像を用いて、検査対象物5の欠陥(表面の傷、白濁や色むら)の有無を検査することができる。   The image generation unit 114 generates a two-dimensional image for inspecting the scratch on the surface of the inspection object 5 from the partial image of the second region 102, and white turbidity and uneven color from the partial image of the first region 101. A two-dimensional image for performing the inspection is generated. The main processing unit 12 can inspect the presence or absence of defects (surface scratches, white turbidity, color unevenness) of the inspection object 5 using these two-dimensional images.

ここにおいて、同期処理部113は、エンコーダ63の出力するパルスをカウントし、パルスのカウント値が規定値Cに達した時点で、第1領域101および第2領域102の各部分画像を取り込むための部分トリガを発生する。なお、搬送速度が最大のときにエンコーダ63が1パルスを発生する周期(最大速度Vmax、検査対象物5の移動量L、パルス数Pで表される)の規定値C倍が、1つの部分画像を取り込むのに要する時間よりも長くなるように、規定値Cが設定される。本実施形態では、部分画像の1画素の実空間上でのピクセルアスペクト比が1:1になるように、カメラ2の分解能に応じて規定値Cが設定されている。   Here, the synchronization processing unit 113 counts the pulses output from the encoder 63, and captures the partial images of the first region 101 and the second region 102 when the pulse count value reaches the specified value C. Generate a partial trigger. Note that the specified value C times the period (expressed by the maximum speed Vmax, the movement amount L of the inspection object 5 and the number of pulses P) in which the encoder 63 generates one pulse when the conveyance speed is maximum is one part. The specified value C is set so as to be longer than the time required to capture an image. In the present embodiment, the prescribed value C is set according to the resolution of the camera 2 so that the pixel aspect ratio in the real space of one pixel of the partial image is 1: 1.

このようにして取得される第1領域101の部分画像に関しては、欠陥(白濁や色むら)の大きさを計測できるように、最適化処理部116は何の処理も施さない。一方、第2領域102の部分画像に関しては、欠陥(表面の傷)の連続性が明瞭になるように、最適化処理部116は、検査対象物の搬送方向(垂直方向)における最大輝度値を求める縮小処理を実施する。   With respect to the partial image of the first region 101 acquired in this way, the optimization processing unit 116 performs no processing so that the size of a defect (white turbidity or color unevenness) can be measured. On the other hand, with respect to the partial image of the second region 102, the optimization processing unit 116 sets the maximum luminance value in the conveyance direction (vertical direction) of the inspection object so that the continuity of the defects (surface scratches) becomes clear. Perform the required reduction process.

画像生成部114は、第1領域101の部分画像を複数結合してなる二次元画像と、最適化処理(縮小処理)後の第2領域102の部分画像を複数結合してなる二次元画像とを生成する。主処理部12は、これら抽出領域ごとに取得された各二次元画像について、それぞれ対応する画像処理を実行する。   The image generation unit 114 includes a two-dimensional image formed by combining a plurality of partial images in the first area 101, and a two-dimensional image formed by combining a plurality of partial images in the second area 102 after optimization processing (reduction processing). Is generated. The main processing unit 12 executes corresponding image processing for each two-dimensional image acquired for each of the extraction regions.

なお、カメラ2がエリア撮像モードである場合、画像取込部111は、制御部15から画像取得の指示を受けてカメラ2に対してトリガ信号を出力し、トリガ信号を受けてカメラ2から出力される画像データを記憶部112に記憶する。画像生成部114は、記憶部112にてバッファリングされた画像データを画像記憶部115の書込アドレスに転送し、エリア画像を生成する。カメラ2がベイヤ配列のカラーカメラの場合、画像生成部114は、バッファリングされたベイヤ配列の画像データを最適化処理部116にてRGBデータに変換した後、画像記憶部115の書込アドレスに順次転送してエリア画像を生成する。   When the camera 2 is in the area imaging mode, the image capturing unit 111 receives an image acquisition instruction from the control unit 15, outputs a trigger signal to the camera 2, receives the trigger signal, and outputs from the camera 2. The stored image data is stored in the storage unit 112. The image generation unit 114 transfers the image data buffered in the storage unit 112 to the write address of the image storage unit 115, and generates an area image. When the camera 2 is a Bayer array color camera, the image generation unit 114 converts the buffered Bayer array image data into RGB data by the optimization processing unit 116, and then sets the write address in the image storage unit 115. The image is sequentially transferred to generate an area image.

また、本実施形態では、エリア画像において第1領域と第2領域との2つの領域が抽出領域として設定されている場合を例に説明したが、この例に限らず、1つのエリア画像に対して3つ以上の領域が抽出領域として設定されていてもよい。   In the present embodiment, the case where two areas of the first area and the second area are set as extraction areas in the area image has been described as an example. However, the present invention is not limited to this example. Three or more regions may be set as the extraction region.

(実施形態2)
本実施形態の画像処理装置1は、最適化処理部116が異なる抽出領域の部分画像同士を結合して結合画像を生成する結合処理部として機能する点で、実施形態1の画像処理装置1と相違する。以下、実施形態1と同様の構成については、共通の符号を付して説明を適宜省略する。
(Embodiment 2)
The image processing apparatus 1 according to the present embodiment differs from the image processing apparatus 1 according to the first embodiment in that the optimization processing unit 116 functions as a combination processing unit that combines partial images of different extraction regions to generate a combined image. Is different. Hereinafter, the same configurations as those of the first embodiment are denoted by common reference numerals, and the description thereof is omitted as appropriate.

すなわち、実施形態1においては、画像生成部114は、抽出領域ごとに複数の部分画像を並べることにより二次元画像を生成しているが、本実施形態では、画像生成部114で二次元画像が生成される前に、異なる抽出領域の部分画像同士が結合されることになる。   That is, in the first embodiment, the image generation unit 114 generates a two-dimensional image by arranging a plurality of partial images for each extraction region. However, in the present embodiment, the image generation unit 114 generates a two-dimensional image. Before being generated, partial images of different extraction regions are combined.

本実施形態における最適化処理部116は、最適化処理として、記憶部112内に記憶されている異なる抽出領域の部分画像を結合して結合画像を生成する結合処理を実行する。これにより、検査対象物の互いに離れた部位を撮像した部分画像同士が、1つの画像(結合画像)に統合されることになる。   The optimization processing unit 116 according to the present embodiment executes a combination process for generating a combined image by combining partial images of different extraction regions stored in the storage unit 112 as the optimization process. Thereby, the partial images obtained by imaging the parts of the inspection object that are separated from each other are integrated into one image (combined image).

画像処理装置1は、たとえば図14に示すように検査対象物5の幅寸法(図14(a)における左右方向の寸法)の計測に用いられる場合、幅寸法を計測するために必要な最小限の画像を部分画像として画像取込部111で取り込む。すなわち、検査対象物5の幅寸法を計測するためには、検査対象物5の幅方向の一端縁を含む第1領域101の部分画像と、幅方向の他端縁を含む第2領域102の部分画像とが必要であるので、画像取込部111はこれら2箇所の部分画像を取り込む。   For example, when the image processing apparatus 1 is used for measuring the width dimension of the inspection object 5 (the horizontal dimension in FIG. 14A) as shown in FIG. 14, the minimum necessary for measuring the width dimension is used. Are captured by the image capturing unit 111 as partial images. That is, in order to measure the width dimension of the inspection object 5, the partial image of the first area 101 including one end edge in the width direction of the inspection object 5 and the second area 102 including the other edge in the width direction are measured. Since partial images are required, the image capturing unit 111 captures these two partial images.

ここで、検査対象物5の幅方向がエリア画像100の水平方向(図14(a)における左右方向)となり、且つ検査対象物5の幅方向の全長がエリア画像100内に収まるようにカメラ2の向きおよび視野が設定されている。図14の例では、第1領域101はエリア画像100の左端から複数画素の範囲に設定され、第2領域102はエリア画像の右端から複数画素の範囲に設定されている。   Here, the camera 2 is arranged such that the width direction of the inspection object 5 is the horizontal direction of the area image 100 (the left-right direction in FIG. 14A), and the entire length of the inspection object 5 is within the area image 100. Direction and field of view are set. In the example of FIG. 14, the first area 101 is set in a range of a plurality of pixels from the left end of the area image 100, and the second area 102 is set in a range of a plurality of pixels from the right end of the area image.

これら第1領域101および第2領域102の各部分画像108,109は、エリア画像内の同一の水平走査線(水平走査に係るライン)上に設定されており、図14(b)に示すようにエリア画像100の垂直方向に1画素分の幅を有している。第1領域101および第2領域102の長さは、両者の和がエリア画像100の水平方向の寸法よりも小さく設定され、これにより、第1領域101および第2領域102は、エリア画像100上において連続せず水平方向に離れて設定されることになる。また、抽出領域(第1領域101、第2領域102)はエリア画像100における決まった位置に設定されるので、水平方向における第1領域101と第2領域102との間隔W0は既知である。   The partial images 108 and 109 in the first area 101 and the second area 102 are set on the same horizontal scanning line (line related to horizontal scanning) in the area image, as shown in FIG. The area image 100 has a width of one pixel in the vertical direction. The lengths of the first area 101 and the second area 102 are set such that the sum of both is smaller than the horizontal dimension of the area image 100, so that the first area 101 and the second area 102 are on the area image 100. Are set apart from each other in the horizontal direction. Further, since the extraction area (the first area 101 and the second area 102) is set at a fixed position in the area image 100, the interval W0 between the first area 101 and the second area 102 in the horizontal direction is known.

最適化処理部116は、カメラ2から取り込まれた第1領域101の部分画像108と第2領域102の部分画像109とを、水平方向に隙間なく並べることにより、図14(c)に示すように両部分画像108,109を1つに結合して結合画像を得る。このようにして得られる結合画像は、検査対象物5のうち幅方向における両端部の状態を表す画像である。   The optimization processing unit 116 arranges the partial image 108 of the first area 101 and the partial image 109 of the second area 102 captured from the camera 2 in the horizontal direction without gaps, as shown in FIG. The partial images 108 and 109 are combined into one to obtain a combined image. The combined image obtained in this way is an image representing the state of both ends of the inspection object 5 in the width direction.

主処理部12は、結合画像において検査対象物5の幅方向の一端縁から他端縁までの寸法W1を計測し、この寸法W1をエリア画像100における第1領域101と第2領域102との間隔W0(既知)に加算することにより、検査対象物5の幅寸法を計測できる。この場合、画像処理装置1は、検査対象物5の幅寸法の計測に必要な部分画像のみを取り込んで幅寸法を計測できるので、計測処理の処理速度を向上することができる。   The main processing unit 12 measures the dimension W1 from one end edge to the other end edge in the width direction of the inspection object 5 in the combined image, and uses the dimension W1 between the first region 101 and the second region 102 in the area image 100. By adding to the interval W0 (known), the width dimension of the inspection object 5 can be measured. In this case, the image processing apparatus 1 can measure the width dimension by taking in only the partial image necessary for the measurement of the width dimension of the inspection object 5, so that the processing speed of the measurement process can be improved.

なお、本実施形態においては、画像生成部114は、最適化処理部116で結合処理が施された複数の結合画像を時系列に並べることにより二次元画像を生成する。   In the present embodiment, the image generation unit 114 generates a two-dimensional image by arranging a plurality of combined images subjected to the combination processing by the optimization processing unit 116 in time series.

以上説明した本実施形態の画像処理装置1によれば、画像処理に必要な最小限の画像を部分画像として取り込んで、且つ異なる抽出領域の部分画像同士を結合して結合画像を生成するので、画像処理に必要な部分の画像の対比が容易になる。   According to the image processing apparatus 1 of the present embodiment described above, a minimum image necessary for image processing is taken as a partial image, and partial images of different extraction regions are combined to generate a combined image. It becomes easy to compare the images of the portions necessary for image processing.

その他の構成および機能は実施形態1と同様である。   Other configurations and functions are the same as those of the first embodiment.

1 画像処理装置
2 カメラ
3 コンソール(操作装置、表示装置)
111 画像取込部
112 記憶部
114 画像生成部
115 画像記憶部
116 最適化処理部(結合処理部)
13 設定記憶部
14 表示部
15 制御部
1 image processing device 2 camera 3 console (operation device, display device)
111 Image Acquisition Unit 112 Storage Unit 114 Image Generation Unit 115 Image Storage Unit 116 Optimization Processing Unit (Combination Processing Unit)
13 Setting Storage Unit 14 Display Unit 15 Control Unit

Claims (4)

検査対象物の画像を画素が二次元配置されたエリア画像として撮像可能なエリアイメージセンサを撮像素子に用いたカメラから、前記エリア画像内に予め設定されている抽出領域の画像を部分画像として、前記検査対象物と前記カメラとの相対的な位置関係が時間経過に伴い変化する状態で順次取り込む画像取込部と、前記部分画像を複数記憶する記憶部と、前記記憶部内の複数の前記部分画像を時系列に沿って並べることにより画素が二次元配置された二次元画像を生成する画像生成部と、前記エリア画像内での前記抽出領域の位置および範囲を示すデータであって前記画像取込部における前記部分画像の取込条件を決める設定データを記憶する設定記憶部と、操作装置からの入力に従って前記設定データを決定して前記設定記憶部に書き込む制御部とを備え、
前記制御部は、前記エリア画像内において前記検査対象物の移動方向と交差する方向に互いに離間した複数の領域を前記抽出領域とするように前記設定データを決定し、前記記憶部は、前記抽出領域ごとに前記部分画像を記憶し、前記画像生成部は、前記抽出領域ごとに前記二次元画像を生成することを特徴とする画像処理装置。
From a camera that uses an area image sensor that can capture an image of an inspection object as an area image in which pixels are arranged two-dimensionally as an image sensor, an image of an extraction region that is set in advance in the area image is used as a partial image. An image capturing unit that sequentially captures the relative positional relationship between the inspection object and the camera as time passes, a storage unit that stores a plurality of the partial images, and a plurality of the parts in the storage unit An image generation unit that generates a two-dimensional image in which pixels are two-dimensionally arranged by arranging images in time series, and data indicating the position and range of the extraction region in the area image, the image capture A setting storage unit that stores setting data for determining the capture condition of the partial image in the capture unit; and the setting data that is determined according to an input from an operating device and written in the setting storage unit And a non-control unit,
The control unit determines the setting data so that a plurality of regions separated from each other in a direction intersecting a moving direction of the inspection target in the area image is the extraction region, and the storage unit The partial image is stored for each region, and the image generation unit generates the two-dimensional image for each extraction region.
前記抽出領域はライン状であって、前記部分画像はライン画像を構成することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the extraction area has a line shape, and the partial image forms a line image. 前記制御部は、前記エリア画像内に矩形状の領域が指定領域として前記操作装置にて複数指定されることにより、前記指定領域ごとに対応した前記二次元画像を構成する前記部分画像を取り込むための前記設定データを自動的に決定することを特徴とする請求項2に記載の画像処理装置。   The control unit captures the partial image constituting the two-dimensional image corresponding to each designated area by designating a plurality of rectangular areas as designated areas in the area image by the operating device. The image processing apparatus according to claim 2, wherein the setting data is automatically determined. 前記カメラから取り込んだ前記エリア画像を設定画面として表示装置に表示する表示部をさらに備え、
前記制御部は、前記設定画面上に表示される前記指定領域の位置および範囲を前記操作装置からの入力に従って調節することにより、前記指定領域を指定することを特徴とする請求項3に記載の画像処理装置。
A display unit that displays the area image captured from the camera as a setting screen on a display device;
The said control part designates the said designation | designated area | region by adjusting the position and range of the said designation | designated area | region displayed on the said setting screen according to the input from the said operating device. image processing equipment.
JP2011171628A 2011-08-05 2011-08-05 Image processing device Expired - Fee Related JP5824278B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011171628A JP5824278B2 (en) 2011-08-05 2011-08-05 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011171628A JP5824278B2 (en) 2011-08-05 2011-08-05 Image processing device

Publications (2)

Publication Number Publication Date
JP2013036796A JP2013036796A (en) 2013-02-21
JP5824278B2 true JP5824278B2 (en) 2015-11-25

Family

ID=47886548

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011171628A Expired - Fee Related JP5824278B2 (en) 2011-08-05 2011-08-05 Image processing device

Country Status (1)

Country Link
JP (1) JP5824278B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6241052B2 (en) * 2013-03-29 2017-12-06 オムロン株式会社 Image processing system and image processing program
JP2017142245A (en) * 2016-02-05 2017-08-17 株式会社ミツトヨ Image measurement machine and program
CA3030226A1 (en) * 2016-07-08 2018-01-11 Ats Automation Tooling Systems Inc. System and method for combined automatic and manual inspection
JP6782449B2 (en) * 2017-03-24 2020-11-11 パナソニックIpマネジメント株式会社 Surface inspection method and its equipment
JP2019135460A (en) * 2018-02-05 2019-08-15 株式会社Screenホールディングス Image acquisition device, image acquisition method, and inspection device
JP7113627B2 (en) * 2018-02-05 2022-08-05 株式会社Screenホールディングス Image Acquisition Device, Image Acquisition Method and Inspection Device
JP6970866B2 (en) * 2020-03-06 2021-11-24 フロンティアシステム株式会社 Surface inspection equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63261952A (en) * 1987-04-20 1988-10-28 Minolta Camera Co Ltd Microreader scanner
JP2006115461A (en) * 2004-09-14 2006-04-27 Ricoh Co Ltd Image forming apparatus, image composite method and program therefor
JP4932595B2 (en) * 2007-05-17 2012-05-16 新日本製鐵株式会社 Surface flaw inspection device
JP5031691B2 (en) * 2008-07-17 2012-09-19 新日本製鐵株式会社 Surface flaw inspection device
JP5068731B2 (en) * 2008-11-14 2012-11-07 新日本製鐵株式会社 Surface flaw inspection apparatus, surface flaw inspection method and program

Also Published As

Publication number Publication date
JP2013036796A (en) 2013-02-21

Similar Documents

Publication Publication Date Title
JP5824278B2 (en) Image processing device
US10796428B2 (en) Inspection system and inspection method
TWI403718B (en) Method and system for the inspection of a periodic structure
JP5031691B2 (en) Surface flaw inspection device
JP2004012325A (en) Method and apparatus for inspection of defect
JP7151873B2 (en) inspection equipment
JP2015216482A (en) Imaging control method and imaging apparatus
JP2007292699A (en) Surface inspection method of member
JP2014197762A (en) Image processing system and image processing program
JP4932595B2 (en) Surface flaw inspection device
JP2009229197A (en) Linear defect detecting method and device
US10410336B2 (en) Inspection device, storage medium, and program
JP7159624B2 (en) Surface texture inspection method and surface texture inspection device
JP2008180578A (en) Cyclic pattern nonuniformity inspection device
JP2014055921A (en) Inspection equipment
JP5946705B2 (en) Inspection apparatus and inspection method
JP2017009533A (en) Image inspection system
JPH08313454A (en) Image processing equipment
JP2015059854A (en) Defect inspection method and defect inspection device
JP2007303848A (en) X-ray fluoroscopic apparatus
JP4252381B2 (en) Appearance inspection device
JP2005122508A (en) Image input device
JP2006125896A (en) Flat panel display inspection device
JP2009150847A (en) Inspection apparatus, inspection system, control method of inspection apparatus, control program of inspection apparatus, and computer readable recording medium recording program
JP2024103415A (en) Surface inspection device and surface inspection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140707

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150303

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150507

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: 20150915

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151009

R150 Certificate of patent or registration of utility model

Ref document number: 5824278

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

LAPS Cancellation because of no payment of annual fees