JP4711015B2 - Image processing apparatus and image processing system - Google Patents

Image processing apparatus and image processing system Download PDF

Info

Publication number
JP4711015B2
JP4711015B2 JP2010005073A JP2010005073A JP4711015B2 JP 4711015 B2 JP4711015 B2 JP 4711015B2 JP 2010005073 A JP2010005073 A JP 2010005073A JP 2010005073 A JP2010005073 A JP 2010005073A JP 4711015 B2 JP4711015 B2 JP 4711015B2
Authority
JP
Japan
Prior art keywords
image
image processing
image data
central processing
processing unit
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
JP2010005073A
Other languages
Japanese (ja)
Other versions
JP2010102736A (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 Corp
Panasonic Electric Works Co Ltd
Original Assignee
Panasonic Corp
Matsushita Electric Works 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 Corp, Matsushita Electric Works Ltd filed Critical Panasonic Corp
Priority to JP2010005073A priority Critical patent/JP4711015B2/en
Publication of JP2010102736A publication Critical patent/JP2010102736A/en
Application granted granted Critical
Publication of JP4711015B2 publication Critical patent/JP4711015B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、例えば製造ラインにおいて、製造物などの検査対象の外観検査測定に使用される画像処理装置および画像処理システムに関するものである。   The present invention relates to an image processing apparatus and an image processing system used for appearance inspection measurement of an inspection object such as a product in a production line, for example.

上記外観検査測定には、検査対象の外観検査、寸法、形状、位置などの測定、傷クラック検査、文字検査などが含まれるが、このような外観検査測定で、良品または不良品の判定結果となった検査対象の良品画像または不良品画像を画像処理装置から出力する必要が多々生じる。どのような場合に画像データを出力する必要があるかについては、例えば、上記判定の基準品と実際の検査対象との差が製造上の誤差などによる若干の差であるときに、本来良品とすべきところ不良品の判定結果となってしまった場合、どのような画像処理で不良品の判定結果となったのかを調査する必要が生じた場合、以前の設定についてどのような画像処理で例えば良品としていたのかを調査する必要が生じた場合などが挙げられる。   The appearance inspection measurement includes appearance inspection, measurement of dimensions, shape, position, etc., scratch crack inspection, character inspection, etc .. In many cases, it is necessary to output a non-defective product image or a defective product image to be inspected from the image processing apparatus. When the image data needs to be output, for example, when the difference between the reference product for determination and the actual inspection object is a slight difference due to manufacturing error, etc. If it is necessary to investigate what kind of image processing resulted in the judgment result of a defective product if it should be judged as a defective product, what kind of image processing should be used for the previous settings, for example, For example, it may be necessary to investigate whether the product is non-defective.

しかし、製造では、決められた一定水準以上の生産性を確保する必要があるのであるが、画像処理による外観検査測定の結果の善し悪しで、良品画像または不良品画像の画像データを画像処理装置から得るために画像処理を止めたり、あるいは遅らせたりすると、検査対象の製造物を製造するための一連の作業が遅れ、全体の生産効率が下がり、この結果、上記一定水準以上の生産性を確保することができなくなる。   However, in manufacturing, it is necessary to ensure productivity that exceeds a certain fixed level. However, the quality of the appearance inspection measurement by image processing is good or bad. If the image processing is stopped or delayed in order to obtain the product, the series of operations for producing the product to be inspected will be delayed, and the overall production efficiency will be reduced. As a result, the productivity above the certain level will be ensured. I can't.

このため、製造中に画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力させる仕組みが望まれる。画像データを出力することについては、例えばパソコン(パーソナル・コンピュータ)で読み込める形態でSDカードなどの記憶媒体に書込み出力する構成でも、通信インターフェースを介してパソコンに送信出力する構成でもどちらでも構わない。また、画像データを出力する際に、対応する各種パラメータや外観検査測定の結果も同時に出力することができるようにすることが望ましい。このようにすれば、製造中に画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを取り出して、製造と平行しながら、別のパソコンで画像処理の内容を解析したり、確認したりすることができる。   For this reason, a mechanism for outputting image data used for image processing without stopping or delaying image processing during manufacturing is desired. For outputting image data, for example, a configuration in which data is written and output to a storage medium such as an SD card in a form that can be read by a personal computer (personal computer) or a configuration in which it is transmitted to a personal computer via a communication interface may be used. Further, it is desirable to be able to simultaneously output various corresponding parameters and results of appearance inspection measurement when outputting image data. In this way, without stopping or delaying image processing during manufacturing, the image data used for image processing can be taken out and analyzed in parallel with the manufacturing while analyzing the contents of the image processing on another computer. Or confirm.

なお、特許文献1には、撮像により得た画像データを部品が変わる度に所定の記憶領域に交互に取り込んで記憶することにより、電子部品の外観検査を高速なタクトタイムで実施できる電子部品の外観検査装置が開示されている。   Patent Document 1 discloses an electronic component that can perform an appearance inspection of an electronic component with a high tact time by alternately capturing and storing image data obtained by imaging in a predetermined storage area every time the component changes. An appearance inspection apparatus is disclosed.

特開平10−78308号公報JP-A-10-78308

しかしながら、画像データの情報量が大きく、その画像データの出力に時間がかかることが、画像処理の内容の解析または確認などを妨げる要因となるので、上記仕組みを設けることは簡単なことではない。   However, since the amount of information of the image data is large and it takes a long time to output the image data, the analysis or confirmation of the contents of the image processing is hindered. Therefore, it is not easy to provide the above mechanism.

画像処理装置を使用する生産ラインの機械的なタクト周期が年々高速になっているので、これに合わせて画像処理を高速に実行させる必要がある。画像処理装置に接続される撮像装置の種類が、例えば標準カメラ、倍速カメラまたはメガピクセルカメラであるとき、その撮像周期は、それぞれ、33.3ms(30フレーム/秒)、16.7ms(60フレーム/秒)または66.7ms(15フレーム/秒)となる。したがって、コマ落ちなく外観検査測定を行うためには、上記撮像周期よりも高速に画像処理を実行させなければならないので、そのような高速の画像処理を妨げないように、画像データを出力する必要がある。   Since the mechanical tact cycle of the production line using the image processing apparatus is increasing year by year, it is necessary to execute image processing at high speed in accordance with this. When the type of the imaging device connected to the image processing device is, for example, a standard camera, a double-speed camera, or a megapixel camera, the imaging cycles are 33.3 ms (30 frames / second) and 16.7 ms (60 frames), respectively. / Second) or 66.7 ms (15 frames / second). Therefore, in order to perform appearance inspection measurement without dropping frames, image processing must be executed at a speed higher than the above imaging cycle. Therefore, it is necessary to output image data so as not to prevent such high-speed image processing. There is.

また、標準カメラ、倍速カメラまたはメガピクセルカメラの場合、出力するべき画像データの情報量は、それぞれ、約256Kバイト(画像1枚の画素数が512×480画素の場合)、約256Kバイト(画像1枚の画素数が512×480画素の場合)または約1Mバイト(画像1枚の画素数が1024×960画素の場合)となる。近年、検査対象の小型、精密化によって、高精度な画像処理が必要となって撮像装置の画素数が増大する傾向にあり、これに伴って、画像処理装置が扱う画像データも増大する傾向にある。   In the case of a standard camera, a double-speed camera, or a megapixel camera, the information amount of image data to be output is about 256 Kbytes (when the number of pixels of one image is 512 × 480 pixels) and about 256 Kbytes (image When the number of pixels of one image is 512 × 480 pixels) or about 1 Mbyte (when the number of pixels of one image is 1024 × 960 pixels). In recent years, due to the miniaturization and refinement of inspection targets, high-precision image processing is required and the number of pixels of the imaging device tends to increase, and along with this, the image data handled by the image processing device also tends to increase. is there.

従来の画像処理装置では、画像データを保存する場合、保存時間の観点からSRAM(Static RAM)などの高速メモリが使用される。そのSRAMには、通常、画像処理を行うCPU(中央処理装置)によって画像データが保存されるが、SRAMは、数十MB程度の比較的小さな容量しか持っていないので、上記のような大きな画像データの場合には数枚〜数十枚程度しか保存することができない。また、RAMは、揮発性のため、バッテリなどのバックアップ電源を使用しなければ、電源のオフ時点で、保存した画像データが消去されることになる。   In the conventional image processing apparatus, when storing image data, a high-speed memory such as SRAM (Static RAM) is used from the viewpoint of storage time. In the SRAM, image data is usually stored by a CPU (Central Processing Unit) that performs image processing. However, since the SRAM has a relatively small capacity of about several tens of MB, the large image as described above is used. In the case of data, only a few to tens of sheets can be stored. Since the RAM is volatile, the stored image data is erased when the power is turned off unless a backup power source such as a battery is used.

このほか、従来の画像処理装置には、より多くの画像データを保存するべく、RAM以外の不揮発性メモリを搭載しているものがある。近時においては、SDカード、コンパクトフラッシュ(登録商標)、メモリスティックなどの小型で低価格の大容量フラッシュROMが普及し、これらを画像データの記憶媒体に使用することによって、多くの枚数をバックアップ電源なしで保持することができるようになっている。   In addition, some conventional image processing apparatuses are equipped with a non-volatile memory other than a RAM in order to store more image data. Recently, small and low-priced large-capacity flash ROMs such as SD cards, compact flash (registered trademark), and memory sticks have become widespread, and many of them can be backed up by using them as image data storage media. It can be held without power.

しかしながら、この種の記憶媒体は、素子の性質上、保存時間が問題となる。例えばSDカードの場合、512×480画像(約256Kバイト)または1024×960画像(約1Mバイト)の画像データを保存するためには、それぞれ2.9秒または12.4秒の時間がかかる。このように保存時間が秒単位となると、画像処理を行うCPUが画像データを保存する構成の場合、保存時間が撮像周期を大きく上回るため、画像データを保存する毎に、画像処理が停止することになる。加えて、画像処理の過程の処理内容を知る上で重要となるその過程で生起する画像データ(例えば、エッジ位置を検出する過程で求められる微分値画像など、原画像に対し、判定前に特定の画像処理が行われた途中経過の画像、処理途中で導出されるデータ等)を保存することがさらに困難となる。   However, this type of storage medium has a problem of storage time due to the nature of the element. For example, in the case of an SD card, it takes 2.9 seconds or 12.4 seconds to store image data of 512 × 480 images (about 256 Kbytes) or 1024 × 960 images (about 1 Mbytes), respectively. Thus, when the storage time is in seconds, if the CPU that performs image processing stores image data, the storage time greatly exceeds the imaging cycle, so that image processing stops each time image data is stored. become. In addition, image data that occurs in the process that is important for knowing the processing contents of the image processing process (for example, the differential image obtained in the process of detecting the edge position, etc., specified before the determination for the original image) It is even more difficult to store an image in the middle of the image processing, data derived in the middle of the processing, and the like.

共通の記憶装置(共有メモリ)を使用して多重処理をするマルチプロセッサの構成でも、各CPUは共有メモリに同時にアクセスすることができず、時分割的に共有メモリを使用する必要があることから、結果として画像処理が遅れることになる。   Even in a multiprocessor configuration in which multiple processes are performed using a common storage device (shared memory), each CPU cannot access the shared memory at the same time, and it is necessary to use the shared memory in a time-sharing manner. As a result, the image processing is delayed.

本発明は、上記事情に鑑みてなされたものであり、画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力することができる画像処理装置および画像処理システムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and provides an image processing apparatus and an image processing system capable of outputting image data used for image processing without stopping or delaying image processing. The purpose is to do.

上記課題を解決するための請求項1記載の発明の画像処理装置は、検査対象の撮像を行う少なくとも1台の撮像装置から画像データを得る画像入力インターフェースと、この画像入力インターフェースで得られた画像データを取り込んで記憶する第1画像メモリと、この第1画像メモリに記憶された画像データを読出し自在に、前記第1画像メモリに接続された第1中央処理装置と、前記画像入力インターフェースで得られた画像データを取り込んで記憶する第2画像メモリと、この第2画像メモリに記憶された画像データを読出し自在に、前記第2画像メモリに接続された第2中央処理装置と、前記第1中央処理装置と前記第2中央処理装置との間に介設され、これらの間でやりとりされる情報の転送を行う中央処理装置間通信部とを備え、前記第1画像メモリおよび前記第2画像メモリは、それぞれ、前記画像入力インターフェースと前記第1中央処理装置および前記第2中央処理装置との間に配置され、前記第1中央処理装置は、前記第1画像メモリに記憶された画像データを用いて画像処理を実行することにより前記検査対象の外観検査測定を行うとともに、前記画像処理の経過中または経過後の結果について所定の判定を行い、前記判定の結果に従って、前記第2中央処理装置に対して、前記第1画像メモリに記憶された画像データに対応する前記第2画像メモリに記憶された画像データの出力指示をする場合、前記中央処理装置間通信部を経由したメッセージ通信によって前記第2中央処理装置に出力指示データを送信する一方、前記第2中央処理装置は、前記中央処理装置間通信部を経由して前記第1中央処理装置から前記出力指示データを受信すると、前記第2画像メモリに記憶された画像データの出力処理を実行することを特徴とする。 An image processing apparatus according to a first aspect of the present invention for solving the above-described problem is an image input interface for obtaining image data from at least one image pickup apparatus that picks up an image of an inspection object, and an image obtained by the image input interface A first image memory that captures and stores data, the first central processing unit connected to the first image memory, and the image input interface so that the image data stored in the first image memory can be read out. A second image memory for taking in and storing the received image data, a second central processing unit connected to the second image memory so that the image data stored in the second image memory can be read out, and the first image memory An inter-central processing unit communication unit that is interposed between the central processing unit and the second central processing unit and transfers information exchanged between them; The first image memory and the second image memory are disposed between the image input interface and the first central processing unit and the second central processing unit, respectively, and the first central processing unit image processing line visual inspection measurement of said object by executing Utotomoni, the course of or after the result of the image processing performing predetermined determination using the image data stored in the first image memory, said When instructing the second central processing unit to output the image data stored in the second image memory corresponding to the image data stored in the first image memory according to the determination result , the central processing While the output instruction data is transmitted to the second central processing unit by message communication via the inter-device communication unit, the second central processing unit transmits the central processing unit. If via the inter-device communication unit receives the output instruction data from said first central processing unit, and executes the output processing of the image data stored in the second image memory.

請求項2記載の発明は、請求項1記載の画像処理装置において、前記画像入力インターフェースの出力に接続された第1および第2ゲートアレイをさらに備え、前記第1画像メモリは、前記画像入力インターフェースに前記第1ゲートアレイを介して接続され、この第1ゲートアレイの制御下で、前記画像入力インターフェースで得られた画像データを取り込んで記憶し、前記第1中央処理装置は、前記第1ゲートアレイの制御下で、前記第1画像メモリに記憶された画像データを読出し自在に、前記第1ゲートアレイを介して前記第1画像メモリに接続され、前記第2画像メモリは、前記画像入力インターフェースに前記第2ゲートアレイを介して接続され、この第2ゲートアレイの制御下で、前記画像入力インターフェースで得られた画像データを取り込んで記憶し、前記第2中央処理装置は、前記第2ゲートアレイの制御下で、前記第2画像メモリに記憶された画像データを読出し自在に、前記第2ゲートアレイを介して前記第2画像メモリに接続されたことを特徴とする。 The invention according to claim 2 is the image processing apparatus according to claim 1, further comprising first and second gate arrays connected to an output of the image input interface, wherein the first image memory is the image input interface. which is connected via a first gate array, under the control of the first gate array, stores captures image data obtained by the image input interface, the first central processing equipment, said first Under the control of the gate array, the image data stored in the first image memory is readable and connected to the first image memory via the first gate array, and the second image memory is connected to the image input. An image obtained by the image input interface is connected to the interface through the second gate array and is controlled by the second gate array. Storing captures data, the second central processing equipment is under control of the second gate array, freely reads the image data stored in said second image memory, via said second gate array It is connected to the second image memory.

請求項3記載の発明は、請求項2記載の画像処理装置において、前記第1および第2画像メモリの各々は、複数フレーム分の画像データの記憶領域を持ち、前記第1および第2ゲートアレイは、それぞれ、前記第1および第2画像メモリにおける記憶領域のうち一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、前記画像入力インターフェースで得られた画像データを記憶する制御を行うほか、その記憶領域に記憶した画像データの記憶状態を一時保存する場合には、前記第1および第2画像メモリにおける記憶領域のうち別の一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、前記画像入力インターフェースで得られた画像データを記憶する制御を行うことを特徴とする。   According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, each of the first and second image memories has a storage area for image data for a plurality of frames, and the first and second gate arrays. Each of the storage areas in the first and second image memories has a storage area for image data of one frame as a storage area for image data of the current frame, and the storage area is obtained by the image input interface. In addition to performing control for storing image data, when temporarily storing the storage state of the image data stored in the storage area, image data for another frame in the storage area in the first and second image memories. Storage area of the current frame image data, and the storage area stores image data obtained by the image input interface. And performing control to store.

請求項4記載の発明は、請求項1〜3のいずれか1項に記載の画像処理装置において、外部コンピュータと通信をするための通信インターフェースを前記第2中央処理装置側にさらに備え、前記第1中央処理装置は、前記中央処理装置間通信部を経由して、前記画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを前記第2中央処理装置側に送信し、前記第2中央処理装置は、前記出力処理として、前記通信インターフェースを介して、前記第1中央処理装置からの画像処理状況データを、対応する画像データとともに前記外部コンピュータに送信することを特徴とする。   According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, a communication interface for communicating with an external computer is further provided on the second central processing unit side. The first central processing unit transmits image processing status data including at least one of various parameters necessary for the image processing and the image processing result to the second central processing unit side via the communication unit between the central processing units. The second central processing unit transmits the image processing status data from the first central processing unit together with the corresponding image data to the external computer via the communication interface as the output processing. And

請求項5記載の発明は、請求項1〜3のいずれか1項に記載の画像処理装置において、前記第2画像メモリに記憶された画像データを着脱式の記憶媒体に書込み出力するための記憶装置を前記第2中央処理装置側にさらに接続して備え、前記第1中央処理装置は、前記中央処理装置間通信部を経由して、前記画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを前記第2中央処理装置に送信し、前記第2中央処理装置は、前記出力処理として、前記記憶装置を介して、前記第1中央処理装置からの画像処理状況データを、対応する画像データとともに前記記憶媒体に書込み出力することを特徴とする。   According to a fifth aspect of the present invention, there is provided the image processing apparatus according to any one of the first to third aspects, wherein the image data stored in the second image memory is written and output to a removable storage medium. An apparatus further connected to the second central processing unit side, and the first central processing unit transmits various parameters necessary for the image processing and the results of the image processing via the communication unit between the central processing units. Image processing status data including at least one is transmitted to the second central processing unit, and the second central processing unit outputs the image processing status from the first central processing unit via the storage device as the output process. The data is written and output to the storage medium together with the corresponding image data.

請求項6記載の発明は、請求項5記載の画像処理装置において、前記第2画像メモリは、画像データの読出しおよび書込み自在に前記第2中央処理装置にさらに接続され、前記第2中央処理装置は、前記記憶装置を介して、前記記憶媒体に書き込まれた画像データを前記第2画像メモリに読み出し、前記第1中央処理装置は、前記記憶媒体から前記第2画像メモリに読み出された画像データを用いて画像処理を再度実行することを特徴とする。 The invention according to claim 6, wherein, in the image processing apparatus according to claim 5, wherein said second image memory is further connected to the read and write freely the second central processing equipment of the image data, the second central processing The apparatus reads the image data written in the storage medium to the second image memory via the storage device, and the first central processing unit is read from the storage medium to the second image memory. The image processing is performed again using the image data.

請求項7記載の発明は、請求項4〜6のいずれか1項に記載の画像処理装置において、前記第1中央処理装置は、前記判定結果に従って、前記中央処理装置間通信部を介して、前記第2中央処理装置側に前記画像処理状況データを送信するとともに、この画像処理状況データに対応する画像データを指定することを特徴とする。 Invention of claim 7, wherein, in the image processing apparatus according to any one of claims 4-6, wherein the first central processing unit, according to the result of the determination, through the inter-CPU communication unit The image processing status data is transmitted to the second central processing unit, and image data corresponding to the image processing status data is designated.

請求項8記載の発明は、請求項1または7記載の画像処理装置において、前記所定の判定とは、前記画像処理において、不良判定結果が所定数連続したか否かの判定、不良判定率が所定率を超えたか否かの判定および所定の異常が発生したか否かの判定の少なくとも1つの判定を含む良否判定のことであることを特徴とする。 The invention according to claim 8 is the image processing apparatus according to claim 1 or 7, wherein the predetermined determination is a determination as to whether or not a predetermined number of defect determination results have continued in the image processing, and a defect determination rate is It is a quality determination including at least one determination of whether or not a predetermined rate has been exceeded and whether or not a predetermined abnormality has occurred.

請求項9記載の発明は、請求項1または7記載の画像処理装置において、前記所定の判定とは、少なくとも一つの判定項目についての良品不良品の判定結果が所定率発生したか否かの判定のことであることを特徴とする。 According to a ninth aspect of the present invention, in the image processing apparatus according to the first or seventh aspect, the predetermined determination is a determination as to whether or not a determination result of a non-defective product for at least one determination item has occurred at a predetermined rate. It is characterized by that.

請求項10記載の発明は、請求項8または9記載の画像処理装置において、前記判定のための基準は前記外部コンピュータまたは外部機器から入力されることを特徴とする。   According to a tenth aspect of the present invention, in the image processing apparatus according to the eighth or ninth aspect, the reference for the determination is input from the external computer or an external device.

請求項11記載の発明の画像処理システムは、請求項4〜10のいずれか1項に記載の画像処理装置と、この画像処理装置に具備された通信インターフェースに対応する通信インターフェースを有する外部コンピュータとを備え、この外部コンピュータは、当該外部コンピュータが有する通信インターフェースを介して前記画像処理装置から得た画像処理状況データおよび画像データを用いて、前記第1中央処理装置による画像処理と同様の画像処理を実行することにより、前記検査対象の外観検査測定のシミュレーションを行うことを特徴とする。   An image processing system according to an eleventh aspect of the present invention is the image processing apparatus according to any one of the fourth to tenth aspects, and an external computer having a communication interface corresponding to the communication interface provided in the image processing apparatus. The external computer includes image processing status data and image data obtained from the image processing device via a communication interface of the external computer, and image processing similar to image processing by the first central processing unit. By performing the above, a simulation of the appearance inspection measurement of the inspection object is performed.

請求項12記載の発明は、請求項11記載の画像処理システムにおいて、前記外部コンピュータは、前記画像処理状況データに含まれる各種パラメータのうち少なくとも一つのパラメータを変更する必要がある場合、そのパラメータを変更して前記シミュレーションを再度行い、そのシミュレーションにより最適な画像処理結果が得られると、その最適な画像処理結果となったパラメータを含むデータを前記画像処理装置に送信設定することを特徴とする。   According to a twelfth aspect of the present invention, in the image processing system according to the eleventh aspect, when the external computer needs to change at least one of various parameters included in the image processing status data, the parameter is set. The simulation is performed again and the simulation is performed again. When an optimal image processing result is obtained by the simulation, data including the parameter that is the optimal image processing result is transmitted to the image processing apparatus.

以上のことから明らかなように、請求項1記載の発明の画像処理装置は、検査対象の撮像を行う少なくとも1台の撮像装置から画像データを得る画像入力インターフェースと、この画像入力インターフェースで得られた画像データを取り込んで記憶する第1画像メモリと、この第1画像メモリに記憶された画像データを読出し自在に、前記第1画像メモリに接続された第1中央処理装置と、前記画像入力インターフェースで得られた画像データを取り込んで記憶する第2画像メモリと、この第2画像メモリに記憶された画像データを読出し自在に、前記第2画像メモリに接続された第2中央処理装置と、前記第1中央処理装置と前記第2中央処理装置との間に介設され、これらの間でやりとりされる情報の転送を行う中央処理装置間通信部とを備え、前記第1画像メモリおよび前記第2画像メモリは、それぞれ、前記画像入力インターフェースと前記第1中央処理装置および前記第2中央処理装置との間に配置され、前記第1中央処理装置は、前記第1画像メモリに記憶された画像データを用いて画像処理を実行することにより前記検査対象の外観検査測定を行うとともに、前記画像処理の経過中または経過後の結果について所定の判定を行い、前記判定の結果に従って、前記第2中央処理装置に対して、前記第1画像メモリに記憶された画像データに対応する前記第2画像メモリに記憶された画像データの出力指示をする場合、前記中央処理装置間通信部を経由したメッセージ通信によって前記第2中央処理装置に出力指示データを送信する一方、前記第2中央処理装置は、前記中央処理装置間通信部を経由して前記第1中央処理装置から前記出力指示データを受信すると、前記第2画像メモリに記憶された画像データの出力処理を実行するので、例えば、入力装置を用いて入力された第2画像メモリの画像データの出力指示に従って、第2中央処理装置が第2画像メモリに記憶された画像データの出力処理を行う場合、第2画像メモリの画像データの出力処理から第1中央処理装置が完全に解放されるから、また例えば第1中央処理装置が、中央処理装置間通信部を経由した情報の転送により第2中央処理装置に対して、第1画像メモリに記憶された画像データに対応する第2画像メモリに記憶された画像データの出力指示をする場合でも、第1中央処理装置に加わる負荷が数バイト程度の出力指示データを含む通信メッセージの送信処理のみで済むから、画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力することができる。また、画像データの大容量化に伴い、SRAMなどの容量不足の対策として用いられる記憶媒体の保存速度ないし時間に起因する画像処理全体の能力低下という課題も解決することができる。さらに、画像データの出力の遅さに対処することができ、従来よりも多くの情報を出力することができるため、画像処理の途中画像の出力が可能となる。 As is apparent from the above, the image processing apparatus according to the first aspect of the present invention is obtained by an image input interface that obtains image data from at least one image pickup apparatus that picks up an image of an inspection object, and the image input interface. A first image memory that captures and stores the received image data, a first central processing unit connected to the first image memory so that the image data stored in the first image memory can be read, and the image input interface. A second image memory that captures and stores the image data obtained in step 2; a second central processing unit connected to the second image memory so that the image data stored in the second image memory can be read; An inter-central processing unit communication unit that is interposed between the first central processing unit and the second central processing unit and transfers information exchanged between them; The first image memory and the second image memory are disposed between the image input interface and the first central processing unit and the second central processing unit, respectively, image processing line visual inspection measurement of said object by executing Utotomoni, the course of or after the result of the image processing performing predetermined determination using the image data stored in the first image memory And instructing the second central processing unit to output the image data stored in the second image memory corresponding to the image data stored in the first image memory according to the determination result , While transmitting the output instruction data to the second central processing unit by message communication via the central processing unit communication unit, the second central processing unit, When the output instruction data is received from the first central processing unit via the central processing unit communication unit, the output processing of the image data stored in the second image memory is executed. For example, an input device is used. When the second central processing unit performs the output process of the image data stored in the second image memory in accordance with the output instruction of the image data input from the second image memory, the image data output process from the second image memory Since the first central processing unit is completely released, for example, the first central processing unit stores the information in the first image memory with respect to the second central processing unit by transferring information via the communication unit between the central processing units. Even when an instruction to output image data stored in the second image memory corresponding to the received image data is given, the load applied to the first central processing unit includes communication instruction data including output instruction data of about several bytes. Since only the message transmission process is required, the image data used for the image process can be output without stopping or delaying the image process. In addition, with the increase in the capacity of image data, it is possible to solve the problem of a decrease in overall image processing capability due to the storage speed or time of a storage medium used as a measure for lack of capacity such as SRAM. Furthermore, since it is possible to cope with the delay in outputting image data and to output more information than before, it is possible to output an image in the middle of image processing.

請求項2記載の発明は、請求項1記載の画像処理装置において、前記画像入力インターフェースの出力に接続された第1および第2ゲートアレイをさらに備え、前記第1画像メモリは、前記画像入力インターフェースに前記第1ゲートアレイを介して接続され、この第1ゲートアレイの制御下で、前記画像入力インターフェースで得られた画像データを取り込んで記憶し、前記第1中央処理装置は、前記第1ゲートアレイの制御下で、前記第1画像メモリに記憶された画像データを読出し自在に、前記第1ゲートアレイを介して前記第1画像メモリに接続され、前記第2画像メモリは、前記画像入力インターフェースに前記第2ゲートアレイを介して接続され、この第2ゲートアレイの制御下で、前記画像入力インターフェースで得られた画像データを取り込んで記憶し、前記第2中央処理装置は、前記第2ゲートアレイの制御下で、前記第2画像メモリに記憶された画像データを読出し自在に、前記第2ゲートアレイを介して前記第2画像メモリに接続されているので、画像入力インターフェースから第1および第2画像メモリへの画像データの読出し処理が第1および第2ゲートアレイにより実行されるので、第1および第2中央処理装置に加わる負荷を軽減することができる。 The invention according to claim 2 is the image processing apparatus according to claim 1, further comprising first and second gate arrays connected to an output of the image input interface, wherein the first image memory is the image input interface. which is connected via a first gate array, under the control of the first gate array, stores captures image data obtained by the image input interface, the first central processing equipment, said first Under the control of the gate array, the image data stored in the first image memory is readable and connected to the first image memory via the first gate array, and the second image memory is connected to the image input. An image obtained by the image input interface is connected to the interface through the second gate array and is controlled by the second gate array. Storing captures data, the second central processing equipment is under control of the second gate array, freely reads the image data stored in said second image memory, via said second gate array Since the image data reading process from the image input interface to the first and second image memories is executed by the first and second gate arrays because of being connected to the second image memory, the first and second center The load applied to the processing device can be reduced.

請求項3記載の発明は、請求項2記載の画像処理装置において、前記第1および第2画像メモリの各々は、複数フレーム分の画像データの記憶領域を持ち、前記第1および第2ゲートアレイは、それぞれ、前記第1および第2画像メモリにおける記憶領域のうち一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、前記画像入力インターフェースで得られた画像データを記憶する制御を行うほか、その記憶領域に記憶した画像データの記憶状態を一時保存する場合には、前記第1および第2画像メモリにおける記憶領域のうち別の一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、前記画像入力インターフェースで得られた画像データを記憶する制御を行うので、複数フレーム分の画像データを用いた画像処理が可能になるほか、画像処理サイクルより画像データの出力処理サイクルの方が長く、例えば画像データを出力する必要のある判定結果が続く場合でも、出力すべき画像データがこれに続く出力すべき画像データによって上書きされることがなくなり、出力すべき画像データの出力時間を稼ぐことができるとともに、第2中央処理装置に低速のものを使用することが可能になる。   According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, each of the first and second image memories has a storage area for image data for a plurality of frames, and the first and second gate arrays. Each of the storage areas in the first and second image memories has a storage area for image data of one frame as a storage area for image data of the current frame, and the storage area is obtained by the image input interface. In addition to performing control for storing image data, when temporarily storing the storage state of the image data stored in the storage area, image data for another frame in the storage area in the first and second image memories. Storage area of the current frame image data, and the storage area stores image data obtained by the image input interface. In addition to enabling image processing using multiple frames of image data, the output processing cycle of the image data is longer than the image processing cycle, and it is necessary to output image data, for example. Even when the result continues, the image data to be output is not overwritten by the subsequent image data to be output, the output time of the image data to be output can be gained, and the second central processing unit is slow. Can be used.

請求項4記載の発明は、請求項1〜3のいずれか1項に記載の画像処理装置において、外部コンピュータと通信をするための通信インターフェースを前記第2中央処理装置側にさらに備え、前記第1中央処理装置は、前記中央処理装置間通信部を経由して、前記画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを前記第2中央処理装置側に送信し、前記第2中央処理装置は、前記出力処理として、前記通信インターフェースを介して、前記第1中央処理装置からの画像処理状況データを、対応する画像データとともに前記外部コンピュータに送信するので、より好適な解析が可能となる。   According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, a communication interface for communicating with an external computer is further provided on the second central processing unit side. The first central processing unit transmits image processing status data including at least one of various parameters necessary for the image processing and the image processing result to the second central processing unit side via the communication unit between the central processing units. The second central processing unit transmits the image processing status data from the first central processing unit together with the corresponding image data to the external computer via the communication interface as the output processing. A suitable analysis becomes possible.

請求項5記載の発明は、請求項1〜3のいずれか1項に記載の画像処理装置において、前記第2画像メモリに記憶された画像データを着脱式の記憶媒体に書込み出力するための記憶装置を前記第2中央処理装置側にさらに接続して備え、前記第1中央処理装置は、前記中央処理装置間通信部を経由して、前記画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを前記第2中央処理装置に送信し、前記第2中央処理装置は、前記出力処理として、前記記憶装置を介して、前記第1中央処理装置からの画像処理状況データを、対応する画像データとともに前記記憶媒体に書込み出力するので、より好適な解析が可能となる。また、オフラインの別のコンピュータで画像データおよび画像処理状況の確認が行え、外部コンピュータをオンラインで接続しておく必要がない。   According to a fifth aspect of the present invention, there is provided the image processing apparatus according to any one of the first to third aspects, wherein the image data stored in the second image memory is written and output to a removable storage medium. An apparatus further connected to the second central processing unit side, and the first central processing unit transmits various parameters necessary for the image processing and the results of the image processing via the communication unit between the central processing units. Image processing status data including at least one is transmitted to the second central processing unit, and the second central processing unit outputs the image processing status from the first central processing unit via the storage device as the output process. Since the data is written and output to the storage medium together with the corresponding image data, more suitable analysis can be performed. Further, the image data and the image processing status can be confirmed on another offline computer, and it is not necessary to connect an external computer online.

請求項6記載の発明は、請求項5記載の画像処理装置において、前記第2画像メモリは、画像データの読出しおよび書込み自在に前記第2中央処理装置にさらに接続され、前記第2中央処理装置は、前記記憶装置を介して、前記記憶媒体に書き込まれた画像データを前記第2画像メモリに読み出し、前記第1中央処理装置は、前記記憶媒体から前記第2画像メモリに読み出された画像データを用いて画像処理を再度実行するので、記憶媒体に書き込まれた画像データの読み出し時に生じ得る画像処理の遅れを抑制することができる。 The invention according to claim 6, wherein, in the image processing apparatus according to claim 5, wherein said second image memory is further connected to the read and write freely the second central processing equipment of the image data, the second central processing The apparatus reads the image data written in the storage medium to the second image memory via the storage device, and the first central processing unit is read from the storage medium to the second image memory. Since the image processing is executed again using the image data, it is possible to suppress a delay in the image processing that may occur at the time of reading the image data written in the storage medium.

請求項7記載の発明は、請求項4〜6のいずれか1項に記載の画像処理装置において、前記第1中央処理装置は、前記判定結果に従って、前記中央処理装置間通信部を介して、前記第2中央処理装置側に前記画像処理状況データを送信するとともに、この画像処理状況データに対応する画像データを指定するので、画像処理の経過中または経過後において解析などに必要となった画像データが出力されることになり、無用な画像データの出力が防止され、出力された画像データの利用価値が高まる。 Invention of claim 7, wherein, in the image processing apparatus according to any one of claims 4-6, wherein the first central processing unit, according to the result of the determination, through the inter-CPU communication unit Since the image processing status data is transmitted to the second central processing unit and the image data corresponding to the image processing status data is designated, it is necessary for analysis during or after the image processing. Image data is output, output of useless image data is prevented, and the utility value of the output image data is increased.

請求項8記載の発明は、請求項1または7記載の画像処理装置において、前記所定の判定とは、前記画像処理において、不良判定結果が所定数連続したか否かの判定、不良判定率が所定率を超えたか否かの判定および所定の異常が発生したか否かの判定の少なくとも1つの判定を含む良否判定のことであるので、良否判定状況に応じて必要な画像データに絞って出力することが可能となり、第1および第2画像メモリの記憶容量を効率的に使用することができる。 The invention according to claim 8 is the image processing apparatus according to claim 1 or 7, wherein the predetermined determination is a determination as to whether or not a predetermined number of defect determination results have continued in the image processing, and a defect determination rate is Since it is a pass / fail determination including at least one determination of whether or not a predetermined rate has been exceeded and whether or not a predetermined abnormality has occurred, output is limited to the required image data according to the pass / fail determination status. This makes it possible to efficiently use the storage capacities of the first and second image memories.

請求項9記載の発明は、請求項1または7記載の画像処理装置において、前記所定の判定とは、少なくとも一つの判定項目についての良品不良品の判定結果が所定率発生したか否かの判定のことであるので、良否判定状況に応じて必要な画像データに絞って出力することが可能となる。 According to a ninth aspect of the present invention, in the image processing apparatus according to the first or seventh aspect, the predetermined determination is a determination as to whether or not a determination result of a non-defective product for at least one determination item has occurred at a predetermined rate. Therefore, it is possible to output only the necessary image data according to the pass / fail judgment situation.

請求項10記載の発明は、請求項8または9記載の画像処理装置において、前記判定のための基準は前記外部コンピュータまたは外部機器から入力されるので、画像処理前後、画像処理中にかかわらず、判定のための基準の設定ないし変更が可能となる。   The invention according to claim 10 is the image processing apparatus according to claim 8 or 9, wherein the reference for the determination is input from the external computer or an external device. It is possible to set or change criteria for determination.

請求項11記載の発明の画像処理システムは、請求項4〜10のいずれか1項に記載の画像処理装置と、この画像処理装置に具備された通信インターフェースに対応する通信インターフェースを有する外部コンピュータとを備え、この外部コンピュータは、当該外部コンピュータが有する通信インターフェースを介して前記画像処理装置から得た画像処理状況データおよび画像データを用いて、前記第1中央処理装置による画像処理と同様の画像処理を実行することにより、前記検査対象の外観検査測定のシミュレーションを行うので、画像処理装置の画像処理を中断することなく、外部コンピュータで画像処理装置と同様の画像処理を再現したシミュレーションにより各種確認が可能となる。   An image processing system according to an eleventh aspect of the present invention is the image processing apparatus according to any one of the fourth to tenth aspects, and an external computer having a communication interface corresponding to the communication interface provided in the image processing apparatus. The external computer includes image processing status data and image data obtained from the image processing device via a communication interface of the external computer, and image processing similar to image processing by the first central processing unit. By performing the above, a visual inspection measurement simulation of the inspection object is performed, so that various confirmations can be made by simulation reproducing image processing similar to that of the image processing apparatus on an external computer without interrupting image processing of the image processing apparatus. It becomes possible.

請求項12記載の発明は、請求項11記載の画像処理システムにおいて、前記外部コンピュータは、前記画像処理状況データに含まれる各種パラメータのうち少なくとも一つのパラメータを変更する必要がある場合、そのパラメータを変更して前記シミュレーションを再度行い、そのシミュレーションにより最適な画像処理結果が得られると、その最適な画像処理結果となったパラメータを含むデータを前記画像処理装置に送信設定するので、画像処理装置のパラメータの更新が可能になる。これにより、画像処理自体と画像処理設定の分業を図ることができる。   According to a twelfth aspect of the present invention, in the image processing system according to the eleventh aspect, when the external computer needs to change at least one of various parameters included in the image processing status data, the parameter is set. When the simulation is performed again and the optimal image processing result is obtained by the simulation, the data including the parameter that is the optimal image processing result is transmitted to the image processing apparatus. Parameters can be updated. Thereby, the division of work between the image processing itself and the image processing setting can be achieved.

本発明に係る第1実施形態の画像処理システムの構成図である。1 is a configuration diagram of an image processing system according to a first embodiment of the present invention. 本発明に係る第2実施形態の画像処理装置の構成図である。It is a block diagram of the image processing apparatus of 2nd Embodiment which concerns on this invention. 出力処理が送信出力である場合の画像処理システムの一部構成図である。It is a partial block diagram of an image processing system when output processing is transmission output. 画像処理を実行することで生起する画像データの例を示す図である。It is a figure which shows the example of the image data which arises by performing image processing. 本発明に係る第3実施形態の画像処理装置の構成図である。It is a block diagram of the image processing apparatus of 3rd Embodiment which concerns on this invention. 図5の画像処理装置の動作説明図である。FIG. 6 is an operation explanatory diagram of the image processing apparatus of FIG. 5. 本発明に係る第4実施形態の画像処理装置の構成図である。It is a block diagram of the image processing apparatus of 4th Embodiment which concerns on this invention. 図7の画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus of FIG. 図7の画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus of FIG. 図7の画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus of FIG. 図7の画像処理装置の動作説明図である。It is operation | movement explanatory drawing of the image processing apparatus of FIG. 本発明に係る第5実施形態の画像処理装置の構成図である。It is a block diagram of the image processing apparatus of 5th Embodiment which concerns on this invention. 原画像の例を示す図である。It is a figure which shows the example of an original image. 判定条件の設定メニュー例を示す図である。It is a figure which shows the example of a setting menu of determination conditions. 本発明に係る第6実施形態の画像処理装置の構成図である。It is a block diagram of the image processing apparatus of 6th Embodiment which concerns on this invention. 図15の画像処理装置の動作説明図である。FIG. 16 is an operation explanatory diagram of the image processing apparatus of FIG. 15. 使用可能フラグの例を示す図である。It is a figure which shows the example of a usable flag. 本発明に係る第7実施形態の画像処理システムの動作説明図である。It is operation | movement explanatory drawing of the image processing system of 7th Embodiment concerning this invention. 本発明に係る第7実施形態の画像処理システムの動作説明図である。It is operation | movement explanatory drawing of the image processing system of 7th Embodiment concerning this invention. 本発明に係る第7実施形態の画像処理システムの動作説明図である。It is operation | movement explanatory drawing of the image processing system of 7th Embodiment concerning this invention. 本発明に係る第7実施形態の画像処理システムの動作説明図である。It is operation | movement explanatory drawing of the image processing system of 7th Embodiment concerning this invention. 第1実施形態などに関連する実施例を示す図である。It is a figure which shows the Example relevant to 1st Embodiment etc. FIG. 図22の通信部のより詳細な構成図である。It is a more detailed block diagram of the communication part of FIG. 図22の画像処理部のより詳細な構成図である。It is a more detailed block diagram of the image processing part of FIG.

(第1実施形態)
図1は画像処理システムの構成図であり、この図を参照しながら本発明の第1実施形態について説明する。
(First embodiment)
FIG. 1 is a block diagram of an image processing system, and a first embodiment of the present invention will be described with reference to this figure.

図1に示す画像処理システムは、例えば製造ラインにおいて、製造物などの検査対象の外観検査測定に使用されるものであり、通信部100および画像処理部150により構成される画像処理装置1と、画像データ用記憶装置21および画像処理調整部22を含み画像処理装置1と通信可能に接続されるパソコン2とを備えているほか、画像処理装置1の周辺機器として、検査対象の撮像を行う少なくとも1台のカメラ3と、キーパッドなどの各種操作入力用の入力装置4と、CRTまたはLCDなどの表示装置5とを備えている。   The image processing system shown in FIG. 1 is used for, for example, an appearance inspection measurement of an inspection target such as a product in a production line, and includes an image processing apparatus 1 including a communication unit 100 and an image processing unit 150. In addition to a personal computer 2 including an image data storage device 21 and an image processing adjustment unit 22 communicatively connected to the image processing device 1, the peripheral device of the image processing device 1 performs at least imaging of an inspection target. One camera 3, an input device 4 for various operation inputs such as a keypad, and a display device 5 such as a CRT or LCD are provided.

通信部100は、画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力する処理などを実行する核となるCPU130およびメインメモリ(主記憶装置)131を備えているとともに、画像入力インターフェース101と、VRAM105と、モニタ出力インターフェース116と、通信インターフェース109と、メインコントローラ137と、画像データ保存用記憶装置120と、デュアルポートメモリ135とを備えている。   The communication unit 100 includes a central processing unit (CPU) 130 and a main memory (main storage device) 131 that execute processing for outputting image data used for image processing without stopping or delaying image processing. In addition, an image input interface 101, a VRAM 105, a monitor output interface 116, a communication interface 109, a main controller 137, an image data storage device 120, and a dual port memory 135 are provided.

画像入力インターフェース101は、A/D変換器103を含み、このA/D変換器103により、カメラ3からのアナログ画像信号をデジタルに変換して画像データを得るものである。VRAM105は、画像入力インターフェース101で得られた画像データを取り込んで記憶するものである。モニタ出力インターフェース116は、D/A変換器119を含み、このD/A変換器119により、VRAM105に記憶された画像データをアナログに変換してアナログ画像信号を表示装置5に出力するものである。通信インターフェース109は、イーサネット(登録商標)またはRS−232Cなどに対応した外部との通信手段である。メインコントローラ137は、入力装置4の操作入力インターフェース(図示せず)および通信インターフェース109などの各種インターフェースの入出力制御を行うものである。画像データ保存用記憶装置120は、SDカードなどの着脱式の記憶媒体に、例えばVRAM105などに記憶された画像データを保存するものである。デュアルポートメモリ135は、CPU130と後述のCPU160との間に介設され、これらの間でやりとりされる情報(例えばコマンドまたはデータなど)の転送を行うものである。   The image input interface 101 includes an A / D converter 103, and the A / D converter 103 converts an analog image signal from the camera 3 into digital to obtain image data. The VRAM 105 captures and stores image data obtained by the image input interface 101. The monitor output interface 116 includes a D / A converter 119. The D / A converter 119 converts image data stored in the VRAM 105 into analog and outputs an analog image signal to the display device 5. . The communication interface 109 is a communication means with the outside corresponding to Ethernet (registered trademark) or RS-232C. The main controller 137 performs input / output control of various interfaces such as an operation input interface (not shown) of the input device 4 and the communication interface 109. The image data storage device 120 stores image data stored in, for example, the VRAM 105 in a removable storage medium such as an SD card. The dual port memory 135 is interposed between the CPU 130 and a CPU 160 described later, and transfers information exchanged between them (for example, commands or data).

画像処理部150は、画像入力インターフェース101で得られた画像データを取り込んで記憶するVRAM153を備えているほか、入力装置4および通信インターフェース109に接続された外部機器の少なくとも一方を通じて設定され、例えばデュアルポートメモリ135を経由したメッセージ通信などで取得した検査条件下で、VRAM153に記憶された画像データを用いた画像処理を通じ、検査対象についての各種外観検査測定を実行する核となるCPU160およびメインメモリ161を備えている。   The image processing unit 150 includes a VRAM 153 that captures and stores image data obtained by the image input interface 101, and is set through at least one of the input device 4 and an external device connected to the communication interface 109. The CPU 160 and the main memory 161 serving as cores for performing various appearance inspection measurements on the inspection target through image processing using the image data stored in the VRAM 153 under the inspection conditions acquired by message communication via the port memory 135 or the like. It has.

上記構成の画像処理システムの特徴となる動作について説明すると、画像入力インターフェース101で得られた画像データは、VRAM153に記憶されるとともにVRAM105に記憶される。   The operation that characterizes the image processing system configured as described above will be described. Image data obtained by the image input interface 101 is stored in the VRAM 153 and the VRAM 105.

一方のVRAM153に記憶された画像データは、メインメモリ161と一体不可分となって動作するCPU160により読み出されて、従来と同様に画像処理に利用され、その画像処理を通じて検査対象についての各種外観検査測定が実行される。   The image data stored in one VRAM 153 is read by the CPU 160 that operates in an integral manner with the main memory 161, and is used for image processing in the same manner as in the prior art. Measurement is performed.

他方のVRAM105に記憶された画像データは、メインメモリ131と一体不可分となって動作するCPU130により読み出されて例えばメインメモリ131に一端保持された後、画像データ保存用記憶装置120に転送されるほか、メインコントローラ137を経由して通信インターフェース109から外部のパソコン2に送信出力される。なお、画像データ保存用記憶装置120に転送された画像データは、その記憶媒体に書込み出力されることになる。   The image data stored in the other VRAM 105 is read by the CPU 130 that is inseparably integrated with the main memory 131, is held in the main memory 131, for example, and then transferred to the image data storage device 120. In addition, the data is transmitted and output from the communication interface 109 to the external personal computer 2 via the main controller 137. Note that the image data transferred to the image data storage device 120 is written and output to the storage medium.

以上、第1実施形態によれば、カメラ3から画像データを得る画像入力インターフェース101と、この画像入力インターフェース101で得られた画像データを取り込んで記憶するVRAM153と、このVRAM153に記憶された画像データを読出し自在に、VRAM153に接続されたCPU160およびメインメモリ161と、画像入力インターフェース101で得られた画像データを取り込んで記憶するVRAM105と、このVRAM105に記憶された画像データを読出し自在に、VRAM105に接続されたCPU130およびメインメモリ131と、CPU160とCPU130との間に介設され、これらの間でやりとりされる情報の転送を行うデュアルポートメモリ135とを備え、CPU160は、VRAM153に記憶された画像データを用いて画像処理を実行することにより検査対象の外観検査測定を行う一方、CPU130は、VRAM105に記憶された画像データの出力処理を実行するので、例えば、入力装置4を用いて入力されたVRAM105の画像データの出力指示に従って、CPU130がVRAM105に記憶された画像データの出力処理を行う場合、VRAM105の画像データの出力処理からCPU160が完全に解放されるから、また例えばCPU160が、デュアルポートメモリ135を経由したメッセージ通信によりCPU130に対して、VRAM153に記憶された画像データに対応するVRAM105に記憶された画像データの出力指示をする場合でも、CPU160に加わる負荷が数バイト程度の出力指示データを含む通信メッセージの送信処理のみで済むから、画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力することができる。   As described above, according to the first embodiment, the image input interface 101 that obtains image data from the camera 3, the VRAM 153 that captures and stores the image data obtained by the image input interface 101, and the image data stored in the VRAM 153. The CPU 160 and the main memory 161 connected to the VRAM 153, the VRAM 105 that captures and stores the image data obtained by the image input interface 101, and the image data stored in the VRAM 105 can be read in the VRAM 105. The CPU 160 and the main memory 131 are connected to each other, and the dual port memory 135 is provided between the CPU 160 and the CPU 130 and transfers information exchanged between them. For example, the CPU 130 performs an output process of the image data stored in the VRAM 105 while performing image processing using the stored image data to perform an appearance inspection measurement of the inspection target. For example, the input device 4 is used. When the CPU 130 performs the output processing of the image data stored in the VRAM 105 in accordance with the image data output instruction of the VRAM 105 input in this way, the CPU 160 is completely released from the image data output processing of the VRAM 105. Even when the CPU 130 is instructed to output the image data stored in the VRAM 105 corresponding to the image data stored in the VRAM 153 to the CPU 130 by message communication via the dual port memory 135, the load applied to the CPU 160 is about several bytes. Output instruction data Transmission processing dealt with in only a communication message including, without stopping or or or delayed image processing, image data used in image processing may be output.

(第2実施形態)
図2は画像処理装置の構成図、図3は出力処理が送信出力である場合の画像処理システムの一部構成図、図4は画像処理を実行することで生起する画像データの例を示す図であり、これらの図を参照しながら本発明の第2実施形態について説明する。
(Second Embodiment)
2 is a block diagram of the image processing apparatus, FIG. 3 is a partial block diagram of the image processing system when the output process is a transmission output, and FIG. 4 is a diagram illustrating an example of image data generated by executing the image process. The second embodiment of the present invention will be described with reference to these drawings.

第2実施形態の画像処理装置1Aは、第1実施形態との相違点として、VRAM153,105と、メインメモリ161,131と、CPU160,130とに代えて、それぞれ図2に示すように、複数(1,2,…N)フレーム分の画像データの記憶領域を持つVRAM153a,105aと、第1実施形態とは異なる実行プログラムが展開されたメインメモリ161a,131aと、これらメインメモリ161a,131aに展開されたプログラムにそれぞれ従って処理を実行するCPU160a,130aとを備えている。   The image processing apparatus 1A according to the second embodiment is different from the first embodiment in that a plurality of VRAMs 153 and 105, main memories 161 and 131, and CPUs 160 and 130, as shown in FIG. VRAMs 153a and 105a having storage areas for image data for (1, 2,... N) frames, main memories 161a and 131a in which execution programs different from those in the first embodiment are expanded, and these main memories 161a and 131a. CPUs 160a and 130a that execute processing in accordance with the developed programs are provided.

そして、CPU160aおよびメインメモリ161aがVRAM105aとデータの読出しおよび書込み自在にさらに接続され、CPU160aが、第1実施形態のCPU160との相違点として、画像処理を実行することで生起した画像データの書込みをVRAM105aに対してさらに行い、CPU130aが、第1実施形態のCPU130との相違点として、VRAM105aに格納された少なくとも1フレーム分の画像データの出力処理を実行する。このように、画像処理中の画像データをも出力する本質的な理由は、画像処理がどのように行われて所定の画像処理結果が出てきたのかを解析し、画像処理装置の設定を調整することにある。   The CPU 160a and the main memory 161a are further connected to the VRAM 105a so as to be able to read and write data, and the CPU 160a is different from the CPU 160 of the first embodiment in that it writes image data generated by executing image processing. Further, the CPU 130a executes an output process of image data for at least one frame stored in the VRAM 105a as a difference from the CPU 130 of the first embodiment. In this way, the essential reason for outputting image data during image processing is to analyze how image processing has been performed and a predetermined image processing result has been produced, and adjust the settings of the image processing apparatus. There is to do.

このような構成の画像処理装置1AのCPU160aおよびメインメモリ161a側では、各種画像処理が実行されるが、図4の例に示すように画像処理の前処理として、図4(a)の原画像から、図4(b)の微分画像および図4(c)細線化画像を経て、図4(d)に示すエッジ線の画像を得る場合、各種画像データがメインメモリ161a中(図2の「処理画像」参照)に生起する。これらの各種画像データは、CPU160aおよびメインメモリ161a側から経過画像としてVRAM105aに書き込まれる。   Various image processing is executed on the CPU 160a and main memory 161a side of the image processing apparatus 1A having such a configuration. As shown in the example of FIG. 4, as the preprocessing of the image processing, the original image of FIG. 4B, when the edge line image shown in FIG. 4D is obtained through the differential image shown in FIG. 4B and the thinned image shown in FIG. 4C, various image data are stored in the main memory 161a (see “ Occurs in the "processed image"). These various image data are written in the VRAM 105a as progress images from the CPU 160a and the main memory 161a side.

この後、VRAM105aに書き込まれた各種画像データは、メインメモリ131aと一体不可分となって動作するCPU130aの指示および制御により、例えばDMA転送でメインメモリ131aに記憶された後、図2に示すように画像データ保存用記憶装置120に転送され、その記憶媒体に書込み出力(保存)されるほか、図3に示すように外部のパソコン2に送信出力(転送)される。   Thereafter, the various image data written in the VRAM 105a is stored in the main memory 131a by, for example, DMA transfer under the instruction and control of the CPU 130a that operates in an integral manner with the main memory 131a, as shown in FIG. In addition to being transferred to the storage device 120 for image data storage and written out (saved) to the storage medium, it is also sent out (transferred) to the external personal computer 2 as shown in FIG.

ここで、上記画像処理の前処理において、図4(d)に示すようにエッジ線の途切れに起因して不都合な画像処理結果となったとき、図4などに示す経過画像も出力されるから、図4(d)に示すようなエッジ線の途切れが原因であるといったような解析がパソコン2で実行可能となる。なお、この場合、微分処理の画像パラメータである微分しきい値の設定が大きすぎると推察されれば、その微分しきい値が図3に示す画像処理調整部22で最適値に変更され、最適値に変更された微分しきい値がCPU130a側に送信されることになる。   Here, in the pre-processing of the image processing, when an inconvenient image processing result is caused due to the interruption of the edge line as shown in FIG. 4D, the progress image shown in FIG. 4 is also output. Analysis such as that caused by the interruption of the edge line as shown in FIG. In this case, if it is inferred that the setting of the differential threshold that is an image parameter of the differential processing is too large, the differential threshold is changed to an optimal value by the image processing adjustment unit 22 shown in FIG. The differential threshold value changed to a value is transmitted to the CPU 130a side.

以上、第2実施形態によれば、CPU160aおよびメインメモリ161aがVRAM105aとデータの読出しおよび書込み自在にさらに接続され、CPU160aは、画像処理を実行することで生起した画像データの書込みをVRAM105aに対してさらに行い、CPU130aは、VRAM105aに記憶された各種画像データの出力処理を実行するので、画像処理を実行することで生起した画像データもパソコン2で確認することができる。   As described above, according to the second embodiment, the CPU 160a and the main memory 161a are further connected to the VRAM 105a so as to be able to read and write data, and the CPU 160a writes image data generated by executing image processing to the VRAM 105a. Furthermore, since the CPU 130a executes output processing of various image data stored in the VRAM 105a, the image data generated by executing the image processing can also be confirmed on the personal computer 2.

(第3実施形態)
図5は画像処理装置の構成図、図6は図5の画像処理装置の動作説明図であり、これらの図を参照しながら本発明の第3実施形態について説明する。
(Third embodiment)
FIG. 5 is a block diagram of the image processing apparatus, and FIG. 6 is an operation explanatory view of the image processing apparatus of FIG. 5. A third embodiment of the present invention will be described with reference to these drawings.

第3実施形態の画像処理装置1Bは、第1実施形態との相違点として、VRAM153,105に代えて、それぞれ図5,図6に示すように、複数フレーム分の画像データの記憶領域を持つVRAM153a,105aを備えているとともに、VRAM153a,105aのアドレス制御をそれぞれ行うVRAMコントローラ152,104をさらに備えている。   The image processing apparatus 1B according to the third embodiment has a storage area for a plurality of frames of image data as shown in FIGS. 5 and 6, respectively, instead of the VRAMs 153 and 105, as a difference from the first embodiment. VRAMs 153a and 105a are provided, and VRAM controllers 152 and 104 for controlling addresses of the VRAMs 153a and 105a are further provided.

VRAMコントローラ152,104は、ともにFPGA(Field Programmable Gate Array)であり、それぞれ、CPU160,130からのアドレス情報に従って、VRAM153a,105aにおける記憶領域のうち、一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、画像入力インターフェース101で得られた画像データを記憶するハード制御を行うほか、その記憶領域に記憶した画像データを一時保存する場合には、別の一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、画像入力インターフェース101で得られた画像データを記憶するハード制御を行う。   The VRAM controllers 152 and 104 are both field programmable gate arrays (FPGAs), and in accordance with address information from the CPUs 160 and 130, the storage areas for image data for one frame among the storage areas in the VRAMs 153a and 105a, respectively. In addition to performing hardware control to store the image data obtained by the image input interface 101 in this storage area, and temporarily storing the image data stored in the storage area, The storage area for the image data for one frame is set as the storage area for the image data of the current frame, and hardware control for storing the image data obtained by the image input interface 101 is performed in this storage area.

なお、図5の例では、CPU160がVRAMコントローラ152,104の両方に指示を与える構成になっているが、これは、VRAMコントローラ104がカメラ3の撮像コントローラを兼ねており、CPU160がVRAMコントローラ104を経由してカメラ3を制御することができるようにするためである。VRAMコントローラ104には、CPU160,130からの指示を格納するレジスタが設けられており、そのレジスタに撮像指示が格納されると、VRAMコントローラ104は、その撮像指示に従って撮像制御を実行する。   In the example of FIG. 5, the CPU 160 is configured to give instructions to both the VRAM controllers 152 and 104, but this is because the VRAM controller 104 also serves as the imaging controller of the camera 3. This is because the camera 3 can be controlled via the. The VRAM controller 104 is provided with a register that stores instructions from the CPUs 160 and 130. When an imaging instruction is stored in the register, the VRAM controller 104 executes imaging control according to the imaging instruction.

上記構成の画像処理装置1Bでは、図6の例に示すように、VRAM105aにおける記憶領域のうち、画像番号“1”の画像データの記憶領域がカレントフレームの画像データの記憶領域(図6では“カレントフレーム画像記憶領域”)となっている場合、そのカレントフレーム画像記憶領域に、画像入力インターフェース101で得られた画像データが記憶される。   In the image processing apparatus 1B having the above configuration, as shown in the example of FIG. 6, among the storage areas in the VRAM 105a, the storage area for the image data with the image number “1” is the storage area for the image data of the current frame (in FIG. If the current frame image storage area is “), the image data obtained by the image input interface 101 is stored in the current frame image storage area.

このとき、外観検査測定で例えば不良品の判定結果が得られると、その不良品の画像データは、VRAM105aに一時保存された上で、解析などのために出力されることになる。すなわち、画像番号“1”の画像データの記憶領域が“一時保存フレーム画像記憶領域”に切り替えられ、画像番号“2”の画像データの記憶領域が“カレントフレーム画像記憶領域”に設定される。これにより、画像番号“1”の画像データの記憶領域に保存された不良品の画像データが新たな画像データによって上書きされて消失することがなくなる。   At this time, for example, when a result of determination of a defective product is obtained in the appearance inspection measurement, the image data of the defective product is temporarily stored in the VRAM 105a and then output for analysis or the like. That is, the storage area for the image data with the image number “1” is switched to the “temporary storage frame image storage area”, and the storage area for the image data with the image number “2” is set to the “current frame image storage area”. As a result, the defective image data stored in the image data storage area of the image number “1” is not overwritten by new image data and disappears.

この後、外観検査測定で不良品の判定結果が得られると、上記同様に、“カレントフレーム画像記憶領域”が“一時保存フレーム画像記憶領域”に切り替えられ、次の画像番号の画像データの記憶領域が“カレントフレーム画像記憶領域”に設定される。そして、画像番号“N”の記憶領域に至った場合には、次の記憶領域が画像番号“1”の記憶領域となり、“カレントフレーム画像記憶領域”がサイクリックに切り替えられる。   After this, when a result of the defective product determination is obtained by the appearance inspection measurement, the “current frame image storage area” is switched to the “temporary storage frame image storage area” as described above, and the image data of the next image number is stored. The area is set to the “current frame image storage area”. When the storage area of the image number “N” is reached, the next storage area becomes the storage area of the image number “1”, and the “current frame image storage area” is cyclically switched.

この“カレントフレーム画像記憶領域”の切替え過程において、VRAM105aに記憶された不良品の画像データは、第1実施形態と同様に、書込みまたは送信出力される。   In this “current frame image storage area” switching process, the defective image data stored in the VRAM 105a is written or transmitted in the same manner as in the first embodiment.

以上、第3実施形態によれば、VRAMコントローラ152,104が、それぞれ、VRAM153a,105aにおける記憶領域のうち、一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、画像入力インターフェース101で得られた画像データを記憶する制御を行うほか、その記憶領域に記憶した画像データを一時保存する場合には、別の一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、画像入力インターフェース101で得られた画像データを記憶する制御を行うので、複数フレーム分の画像データを用いた画像処理が可能になるほか、画像処理サイクルより画像データの出力処理サイクルの方が長く、例えば画像データを出力する必要のある判定結果が続く場合でも、出力すべき画像データがこれに続く出力すべき画像データによって上書きされることがなくなり、出力すべき画像データの出力時間を稼ぐことができるとともに、CPU130に低速のものを使用することが可能になる。また、過去の履歴を残し、複数枚の画像を表示装置5に表示することができる。さらに、VRAM153a,105aの画像データの整合を図ることにより、CPU160がCPU130に対して例えば画像番号のみで出力するべき画像データを指定することが可能になる。   As described above, according to the third embodiment, the VRAM controllers 152 and 104 set the image data storage area for one frame out of the storage areas in the VRAMs 153a and 105a as the storage areas for the current frame image data. In addition to controlling to store the image data obtained by the image input interface 101 in the area, when temporarily storing the image data stored in the storage area, the storage area of the image data for another frame is made the current Since the image data obtained by the image input interface 101 is stored in the storage area of the frame image data, image processing using a plurality of frames of image data can be performed. The output processing cycle of image data is longer than the processing cycle, for example, image data Even when the determination result that needs to be output continues, the image data to be output is not overwritten by the image data to be subsequently output, and the output time of the image data to be output can be gained. It becomes possible to use a low-speed one. Further, a past history can be left and a plurality of images can be displayed on the display device 5. Further, by matching the image data in the VRAMs 153a and 105a, the CPU 160 can designate image data to be output to the CPU 130 only with, for example, an image number.

なお、第3実施形態では、画像データの整合のため、VRAM153a,105aの双方に対して、“カレントフレーム画像記憶領域”の切替えがサイクリックに行われる構成になっているが、VRAM105aのみに対して、“カレントフレーム画像記憶領域”の切替えがサイクリックに行われる構成でもよい。   In the third embodiment, the “current frame image storage area” is cyclically switched for both the VRAMs 153a and 105a for image data matching, but only for the VRAM 105a. Thus, the “current frame image storage area” may be switched cyclically.

(第4実施形態)
図7は画像処理装置の構成図、図8〜図11は図7の画像処理装置の動作説明図であり、これらの図を参照しながら本発明の第4実施形態について説明する。
(Fourth embodiment)
FIG. 7 is a configuration diagram of the image processing apparatus, and FIGS. 8 to 11 are operation explanatory views of the image processing apparatus of FIG. 7. The fourth embodiment of the present invention will be described with reference to these drawings.

第4実施形態の画像処理装置1Cは、第1実施形態との相違点として、VRAM153,105と、メインメモリ161,131と、CPU160,130とに代えて、それぞれ図7に示すように、複数フレーム分の画像データの記憶領域を持つVRAM153a,105aと、第1実施形態とは異なる実行プログラムが展開されたメインメモリ161c,131cと、これらメインメモリ161c,131cに展開されたプログラムにそれぞれ従って処理を実行するCPU160c,130cとを備えている。なお、図7では、画像入力インターフェース101および通信インターフェース109などは図示省略してある。また、VRAM105aは、データの読出しおよび書込み自在にCPU160cおよびメインメモリ161cにさらに接続される。   The image processing apparatus 1C according to the fourth embodiment is different from the first embodiment in that a plurality of image processing apparatuses 1C are replaced with VRAMs 153 and 105, main memories 161 and 131, and CPUs 160 and 130 as shown in FIG. Processing is performed in accordance with VRAMs 153a and 105a having image data storage areas for frames, main memories 161c and 131c in which execution programs different from those in the first embodiment are expanded, and programs expanded in these main memories 161c and 131c, respectively. CPUs 160c and 130c for executing the above. In FIG. 7, the image input interface 101 and the communication interface 109 are not shown. The VRAM 105a is further connected to the CPU 160c and the main memory 161c so that data can be read and written.

CPU160cは、第1実施形態のCPU160との相違点として、デュアルポートメモリ135を経由して、画像処理に必要な画像処理パラメータ、判定パラメータなどの各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データをCPU130c側に送信する処理を実行する。   The CPU 160c is different from the CPU 160 of the first embodiment in that an image including at least one of various parameters such as image processing parameters and determination parameters necessary for image processing and the image processing results via the dual port memory 135. A process of transmitting the processing status data to the CPU 130c side is executed.

CPU130cは、第1実施形態のCPU130との相違点として、出力処理として、通信インターフェース109を介して、CPU160cからの画像処理状況データを、対応する画像データとともにパソコン2に送信するほか、画像データ保存用記憶装置120を介して、CPU160cからの画像処理状況データを、対応する画像データとともに画像データ保存用記憶装置120の記憶媒体に書込み出力する処理を実行する。   As a difference from the CPU 130 of the first embodiment, the CPU 130c transmits image processing status data from the CPU 160c together with corresponding image data to the personal computer 2 via the communication interface 109 as output processing, and also stores image data. The image processing status data from the CPU 160c is written to the storage medium of the image data storage storage device 120 together with the corresponding image data via the storage device 120.

また、CPU130cは、画像データ保存用記憶装置120を介して、その記憶媒体に書き込まれた画像データをVRAM105aに読み出し、CPU160cは、画像データ保存用記憶装置120の記憶媒体からVRAM105aに読み出された画像データを用いて画像処理を再度実行する。   Further, the CPU 130c reads the image data written in the storage medium to the VRAM 105a via the image data storage device 120, and the CPU 160c reads the image data from the storage medium of the image data storage device 120 to the VRAM 105a. Image processing is executed again using the image data.

上記構成の画像処理装置では、画像入力インターフェース101で得られた画像データは、VRAM153a,105aに並列に記憶される。VRAM153a,105aにはN枚の画像データを記憶することができ、各画像データには画像番号が付される。画像データは、第3実施形態と同様に、通常は同じ記憶領域に繰り返し記憶されるが、CPU160cが画像データを出力すると判断した場合には、画像データを記憶する記憶領域が切り替えられる。   In the image processing apparatus configured as described above, the image data obtained by the image input interface 101 is stored in parallel in the VRAMs 153a and 105a. N image data can be stored in the VRAMs 153a and 105a, and an image number is assigned to each image data. Similar to the third embodiment, the image data is normally repeatedly stored in the same storage area, but when the CPU 160c determines to output the image data, the storage area for storing the image data is switched.

CPU160cおよびメインメモリ161c側では、VRAM153aに記憶されたカレントの画像データをメインメモリ161cにコピーした上で画像処理が実行される。   On the CPU 160c and main memory 161c side, image processing is executed after copying the current image data stored in the VRAM 153a to the main memory 161c.

ここで、図8の例において、VRAM105aに記憶されているN枚の画像データをパソコン2に送信出力する場合、CPU160cは、N枚目の画像データを用いて画像処理を実行しているときに、VRAM105aに記憶されているN枚の画像データを送信出力させるべく、画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを通信メッセージとして、デュアルポートメモリ135経由でCPU130cに送信する。通信メッセージには、出力するべき画像番号および通信インターフェース109経由の指示などがさらに含められる。   Here, in the example of FIG. 8, when N image data stored in the VRAM 105 a is transmitted and output to the personal computer 2, the CPU 160 c is executing image processing using the Nth image data. In order to transmit and output the N pieces of image data stored in the VRAM 105a, the image processing status data including at least one of various parameters necessary for image processing and the image processing result is used as a communication message via the dual port memory 135. It transmits to CPU130c. The communication message further includes an image number to be output, an instruction via the communication interface 109, and the like.

CPU130cは、その通信メッセージを受け取ると、VRAM105aに記憶されている出力するべき画像データをメインメモリ131cに順次読み出し、画像処理状況データとともに通信インターフェース109を介してパソコン2に送信出力する。   When the CPU 130c receives the communication message, the CPU 130c sequentially reads the image data to be output stored in the VRAM 105a into the main memory 131c, and transmits the image data to the personal computer 2 via the communication interface 109 together with the image processing status data.

パソコン2は、画像処理装置1Cからの画像データおよび画像処理状況データを画像処理調整部22の受信機能により受信した後、例えばハードディスク装置などの画像データ用記憶装置21に保存する。   The personal computer 2 receives the image data and the image processing status data from the image processing device 1C by the reception function of the image processing adjustment unit 22, and then stores the image data in the image data storage device 21 such as a hard disk device.

なお、パソコン2が画像処理装置1Cに未接続である場合、パソコン2が受信状態に入っていない場合などでは、画像データおよび画像処理状況データが受信されないので、画像処理調整部22は受信状態に入ったか否かを示す情報をCPU130cに送信し、CPU130cはその情報を受信した後に画像データおよび画像処理状況データを送信出力する。   Note that when the personal computer 2 is not connected to the image processing apparatus 1C, or when the personal computer 2 is not in the reception state, the image data and the image processing status data are not received. The CPU 130c transmits information indicating whether it has entered or not, and the CPU 130c transmits and outputs image data and image processing status data after receiving the information.

図9の例において、VRAM105aに記憶されているN枚の画像データを画像データ保存用記憶装置120に書込み出力する場合、CPU160cは、N枚目の画像データを用いて画像処理を実行しているときに、VRAM105aに記憶されているN枚の画像データを送信出力させるべく、画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを通信メッセージとして、デュアルポートメモリ135経由でCPU130cに送信する。通信メッセージには、出力するべき画像番号および画像データ保存用記憶装置120経由の指示などがさらに含められる。   In the example of FIG. 9, when N image data stored in the VRAM 105 a is written and output to the image data storage device 120, the CPU 160 c executes image processing using the Nth image data. Sometimes, in order to transmit and output N pieces of image data stored in the VRAM 105a, the dual port memory 135 uses image processing status data including various parameters necessary for image processing and at least one of the image processing results as a communication message. To the CPU 130c. The communication message further includes an image number to be output, an instruction via the image data storage device 120, and the like.

CPU130cは、その通信メッセージを受け取ると、VRAM105aに記憶されている出力するべき画像データをメインメモリ131cに順次読み出し、画像処理状況データとともに画像データ保存用記憶装置120に転送する。順次転送された画像データおよび画像処理状況データは、画像データ保存用記憶装置120の記憶媒体に書込み出力される。   Upon receiving the communication message, the CPU 130c sequentially reads the image data to be output stored in the VRAM 105a into the main memory 131c, and transfers the image data together with the image processing status data to the image data storage storage device 120. The sequentially transferred image data and image processing status data are written and output to the storage medium of the image data storage device 120.

図10の例において、CPU130cは、VRAM105aに記憶されている複数の画像のうち、出力するべき所望の画像を入力装置4により選択可能に表示装置5に表示し、入力装置4を用いて所望の画像が選択されると、VRAM105aから対応する画像データをメインメモリ131cに読み出し、画像データ保存用記憶装置120に転送する。転送された画像データは、画像データ保存用記憶装置120の記憶媒体に書込み出力される。この場合、VRAM105aの画像データの出力処理からCPU160cが完全に解放されるから、CPU160cの画像処理を遅らせることなく、画像処理に使用された画像データを出力することができる。   In the example of FIG. 10, the CPU 130 c displays a desired image to be output among the plurality of images stored in the VRAM 105 a on the display device 5 so as to be selectable by the input device 4. When an image is selected, the corresponding image data is read from the VRAM 105a to the main memory 131c and transferred to the image data storage device 120. The transferred image data is written and output to the storage medium of the image data storage device 120. In this case, since the CPU 160c is completely released from the image data output process of the VRAM 105a, the image data used for the image process can be output without delaying the image process of the CPU 160c.

図11の例において、以前の画像データが保存されている記憶媒体を画像データ保存用記憶装置120に装着した後、その記憶媒体に保存されている画像データを用いて画像処理を再実行する指示が入力装置4からCPU130cに入力されると、CPU130cは、画像データ保存用記憶装置120から、指示された保存画像の画像データをメインメモリ131cに読み出し、それをVRAM105aにコピーしてその保存画像を表示装置5に表示する。保存画像のVRAM105aへの配置が完了した後、CPU130cは、デュアルポートメモリ135を経由して、保存画像が展開されているVRAM105aの画像番号を含む画像処理実行指示をCPU160cに送信する。   In the example of FIG. 11, an instruction to re-execute image processing using the image data stored in the storage device 120 after attaching the storage medium storing the previous image data to the storage device 120 for image data storage. Is input from the input device 4 to the CPU 130c, the CPU 130c reads the image data of the designated saved image from the image data saving storage device 120 to the main memory 131c, and copies it to the VRAM 105a to copy the saved image. It is displayed on the display device 5. After the arrangement of the stored image in the VRAM 105a is completed, the CPU 130c transmits an image processing execution instruction including the image number of the VRAM 105a in which the stored image is expanded to the CPU 160c via the dual port memory 135.

CPU160cは、その画像処理実行指示を受信すると、画像データ保存用記憶装置120の記憶媒体からVRAM105aに読み出された画像データを用いて画像処理を再度実行する。   When the CPU 160c receives the image processing execution instruction, the CPU 160c executes the image processing again using the image data read from the storage medium of the image data storage device 120 to the VRAM 105a.

以上、第4実施形態によれば、CPU160cは、デュアルポートメモリ135を経由して、画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データをCPU130cに送信し、CPU130cは、CPU160cからの画像処理状況データを、対応する画像データとともに出力するので、より好適な解析が可能となる。   As described above, according to the fourth embodiment, the CPU 160c transmits the image processing status data including at least one of various parameters necessary for image processing and the image processing result to the CPU 130c via the dual port memory 135, and the CPU 130c. Since the image processing status data from the CPU 160c is output together with the corresponding image data, more suitable analysis can be performed.

また、CPU130cは、画像データ保存用記憶装置120を介して、その記憶媒体に書き込まれた画像データをVRAM105aに読み出し、CPU160cは、画像データ保存用記憶装置120の記憶媒体からVRAM105aに読み出された画像データを用いて画像処理を再度実行するので、画像データ保存用記憶装置120からの時間のかかる(512×480画素の画像の場合は約50ms強)保存画像の読出しがCPU130cにより実行され、VRAM105aに再配置された保存画像がCPU160c側に読み出されることになるから、保存画像の再読込み時に生じ得る画像処理の遅れを抑制することができる。また、VRAM105aへの保存画像の配置が完了した後に画像処理実行指示が出されるので、VRAM105aに対するCPU160c,130cによるアクセスの競合は起こらない。   Further, the CPU 130c reads the image data written in the storage medium to the VRAM 105a via the image data storage device 120, and the CPU 160c reads the image data from the storage medium of the image data storage device 120 to the VRAM 105a. Since the image processing is executed again using the image data, the CPU 130c reads out the stored image, which takes time (from the image data storage device 120, about 50 ms in the case of an image of 512 × 480 pixels), and the VRAM 105a Since the saved image rearranged at the time is read out to the CPU 160c side, it is possible to suppress delay in image processing that may occur when the saved image is re-read. Further, since the image processing execution instruction is issued after the arrangement of the stored image in the VRAM 105a is completed, there is no contention for access by the CPUs 160c and 130c to the VRAM 105a.

なお、CPU160cとCPU130cとの間で交換される指示などは、ポーリング的に送信される構成でも、指示をFPGAのレジスタに書き込むことによりイベントを発生させ、割込みにより指示を取り込む構成でもよい。   The instructions exchanged between the CPU 160c and the CPU 130c may be configured to be transmitted in a polling manner, or may be configured to generate an event by writing the instruction in the FPGA register and capture the instruction by interruption.

また、画像処理の再実行は、カレントの画像データを用いた画像処理の合間に実行されるようにしてもよい。   Further, the re-execution of the image processing may be executed between image processing using the current image data.

(第5実施形態)
図12は画像処理装置の構成図、図13は原画像の例を示す図、図14は判定条件の設定メニュー例を示す図であり、これらの図を参照しながら本発明の第5実施形態について説明する。
(Fifth embodiment)
FIG. 12 is a configuration diagram of the image processing apparatus, FIG. 13 is a diagram illustrating an example of an original image, and FIG. 14 is a diagram illustrating an example of a determination condition setting menu. The fifth embodiment of the present invention with reference to these diagrams Will be described.

第5実施形態の画像処理装置1Dは、第1実施形態との相違点として、VRAM153,105と、メインメモリ161,131と、CPU160,130とに代えて、それぞれ図12に示すように、複数フレーム分の画像データの記憶領域を持つVRAM153a,105aと、第1実施形態とは異なる実行プログラムが展開されたメインメモリ161d,131dと、これらメインメモリ161d,131dに展開されたプログラムにそれぞれに従って処理を実行するCPU160d,130dとを備えている。なお、図12では、画像入力インターフェース101および通信インターフェース109などは図示省略してある。   The image processing apparatus 1D according to the fifth embodiment is different from the first embodiment in that a plurality of image processing apparatuses 1D are replaced with VRAMs 153 and 105, main memories 161 and 131, and CPUs 160 and 130, as shown in FIG. VRAMs 153a and 105a having image data storage areas for frames, main memories 161d and 131d in which execution programs different from those in the first embodiment are expanded, and processing according to the programs expanded in these main memories 161d and 131d, respectively. CPUs 160d and 130d for executing the above. In FIG. 12, the image input interface 101 and the communication interface 109 are not shown.

CPU160dは、第1実施形態のCPU160との相違点として、画像処理の経過中または経過後の結果について所定の判定を行い、この判定結果に従って、デュアルポートメモリ135を介して、CPU130d側に、画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを送信するとともに、この画像処理状況データに対応する画像データを指定する処理をさらに実行する。ここで、所定の判定とは、画像処理において、不良判定結果が所定数連続したか否かの判定、不良判定率が所定率を超えたか否かの判定および所定の異常が発生したか否かの判定の少なくとも1つの判定を含む良否判定のことであり、また少なくとも一つの判定項目についての良品不良品の判定結果が所定率発生したか否かの判定のことである。   As a difference from the CPU 160 of the first embodiment, the CPU 160d makes a predetermined determination on the result during or after the image processing, and in accordance with this determination result, the image is sent to the CPU 130d via the dual port memory 135. The image processing status data including at least one of various parameters necessary for the processing and the image processing result is transmitted, and processing for designating image data corresponding to the image processing status data is further executed. Here, the predetermined determination is a determination as to whether or not a predetermined number of defect determination results have continued in image processing, a determination as to whether the defect determination rate has exceeded a predetermined rate, and whether a predetermined abnormality has occurred. This is a pass / fail determination including at least one of the determinations, and a determination as to whether or not a determination result of a non-defective product for at least one determination item has occurred at a predetermined rate.

CPU130dは、第1実施形態のCPU130との相違点として、入力装置4が接続される操作入力インターフェース(図示せず)および通信インターフェース109の少なくとも一方を介して、上記所定の判定のための判定基準を受け取ると、その判定基準をデュアルポートメモリ135経由でCPU160dに送信する処理をさらに実行する。   As a difference from the CPU 130 of the first embodiment, the CPU 130d is a determination criterion for the predetermined determination via at least one of an operation input interface (not shown) to which the input device 4 is connected and the communication interface 109. Is received, the process of transmitting the determination criteria to the CPU 160d via the dual port memory 135 is further executed.

このような構成の画像処理装置1Dでも、CPU130dに出力処理させる画像データを指定するときにCPU160dが使用する出力命令のデータ量を滅らして、CPU160dの画像処理の停滞を防止するべく、画像番号がVRAM153a,105aの各記憶領域に付される。   Even in the image processing apparatus 1D having such a configuration, in order to prevent the stagnation of the image processing of the CPU 160d by destroying the data amount of the output command used by the CPU 160d when designating the image data to be output to the CPU 130d, the image number Is attached to each storage area of the VRAMs 153a and 105a.

いま、上記判定基準を含む自動サンプリング条件が操作入力インターフェースおよび通信インターフェース109の少なくとも一方から入力されると、CPU130dは、デュアルポートメモリ135を介してその自動サンプリング条件をCPU160d側に送信する。ここで、判定基準は、例えば「不良品とする判定がN回連続したとき」というものであるとする。   When an automatic sampling condition including the determination criterion is input from at least one of the operation input interface and the communication interface 109, the CPU 130d transmits the automatic sampling condition to the CPU 160d via the dual port memory 135. Here, it is assumed that the determination criterion is, for example, “when the determination as a defective product is continued N times”.

この後、CPU160dは、予め設定された検査測定条件に従って良品不良品の判定を行い、この判定結果(上記画像処理の経過中または経過後の結果)が不良品であれば、第3実施形態と同様にして“カレントフレーム画像記憶領域”を切り替える。このとき、“一時保存フレーム画像記憶領域”の画像番号が例えばメインメモリ161dに保存される。また、CPU160dからCPU130dに“カレントフレーム画像記憶領域”の切替え指示が出される。   Thereafter, the CPU 160d determines a non-defective product in accordance with preset inspection measurement conditions, and if this determination result (result during or after the above-described image processing) is a defective product, the third embodiment and the third embodiment. Similarly, the “current frame image storage area” is switched. At this time, the image number of the “temporarily stored frame image storage area” is stored in the main memory 161d, for example. Also, the CPU 160d issues a “current frame image storage area” switching instruction to the CPU 130d.

この後、不良品の判定結果がN回連続すると、CPU160dは、上記所定の判定により、「不良品とする判定がN回連続したとき」に該当するので、画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データ、この画像処理状況データに対応する画像データを指定する画像番号などを通信メッセージに含めて、デュアルポートメモリ135を介して、CPU130d側に送信する。   Thereafter, if the determination result of the defective product is N times consecutively, the CPU 160d corresponds to “when the determination of being a defective product continues N times” according to the predetermined determination. Image processing status data including at least one of the image processing results, an image number specifying image data corresponding to the image processing status data, and the like are included in the communication message and transmitted to the CPU 130d via the dual port memory 135.

CPU130dは、上記を通信メッセージを受信すると、VRAM105aから対応する画像データをメインメモリ131dに読み出して、画像処理状況データとともに画像データ保存用記憶装置120に書込み出力、または通信インターフェース109を介してパソコン2に送信出力する。   When the CPU 130d receives the above communication message, the CPU 130d reads the corresponding image data from the VRAM 105a into the main memory 131d, writes it together with the image processing status data to the image data storage storage device 120, or the personal computer 2 via the communication interface 109. To send output.

ところで、上記動作例では、判定基準は、「不良品とする判定がN回連続したとき」というものになっているが、この他にも様々な判定基準が考えられる。   By the way, in the above-described operation example, the determination criterion is “when the determination as a defective product is repeated N times”, but various other determination criteria are conceivable.

図13に示す原画像について、枠F内の面積値(2値化しきい値以上の光量を持つ画素数)と枠F内の平均光量とを算出する画像処理において、図14に示す設定メニューで、面積値および平均濃淡値を判定基準として設定する場合を考えると、その範囲を外れる結果となった画像データが出力の対象となる。   In the image processing for calculating the area value in the frame F (the number of pixels having a light quantity equal to or greater than the binarization threshold) and the average light quantity in the frame F for the original image shown in FIG. Considering the case where the area value and the average gray value are set as determination criteria, the image data that is out of the range is the output target.

図14中のチェックボックスは、判定基準として有効にするか無効にするかを設定するためのものであり、チェックが入れられると有効となる。そして、そのチェックは、入力装置4またはパソコン2を通じて設定することができるように構成される。   The check box in FIG. 14 is for setting whether to validate or invalidate as a criterion, and becomes valid when a check is entered. The check can be set through the input device 4 or the personal computer 2.

以上、第5実施形態によれば、CPU160dが、画像処理の経過中または経過後の結果について所定の判定を行い、この判定結果に従って、デュアルポートメモリ135を介して、CPU131d側に画像処理状況データを送信するとともに、この画像処理状況データに対応する画像データを指定するので、画像処理の経過中または経過後において解析などに必要となった画像データが出力されることになり、出力された画像データの利用価値が高まる。   As described above, according to the fifth embodiment, the CPU 160d performs a predetermined determination on the result during or after the image processing, and the image processing status data is transmitted to the CPU 131d via the dual port memory 135 according to the determination result. Since the image data corresponding to the image processing status data is specified, the image data necessary for analysis or the like during or after the image processing is output, and the output image Increases the utility value of data.

また、所定の判定が、画像処理において、不良判定結果が所定数連続したか否かの判定、不良判定率が所定率を超えたか否かの判定および所定の異常が発生したか否かの判定の少なくとも1つの判定を含む良否判定であれば、良否判定状況に応じて必要な画像データに絞って出力することが可能となり、VRAMの記憶容量を効率的に使用することができる。   Further, the predetermined determination is a determination as to whether or not a predetermined number of failure determination results have continued in image processing, a determination as to whether the failure determination rate has exceeded a predetermined rate, and a determination as to whether a predetermined abnormality has occurred. If it is a pass / fail judgment including at least one determination, it is possible to narrow down the output to the necessary image data according to the pass / fail judgment situation, and the storage capacity of the VRAM can be used efficiently.

また、所定の判定が、少なくとも一つの判定項目についての良品不良品の判定結果が所定率発生したか否かの判定でも、良否判定状況に応じて必要な画像データに絞って出力することが可能となる。例えば、重要度を考えて所定率を設定すれば、よく発生する不良品についてはその画像データが出力される確率を下げ、まれにしか発生しない不良品についてはその画像データが出力される確率を高くすることができる。   In addition, even if the predetermined determination is a determination as to whether or not a non-defective / non-defective product determination result for at least one determination item has occurred at a predetermined rate, it is possible to output only the necessary image data according to the pass / fail determination situation. It becomes. For example, if a predetermined rate is set in consideration of the importance, the probability that the image data is output for a defective product that often occurs is reduced, and the probability that the image data is output for a defective product that occurs rarely is reduced. Can be high.

さらに、判定のための基準が通信インターフェース109に接続されたパソコン2または外部機器から入力される構成の場合、画像処理前後、画像処理中にかかわらす、判定のための基準の設定ないし変更が可能となる。   In addition, in the case of a configuration in which a criterion for determination is input from the personal computer 2 connected to the communication interface 109 or an external device, the criterion for determination can be set or changed before and after image processing or during image processing. It becomes.

なお、第5実施形態では、N回連続して不良品の判定結果となった画像データが出力される構成になっているが、例えば経緯変化の解析のため、設定した不良率の上限を超えた時点の前後各N枚の画像データが出力される構成でもよい。   In the fifth embodiment, image data that is a defective product determination result is output N times in succession. However, for example, for analysis of changes in background, the upper limit of the set defective rate is exceeded. The configuration may be such that N pieces of image data before and after the time point are output.

また、CPU160dがメインメモリ161dではなく、VRAM105aを途中経過の画像データの保存位置としている場合には、N回連続で不良品判定となった画像の途中経過を保存するように指定することも可能である。   Further, when the CPU 160d uses the VRAM 105a as the storage position for the intermediate progress image data instead of the main memory 161d, it is possible to specify to store the intermediate progress of the image that has been determined to be defective for N consecutive times. It is.

(第6実施形態)
図15は画像処理装置の構成図、図16は図15の画像処理装置の動作説明図、図17は使用可能フラグの例を示す図であり、これらの図を参照しながら本発明の第6実施形態について説明する。
(Sixth embodiment)
FIG. 15 is a block diagram of the image processing apparatus, FIG. 16 is a diagram for explaining the operation of the image processing apparatus in FIG. 15, and FIG. 17 is a diagram showing an example of an available flag. Embodiments will be described.

第6実施形態の画像処理装置1Eは、第3実施形態との相違点として、デュアルポートメモリ135と、メインメモリ161,131と、CPU160,130とに代えて、それぞれ図15,図16に示すように、使用可能フラグ(図17の例を参照)が設定されるデュアルポートメモリ135eと、第3実施形態とは異なる実行プログラムが展開されたメインメモリ161e,131eと、これらメインメモリ161e,131eに展開されたプログラムにそれぞれ従って処理を実行するCPU160e,130eとを備えている。なお、使用可能フラグの各フラグは、初期値として“1”が設定されているとする。   The image processing apparatus 1E according to the sixth embodiment is different from the third embodiment in that instead of the dual port memory 135, the main memories 161 and 131, and the CPUs 160 and 130, shown in FIGS. 15 and 16, respectively. As described above, the dual port memory 135e in which the usable flag (see the example of FIG. 17) is set, the main memories 161e and 131e in which the execution program different from the third embodiment is expanded, and the main memories 161e and 131e. And CPUs 160e and 130e for executing processing in accordance with the programs developed in FIG. It is assumed that each flag of the usable flag is set to “1” as an initial value.

CPU160eは、第3実施形態のCPU160bとの相違点として、デュアルポートメモリ135eの使用可能フラグのうち、出力するべき画像データの画像番号に対応するフラグを“0”に設定する処理を実行する。   As a difference from the CPU 160b of the third embodiment, the CPU 160e executes a process of setting a flag corresponding to the image number of the image data to be output among the available flags of the dual port memory 135e to “0”.

CPU130eは、第3実施形態のCPU130bとの相違点として、デュアルポートメモリ135eの使用可能フラグにおいて、“0”のフラグの画像番号に対応する画像データをVRAM105aから読み出して出力し、その画像データの出力が完了すると、そのフラグを“1”に置き換える処理を実行する。   As a difference from the CPU 130b of the third embodiment, the CPU 130e reads out and outputs the image data corresponding to the image number of the flag “0” from the VRAM 105a in the usable flag of the dual port memory 135e, and outputs the image data. When the output is completed, a process of replacing the flag with “1” is executed.

上記構成の画像処理装置1Eの動作について説明すると、CPU160eは、外観検査測定で画像データを出力すると判定した場合、その画像データの画像番号に当たるフラグを“0”に設定して、CPU130eに対してその画像データの出力指示を出す。   The operation of the image processing apparatus 1E having the above configuration will be described. When the CPU 160e determines that the image data is to be output by the appearance inspection measurement, the CPU 160e sets a flag corresponding to the image number of the image data to “0” and An instruction to output the image data is issued.

この後、CPU130eは、ポーリング的に使用可能フラグの各フラグ状態を監視し、“0”に設定されたフラグを検出すると、そのフラグの画像番号に対応する画像データをVRAM105aから読み出して出力する処理を実行する。続いて、その画像データの出力が完了すると、対応するフラグを“1”に置き換える処理を実行する。   Thereafter, the CPU 130e monitors each flag state of the usable flag in a polling manner, and when detecting the flag set to “0”, reads out the image data corresponding to the image number of the flag from the VRAM 105a and outputs it. Execute. Subsequently, when the output of the image data is completed, a process of replacing the corresponding flag with “1” is executed.

ところで、CPU160e,CPU130eは、それぞれ、ポーリング的に使用可能フラグの各フラグ状態を監視するが、“0”に設定されたフラグを検出した場合には、VRAM153a,105aにおける各記憶領域のうち、対応する画像番号の記憶領域を書込み禁止の状態に設定し、“1”に置き換えられたフラグを検出した場合には、対応する画像番号の記憶領域を書込み許可の状態に設定する。   By the way, the CPU 160e and the CPU 130e monitor each flag state of the usable flag in a polling manner. When a flag set to “0” is detected, the CPU 160e and the CPU 130e correspond to the corresponding storage areas in the VRAMs 153a and 105a. When the storage area of the image number to be written is set to the write-inhibited state and the flag replaced with “1” is detected, the storage area of the corresponding image number is set to the write-permitted state.

以上、第6実施形態によれば、フラグを用いて出力するべき画像データの指示をするので、VRAMの効率的な利用が可能となる。   As described above, according to the sixth embodiment, since the image data to be output is instructed using the flag, the VRAM can be used efficiently.

(第7実施形態)
図18〜図21は画像処理システムの動作説明図であり、これらの図を参照しながら本発明の第7実施形態について説明する。
(Seventh embodiment)
FIGS. 18 to 21 are diagrams for explaining the operation of the image processing system. The seventh embodiment of the present invention will be described with reference to these drawings.

第7実施形態の画像処理システムは、上記各実施形態で説明した画像処理装置と、この画像処理装置に具備された通信インターフェース109に対応する通信インターフェース(図示せず)を有するパソコン2eとを備えている。   The image processing system according to the seventh embodiment includes the image processing apparatus described in each of the above embodiments, and a personal computer 2e having a communication interface (not shown) corresponding to the communication interface 109 included in the image processing apparatus. ing.

パソコン2eは、自己の通信インターフェースを介して画像処理装置から得た画像処理状況データおよび画像データを用いて、画像処理部のCPUによる画像処理と同様の画像処理を実行することにより、検査対象の外観検査測定のシミュレーションを行うほか、画像処理状況データに含まれる各種パラメータのうち少なくとも一つのパラメータを変更する必要がある場合、そのパラメータを変更して上記シミュレーションを再度行い、そのシミュレーションにより最適な画像処理結果が得られると、その最適な画像処理結果となったパラメータを含むデータを画像処理装置に送信設定する。   The personal computer 2e performs image processing similar to the image processing by the CPU of the image processing unit using the image processing status data and the image data obtained from the image processing apparatus via its own communication interface, and thereby the inspection target object. In addition to performing a visual inspection measurement simulation, if it is necessary to change at least one of the various parameters included in the image processing status data, the parameter is changed and the above simulation is performed again. When the processing result is obtained, the data including the parameter that is the optimum image processing result is transmitted and set to the image processing apparatus.

図18の動作例において、画像処理装置で不良品の判定結果(NG)が発生した場合(S1)、画像処理装置は、通信インターフェース109を介して画像データおよび画像処理状況データをパソコン2eに送信し(S2)、この後、以前に設定された画像処理パラメータを用いて画像処理を続行する(S3)。これにより生産が続行する。   In the operation example of FIG. 18, when a defective product determination result (NG) occurs in the image processing apparatus (S1), the image processing apparatus transmits image data and image processing status data to the personal computer 2e via the communication interface 109. Thereafter, the image processing is continued using the previously set image processing parameters (S3). This will continue production.

画像データおよび画像処理状況データを受信したパソコン2e側では、それらの情報に基づき、上記画像処理装置と同様の画像処理を再現し、画像処理装置上で起きている画像処理の内容を再現しながら最適なパラメータに調整する(S4〜S7)。すなわち、画像処理調整部22e(図20参照)により、画像処理検査パラメータの調整、受信した画像データを用いた画像処理を繰り返し実行することにより、検査シミュレーションを行い、画像処理装置とは独立してパラメータの調整を行う。   On the personal computer 2e side that has received the image data and the image processing status data, the same image processing as that of the image processing apparatus is reproduced based on the information, and the contents of the image processing occurring on the image processing apparatus are reproduced. Adjust to optimum parameters (S4 to S7). In other words, the image processing adjustment unit 22e (see FIG. 20) adjusts the image processing inspection parameters and repeatedly executes the image processing using the received image data, thereby performing an inspection simulation, independently of the image processing apparatus. Adjust the parameters.

パラメータの調整が完了した後、その調整済みのパラメータを画像処理装置に転送して、画像処理装置の画像処理部におけるCPUが使用する画像処理パラメータを変更する(S8)。   After the parameter adjustment is completed, the adjusted parameter is transferred to the image processing apparatus, and the image processing parameter used by the CPU in the image processing unit of the image processing apparatus is changed (S8).

図19の動作例において、画像処理は、“画像処理A”および“画像処理B”などの特定の画像処理ルーチンを組み合わせて使用することで行われるので、特定数の画像処理ルーチンが、予め画像処理装置にライブラリとして搭載されている。   In the operation example of FIG. 19, the image processing is performed by using a combination of specific image processing routines such as “image processing A” and “image processing B”. It is mounted as a library on the processing device.

画像処理装置では、画像処理部のCPUで画像処理プログラムが動作する。まず、画像処理手順を読み込み、手順に従って順次画像処理パラメータおよび判定パラメータを入力し(S11)、それらのパラメータを使用して、ライブラリ内の画像処理ルーチンを呼び出すことで画像処理を実行し(S12)、画像処理結果のデータ(パラメータ)を出力する(S13)。   In the image processing apparatus, an image processing program operates on the CPU of the image processing unit. First, an image processing procedure is read, image processing parameters and determination parameters are sequentially input according to the procedure (S11), and image processing is executed by calling an image processing routine in the library using these parameters (S12). The image processing result data (parameter) is output (S13).

パソコン2eは、画像処理調整を行うため、画像処理装置にあるプログラムおよびライブラリと同じものが搭載されており、画像処理装置から画像データおよび画像処理状況データを受信することで(S14)、画像処理装置と同様の画像処理を実行する(S15)。   The personal computer 2e is equipped with the same programs and libraries in the image processing apparatus in order to perform image processing adjustment, and receives image data and image processing status data from the image processing apparatus (S14). Image processing similar to that of the apparatus is executed (S15).

この場合、パソコン2eで画像処理の経緯の確認とパラメータの修正が可能となり、画像処理状況データのみを画像処理装置に設定することで、画像処理装置の画像処理を調整することができる。   In this case, it is possible to check the background of the image processing and correct the parameters with the personal computer 2e, and it is possible to adjust the image processing of the image processing apparatus by setting only the image processing status data in the image processing apparatus.

図20の動作例において、パソコン2e上の画像処理調整部22eによって調整された画像処理パラメータは、画像データ用記憶装置21に格納されており、画像処理調整部22eにより読み出され(S21)、画像処理装置の通信部のCPU側に転送される(S22)。   In the operation example of FIG. 20, the image processing parameters adjusted by the image processing adjustment unit 22e on the personal computer 2e are stored in the image data storage device 21 and read by the image processing adjustment unit 22e (S21). The data is transferred to the CPU side of the communication unit of the image processing apparatus (S22).

通信部のCPUは、画像処理調整部22eからの通信コマンドを解析するルーチンを有しており、画像処理調整部22eから送られてきた画像処理パラメータを解析し、パラメータ変更指示をデュアルポートメモリに配置する(S23)。   The CPU of the communication unit has a routine for analyzing a communication command from the image processing adjustment unit 22e, analyzes the image processing parameter sent from the image processing adjustment unit 22e, and sends a parameter change instruction to the dual port memory. Arrange (S23).

画像処理部のCPUは、そのパラメータ変更指示を画像処理の合間にポーリング的に受信し(S24)、画像処理パラメータとして設定する。   The CPU of the image processing unit receives the parameter change instruction in a polling manner during the image processing (S24) and sets it as an image processing parameter.

ここで、画像処理の対象となる画像が大きなデータ(256KB〜1MB)であるのに比べ、画像処理に使用されるパラメータのデータ量はそれほど大きくない。これは、画像処理において繰返し演算の占める割合が大きいからである。例えば、原画像に対してSobelオペレータなどの微分処理を行う場合、入力オペレータとしては、オペレータの大きさや微分値のしきい値などが必要となるだけで、それらの設定を使って繰返し演算を行い、所定の画像のオペレータ処理を行うことになる。画像処理の対象となる画像データが256KB〜1MBと容量が大きいのに比較して、修正設定すべき画像処理パラメータは、数十〜数百バイト程度である。   Here, the amount of parameter data used for image processing is not so large compared to the case where the image to be subjected to image processing is large data (256 KB to 1 MB). This is because the ratio of repetitive calculations in image processing is large. For example, when performing differential processing such as the Sobel operator on the original image, the input operator only needs the operator's size, differential value threshold, etc., and repeats calculations using those settings. Then, operator processing of a predetermined image is performed. The image processing parameter to be corrected and set is about several tens to several hundreds of bytes, compared with the image data to be subjected to image processing having a large capacity of 256 KB to 1 MB.

より具体的には、従来の画像処理装置においてSobelオペレータを使用して、ひびを検出するための外観検査画像の処理ルーチンの入力パラメータは、以下のように11個しかなく、容量的には、11×4バイト=44バイトに過ぎない。
入力パラメータ パラメータ名
param[0] フィルタサイズ
param[1] エッジ抽出しきい値
param[2] エッジ延長下限値
param[3] 微分値しきい値
param[4] 検出微分方向値
param[5] 白黒判定
param[6] 濃度判定しきい値補正量
param[7] 濃度判定用ウイングサイズ
param[8] 微分値総和しきい値
param[9] 不良画素数しきい値
param[10] エラーコード
したがって、入力パラメータを画像処理部のCPUで変更設定しても設定時間の問題とはならないのである。
More specifically, there are only 11 input parameters of the appearance inspection image processing routine for detecting cracks using the Sobel operator in the conventional image processing apparatus as follows. 11 × 4 bytes = only 44 bytes.
Input parameter Parameter name
param [0] Filter size
param [1] Edge extraction threshold
param [2] Edge extension lower limit
param [3] differential value threshold
param [4] Detected differential direction value
param [5] Black and white judgment
param [6] Density judgment threshold correction amount
param [7] Wing size for concentration determination
param [8] Differential sum threshold
param [9] Bad pixel count threshold
param [10] Error code Therefore, even if the input parameter is changed and set by the CPU of the image processing unit, there is no problem of setting time.

図21の動作例において、パソコン2eが上記S4〜S7による調整済みのパラメータを画像処理装置に転送すると、画像処理装置は、例えば指定した一定時間に上記調整済みのパラメータに一時的に変更して画像処理シミュレーションを実行し(S31)、その画像処理シミュレーションにより、例えば目標のNG率に達したか否かに応じて調整済みのパラメータの妥当性を検証し(S32)、問題点が解決されたことを示す検証結果が得られたとき、はじめて当該画像処理装置内部の画像処理パラメータを調整済みのパラメータに切り替える(S33)。   In the operation example of FIG. 21, when the personal computer 2e transfers the parameters adjusted in S4 to S7 to the image processing apparatus, the image processing apparatus temporarily changes the parameters to the adjusted parameters for a specified fixed time, for example. An image processing simulation is executed (S31), and the validity of the adjusted parameter is verified by the image processing simulation depending on whether the target NG rate is reached, for example (S32), and the problem is solved. When a verification result indicating this is obtained, the image processing parameter in the image processing apparatus is switched to the adjusted parameter for the first time (S33).

この動作の場合、画像処理装置とパソコン2eとが異なる条件であったとしても、画像処理装置の方でパソコン2eによる調整済みのパラメータの妥当性が検証されるから、より確度の高いパラメータの調整が可能になる。異なる条件の例としては、パソコン2eでは画像データが固定されているのに対して、画像処理装置ではラインを流れる検査対象に対するランプ照度等の撮像条件の変動により画像データが変動すること、パソコン2eでは処理スピードの制限を受けないのに対して、画像処理装置ではラインスピード以上の処理スピードで処理を実行しなければならず、検査対象領域を広げるなどすると、画像処理スピードが落ちてS32の判定でNG解消にならない場合があることなどが挙げられる。   In this operation, even if the image processing apparatus and the personal computer 2e have different conditions, the validity of the adjusted parameter by the personal computer 2e is verified by the image processing apparatus. Is possible. As an example of different conditions, the image data is fixed in the personal computer 2e, whereas in the image processing apparatus, the image data changes due to the change in imaging conditions such as lamp illuminance with respect to the inspection target flowing through the line. However, the processing speed is not limited, but the image processing apparatus must execute processing at a processing speed that is higher than the line speed. If the inspection target area is widened, the image processing speed decreases and the determination in S32 is made. In some cases, NG may not be resolved.

以上、第7実施形態によれば、パソコン2eが、画像処理装置に具備された通信インターフェース109に対応する通信インターフェースを有し、この通信インターフェースを介して画像処理装置から得た画像処理状況データおよび画像データを用いて、画像処理装置の画像処理部のCPUによる画像処理と同様の画像処理を実行することにより、検査対象の外観検査測定のシミュレーションを行うので、画像処理装置の画像処理を中断することなく、パソコン2eで画像処理装置と同様の画像処理を再現したシミュレーションにより各種確認が可能となる。   As described above, according to the seventh embodiment, the personal computer 2e has a communication interface corresponding to the communication interface 109 provided in the image processing apparatus, and the image processing status data obtained from the image processing apparatus via this communication interface, and By performing image processing similar to the image processing performed by the CPU of the image processing unit of the image processing apparatus using the image data, the appearance inspection measurement simulation of the inspection target is performed, so the image processing of the image processing apparatus is interrupted. Without any problem, various confirmations can be made by simulation in which the personal computer 2e reproduces the same image processing as the image processing apparatus.

また、パソコン2eが、画像処理状況データに含まれる各種パラメータのうち少なくとも一つのパラメータを変更する必要がある場合、そのパラメータを変更して上記シミュレーションを再度行い、そのシミュレーションにより最適な画像処理結果が得られると、その最適な画像処理結果となったパラメータを含むデータを画像処理装置に送信設定するので、画像処理装置のパラメータの更新が可能になる。   When the computer 2e needs to change at least one of various parameters included in the image processing status data, the parameter is changed and the simulation is performed again, and the simulation results in an optimal image processing result. When obtained, the data including the parameter that is the optimum image processing result is transmitted to the image processing apparatus, so that the parameter of the image processing apparatus can be updated.

図22〜図24は上記第1実施形態などに関連する実施例を示す図であり、図22は画像処理装置の構成図、図23は図22の通信部のより詳細な構成図、図24は図22の画像処理部のより詳細な構成図である。   22 to 24 are diagrams showing examples related to the first embodiment and the like. FIG. 22 is a configuration diagram of the image processing apparatus, FIG. 23 is a more detailed configuration diagram of the communication unit in FIG. FIG. 23 is a more detailed configuration diagram of the image processing unit in FIG. 22.

この実施例の画像処理装置は、上述の入力装置4を用いて設定された検査条件下で、カメラ3の撮像により得られた画像に対する画像処理を通じ、検査対象についての各種外観検査測定を実行するほか、画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力するものであり、図22に示すように、通信部と、画像処理部とにより構成されている。   The image processing apparatus according to this embodiment performs various appearance inspection measurements on an inspection object through image processing on an image obtained by imaging with the camera 3 under inspection conditions set using the input device 4 described above. In addition, the image data used for the image processing is output without stopping or delaying the image processing. As shown in FIG. 22, the image processing unit includes a communication unit and an image processing unit.

図23の通信部において、101は、検査対象の撮像を行う最大で4台のカメラ3から画像データを得る画像入力インターフェースであり、各カメラ3の出力と接続されるコネクタ102と、各コネクタ102に接続されたカメラ3からのアナログ画像信号をデジタル信号に変換して画像データを得るA/D変換器103とにより構成されている。   In the communication unit of FIG. 23, reference numeral 101 denotes an image input interface that obtains image data from a maximum of four cameras 3 that capture an image of an inspection target. A connector 102 connected to the output of each camera 3, and each connector 102 And an A / D converter 103 that converts an analog image signal from the camera 3 to a digital signal to obtain image data.

104は、VRAMコントローラ(ゲートアレイ)であり、図23ではFPGAにより構成されており、画像入力インターフェース101の出力に接続されている。   Reference numeral 104 denotes a VRAM controller (gate array), which is composed of an FPGA in FIG. 23 and is connected to the output of the image input interface 101.

105は、VRAM(SDRAM)であり、画像入力インターフェース101にVRAMコントローラ104を介して接続され、このVRAMコントローラ104のハード制御下で、画像入力インターフェース101で得られた画像データを取り込んで記憶する。   Reference numeral 105 denotes a VRAM (SDRAM), which is connected to the image input interface 101 via the VRAM controller 104 and captures and stores image data obtained by the image input interface 101 under the hardware control of the VRAM controller 104.

106は、入力装置4を接続するための操作入力インターフェースであり、入力装置4と接続されるコネクタ107と、このコネクタ107に接続された入力装置4から入力信号を得る回路部108とにより構成されている。   Reference numeral 106 denotes an operation input interface for connecting the input device 4, which includes a connector 107 connected to the input device 4 and a circuit unit 108 that obtains an input signal from the input device 4 connected to the connector 107. ing.

109は、パソコン2などの外部機器と通信をするための通信インターフェースであり、コネクタ110、トランス111およびイーサーネット(登録商標)コントローラ112により構成されるイーサネット(登録商標)用のインターフェースと、コネクタ113およびRS−232C用の回路部114により構成される2組のシリアル通信用のインターフェースとを備えている。なお、115はセレクタである。   Reference numeral 109 denotes a communication interface for communicating with an external device such as the personal computer 2, an Ethernet (registered trademark) interface including a connector 110, a transformer 111 and an Ethernet (registered trademark) controller 112, and a connector 113. And two sets of serial communication interfaces configured by the circuit unit 114 for RS-232C. Reference numeral 115 denotes a selector.

116は、モニタ出力インターフェースであり、NTSCないしVGA用のコネクタ117,118と、VRAMコントローラ104の制御下で取得したVRAM105からの画像データをアナログに変換して、アナログ画像信号をコネクタ117,118に接続された表示装置5に出力するD/A変換器119とにより構成されている。   Reference numeral 116 denotes a monitor output interface, which converts the image data from the NTSC or VGA connectors 117 and 118 and the VRAM 105 acquired under the control of the VRAM controller 104 to analog, and converts the analog image signal to the connectors 117 and 118. And a D / A converter 119 for outputting to the connected display device 5.

120は、画像データ保存用記憶装置であり、図23の例では、SDカード121と、このSDカード121に画像データなどを書込み出力するSDカードコントローラ122とにより構成されている。そして、このほか、ストロボなどを制御するために、フォトカプラなどを含むインターフェース123,124が設けられている。   Reference numeral 120 denotes a storage device for storing image data. In the example of FIG. 23, the storage device 120 includes an SD card 121 and an SD card controller 122 that writes and outputs image data and the like to the SD card 121. In addition, interfaces 123 and 124 including photocouplers and the like are provided for controlling the strobe and the like.

130は図23の通信部全体の制御などの処理を実行するCPU、131はメインメモリ、132はFROM(フラッシュメモリ)であり、これらCPU130、メインメモリ131およびFROM132と、VRAMコントローラ104および画像データ保存用記憶装置120は、バスB1を介して相互に接続されている。これらのうち、一体不可分として動作するCPU130およびメインメモリ131は、VRAMコントローラ104の制御下で、VRAM105に記憶された画像データを読出し自在に、VRAMコントローラ104を介してVRAM105に接続されている。なお、133はCPU130によりデータの読み書きが行われるSROMである。また、134はVMEバスコントローラであり、例えばFPGAにより構成される。   Reference numeral 130 denotes a CPU that executes processing such as control of the entire communication unit in FIG. 23, 131 is a main memory, and 132 is a FROM (flash memory). These CPU 130, main memory 131 and FROM 132, VRAM controller 104, and image data storage The storage devices 120 are connected to each other via the bus B1. Among these, the CPU 130 and the main memory 131 that operate as an integral inseparable unit are connected to the VRAM 105 via the VRAM controller 104 so that image data stored in the VRAM 105 can be read out under the control of the VRAM controller 104. Reference numeral 133 denotes an SROM in which data is read and written by the CPU 130. Reference numeral 134 denotes a VME bus controller, which is composed of, for example, an FPGA.

136はSRAMである。137は、メインコントローラ(図23ではFPGA)であり、バスB1と、SRAM136およびVRAMコントローラ104が接続されたバスB2とに接続され、操作入力インターフェース106、通信インターフェース109およびインターフェース124の入出力制御を行うほか、デュアルポートメモリとしてデータの転送制御を行う。すなわち、このメインコントローラ137の一部とSRAM136とによって、CPU130と図24に示すCPU160との間に介設され、これらの間でやりとりされる情報の転送を行うデュアルポートメモリ135が構成されるのである。このデュアルポートメモリ135については、CPU130がメインコントローラ137を経由してSRAM136にアクセスしているときでも、図24に示すCPU160がバスB2を経由してSRAM136にアクセスすることができる一方、逆に、CPU160がバスB2を経由してSRAM136にアクセスしているときは、CPU130がメインコントローラ137を経由してSRAM136にアクセスすることができない構成になっている。   Reference numeral 136 denotes an SRAM. Reference numeral 137 denotes a main controller (FPGA in FIG. 23), which is connected to the bus B1 and the bus B2 to which the SRAM 136 and the VRAM controller 104 are connected, and performs input / output control of the operation input interface 106, the communication interface 109, and the interface 124. In addition, it performs data transfer control as a dual port memory. That is, a part of the main controller 137 and the SRAM 136 constitute a dual port memory 135 that is interposed between the CPU 130 and the CPU 160 shown in FIG. 24 and transfers information exchanged between them. is there. With respect to the dual port memory 135, even when the CPU 130 is accessing the SRAM 136 via the main controller 137, the CPU 160 shown in FIG. 24 can access the SRAM 136 via the bus B2. When the CPU 160 is accessing the SRAM 136 via the bus B <b> 2, the CPU 130 cannot access the SRAM 136 via the main controller 137.

138は、図23の通信部と図24の画像処理部とを接続するためのコネクタであり、画像入力インターフェース101の出力およびバスB2に接続されている。   Reference numeral 138 denotes a connector for connecting the communication unit shown in FIG. 23 and the image processing unit shown in FIG. 24, and is connected to the output of the image input interface 101 and the bus B2.

図24の画像処理部において、151は、図23の通信部のコネクタ138と接続されるコネクタである。152は、VRAMコントローラ(ゲートアレイ)であり、図24ではFPGAにより構成されており、コネクタ151,138を介して画像入力インターフェース101の出力に接続されている。   In the image processing unit in FIG. 24, reference numeral 151 denotes a connector connected to the connector 138 of the communication unit in FIG. Reference numeral 152 denotes a VRAM controller (gate array), which is composed of an FPGA in FIG. 24 and is connected to the output of the image input interface 101 via connectors 151 and 138.

153は、VRAM(SDRAM)であり、画像入力インターフェース101にVRAMコントローラ152を介して接続され、このVRAMコントローラ152のハード制御下で、画像入力インターフェース101で得られた画像データを取り込んで記憶する。なお、154は、SDRAMなどによるオーバレイメモリであり、VRAMの一部を構成する(図22参照)。   Reference numeral 153 denotes a VRAM (SDRAM), which is connected to the image input interface 101 via the VRAM controller 152 and captures and stores the image data obtained by the image input interface 101 under the hardware control of the VRAM controller 152. Reference numeral 154 denotes an overlay memory such as an SDRAM, which constitutes a part of the VRAM (see FIG. 22).

160は画像処理用のCPU、161はメインメモリ、162はメインコントローラであり、これらCPU160、メインメモリ161およびメインコントローラ162は、バスB3を介して相互に接続されている。これらのうち、一体不可分として動作するCPU160およびメインメモリ161は、VRAMコントローラ152の制御下で、VRAM153に記憶された画像データを読出し自在に、VRAMコントローラ152を介してVRAM153に接続されている。他方、メインコントローラ162は、オーバレイメモリ154およびFROM163に接続されているほか、コネクタ151,138を介して図23の通信部のバスB2に接続されている。なお、FROM163は、メインコントローラ162を介して、CPU160によりデータが読み書きされる。   Reference numeral 160 denotes an image processing CPU, 161 denotes a main memory, and 162 denotes a main controller. The CPU 160, the main memory 161, and the main controller 162 are connected to each other via a bus B3. Among these, the CPU 160 and the main memory 161 that operate as an integral inseparable unit are connected to the VRAM 153 via the VRAM controller 152 so that image data stored in the VRAM 153 can be read out under the control of the VRAM controller 152. On the other hand, the main controller 162 is connected to the overlay memory 154 and the FROM 163, and is also connected to the bus B2 of the communication unit in FIG. The FROM 163 reads and writes data by the CPU 160 via the main controller 162.

このように構成される画像処理装置の特徴となる動作について説明すると、画像入力インターフェース101で得られた画像データは、VRAMコントローラ152の制御によりVRAM153に記憶されるとともに、VRAMコントローラ104の制御によりVRAM105に記憶される。   The operation that characterizes the image processing apparatus configured as described above will be described. Image data obtained by the image input interface 101 is stored in the VRAM 153 under the control of the VRAM controller 152, and the VRAM 105 is controlled by the control of the VRAM controller 104. Is remembered.

一方のVRAM153に記憶された画像データは、メインメモリ161と一体不可分となって動作するCPU160により読み出されて、従来と同様に画像処理に利用され、その画像処理を通じて検査対象についての各種外観検査測定が実行される。なお、画像処理に必要な各種設定情報は、操作入力インターフェース106および通信インターフェース109の少なくとも一方から、CPU103およびメインメモリ131、デュアルポートメモリ135、そしてメインコントローラ162を経由して、CPU160およびメインメモリ161に取り込まれる。   The image data stored in one VRAM 153 is read by the CPU 160 that operates in an integral manner with the main memory 161, and is used for image processing in the same manner as in the prior art. Measurement is performed. Various setting information necessary for image processing is transmitted from at least one of the operation input interface 106 and the communication interface 109 via the CPU 103, the main memory 131, the dual port memory 135, and the main controller 162, and the CPU 160 and the main memory 161. Is taken in.

他方のVRAM105に記憶された画像データは、メインメモリ131と一体不可分となって動作するCPU130により読み出されて例えばメインメモリ131に一端保持された後、画像データ保存用記憶装置120に転送されるほか、メインコントローラ137を介して通信インターフェース109から外部のパソコン2に送信出力される。なお、画像データ保存用記憶装置120に転送された画像データは、そのSDカード121に書込み出力されることになる。また、どのような画像データを書込み出力または送信出力するかは、上述した実施形態と同様に処理され、そして仕様のメモリ容量に応じた複数フレーム分の画像データの記憶領域を持つVRAM153a,105aが搭載される。   The image data stored in the other VRAM 105 is read by the CPU 130 that is inseparably integrated with the main memory 131, is held in the main memory 131, for example, and then transferred to the image data storage device 120. In addition, the data is transmitted and output from the communication interface 109 to the external personal computer 2 via the main controller 137. The image data transferred to the image data storage device 120 is written and output to the SD card 121. Further, what image data is written out or transmitted is processed in the same manner as in the above-described embodiment, and the VRAMs 153a and 105a having a storage area for a plurality of frames of image data according to the specified memory capacity. Installed.

以上、本実施例によれば、検査対象の撮像を行うカメラ3から画像データを得る画像入力インターフェース101と、この画像入力インターフェース101の出力に接続されたVRAMコントローラ152,104と、画像入力インターフェース101にVRAMコントローラ152を介して接続され、このVRAMコントローラ152の制御下で、画像入力インターフェース101で得られた画像データを取り込んで記憶するVRAM153と、VRAMコントローラ152の制御下で、VRAM153に記憶された画像データを読出し自在に、VRAMコントローラ152を介してVRAM153に接続されたCPU160およびメインメモリ161と、画像入力インターフェース101にVRAMコントローラ104を介して接続され、このVRAMコントローラ104の制御下で、画像入力インターフェース101で得られた画像データを取り込んで記憶するVRAM105と、VRAMコントローラ104の制御下で、VRAM105に記憶された画像データを読出し自在に、VRAMコントローラ104を介してVRAM105に接続されたCPU130およびメインメモリ131と、FPGA162を介してCPU160とCPU130との間に介設され、これらの間でやりとりされる情報の転送を行うデュアルポートメモリ135とを備え、CPU160は、VRAM153に記憶された画像データを用いて画像処理を実行することにより検査対象の外観検査測定を行う一方、CPU130は、VRAM105に記憶された画像データの出力処理を実行するので、例えば、入力装置4を用いて入力されたVRAM105の画像データの出力指示に従って、CPU130がVRAM105に記憶された画像データの出力処理を行う場合、VRAM105の画像データの出力処理からCPU160が完全に解放されるから、また例えばCPU160が、デュアルポートメモリ135を経由したメッセージ通信によりCPU130に対して、VRAM153に記憶された画像データに対応するVRAM105に記憶された画像データの出力指示をする場合でも、CPU160に加わる負荷が数バイト程度の出力指示データを含む通信メッセージの送信処理のみで済むから、画像処理を止めたりあるいは遅らせたりすることなく、画像処理に使用された画像データを出力することができる。   As described above, according to the present embodiment, the image input interface 101 that obtains image data from the camera 3 that images the inspection target, the VRAM controllers 152 and 104 connected to the output of the image input interface 101, and the image input interface 101 Are connected via the VRAM controller 152, and under the control of the VRAM controller 152, the VRAM 153 that captures and stores the image data obtained by the image input interface 101, and is stored in the VRAM 153 under the control of the VRAM controller 152. The CPU 160 and the main memory 161 connected to the VRAM 153 via the VRAM controller 152 and the image input interface 101 are connected via the VRAM controller 104 so that the image data can be read freely. Under the control of the VRAM controller 104, the VRAM 105 that captures and stores the image data obtained by the image input interface 101, and under the control of the VRAM controller 104, the image data stored in the VRAM 105 can be freely read. A CPU 130 and a main memory 131 connected to the VRAM 105 via the CPU, and a dual port memory 135 interposed between the CPU 160 and the CPU 130 via the FPGA 162 and transferring information exchanged between them. The CPU 160 performs an image inspection using the image data stored in the VRAM 153 to perform an appearance inspection measurement of the inspection target, while the CPU 130 executes an output process of the image data stored in the VRAM 105. For example, when the CPU 130 performs the output process of the image data stored in the VRAM 105 in accordance with the image data output instruction of the VRAM 105 input using the input device 4, the CPU 160 is completely released from the image data output process of the VRAM 105. Therefore, for example, even when the CPU 160 instructs the CPU 160 to output the image data stored in the VRAM 105 corresponding to the image data stored in the VRAM 153 to the CPU 130 by message communication via the dual port memory 135, the CPU 160 Since only a transmission process of a communication message including output instruction data with a load of about several bytes is required, the image data used for the image processing can be output without stopping or delaying the image processing.

1,1A,1B,1C,1D,1E 画像処理装置
2 パソコン
3 カメラ
4 入力装置
5 表示装置
101 画像入力インターフェース
103 A/D変換器
104 VRAMコントローラ(FPGA)
105,105a VRAM(SDRAM)
106 操作入力インターフェース
109 通信インターフェース
116 モニタ出力インターフェース
119 D/A変換器
120 画像データ保存用記憶装置
121 SDカード
122 SDカードコントローラ
130,130a,130c,130d,130e CPU
131,131a,131c,131d,131e メインメモリ
135,135e デュアルポートメモリ
137 メインコントローラ
152 VRAMコントローラ(FPGA)
153,153a VRAM(SDRAM)
160,160a,160c,160d,160e CPU
161,161a,161c,161d,161e メインメモリ
1, 1A, 1B, 1C, 1D, 1E Image processing device 2 Personal computer 3 Camera 4 Input device 5 Display device 101 Image input interface 103 A / D converter 104 VRAM controller (FPGA)
105,105a VRAM (SDRAM)
106 Operation Input Interface 109 Communication Interface 116 Monitor Output Interface 119 D / A Converter 120 Image Data Storage Device 121 SD Card 122 SD Card Controller 130, 130a, 130c, 130d, 130e CPU
131, 131a, 131c, 131d, 131e Main memory 135, 135e Dual port memory 137 Main controller 152 VRAM controller (FPGA)
153, 153a VRAM (SDRAM)
160, 160a, 160c, 160d, 160e CPU
161, 161a, 161c, 161d, 161e Main memory

Claims (12)

検査対象の撮像を行う少なくとも1台の撮像装置から画像データを得る画像入力インターフェースと、
この画像入力インターフェースで得られた画像データを取り込んで記憶する第1画像メモリと、
この第1画像メモリに記憶された画像データを読出し自在に、前記第1画像メモリに接続された第1中央処理装置と、
前記画像入力インターフェースで得られた画像データを取り込んで記憶する第2画像メモリと、
この第2画像メモリに記憶された画像データを読出し自在に、前記第2画像メモリに接続された第2中央処理装置と、
前記第1中央処理装置と前記第2中央処理装置との間に介設され、これらの間でやりとりされる情報の転送を行う中央処理装置間通信部とを備え、
前記第1画像メモリおよび前記第2画像メモリは、それぞれ、前記画像入力インターフェースと前記第1中央処理装置および前記第2中央処理装置との間に配置され、
前記第1中央処理装置は、前記第1画像メモリに記憶された画像データを用いて画像処理を実行することにより前記検査対象の外観検査測定を行うとともに、前記画像処理の経過中または経過後の結果について所定の判定を行い、前記判定の結果に従って、前記第2中央処理装置に対して、前記第1画像メモリに記憶された画像データに対応する前記第2画像メモリに記憶された画像データの出力指示をする場合、前記中央処理装置間通信部を経由したメッセージ通信によって前記第2中央処理装置に出力指示データを送信する一方、
前記第2中央処理装置は、前記中央処理装置間通信部を経由して前記第1中央処理装置から前記出力指示データを受信すると、前記第2画像メモリに記憶された画像データの出力処理を実行する
ことを特徴とする画像処理装置。
An image input interface for obtaining image data from at least one imaging device for imaging the inspection object;
A first image memory for capturing and storing image data obtained by the image input interface;
A first central processing unit connected to the first image memory so that image data stored in the first image memory can be read out;
A second image memory for capturing and storing image data obtained by the image input interface;
A second central processing unit connected to the second image memory so that image data stored in the second image memory can be read out;
An inter-central processing unit communication unit that is interposed between the first central processing unit and the second central processing unit and transfers information exchanged between them;
The first image memory and the second image memory are respectively disposed between the image input interface and the first central processing unit and the second central processing unit,
Wherein the first central processing unit, said line visual inspection measurement of said object by performing image processing using the image data stored in the first image memory Utotomoni, during the course of the image processing or after Image data stored in the second image memory corresponding to the image data stored in the first image memory for the second central processing unit according to the determination result. When sending the output instruction data to the second central processing unit by message communication via the communication unit between the central processing units,
When the second central processing unit receives the output instruction data from the first central processing unit via the inter-central processing unit communication unit, the second central processing unit executes output processing of image data stored in the second image memory. An image processing apparatus.
前記画像入力インターフェースの出力に接続された第1および第2ゲートアレイをさらに備え、
前記第1画像メモリは、前記画像入力インターフェースに前記第1ゲートアレイを介して接続され、この第1ゲートアレイの制御下で、前記画像入力インターフェースで得られた画像データを取り込んで記憶し、
前記第1中央処理装置は、前記第1ゲートアレイの制御下で、前記第1画像メモリに記憶された画像データを読出し自在に、前記第1ゲートアレイを介して前記第1画像メモリに接続され、
前記第2画像メモリは、前記画像入力インターフェースに前記第2ゲートアレイを介して接続され、この第2ゲートアレイの制御下で、前記画像入力インターフェースで得られた画像データを取り込んで記憶し、
前記第2中央処理装置は、前記第2ゲートアレイの制御下で、前記第2画像メモリに記憶された画像データを読出し自在に、前記第2ゲートアレイを介して前記第2画像メモリに接続された
ことを特徴とする請求項1記載の画像処理装置。
Further comprising first and second gate arrays connected to the output of the image input interface;
The first image memory is connected to the image input interface via the first gate array, and under the control of the first gate array, captures and stores image data obtained by the image input interface;
The first central processing unit is connected to the first image memory via the first gate array so that image data stored in the first image memory can be read out under the control of the first gate array. ,
The second image memory is connected to the image input interface via the second gate array, and under the control of the second gate array, captures and stores image data obtained by the image input interface;
The second central processing unit is connected to the second image memory via the second gate array so that the image data stored in the second image memory can be read out under the control of the second gate array. The image processing apparatus according to claim 1, wherein:
前記第1および第2画像メモリの各々は、複数フレーム分の画像データの記憶領域を持ち、
前記第1および第2ゲートアレイは、それぞれ、前記第1および第2画像メモリにおける記憶領域のうち一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、前記画像入力インターフェースで得られた画像データを記憶する制御を行うほか、その記憶領域に記憶した画像データの記憶状態を一時保存する場合には、前記第1および第2画像メモリにおける記憶領域のうち別の一フレーム分の画像データの記憶領域をカレントフレームの画像データの記憶領域とし、この記憶領域に、前記画像入力インターフェースで得られた画像データを記憶する制御を行う
ことを特徴とする請求項2記載の画像処理装置。
Each of the first and second image memories has a storage area for image data for a plurality of frames,
Each of the first and second gate arrays has a storage area for image data of one frame of storage areas in the first and second image memories as a storage area for image data of a current frame. In addition to performing control to store the image data obtained by the image input interface, when temporarily storing the storage state of the image data stored in the storage area, of the storage areas in the first and second image memories The storage area for the image data of another frame is set as the storage area for the image data of the current frame, and control for storing the image data obtained by the image input interface is performed in this storage area. 2. The image processing apparatus according to 2.
外部コンピュータと通信をするための通信インターフェースを前記第2中央処理装置側にさらに備え、
前記第1中央処理装置は、前記中央処理装置間通信部を経由して、前記画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを前記第2中央処理装置側に送信し、
前記第2中央処理装置は、前記出力処理として、前記通信インターフェースを介して、前記第1中央処理装置からの画像処理状況データを、対応する画像データとともに前記外部コンピュータに送信する
ことを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。
A communication interface for communicating with an external computer is further provided on the second central processing unit side,
The first central processing unit sends image processing status data including at least one of various parameters necessary for the image processing and the image processing result via the communication unit between the central processing units to the second central processing unit side. To
The second central processing unit transmits the image processing status data from the first central processing unit together with the corresponding image data to the external computer via the communication interface as the output process. The image processing apparatus according to claim 1.
前記第2画像メモリに記憶された画像データを着脱式の記憶媒体に書込み出力するための記憶装置を前記第2中央処理装置側にさらに接続して備え、
前記第1中央処理装置は、前記中央処理装置間通信部を経由して、前記画像処理に必要な各種パラメータおよびその画像処理結果の少なくとも一方を含む画像処理状況データを前記第2中央処理装置に送信し、
前記第2中央処理装置は、前記出力処理として、前記記憶装置を介して、前記第1中央処理装置からの画像処理状況データを、対応する画像データとともに前記記憶媒体に書込み出力する
ことを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。
A storage device for writing and outputting image data stored in the second image memory to a removable storage medium is further connected to the second central processing unit side,
The first central processing unit sends image processing status data including at least one of various parameters necessary for the image processing and the image processing result to the second central processing unit via the communication unit between the central processing units. Send
The second central processing unit writes and outputs the image processing status data from the first central processing unit together with the corresponding image data to the storage medium via the storage device as the output processing. The image processing apparatus according to claim 1.
前記第2画像メモリは、画像データの読出しおよび書込み自在に前記第2中央処理装置にさらに接続され、
前記第2中央処理装置は、前記記憶装置を介して、前記記憶媒体に書き込まれた画像データを前記第2画像メモリに読み出し、
前記第1中央処理装置は、前記記憶媒体から前記第2画像メモリに読み出された画像データを用いて画像処理を再度実行する
ことを特徴とする請求項5記載の画像処理装置。
The second image memory is further connected to the second central processing unit so that image data can be read and written,
The second central processing unit reads image data written in the storage medium to the second image memory via the storage device,
The image processing apparatus according to claim 5, wherein the first central processing unit re-executes image processing using image data read from the storage medium to the second image memory.
前記第1中央処理装置は、前記判定結果に従って、前記中央処理装置間通信部を介して、前記第2中央処理装置側に前記画像処理状況データを送信するとともに、この画像処理状況データに対応する画像データを指定することを特徴とする請求項4〜6のいずれか1項に記載の画像処理装置。 It said first central processing unit, according to the result of the determination, through the inter-CPU communication unit, and transmits the image processing status data to the second central processing device side, corresponding to the image processing status data The image processing apparatus according to claim 4, wherein image data to be specified is designated. 前記所定の判定とは、前記画像処理において、不良判定結果が所定数連続したか否かの判定、不良判定率が所定率を超えたか否かの判定および所定の異常が発生したか否かの判定の少なくとも1つの判定を含む良否判定のことであることを特徴とする請求項1または7記載の画像処理装置。 The predetermined determination is a determination as to whether or not a predetermined number of defect determination results have continued in the image processing, a determination as to whether or not a defect determination rate has exceeded a predetermined rate, and whether or not a predetermined abnormality has occurred. The image processing apparatus according to claim 1 , wherein the image processing apparatus is a pass / fail determination including at least one determination. 前記所定の判定とは、少なくとも一つの判定項目についての良品不良品の判定結果が所定率発生したか否かの判定のことであることを特徴とする請求項1または7記載の画像処理装置。 The predetermined determination and at least one non-defective defective for judgment item determination result by the image processing apparatus according to claim 1 or 7, wherein the is that the determination of whether the generated predetermined rate. 前記判定のための基準は前記外部コンピュータまたは外部機器から入力されることを特徴とする請求項8または9記載の画像処理装置。   The image processing apparatus according to claim 8, wherein the criterion for the determination is input from the external computer or an external device. 請求項4〜10のいずれか1項に記載の画像処理装置と、
この画像処理装置に具備された通信インターフェースに対応する通信インターフェースを有する外部コンピュータとを備え、
この外部コンピュータは、当該外部コンピュータが有する通信インターフェースを介して前記画像処理装置から得た画像処理状況データおよび画像データを用いて、前記第1中央処理装置による画像処理と同様の画像処理を実行することにより、前記検査対象の外観検査測定のシミュレーションを行う
ことを特徴とする画像処理システム。
The image processing apparatus according to any one of claims 4 to 10,
An external computer having a communication interface corresponding to the communication interface provided in the image processing apparatus,
The external computer executes image processing similar to the image processing by the first central processing unit, using image processing status data and image data obtained from the image processing device via a communication interface of the external computer. An image processing system characterized in that a simulation of an appearance inspection measurement of the inspection object is performed.
前記外部コンピュータは、前記画像処理状況データに含まれる各種パラメータのうち少なくとも一つのパラメータを変更する必要がある場合、そのパラメータを変更して前記シミュレーションを再度行い、そのシミュレーションにより最適な画像処理結果が得られると、その最適な画像処理結果となったパラメータを含むデータを前記画像処理装置に送信設定することを特徴とする請求項11記載の画像処理システム。   When the external computer needs to change at least one of various parameters included in the image processing status data, the parameter is changed and the simulation is performed again, and the simulation results in an optimal image processing result. 12. The image processing system according to claim 11, wherein when obtained, data including a parameter that is an optimum image processing result is set to be transmitted to the image processing apparatus.
JP2010005073A 2010-01-13 2010-01-13 Image processing apparatus and image processing system Expired - Fee Related JP4711015B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010005073A JP4711015B2 (en) 2010-01-13 2010-01-13 Image processing apparatus and image processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010005073A JP4711015B2 (en) 2010-01-13 2010-01-13 Image processing apparatus and image processing system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2001289448A Division JP4473479B2 (en) 2001-09-21 2001-09-21 Image processing apparatus and image processing system

Publications (2)

Publication Number Publication Date
JP2010102736A JP2010102736A (en) 2010-05-06
JP4711015B2 true JP4711015B2 (en) 2011-06-29

Family

ID=42293264

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010005073A Expired - Fee Related JP4711015B2 (en) 2010-01-13 2010-01-13 Image processing apparatus and image processing system

Country Status (1)

Country Link
JP (1) JP4711015B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6987616B2 (en) * 2017-11-21 2022-01-05 株式会社キーエンス Configuration support systems, data servers, control methods and programs
JP6987617B2 (en) * 2017-11-21 2022-01-05 株式会社キーエンス Configuration support systems, data servers, control methods and programs

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002228606A (en) * 2001-01-31 2002-08-14 Hitachi Ltd Electron beam circuit pattern inspecting method and apparatus therefor

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01243182A (en) * 1988-03-24 1989-09-27 Mitsubishi Electric Corp Picture processor
JPH035869A (en) * 1989-06-01 1991-01-11 Matsushita Electric Ind Co Ltd Information processing device
JPH0528244A (en) * 1991-07-18 1993-02-05 Shinko Electric Ind Co Ltd Image processor
JPH0778418B2 (en) * 1991-12-06 1995-08-23 住友軽金属工業株式会社 Plate shape measuring device
JP3266290B2 (en) * 1991-12-27 2002-03-18 松下電器産業株式会社 Component mounting method and component mounting device
JPH05223751A (en) * 1992-02-13 1993-08-31 Sumitomo Metal Ind Ltd Inspecting method for surface flaw
JPH06229941A (en) * 1993-01-29 1994-08-19 Ricoh Co Ltd Inspection apparatus for image
JP3255562B2 (en) * 1994-08-12 2002-02-12 株式会社東芝 Surface inspection equipment
JPH08128960A (en) * 1994-11-01 1996-05-21 Nabco Ltd Cylinder inspection machine
JPH08261737A (en) * 1995-03-20 1996-10-11 Sony Corp Device and method for inspecting net shape object
JPH1032810A (en) * 1996-07-15 1998-02-03 Matsushita Electric Works Ltd Image-processing inspecting device
JPH1078308A (en) * 1996-09-03 1998-03-24 Taiyo Yuden Co Ltd Inspecting device for appearance of electronic parts
JP3982646B2 (en) * 1997-04-28 2007-09-26 財団法人くまもとテクノ産業財団 Image identification apparatus and method, image detection identification apparatus provided with image identification apparatus, and medium on which image identification program is recorded

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002228606A (en) * 2001-01-31 2002-08-14 Hitachi Ltd Electron beam circuit pattern inspecting method and apparatus therefor

Also Published As

Publication number Publication date
JP2010102736A (en) 2010-05-06

Similar Documents

Publication Publication Date Title
JP4473479B2 (en) Image processing apparatus and image processing system
TW201919000A (en) Automatic optical detection system based on CPU+GPU+FPGA architecture
JP5371099B2 (en) Visual inspection device and visual inspection method
KR102116064B1 (en) Plant diagnosis method using the same system
US11836911B2 (en) Image data management method, production apparatus, production system, image data management method for production system, and non-transitory computer-readable recording medium
JP4711015B2 (en) Image processing apparatus and image processing system
WO2024164887A1 (en) Main control board of robot, and robot
CN108111777B (en) Dark corner correction system and method
CN114326171B (en) Screen detection method and device
JP2009194726A (en) Mobile terminal with inconvenient part specifying function, and method and program for specifying inconvenient part of mobile terminal
KR101597024B1 (en) Liquid crystal display device for testing and how to upload an image pattern
JP7479530B1 (en) Display abnormality detection system and display abnormality detection method
JP2001184018A (en) Automatic decision system for display fuction of electronic equipment and automatic deciding method
JP2921718B2 (en) Image processing method for industrial vision sensor
KR101542866B1 (en) Remotely monitoring system in inspection process and Inspection method for remotely monitoring in inspection process using the same
CN213659503U (en) Image data processing system, storage policy device
TWI848253B (en) Defect inspection method and system
JP2023125673A (en) Image processing system
WO2023162940A1 (en) Inspection device, inspection method, and inspection program
JP5367484B2 (en) Inspection system
WO2023162941A1 (en) Inspection device, image processing method, and image processing program
TWI237111B (en) Optical inspection ststem and method thereof
JP5277768B2 (en) Analytical apparatus with camera and control program thereof
CN112394705A (en) Method and device for processing exception of control program system parameters
CN115564963A (en) Image processing method, system, electronic device and storage medium

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100810

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101012

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101102

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110119

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20110131

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110307

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140401

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees