[go: up one dir, main page]

JP2019067365A - IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGE PROCESSING METHOD, AND PROGRAM - Google Patents

IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGE PROCESSING METHOD, AND PROGRAM Download PDF

Info

Publication number
JP2019067365A
JP2019067365A JP2018123561A JP2018123561A JP2019067365A JP 2019067365 A JP2019067365 A JP 2019067365A JP 2018123561 A JP2018123561 A JP 2018123561A JP 2018123561 A JP2018123561 A JP 2018123561A JP 2019067365 A JP2019067365 A JP 2019067365A
Authority
JP
Japan
Prior art keywords
histogram
image
leveling
value
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.)
Granted
Application number
JP2018123561A
Other languages
Japanese (ja)
Other versions
JP7143649B2 (en
Inventor
慶二 大村
Keiji Omura
慶二 大村
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to CN201811142491.8A priority Critical patent/CN109600578B/en
Publication of JP2019067365A publication Critical patent/JP2019067365A/en
Application granted granted Critical
Publication of JP7143649B2 publication Critical patent/JP7143649B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

【課題】正否判定の実用性を向上させる。【解決手段】画像処理装置3は、第1の画像の画素値のヒストグラムである第1のヒストグラムと第2の画像の画素値のヒストグラムである第2のヒストグラムとを生成し、第1のヒストグラム及び第2のヒストグラムにおける頻度値を当該頻度値に対応するビンの近傍に位置する1つ以上のビンに分散させる平準化処理を行い、平準化された第1のヒストグラムである第1の平準化ヒストグラムと平準化された第2のヒストグラムである第2の平準化ヒストグラムとの比較結果を示す比較情報を生成する。【選択図】図3PROBLEM TO BE SOLVED: To improve the practicality of a correctness determination. An image processing apparatus 3 generates a first histogram which is a histogram of pixel values of a first image and a second histogram which is a histogram of pixel values of a second image, and the first histogram. And the first leveling, which is the first leveled histogram, is performed by performing a leveling process in which the frequency value in the second histogram is dispersed in one or more bins located in the vicinity of the bin corresponding to the frequency value. Generates comparative information showing the comparison result between the histogram and the second leveled histogram, which is the leveled second histogram. [Selection diagram] Fig. 3

Description

本発明は、画像処理装置、画像処理システム、画像処理方法、及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing system, an image processing method, and a program.

ビデオカメラ等の撮像装置により撮影された映像を分析することにより異常検知等を行う監視システムがある。このようなシステムにおいては、判定の基準となる基準画像と、判定の対象となる検体を撮影した検知画像とを比較する方法が利用されている。例えば、基準画像の画素値のヒストグラムと検知画像の画素値のヒストグラムとの比較結果に基づいて正否判定を行う方法が知られている。   There is a monitoring system that performs abnormality detection and the like by analyzing an image captured by an imaging device such as a video camera. In such a system, a method is used in which a reference image serving as a determination reference is compared with a detected image obtained by imaging a sample to be determined. For example, there is known a method of performing a positive or negative determination based on a comparison result of a histogram of pixel values of a reference image and a histogram of pixel values of a detection image.

例えば、検査画像と閾値とを比較することにより異物候補を選出する自動検査装置において、画素欠陥がある撮像素子を使用した場合でも良好な異物検出を実現することを目的として、検査画像の各画素を輝度毎に集計して作成されたヒストグラムの階調幅を拡張し、拡張された検査画像の画像サイズを縮小して縮小画像を生成し、検査画像において縮小画像の画素に対応する位置にある特定画素及び特定画素に近接する複数の画素の各輝度の平均値を、縮小画像における各画素の輝度に設定する方法が開示されている(特許文献1)。   For example, in an automatic inspection apparatus that selects a foreign object candidate by comparing an inspection image and a threshold, each pixel of the inspection image for the purpose of achieving good foreign object detection even when using an imaging device having a pixel defect. Are expanded for each luminance to expand the gradation width of the created histogram, and the image size of the expanded inspection image is reduced to generate a reduced image, and a specified image is located at a position corresponding to the pixel of the reduced image in the inspection image There is disclosed a method of setting the average value of the luminances of a pixel and a plurality of pixels adjacent to a specific pixel to the luminance of each pixel in a reduced image (Japanese Patent Application Laid-Open No. 2008-101501).

基準画像のヒストグラムと検知画像のヒストグラムとの比較結果に基づいて正否判定を行う場合、頻度値が投票されるビンの僅かなずれにより、本来正常(一致)と判定されるべき検知画像について異常(不一致)と判定される可能性がある。例えば、256通りの色成分に対応する256個のビンを有するヒストグラムを用いて比較を行う場合であって、基準画像のヒストグラムにおける投票が第200ビンに集中し、検知画像のヒストグラムにおける投票が第201ビンに集中した場合を考える。このような場合、隣接する2つのビンにおける色相の差は僅かであるから、基準画像と検知画像の色相は略一致していると判断することができる。このようなビンの僅かなずれは、検体以外の要因、例えば環境光の変化、検知領域内における検体の配置等に応じて生じ得る。従来技術によっては、このような検体以外の要因による不当な正否判定を十分に回避することができず、正否判定を柔軟に行うことができない。そのため、正否判定の実用性という点において改善の余地がある。   When making a determination of correctness based on the comparison result of the histogram of the reference image and the histogram of the detected image, the detected image that should be judged as normal (matched) is abnormal due to a slight deviation of the bin to which the frequency value is voted (Mismatch) may be determined. For example, in the case of comparison using a histogram having 256 bins corresponding to 256 color components, votes in the histogram of the reference image are concentrated in the 200th bin, and votes in the histogram of the detected image are Consider the case of concentrating on 201 bins. In such a case, since the difference in hue between two adjacent bins is small, it can be determined that the hues of the reference image and the detection image substantially match. Such slight deviation of the bin may occur depending on factors other than the sample, such as a change in ambient light, an arrangement of the sample in the detection area, and the like. According to the prior art, it is not possible to sufficiently avoid such an unfair judgment as to correctness or falseness due to factors other than the sample, and it is not possible to flexibly perform the correctness judgment. Therefore, there is room for improvement in terms of the practicability of the correctness determination.

本発明は上記に鑑みてなされたものであって、正否判定の実用性を向上させることを目的とする。   The present invention has been made in view of the above, and it is an object of the present invention to improve the practicability of positive / negative determination.

上述した課題を解決し、目的を達成するために、本発明の一態様である画像処理装置は、第1の画像の画素値のヒストグラムである第1のヒストグラムと、第2の画像の画素値のヒストグラムである第2のヒストグラムとを生成するヒストグラム生成部と、前記第1のヒストグラム及び前記第2のヒストグラムにおける頻度値を当該頻度値に対応するビンの近傍に位置する1つ以上のビンに分散させる平準化処理を行う平準化部と、平準化された前記第1のヒストグラムである第1の平準化ヒストグラムと、平準化された前記第2のヒストグラムである第2の平準化ヒストグラムとの比較結果を示す比較情報を生成する比較部と、を備えることを特徴とする。   In order to solve the problems described above and to achieve the object, an image processing apparatus according to an aspect of the present invention includes a first histogram that is a histogram of pixel values of a first image, and a pixel value of a second image. A histogram generation unit that generates a second histogram that is a histogram of the first and second histograms, and a frequency value in the first histogram and the second histogram to one or more bins located in the vicinity of a bin corresponding to the frequency value A leveling unit for performing leveling processing for dispersing, a first leveling histogram that is the first leveled histogram, and a second leveling histogram that is the second leveled histogram. And a comparison unit that generates comparison information indicating a comparison result.

本発明によれば、正否判定の実用性を向上させることができる。   According to the present invention, it is possible to improve the practicability of the correctness determination.

図1は、第1の実施形態に係る画像処理システムのハードウェア構成例を示す図である。FIG. 1 is a diagram showing an example of the hardware configuration of the image processing system according to the first embodiment. 図2は、第1の実施形態に係る情報処理装置のハードウェア構成例を示す図である。FIG. 2 is a diagram illustrating an example of the hardware configuration of the information processing apparatus according to the first embodiment. 図3は、第1の実施形態に係る情報処理装置の機能構成例を示すブロック図である。FIG. 3 is a block diagram showing an example of the functional configuration of the information processing apparatus according to the first embodiment. 図4は、第1の実施形態に係る情報処理装置による処理例を示すフローチャートである。FIG. 4 is a flowchart showing an example of processing performed by the information processing apparatus according to the first embodiment. 図5は、第1の実施形態に係る設定画面の領域設定時の状態の例を示す図である。FIG. 5 is a view showing an example of a state at the time of area setting of the setting screen according to the first embodiment. 図6は、第1の実施形態に係る設定画面の基準画像設定時における状態の例を示す図である。FIG. 6 is a diagram illustrating an example of a state at the time of setting a reference image of the setting screen according to the first embodiment. 図7は、第1の実施形態に係る設定画面の検知画像設定時における状態の例を示す図である。FIG. 7 is a diagram illustrating an example of a state at the time of setting a detection image of the setting screen according to the first embodiment. 図8は、第1の実施形態に係るヒストグラム生成部及び平準化部による具体的な処理例を示すフローチャートである。FIG. 8 is a flowchart showing a specific processing example by the histogram generation unit and the leveling unit according to the first embodiment. 図9は、第1の実施形態に係る平準化前のヒストグラムの例を示す図である。FIG. 9 is a diagram showing an example of a histogram before leveling according to the first embodiment. 図10は、第1の実施形態に係る平準化後のヒストグラムの例を示す図である。FIG. 10 is a diagram showing an example of the histogram after leveling according to the first embodiment. 図11は、第1の実施形態に係る設定画面の閾値設定時における第1の状態の例を示す図である。FIG. 11 is a diagram illustrating an example of a first state at the time of setting the threshold of the setting screen according to the first embodiment. 図12は、第1の実施形態に係る設定画面の閾値設定時における第2の状態の例を示す図である。FIG. 12 is a diagram illustrating an example of a second state at the time of setting the threshold of the setting screen according to the first embodiment. 図13は、第1の実施形態に係る正否判定の結果例を示す図である。FIG. 13 is a diagram illustrating an example of the result of the correctness determination according to the first embodiment. 図14は、第1の実施形態に係る設定画面の閾値設定時における第3の状態の例を示す図である。FIG. 14 is a diagram illustrating an example of a third state at the time of setting the threshold of the setting screen according to the first embodiment. 図15は、第1の実施形態における設定画面の設定完了時の状態の例を示す図である。FIG. 15 is a diagram showing an example of a state when setting of the setting screen in the first embodiment is completed. 図16は、第2の実施形態に係る設定画面の閾値設定時における第1の状態の例を示す図である。FIG. 16 is a diagram illustrating an example of a first state at the time of setting the threshold of the setting screen according to the second embodiment. 図17は、第2の実施形態に係る設定画面の閾値設定時における第2の状態の例を示す図である。FIG. 17 is a diagram illustrating an example of a second state at the time of setting the threshold of the setting screen according to the second embodiment. 図18は、第3の実施形態に係る情報処理装置の機能構成例を示すブロック図である。FIG. 18 is a block diagram showing an example of a functional configuration of the information processing apparatus according to the third embodiment. 図19は、第3の実施形態に係る情報処理装置による処理例を示すフローチャートである。FIG. 19 is a flowchart illustrating an example of processing performed by the information processing apparatus according to the third embodiment. 図20は、第3の実施形態に係る再計算部による具体的な処理例を示すフローチャートである。FIG. 20 is a flowchart showing a specific processing example by the recalculation unit according to the third embodiment. 図21は、第3の実施形態に係るS成分の下限値の例を示す図である。FIG. 21 is a diagram showing an example of the lower limit value of the S component according to the third embodiment. 図22は、第3の実施形態に係るV成分の下限値及び上限値の例を示す図である。FIG. 22 is a diagram showing an example of the lower limit value and the upper limit value of the V component according to the third embodiment. 図23は、第3の実施形態においてピクセルを無効にする状態の例を示す図である。FIG. 23 is a diagram showing an example of the state in which the pixel is invalidated in the third embodiment. 図24は、第3の実施形態に係る設定画面の基準画像設定時における状態の例を示す図である。FIG. 24 is a diagram showing an example of a state at the time of setting a reference image of the setting screen according to the third embodiment. 図25は、第3の実施形態に係る設定画面の判定処理時における状態の例を示す図である。FIG. 25 is a diagram illustrating an example of a state at the time of determination processing of the setting screen according to the third embodiment. 図26は、第3の実施形態に係る原点移動部による具体的な処理例を示すフローチャートである。FIG. 26 is a flowchart illustrating a specific processing example of the origin moving unit according to the third embodiment. 図27は、第3の実施形態に係る原点移動処理を実行する前のヒストグラムの例を示す図である。FIG. 27 is a diagram illustrating an example of a histogram before the origin movement process according to the third embodiment is performed. 図28は、第3の実施形態に係る原点移動処理を実行した後のヒストグラムの例を示す図である。FIG. 28 is a diagram illustrating an example of a histogram after the origin movement process according to the third embodiment is performed. 図29は、第4の実施形態に係る情報処理装置の機能構成例を示すブロック図である。FIG. 29 is a block diagram showing an example of a functional configuration of the information processing apparatus according to the fourth embodiment. 図30は、第4の実施形態に係る情報処理装置による処理例を示すフローチャートである。FIG. 30 is a flowchart illustrating an example of processing performed by the information processing apparatus according to the fourth embodiment. 図31は、第4の実施形態に係る色設定部による具体的な処理例を示すフローチャートである。FIG. 31 is a flowchart showing a specific processing example by the color setting unit according to the fourth embodiment. 図32は、第4の実施形態に係る設定画面の色設定処理時における状態の例を示す図である。FIG. 32 is a diagram showing an example of a state at the time of color setting processing of a setting screen according to the fourth embodiment. 図33は、第4の実施形態に係る設定画面の設定色反映時における状態の例を示す図である。FIG. 33 is a diagram showing an example of a state at the time of setting color reflection of the setting screen according to the fourth embodiment. 図34は、第5の実施形態に係る設定画面の例を示す図である。FIG. 34 is a view showing an example of a setting screen according to the fifth embodiment. 図35は、第5の実施形態に係る設定画面において1つの指定点が指定された状態の例を示す図である。FIG. 35 is a diagram showing an example of a state in which one designated point is designated on the setting screen according to the fifth embodiment. 図36は、第5の実施形態に係る設定画面において2つの指定点が指定された状態の例を示す図である。FIG. 36 is a diagram showing an example of a state in which two designated points are designated on the setting screen according to the fifth embodiment. 図37は、第5の実施形態に係る設定画面において3つの指定点が指定された状態の例を示す図である。FIG. 37 is a diagram showing an example of a state in which three designated points are designated on the setting screen according to the fifth embodiment. 図38は、第5の実施形態に係る設定画面において4つの指定点が指定された状態の例を示す図である。FIG. 38 is a diagram showing an example of a state in which four designated points are designated on the setting screen according to the fifth embodiment. 図39は、第5の実施形態に係る設定画面において指定点を削除するときの状態の例を示す図である。FIG. 39 is a diagram showing an example of a state when a designated point is deleted on the setting screen according to the fifth embodiment. 図40は、第5の実施形態に係る設定画面において指定点が削除された後の状態の例を示す図である。FIG. 40 is a diagram illustrating an example of a state after the designated point is deleted on the setting screen according to the fifth embodiment. 図41は、第5の実施形態に係る設定画面において許容誤差下限値及び許容誤差上限値を調整するときの状態の例を示す図である。FIG. 41 is a diagram illustrating an example of a state in which the allowable error lower limit value and the allowable error upper limit value are adjusted in the setting screen according to the fifth embodiment. 図42は、第5の実施形態に係る情報処理装置による処理例を示すフローチャートである。FIG. 42 is a flowchart illustrating an example of processing performed by the information processing apparatus according to the fifth embodiment. 図43は、第6の実施形態に係る情報処理装置の機能構成例を示すブロック図である。FIG. 43 is a block diagram illustrating an example of a functional configuration of the information processing apparatus according to the sixth embodiment. 図44は、第6の実施形態に係る情報処理装置による処理例を示すフローチャートである。FIG. 44 is a flowchart of an example of processing performed by the information processing apparatus according to the sixth embodiment. 図45は、第6の実施形態に係る拡張化部による具体的な処理例を示すフローチャートである。FIG. 45 is a flowchart of a specific process example of the extension unit according to the sixth embodiment. 図46は、第6の実施形態に係る拡張化前のヒストグラムの例を示す図である。FIG. 46 is a diagram showing an example of a histogram before expansion according to the sixth embodiment. 図47は、第6の実施形態に係る拡張化後のヒストグラムの例を示す図である。FIG. 47 is a diagram showing an example of a histogram after expansion according to the sixth embodiment. 図48は、第6の実施形態に係る設定画面の拡張化前における状態の例を示す図である。FIG. 48 is a diagram showing an example of a state before expansion of the setting screen according to the sixth embodiment. 図49は、第6の実施形態に係る設定画面の拡張化後における状態の例を示す図である。FIG. 49 is a diagram showing an example of a state after expansion of the setting screen according to the sixth embodiment.

以下に、図面を参照しながら本発明に係る画像処理装置、画像処理システム、画像処理方法、及びプログラムの実施形態を詳細に説明する。以下の実施形態によって本発明が限定されるものではなく、以下の実施形態における構成要素には当業者が容易に想到できるもの、実質的に同一のもの、及びいわゆる均等の範囲のものが含まれる。以下の実施形態の要旨を逸脱しない範囲で構成要素の種々の省略、置換、変更、及び組み合わせを行うことができる。   Hereinafter, embodiments of an image processing apparatus, an image processing system, an image processing method, and a program according to the present invention will be described in detail with reference to the drawings. The present invention is not limited by the following embodiments, and the constituent elements in the following embodiments include those which can be easily conceived by those skilled in the art, substantially the same ones, and so-called equivalent ranges. . Various omissions, substitutions, changes, and combinations of the constituent elements can be made without departing from the scope of the following embodiments.

(第1の実施形態)
図1は、第1の実施形態に係る画像処理システム1のハードウェア構成例を示す図である。画像処理システム1は、撮像装置2a〜2f、情報処理装置3(画像処理装置)、ネットワーク4、及び外部機器5を含む。
First Embodiment
FIG. 1 is a diagram illustrating an example of a hardware configuration of an image processing system 1 according to the first embodiment. The image processing system 1 includes imaging devices 2 a to 2 f, an information processing device 3 (image processing device), a network 4, and an external device 5.

撮像装置2a〜2fは、被写体から照射(反射)された光を電気信号に変換することにより被写体を撮影し、複数のフレーム(静止画像データ)で構成される動画(例えば10[FPS])の映像データを生成するビデオカメラである。撮像装置2a〜2fは、例えば、複数の製品を生産する生産設備、生産ライン等を撮影し、製造物であるワーク(検体)に対する異常を検知する正否判定を実行するための映像データを生成する。本実施形態においては、複数(本例では6台)の撮像装置2a〜2fが備えられているが、1台であってもよい。   The imaging devices 2a to 2f capture an object by converting light (reflected) emitted from the object into an electric signal, and the moving image (for example, 10 [FPS]) composed of a plurality of frames (still image data) It is a video camera that generates video data. The imaging devices 2a to 2f, for example, photograph a production facility that produces a plurality of products, a production line, and the like, and generate video data for performing correctness determination to detect an abnormality with respect to a workpiece (sample) that is a manufactured product. . In the present embodiment, a plurality of (six in this example) imaging devices 2a to 2f are provided, but may be one.

情報処理装置3は、各撮像装置2a〜2fによって生成された各映像データに基づいてワークの正否判定を実行する装置として機能するPC(Personal Computer)、ワークステーション等である。本実施形態に係る情報処理装置3は、生産設備等を構成する外部機器5との間で、例えばフィールドバス規格による通信が可能となるように接続されている。   The information processing device 3 is a PC (Personal Computer), a work station, or the like that functions as a device that performs the correctness determination of the work based on the video data generated by the imaging devices 2a to 2f. The information processing apparatus 3 according to the present embodiment is connected with the external device 5 constituting a production facility or the like so as to be able to communicate according to, for example, the fieldbus standard.

ネットワーク4は、撮像装置2a〜2fと情報処理装置3とを接続するための、例えばEthernet(登録商標)規格のネットワークである。この場合、ネットワーク4ではTCP(Transmission Control Protocol)/IP(Internet Protocol)等のプロトコルによりデータ通信が行われる。この場合、撮像装置2a〜2f及び情報処理装置3は、TCP/IPのプロトコルにより通信するためのMAC(Media Access Control)アドレスを有し、且つプライベートIPアドレス等のIPアドレスが割り当てられる。ネットワーク4の具体的構成の一例として、例えば複数のポートを有するスイッチングハブに撮像装置2a〜2f及び情報処理装置3それぞれがLAN(Local Area Network)ケーブルによって接続されたスター配線形式が挙げられる。なお、ネットワーク4は、TCP/IPによるものに限定されるものではなく、例えば情報処理装置3側にVGA(Video Graphics Array)端子又はUSB(Universal Serial Bus)ポートを複数有し、複数の撮像装置2a〜2fがVGAケーブル又はUSBケーブルで情報処理装置3に接続された形態等であってもよい。   The network 4 is, for example, a Ethernet (registered trademark) standard network for connecting the imaging devices 2 a to 2 f and the information processing device 3. In this case, in the network 4, data communication is performed by a protocol such as Transmission Control Protocol (TCP) / Internet Protocol (IP). In this case, the imaging devices 2a to 2f and the information processing device 3 have a MAC (Media Access Control) address for communicating according to the TCP / IP protocol, and an IP address such as a private IP address is assigned. An example of a specific configuration of the network 4 is, for example, a star wiring type in which each of the imaging devices 2a to 2f and the information processing device 3 is connected by a LAN (Local Area Network) cable to a switching hub having a plurality of ports. The network 4 is not limited to one using TCP / IP. For example, the information processing device 3 has a plurality of VGA (Video Graphics Array) terminals or USB (Universal Serial Bus) ports, and a plurality of imaging devices The configuration may be such that 2a to 2f are connected to the information processing device 3 by a VGA cable or a USB cable.

図2は、第1の実施形態に係る情報処理装置3のハードウェア構成例を示す図である。情報処理装置3は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、外部記憶装置14、ディスプレイ15、ネットワークI/F16、キーボード17、マウス18、DVD(Digital Versatile Disc)ドライブ19、外部機器I/F21、及びスピーカ22を含む。   FIG. 2 is a diagram illustrating an example of a hardware configuration of the information processing device 3 according to the first embodiment. The information processing apparatus 3 includes a central processing unit (CPU) 11, a read only memory (ROM) 12, a random access memory (RAM) 13, an external storage device 14, a display 15, a network I / F 16, a keyboard 17, a mouse 18, and a DVD. (Digital Versatile Disc) A drive 19, an external device I / F 21, and a speaker 22 are included.

CPU11は、情報処理装置3全体の動作を制御するため演算処理を行う1つ以上の回路からなる装置である。ROM12は、情報処理装置3用のプログラムを記憶している不揮発性記憶装置である。RAM13は、CPU11のワークエリアとして使用される揮発性記憶装置である。   The CPU 11 is a device including one or more circuits that perform arithmetic processing to control the entire operation of the information processing device 3. The ROM 12 is a non-volatile storage device storing a program for the information processing device 3. The RAM 13 is a volatile storage device used as a work area of the CPU 11.

外部記憶装置14は、撮像装置2a〜2fにより生成された映像データ、設定情報等の各種データを記憶するHDD(Hard Disk Drive)、SSD(Solid State Drive)等の記憶装置である。   The external storage device 14 is a storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive) that stores various data such as video data and setting information generated by the imaging devices 2a to 2f.

ディスプレイ15は、カーソル、メニュー、ウィンドウ、文字、画像、正否判定を実行するアプリケーションの画面等を表示する表示装置である。ディスプレイ15は、例えばCRT(Cathode Ray Tube)ディスプレイ、液晶ディスプレイ、プラズマディスプレイ、有機EL(Electroluminescence)ディスプレイ等である。ディスプレイ15は、例えば情報処理装置3の本体に対して、VGAケーブル、HDMI(登録商標)(High-Definition Multimedia Interface)ケーブル、Ethernetケーブル等により接続される。ディスプレイ15は、タッチパネル式の入力操作を可能にするための機構を備えていてもよい。   The display 15 is a display device that displays a cursor, a menu, a window, characters, an image, a screen of an application that performs correctness determination, and the like. The display 15 is, for example, a CRT (Cathode Ray Tube) display, a liquid crystal display, a plasma display, an organic EL (Electroluminescence) display, or the like. The display 15 is connected to, for example, the main body of the information processing apparatus 3 by a VGA cable, a high-definition multimedia interface (HDMI (registered trademark)) cable, an Ethernet cable, or the like. The display 15 may have a mechanism for enabling touch panel type input operation.

ネットワークI/F16は、ネットワーク4に接続してデータ通信するためのインターフェースである。ネットワークI/F16は、例えばTCP/IPプロトコルによる通信を可能にするNIC(Network Interface Card)である。具体的には、情報処理装置3は、撮像装置2a〜2fからネットワーク4及びネットワークI/F16を介して、映像データを取得する。   The network I / F 16 is an interface for connecting to the network 4 to perform data communication. The network I / F 16 is, for example, a NIC (Network Interface Card) that enables communication by the TCP / IP protocol. Specifically, the information processing device 3 acquires video data from the imaging devices 2 a to 2 f via the network 4 and the network I / F 16.

キーボード17は、文字、数字、各種指示の選択、カーソルの移動、設定情報の設定等の入力を行う入力装置である。マウス18は、各種指示の選択(実行)、処理対象の選択、カーソルの移動、設定情報の設定等を行うための入力装置である。   The keyboard 17 is an input device for inputting characters, numerals, selection of various instructions, movement of a cursor, setting of setting information, and the like. The mouse 18 is an input device for performing selection (execution) of various instructions, selection of a processing target, movement of a cursor, setting of setting information, and the like.

DVDドライブ19は、着脱自在な記憶媒体の一例としてのDVD20に対するデータの読み出し、書き込み、及び削除を制御する装置である。   The DVD drive 19 is a device that controls reading, writing, and deletion of data to the DVD 20 as an example of a removable storage medium.

外部機器I/F21は、外部機器5と接続してデータ通信をするためのインターフェースである。外部機器I/F21は、例えばフィールドバス規格による通信を可能にするインターフェースカードである。具体的には、情報処理装置3は、外部機器5と外部機器I/F21を介してデータ通信を行う。   The external device I / F 21 is an interface for connecting to the external device 5 and performing data communication. The external device I / F 21 is an interface card that enables communication according to, for example, the fieldbus standard. Specifically, the information processing device 3 performs data communication with the external device 5 via the external device I / F 21.

スピーカ22は、アプリケーションの動作に従って音声を出力する装置である。   The speaker 22 is a device that outputs sound in accordance with the operation of the application.

上述のCPU11、ROM12、RAM13、外部記憶装置14、ディスプレイ15、ネットワークI/F16、キーボード17、マウス18、DVDドライブ19、外部機器I/F21、及びスピーカ22は、アドレスバス、データバス等のバスによって互いに通信可能に接続されている。ディスプレイ15は、Ethernetケーブルによって接続される場合にはネットワークI/F16に接続されることになり、この場合にはTCP/IP等のプロトコルによりデータ通信が行われる。   The above-described CPU 11, ROM 12, RAM 13, external storage device 14, display 15, network I / F 16, keyboard 17, mouse 18, DVD drive 19, external device I / F 21, and speaker 22 are buses such as address bus and data bus Are communicably connected to each other. The display 15 is connected to the network I / F 16 when connected by an Ethernet cable. In this case, data communication is performed by a protocol such as TCP / IP.

なお、図1及び図2に示すハードウェア構成は単なる例示であり、画像処理システム1及び情報処理装置3は、使用状況に応じて適宜なハードウェア及びソフトウェアを利用して構築されるべきものである。   Note that the hardware configuration shown in FIGS. 1 and 2 is merely an example, and the image processing system 1 and the information processing apparatus 3 should be constructed using appropriate hardware and software according to the use situation. is there.

図3は、第1の実施形態に係る情報処理装置3の機能構成例を示すブロック図である。情報処理装置3は、映像受信部101(取得部)、記憶部102、入力部103、領域設定部104、基準画像設定部105(画像設定部)、検知画像設定部106(画像設定部)、ヒストグラム生成部107、平準化部108、比較部109、判定部110、閾値設定部111、表示制御部112、及び外部出力部113を含む。   FIG. 3 is a block diagram showing an example of the functional configuration of the information processing apparatus 3 according to the first embodiment. The information processing apparatus 3 includes a video reception unit 101 (acquisition unit), a storage unit 102, an input unit 103, an area setting unit 104, a reference image setting unit 105 (image setting unit), a detection image setting unit 106 (image setting unit), A histogram generation unit 107, a leveling unit 108, a comparison unit 109, a determination unit 110, a threshold setting unit 111, a display control unit 112, and an external output unit 113 are included.

映像受信部101は、ネットワーク4を介して撮像装置2a〜2fとデータ通信を行い、撮像装置2a〜2fから映像データを受信する。映像受信部101は、受信した映像データを記憶部102に記憶させる。   The video reception unit 101 performs data communication with the imaging devices 2 a to 2 f via the network 4, and receives video data from the imaging devices 2 a to 2 f. The video receiving unit 101 causes the storage unit 102 to store the received video data.

記憶部102は、映像受信部101により受信された映像データ、設定情報等の各種データを記憶する。   The storage unit 102 stores various data such as video data and setting information received by the video reception unit 101.

入力部103は、情報処理装置3が実行する各種処理に関するユーザによる入力操作を受け付ける。   The input unit 103 receives an input operation by the user regarding various processes executed by the information processing device 3.

領域設定部104は、映像データが示す映像(撮像装置2a〜2fにより撮影された映像)から任意の領域を設定するための処理を行う。領域の設定方法は特に限定されるべきものではないが、例えばディスプレイ15等の表示装置115に映し出された映像上でユーザがマウス18等のポインティングデバイスを操作して任意の領域を指定する操作等により行うことができる。   The area setting unit 104 performs processing for setting an arbitrary area from the video (video captured by the imaging devices 2 a to 2 f) indicated by the video data. Although the method of setting the area should not be particularly limited, for example, the user operates a pointing device such as the mouse 18 on an image displayed on the display device 115 such as the display 15 to designate an arbitrary area, etc. Can be done by

基準画像設定部105は、領域設定部104により設定された領域に基づいて、判定の基準となる基準画像(第1の画像)を設定するための処理を行う。   The reference image setting unit 105 performs processing for setting a reference image (first image) as a reference of determination based on the area set by the area setting unit 104.

検知画像設定部106は、領域設定部104により設定された領域に基づいて、判定の対象となる検体が撮影された検知画像(第2の画像)を設定するための処理を行う。   Based on the area set by the area setting unit 104, the detection image setting unit 106 performs processing for setting a detection image (second image) in which the sample to be determined is captured.

ヒストグラム生成部107は、基準画像の画素値のヒストグラムである基準ヒストグラム(第1のヒストグラム)及び検知画像の画素値のヒストグラムである検知ヒストグラム(第2のヒストグラム)を生成する。ヒストグラムを生成するための画素値は特に限定されるべきものではないが、例えばHSV(色相(Hue)・彩度(Saturation)・明度(Value))、HLS(色相(Hue)・彩度(Saturation)・輝度(Lightness/Luminance))等の色空間における位置を示す値、グレースケールにおける輝度を示す値(輝度値)等であり得る。基準画像及び検知画像がカラーである場合には、HSV等の色空間における位置を示す画素値が利用される。例えば画素値としてHSVやHLSを採用する場合には、ヒストグラムにおけるビン(階級)はH成分(色相)の数(例えば256)に対応して設定され、各H成分の出現回数(頻度値)が対応するビンに投票される。   The histogram generation unit 107 generates a reference histogram (first histogram) which is a histogram of pixel values of a reference image and a detection histogram (second histogram) which is a histogram of pixel values of a detection image. The pixel values for generating the histogram are not particularly limited, but, for example, HSV (Hue, Saturation, Value), HLS (Hue), Saturation (Lightness / Luminance)) may be a value indicating the position in the color space, a value indicating the luminance in gray scale (luminance value), or the like. When the reference image and the detection image are colors, pixel values indicating positions in a color space such as HSV are used. For example, when using HSV or HLS as pixel values, bins (classes) in the histogram are set corresponding to the number (for example, 256) of H components (hue), and the number of appearances (frequency value) of each H component is The corresponding bin is voted.

平準化部108は、基準ヒストグラム及び検知ヒストグラムに平準化処理を施す。平準化処理とは、ヒストグラムにおける頻度値を当該頻度値に対応するビンの近傍に位置する1つ以上のビンに分散させる処理である。頻度値の分散の仕方は特に限定されるべきものではないが、例えば第100ビンの頻度値を第100ビンに隣接する第99ビンや第101ビンに分配する。また、第100ビンに直接隣接していないがその近傍に位置するビン(例えば第98ビン、第102ビン等)に分配してもよい。このように、平準化処理が施されることにより、あるビンに集中している頻度値が当該ビンの近傍に位置するビンに分配される。これにより、頻度値が投票されるビンの僅かなずれが判定結果に与える影響を緩和することが可能となる。   The leveling unit 108 performs a leveling process on the reference histogram and the detection histogram. The leveling process is a process of distributing the frequency value in the histogram to one or more bins located in the vicinity of the bin corresponding to the frequency value. There is no particular limitation on the method of distributing the frequency value, but for example, the frequency value of the 100th bin is distributed to the 99th and 101st bins adjacent to the 100th bin. Also, it may be distributed to bins (e.g., the 98th bin, the 102nd bin, etc.) that are not directly adjacent to the 100th bin but located in the vicinity thereof. As described above, the leveling process is performed to distribute the frequency value concentrated in a certain bin to the bins located near the relevant bin. This makes it possible to reduce the influence of a slight deviation of the bins for which frequency values are voted on the determination result.

比較部109は、平準化された基準ヒストグラムである平準化基準ヒストグラム(第1の平準化ヒストグラム)と、平準化された検知ヒストグラムである平準化検知ヒストグラム(第2の平準化ヒストグラム)とを比較し、その比較結果を示す比較情報を生成する。両平準化ヒストグラムを比較する方法は特に限定されるべきものではなく、公知又は新規な方法を適宜利用することができる。比較情報の形態は、採用される比較方法に応じて決定されるものであるが、例えば両平準化ヒストグラムの一致率、異常発生の蓋然性を示す検知率(例えば一致率の逆数)等であり得る。   The comparison unit 109 compares the leveling reference histogram (first leveling histogram), which is a leveled reference histogram, with the leveling detection histogram (second leveling histogram), which is a leveled detection histogram. And generates comparison information indicating the comparison result. The method for comparing the leveling histograms is not particularly limited, and any known or novel method can be used as appropriate. The form of the comparison information is determined according to the comparison method to be employed, and may be, for example, the matching rate of both leveling histograms, the detection rate indicating the probability of occurrence of abnormality (for example, the reciprocal of the matching rate), etc. .

判定部110は、比較部109による比較結果に基づいて基準画像と検知画像とが一致しているか否かを判定する正否判定処理を行う。本実施形態に係る正否判定処理は、比較情報と閾値とを比較することにより行われる。例えば、比較情報が検知率(値が大きい程不一致(異常)である可能性が高い)である場合、検知率がある閾値(例えば20%)より大きい場合に、基準画像と検知画像とが一致していない(検体は異常である)と判定される。比較情報が一致率(値が小さい程不一致である可能性が高い)である場合、一致率がある閾値(例えば80%)より小さい場合に、基準画像と検知画像とが一致していないと判定される。   The determination unit 110 performs a correctness determination process of determining whether or not the reference image and the detected image match based on the comparison result by the comparison unit 109. The correctness determination process according to the present embodiment is performed by comparing comparison information with a threshold. For example, when the comparison information is a detection rate (the larger the value is, the higher the possibility of a mismatch (abnormality)), the reference image and the detection image are one when the detection rate is larger than a certain threshold (for example, 20%). It is determined that the test is not performed (the sample is abnormal). If the comparison information is a match rate (the smaller the value, the higher the possibility of a mismatch), it is determined that the reference image and the detected image do not match if the match rate is smaller than a certain threshold (for example, 80%) Be done.

閾値設定部111は、正否判定処理における閾値を設定する。閾値の設定方法は特に限定されるべきものではないが、例えばユーザが入力部103に所定の操作を入力することにより任意に閾値を変更可能とすることが好ましい。このとき、ユーザはディスプレイ15等の表示装置115に表示される基準画像、検知画像、ヒストグラム、比較情報(検知率等)等を参照しながら当該閾値の設定が可能であることが好ましい。これにより、ユーザは閾値を適切に設定することが可能となる。例えば、環境光の変化による検知率の増加(一致率の低下)を無視できるように設定したり、検体の配置(検知領域内の位置、検体の向き等)の違いを無視できるように設定したりすることが可能となる。   The threshold setting unit 111 sets a threshold in the correctness determination process. The method of setting the threshold is not particularly limited, but it is preferable that the threshold can be arbitrarily changed by, for example, the user inputting a predetermined operation to the input unit 103. At this time, it is preferable that the user can set the threshold while referring to a reference image, a detection image, a histogram, comparison information (detection rate and the like) and the like displayed on the display device 115 such as the display 15. This allows the user to set the threshold appropriately. For example, the increase in detection rate (the decrease in match rate) due to a change in ambient light can be set to be negligible, or the difference in sample placement (position in the detection area, sample orientation, etc.) can be ignored. It is possible to

表示制御部112は、上記各機能部101〜111の機能を実現するために必要な映像(静止画、動画を含む)を表示装置115に表示させるための処理を行う。本実施形態に係る表示制御部112は、各種設定画面(検知領域、基準画像、検知画像、閾値等を設定するための画面)、撮像装置2a〜2fにより撮影された現在又は過去の映像、基準画像、検知画像、各種ヒストグラム(基準ヒストグラム、検知ヒストグラム、平準化基準ヒストグラム、平準化検知ヒストグラム等)、比較情報(検知率、一致率等)、判定結果等を表示装置115に表示させる。   The display control unit 112 performs processing for causing the display device 115 to display a video (including a still image and a moving image) necessary to realize the functions of the functional units 101 to 111. The display control unit 112 according to the present embodiment includes various setting screens (screens for setting a detection area, a reference image, a detection image, a threshold, and the like), current or past images captured by the imaging devices 2a to 2f, and a reference An image, a detection image, various histograms (reference histogram, detection histogram, leveling reference histogram, leveling detection histogram, etc.), comparison information (detection rate, match rate, etc.), determination results, etc. are displayed on the display device 115.

外部出力部113は、上記各機能部101〜111により生成された情報を外部機器5に出力する。外部出力部113は、例えば比較部109により生成された比較情報や判定部110により生成された判定結果を、生産設備等を構成する外部機器5に出力してもよい。   The external output unit 113 outputs the information generated by the functional units 101 to 111 to the external device 5. The external output unit 113 may output, for example, the comparison information generated by the comparison unit 109 and the determination result generated by the determination unit 110 to the external device 5 constituting the production facility or the like.

なお、上記判定部110及び閾値設定部111は、必ずしも情報処理装置3内に備えられていなくてもよく、画像処理システム1内に存在する他の情報処理装置を用いて実現されてもよい。また、本例では、上記基準画像設定部105及び検知画像設定部106により、撮像装置2a〜2fにより撮影された映像(映像データ)から基準画像及び検知画像が設定されているが、基準画像及び検知画像の設定方法はこれに限定されるものではない。基準画像及び検知画像は、画像処理システム1のハードウェア構成、監視対象となる検体の性質等に応じて適宜な方法により設定されるべきものである。   The determination unit 110 and the threshold setting unit 111 may not necessarily be included in the information processing apparatus 3, and may be realized using another information processing apparatus existing in the image processing system 1. Further, in the present example, the reference image and the detection image are set from the video (video data) captured by the imaging devices 2a to 2f by the reference image setting unit 105 and the detection image setting unit 106. The method of setting the detection image is not limited to this. The reference image and the detection image should be set by an appropriate method according to the hardware configuration of the image processing system 1, the property of the sample to be monitored, and the like.

上記各機能部101〜113は、例えば1つ以上の集積回路により実現される。上記各機能部101〜113は、CPU11等のプロセッサにプログラムを実行させること、すなわちソフトウェアにより実現されてもよい。また、上記各機能部101〜113は、専用のIC(Integrated Circuit)等のプロセッサ、すなわちハードウェアにより実現されてもよい。また、上記各機能部101〜113は、ソフトウェア及びハードウェアを併用して実現されてもよい。複数のプロセッサを用いる場合、各プロセッサは、各機能部101〜113のうちの1つを実現してもよいし、各機能部101〜113のうちの2以上を実現してもよい。   Each of the functional units 101 to 113 is realized by, for example, one or more integrated circuits. Each of the functional units 101 to 113 may be realized by causing a processor such as the CPU 11 to execute a program, that is, software. Each of the functional units 101 to 113 may be realized by a processor such as a dedicated IC (Integrated Circuit), that is, hardware. Each of the functional units 101 to 113 may be realized by using software and hardware in combination. When a plurality of processors are used, each processor may realize one of the functional units 101 to 113 or may realize two or more of the functional units 101 to 113.

図4は、第1の実施形態に係る情報処理装置3による処理例を示すフローチャートである。ステップS101〜S108は、正否判定処理を実行する前に行われる設定処理である。先ず、領域設定部104は、検知領域を設定するための処理を行う(S101)。   FIG. 4 is a flowchart showing an example of processing by the information processing device 3 according to the first embodiment. Steps S <b> 101 to S <b> 108 are setting processes performed before the correctness determination process is performed. First, the area setting unit 104 performs processing for setting a detection area (S101).

図5は、第1の実施形態に係る設定画面151の領域設定時の状態の例を示す図である。本例の設定画面151には、第2の撮像装置2b(CAM2)により撮影された映像152が表示されており、当該映像152は第1の撮像装置2a(CAM1)により撮影された映像と切り換えることができるようになされている。また、設定画面151には、映像152が撮影された時刻を指定するためのインジケータ153が設けられている。ユーザがインジケータ153を操作して所望の時刻を指定することにより、当該時刻に対応する映像152が表示される。本例の映像152には、検知領域155と3つの検体161a〜161cとが表示されている。検知領域155は、ユーザの操作により任意に設定されるものであり、例えばマウス18等を用いて映像152上の任意の領域を指定する操作等を行うことにより設定される。本例の検知領域155は、3つの検体161a〜161cの画像が含まれるように設定されている。   FIG. 5 is a view showing an example of a state at the time of area setting of the setting screen 151 according to the first embodiment. On the setting screen 151 of this example, a video 152 captured by the second imaging device 2b (CAM 2) is displayed, and the video 152 is switched to the video captured by the first imaging device 2a (CAM 1). It is made to be able to. In addition, the setting screen 151 is provided with an indicator 153 for specifying the time when the image 152 was taken. When the user operates the indicator 153 to specify a desired time, an image 152 corresponding to the time is displayed. In the image 152 of this example, a detection area 155 and three specimens 161a to 161c are displayed. The detection area 155 is arbitrarily set by the user's operation, and is set, for example, by performing an operation of designating an arbitrary area on the image 152 using the mouse 18 or the like. The detection area 155 of this example is set to include the images of three specimens 161a to 161c.

その後、図4に示すように、基準画像設定部105は、基準画像を設定するための処理を行う(S102)。   Thereafter, as shown in FIG. 4, the reference image setting unit 105 performs processing for setting a reference image (S102).

図6は、第1の実施形態に係る設定画面151の基準画像設定時における状態の例を示す図である。本例の設定画面151には、基準画像表示部171、検知画像表示部172、ヒストグラム表示部173、及び閾値操作部174が含まれている。本例の基準画像表示部171には、検知領域155内の画像が表示されている。検知領域155内の画像は、過去又は現在の映像152から切り取られた画像である。ユーザが設定画面151内のOKボタン179を押す操作を行うことにより、基準画像表示部171に表示されている画像が基準画像175として記憶部102に記憶される。   FIG. 6 is a view showing an example of a state at the time of setting a reference image of the setting screen 151 according to the first embodiment. The setting screen 151 of this example includes a reference image display unit 171, a detection image display unit 172, a histogram display unit 173, and a threshold value operation unit 174. Images in the detection area 155 are displayed on the reference image display unit 171 of this example. The image in the detection area 155 is an image cut from the past or present image 152. When the user performs an operation of pressing the OK button 179 in the setting screen 151, the image displayed on the reference image display unit 171 is stored in the storage unit 102 as the reference image 175.

その後、図4に示すように、検知画像設定部106は、検知画像を設定するための処理を行う(S103)。   Thereafter, as shown in FIG. 4, the detection image setting unit 106 performs processing for setting a detection image (S103).

図7は、第1の実施形態に係る設定画面151の検知画像設定時における状態の例を示す図である。図7に示す検知領域155内の画像は、図6に示す検知領域155と同様に、過去又は現在の映像152から切り取られた画像である。図7に示す検知領域155内の画像は、図6に示す検知領域155内の画像とは異なっている。すなわち、図7に示す映像152が撮影された時刻は、図6に示す映像152が撮影された時刻とは異なっている。本例の検知画像表示部172には、図7に示す検知領域155内の画像が表示されている。ユーザが設定画面151内のOKボタン179を押す操作を行うことにより、検知画像表示部172に表示されている画像が検知画像176として記憶部102に記憶される。   FIG. 7 is a diagram showing an example of a state at the time of detection image setting of the setting screen 151 according to the first embodiment. The image in the detection area 155 shown in FIG. 7 is an image cut out from the past or present image 152, as in the detection area 155 shown in FIG. The image in the detection area 155 shown in FIG. 7 is different from the image in the detection area 155 shown in FIG. That is, the time when the video 152 shown in FIG. 7 was taken is different from the time when the video 152 shown in FIG. 6 was taken. The detected image display unit 172 of this example displays an image in the detection area 155 shown in FIG. 7. When the user performs an operation of pressing the OK button 179 in the setting screen 151, the image displayed on the detected image display unit 172 is stored in the storage unit 102 as a detected image 176.

その後、図4に示すように、ヒストグラム生成部107は、基準画像175に画素値のヒストグラムである基準ヒストグラムと、検知画像176の画素値のヒストグラムである検知ヒストグラムとを生成し(S104)、平準化部108は、基準ヒストグラムを平準化した平準化基準ヒストグラムと、検知ヒストグラムを平準化した平準化検知ヒストグラムとを生成する(S105)。   Thereafter, as shown in FIG. 4, the histogram generation unit 107 generates, in the reference image 175, a reference histogram which is a histogram of pixel values and a detection histogram which is a histogram of pixel values of the detected image 176 (S104). The conversion unit 108 generates a leveling reference histogram obtained by leveling the reference histogram and a leveling detection histogram obtained by leveling the detection histogram (S105).

図8は、第1の実施形態に係るヒストグラム生成部107及び平準化部108による具体的な処理例を示すフローチャートである。ここでは、HSVのH(色相)成分の値をヒストグラム化する例を示す。   FIG. 8 is a flowchart showing a specific processing example by the histogram generation unit 107 and the leveling unit 108 according to the first embodiment. Here, an example is shown in which the value of the H (hue) component of HSV is histogrammed.

ヒストグラム生成部107は、基準画像175の各画素のH成分の値から基準ヒストグラムを生成し、検知画像176の各画素のH成分の値から検知ヒストグラムを生成する(S151)。その後、平準化部108は、ヒストグラム生成部107により生成された両ヒストグラムをそれぞれベクトル化したヒストグラムベクトルHと平準化行列Sとを積算し、平準化ベクトルH’を算出する(S152)。すなわち、基準ヒストグラムに対応するヒストグラムベクトルHと平準化行列Sとを積算することにより基準ヒストグラムに対応する平準化ベクトルH’を生成し、検知ヒストグラムに対応するヒストグラムベクトルHと平準化行列Sとを積算することにより検知ヒストグラムに対応する平準化ベクトルH’を生成する。下記式(1)はヒストグラムベクトルHの一例であり、下記式(2)は平準化行列Sの一例であり、下記式(3)は平準化ベクトルH’の一例である。   The histogram generation unit 107 generates a reference histogram from the value of the H component of each pixel of the reference image 175, and generates a detection histogram from the value of the H component of each pixel of the detection image 176 (S151). After that, the leveling unit 108 integrates the histogram vector H obtained by vectorizing both histograms generated by the histogram generation unit 107 with the leveling matrix S to calculate a leveling vector H '(S152). That is, the leveling vector H corresponding to the reference histogram is generated by integrating the histogram vector H corresponding to the reference histogram and the leveling matrix S, and the histogram vector H corresponding to the detection histogram and the leveling matrix S are generated. The integration generates a leveling vector H ′ corresponding to the detected histogram. The following equation (1) is an example of the histogram vector H, the following equation (2) is an example of the leveling matrix S, and the following equation (3) is an example of the leveling vector H ′.

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

上記式(1)〜(3)の例は、ヒストグラムのビン数が5である場合の例であり、ヒストグラムベクトルH、平準化ベクトルH’、及び平準化行列Sのサイズはビン数に応じて変化する。例えば、ビン数が256である場合には、ヒストグラムベクトルH及び平準化ベクトルH’のサイズは256となり、平準化行列Sのサイズは256×256となる。   The examples of the above formulas (1) to (3) are examples in which the number of bins of the histogram is 5, and the sizes of the histogram vector H, the leveling vector H ′, and the leveling matrix S depend on the number of bins. Change. For example, when the number of bins is 256, the sizes of the histogram vector H and the leveling vector H ′ are 256, and the size of the leveling matrix S is 256 × 256.

その後、平準化部108は、平準化ベクトルH’に基づいて、平準化されたヒストグラムを生成する(S153)。すなわち、基準ヒストグラムに対応する平準化ベクトルH’に基づいて平準化基準ヒストグラムを生成し、検知ヒストグラムに対応する平準化ベクトルH’に基づいて平準化検知ヒストグラムを生成する。   Thereafter, the leveling unit 108 generates a leveled histogram based on the leveling vector H '(S153). That is, the leveling reference histogram is generated based on the leveling vector H 'corresponding to the reference histogram, and the leveling detection histogram is generated based on the leveling vector H' corresponding to the detection histogram.

図9は、第1の実施形態に係る平準化前のヒストグラム181の例を示す図である。図10は、第1の実施形態に係る平準化後のヒストグラム182の例を示す図である。平準化前のヒストグラム181(基準ヒストグラム又は検知ヒストグラム)は、式(1)のヒストグラムベクトルHに対応している。平準化後のヒストグラム182(平準化基準ヒストグラム又は平準化検知ヒストグラム)は、式(3)の平準化ベクトルH’に対応している。   FIG. 9 is a diagram showing an example of the histogram 181 before leveling according to the first embodiment. FIG. 10 is a diagram showing an example of the histogram 182 after leveling according to the first embodiment. The histogram 181 (reference histogram or detection histogram) before leveling corresponds to the histogram vector H of Equation (1). The histogram 182 (leveling reference histogram or leveling detection histogram) after leveling corresponds to the leveling vector H 'of equation (3).

図9に示す平準化前のヒストグラム181においては、第1ビンの頻度値が0、第2ビンの頻度値が2、第3ビンの頻度値が3、そして第4ビンの頻度値が0となっている。図10に示す平準化後のヒストグラム182においては、第1ビンの頻度値が2/3、第2ビンの頻度値が5/3、第3ビンの頻度値が5/3、そして第4ビンの頻度値が1となっている。すなわち、平準化処理により、平準化前の第2ビンの頻度値2及び第3ビンの頻度値3が、これらのビンの近傍に位置する第1ビン及び第4ビンに分配されている。   In the histogram 181 before leveling shown in FIG. 9, the frequency value of the first bin is 0, the frequency value of the second bin is 2, the frequency value of the third bin is 3 and the frequency value of the 4th bin is 0 It has become. In the histogram 182 after leveling shown in FIG. 10, the first bin frequency value is 2/3, the second bin frequency value is 5/3, the third bin frequency value is 5/3, and the fourth bin The frequency value of is 1. That is, by the leveling process, the frequency value 2 of the second bin and the frequency value 3 of the third bin before leveling are distributed to the first bin and the fourth bin located in the vicinity of these bins.

なお、平準化処理による頻度値の分配の仕方は上記に限られるものではなく、ヒストグラムのビン数、対象とする画素値の特性等に応じて適宜調整されるべきものである。頻度値の分配の仕方は、平準化行列Sの構成を変化させることにより調整することができる。平準化行列Sの構成を変化させることにより、例えば頻度値の他のビンへの分散幅等を変化させることができる。平準化行列Sは、例えば予め記憶部102に記憶されていてもよいし、ユーザにより設定されてもよいし、プログラムにより自動的且つ動的に生成されてもよい。   Note that the method of distributing the frequency value by the leveling process is not limited to the above, and should be appropriately adjusted according to the number of bins of the histogram, the characteristics of the target pixel value, and the like. The way of distributing frequency values can be adjusted by changing the configuration of the leveling matrix S. By changing the configuration of the leveling matrix S, for example, the dispersion width of frequency values to other bins can be changed. The leveling matrix S may be stored in advance in, for example, the storage unit 102, may be set by the user, or may be automatically and dynamically generated by a program.

その後、図4に示すように、比較部109は、平準化された両ヒストグラム(平準化基準ヒストグラム及び平準化検知ヒストグラム)を比較して検知率を算出する(S106)。   Thereafter, as shown in FIG. 4, the comparison unit 109 compares the leveled histograms (leveling reference histogram and leveling detection histogram) to calculate a detection rate (S106).

平準化基準ヒストグラムと平準化検知ヒストグラムとを比較する方法(検知率、一致率等を算出する方法)は特に限定されるべきものではなく、公知又は新規な方法を適宜利用することができる。例えば、相関、カイ2乗、交差、Bhattacharyya距離等を利用した演算法が知られている(参考:http://opencv.jp/opencv-2svn/cpp/histograms.html)。下記式(4),(5)は相関による計算式であり、下記式(6)はカイ2乗による計算式であり、下記式(7)は交差による計算式であり、下記(8)はBhattacharyya距離による計算式である。下記式中、H1は一方のヒストグラム(例えば平準化基準ヒストグラム201)、H2は他方のヒストグラム(例えば平準化検知ヒストグラム202)、Nはビン数を表す。   The method for comparing the leveling reference histogram and the leveling detection histogram (the method for calculating the detection rate, the matching rate, and the like) is not particularly limited, and any known or novel method can be used as appropriate. For example, arithmetic methods using correlation, chi-square, intersection, Bhattacharyya distance, etc. are known (Reference: http://opencv.jp/opencv-2svn/cpp/histograms.html). The following formulas (4) and (5) are calculation formulas by correlation, the following formula (6) is a calculation formula by chi-square, the following formula (7) is a calculation formula by intersection, and the following (8) is It is a formula by Bhattacharyya distance. In the following formula, H1 represents one histogram (for example, leveling reference histogram 201), H2 represents the other histogram (for example, leveling detection histogram 202), and N represents the number of bins.

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

その後、表示制御部112は、表示装置115に基準画像175、検知画像176、検知率、正否判定結果、平準化前後のヒストグラム等を表示する(S107)。閾値設定部111は、ユーザによる入力部103への操作に応じて、正否判定の基準となる検知率の閾値を設定するための処理を行う(S108)。このとき、基準画像175又は検知画像176が変更されれば、表示される検知率、正否判定結果、平準化前後のヒストグラム等も変化する。これにより、ユーザは、表示装置115に表示される基準画像175、検知画像176、検知率、正否判定結果、平準化前後のヒストグラム等を参照しながら、検知率の閾値を適切に設定することが可能となる。一致率等の他の比較情報の閾値についても同様である。   Thereafter, the display control unit 112 displays the reference image 175, the detection image 176, the detection rate, the correctness determination result, the histogram before and after leveling, and the like on the display device 115 (S107). The threshold setting unit 111 performs processing for setting a threshold of a detection rate serving as a reference of the determination of correctness in accordance with an operation on the input unit 103 by the user (S108). At this time, if the reference image 175 or the detection image 176 is changed, the detection rate to be displayed, the result of the correctness determination, the histogram before and after the leveling, etc. are also changed. Thus, the user can appropriately set the detection rate threshold while referring to the reference image 175, the detection image 176, the detection rate, the correctness determination result, the histogram before and after equalization, etc. displayed on the display device 115. It becomes possible. The same applies to the threshold of other comparison information such as the matching rate.

図11は、第1の実施形態に係る設定画面151の閾値設定時における第1の状態の例を示す図である。本例においては、基準画像175及び検知画像176の両方に3つの検体161a〜161cが含まれているが、基準画像175に含まれる検体161a〜161cの配置と検知画像176に含まれる3つの検体161a〜161cの配置とが異なっている。   FIG. 11 is a diagram showing an example of a first state at the time of setting a threshold of the setting screen 151 according to the first embodiment. In this example, although both the reference image 175 and the detection image 176 include the three samples 161a to 161c, the arrangement of the samples 161a to 161c included in the reference image 175 and the three samples included in the detection image 176 It differs from the arrangement of 161a to 161c.

ヒストグラム表示部173には、基準画像175に対応する平準化基準ヒストグラム201と検知画像176に対応する平準化検知ヒストグラム202とが表示されている。両平準化ヒストグラム201,202には、第1の検体161aの色相に対応するピーク201a,202a、第2の検体161bの色相に対応するピーク201b,202b、及び第3の検体161cの色相に対応するピーク201c,202cが含まれている。各ピーク201a,201b,201b,202b,201c,202cについて両平準化ヒストグラム201,202間でいくらかの相違が見られるが、これは各検体161a〜161cの配置によるものであり、検体161a〜161cの不在によるものではない。   On the histogram display unit 173, a leveling reference histogram 201 corresponding to the reference image 175 and a leveling detection histogram 202 corresponding to the detected image 176 are displayed. The leveling histograms 201 and 202 correspond to the peaks 201a and 202a corresponding to the hue of the first sample 161a, the peaks 201b and 202b corresponding to the hue of the second sample 161b, and the hue of the third sample 161c. Peaks 201c and 202c are included. Although there is some difference between the two leveled histograms 201 and 202 for each of the peaks 201a, 201b, 201b, 202b, 201c and 202c, this is due to the arrangement of each of the samples 161a to 161c. Not by absence.

上記のように、本実施形態においては、基準ヒストグラムと検知ヒストグラムとを比較するのではなく、平準化基準ヒストグラム201と平準化検知ヒストグラム202とを比較することにより、上記のような検体161a〜161cの配置の違いによる影響等を軽減することができる。また、環境光の変化による微妙な色相の変化等の影響も軽減することができる。これにより、検体161a〜161cの異常以外の要因による影響を軽減して適切に正否判定を行うことが可能となる。   As described above, in the present embodiment, the above-described specimens 161a to 161c are compared by comparing the leveling reference histogram 201 and the leveling detection histogram 202 instead of comparing the reference histogram and the detection histogram. It is possible to reduce the effects of differences in the placement of In addition, the influence of subtle changes in hue due to changes in ambient light can also be reduced. Thereby, it becomes possible to reduce the influence of factors other than the abnormality of the specimens 161a to 161c and to perform the correctness determination appropriately.

図11に示す例においては、閾値操作部174に示されているように、検知率の閾値が2%に設定されている(検知率が2%以上のときに異常(変化あり)と判定される。)。この閾値は、ユーザが閾値操作部174を操作することにより任意に変更することができる。設定画面151には、正否判定の結果を示す検知率表示部191が含まれている。本例における検知率は3%であり、閾値の2%を超えているため、ここでは「変化あり」と判定されている。   In the example shown in FIG. 11, as shown in the threshold value operation unit 174, the threshold of the detection rate is set to 2% (when the detection rate is 2% or more, it is determined to be abnormal (with change)). ). The threshold can be arbitrarily changed by the user operating the threshold operation unit 174. The setting screen 151 includes a detection rate display unit 191 that indicates the result of the correctness determination. Since the detection rate in the present example is 3% and exceeds 2% of the threshold value, it is determined here that “changed”.

図12は、第1の実施形態に係る設定画面151の閾値設定時における第2の状態の例を示す図である。本例においては、基準画像175に3つの検体161a〜161cが含まれ、検知画像176に2つの検体161a,161cが含まれている。すなわち、本例の検知画像176には検体161bが含まれていない。これに伴い、本例の平準化検知ヒストグラム202には、検体161aに対応するピーク202a及び検体161cに対応するピーク202cは含まれているが、検体161bに対応するピーク202bは含まれていない。そのため、本例における検知率は40%という比較的高い値となっており、正否判定は「変化あり」となっている。   FIG. 12 is a diagram showing an example of the second state at the time of setting the threshold of the setting screen 151 according to the first embodiment. In the present example, the reference image 175 includes three specimens 161a to 161c, and the detection image 176 includes two specimens 161a and 161c. That is, the detected image 176 in this example does not include the sample 161 b. Accordingly, the leveling detection histogram 202 of this example includes the peak 202a corresponding to the sample 161a and the peak 202c corresponding to the sample 161c, but does not include the peak 202b corresponding to the sample 161b. Therefore, the detection rate in the present example is a relatively high value of 40%, and the correct / incorrect determination is “changed”.

図11に示す第1の例の検知画像176には、基準画像175と同様に3つの検体161a〜161c全てが含まれているが、図12に示す第2の例の検知画像176には2つの検体161a,161cしか含まれていない。このような場合、第1の例の検知画像176を正常(変化なし)と判定し、第2の例の検知画像176を異常(変化あり)と判定することが適当な場合がある。そこで、閾値操作部174を操作して検知率の閾値を3%〜40%の範囲内に設定することにより、図11に示す第1の例の検知画像176のような状態(全ての検体161a〜161cが写っている状態)を正常(変化なし)と判定し、図12に示す第2の例の検知画像176のような状態(複数の検体161a〜161cのうちの1つ以上が写っていない状態)を異常(変化あり)と判定することが可能となる。   Although the detection image 176 of the first example shown in FIG. 11 includes all three specimens 161a to 161c similarly to the reference image 175, the detection image 176 of the second example shown in FIG. Only one sample 161a, 161c is included. In such a case, it may be appropriate to determine the detected image 176 of the first example as normal (no change) and to determine the detected image 176 of the second example as abnormal (with change). Therefore, by operating the threshold value operation unit 174 and setting the threshold of the detection rate within the range of 3% to 40%, a state (all the specimens 161a like the detection image 176 of the first example shown in FIG. 11) It is determined that ~ 161c is in a normal state (no change), and a state (one or more of a plurality of specimens 161a to 161c is shown as a detected image 176 of the second example shown in FIG. 12). It is possible to determine that there is no condition as abnormal (with change).

図13は、第1の実施形態に係る正否判定の結果例を示す図である。上記のように検知率の閾値を3%〜40%に設定することにより、右側上部の第1の例の検知画像176についての判定結果は「変化なし」となり、右側下部の第2の例の検知画像176についての判定結果は「変化あり」となる。なお、閾値の設定の仕方は上記に限られるものではなく、検体の性質、要求される判定精度等に応じて適宜選択されるべきものである。   FIG. 13 is a diagram illustrating an example of the result of the correctness determination according to the first embodiment. By setting the detection rate threshold to 3% to 40% as described above, the determination result for the detection image 176 of the first example on the upper right is “no change”, and the second lower example on the right is The determination result of the detected image 176 is “changed”. The method of setting the threshold is not limited to the above, and should be appropriately selected according to the nature of the sample, the required determination accuracy, and the like.

図14は、第1の実施形態に係る設定画面151の閾値設定時における第3の状態の例を示す図である。本例に係る設定画面151は、検知率チャート表示部177を含んでいる。検知率チャート表示部177には、リアルタイムに変化する映像152に設定された検知領域155内の画像(検知画像176)についての検知率の変化を示すチャートが表示されている。本例では、検知率の閾値が20%に設定され、リアルタイムに変化する検知率が閾値より大きくなった時点(変化なしから変化ありに転換した時点)と、検知率が閾値より小さくなった時点(変化ありから変化なしに転換した時点)とが示されている。ユーザはこのようなチャートと検知領域155内の画像とを参照しながら、検知率の閾値を設定してもよい。   FIG. 14 is a diagram illustrating an example of a third state at the time of setting the threshold of the setting screen 151 according to the first embodiment. The setting screen 151 according to the present example includes a detection rate chart display unit 177. The detection rate chart display unit 177 displays a chart showing a change in detection rate for an image (detection image 176) in the detection area 155 set to the image 152 changing in real time. In this example, the threshold of the detection rate is set to 20%, and the time when the detection rate changing in real time becomes larger than the threshold (the time when the change is made from no change to change) and the time when the detection rate becomes smaller than the threshold (The point of change from change to no change) is shown. The user may set the detection rate threshold while referring to such a chart and the image in the detection area 155.

図15は、第1の実施形態における設定画面151の設定完了時の状態の例を示す図である。設定完了時の設定画面151には、設定内容表示部166が含まれている。設定内容表示部166には、上記のように行った設定の内容を示す情報が表示され、本例では基準画像175及び検知画像176のカラー成分、検知率の閾値等の情報が表示されている。本例のカラー成分は「色合い」となっているが、これは比較の対象となる画像(基準画像175及び検知画像176)がカラー画像であり、カラー画像を構成する各ピクセルの色相を比較して正否判定を行うことを示している。   FIG. 15 is a diagram showing an example of a state when setting of the setting screen 151 is completed in the first embodiment. A setting content display unit 166 is included in the setting screen 151 when setting is completed. The setting content display section 166 displays information indicating the contents of the setting performed as described above, and in this example, information such as color components of the reference image 175 and the detection image 176 and a threshold of the detection rate is displayed. . The color components in this example are "color shades". The images to be compared (the reference image 175 and the detection image 176) are color images, and the hue of each pixel constituting the color image is compared. It indicates that the correctness determination is performed.

カラー成分は、「色合い」の他に「グレースケール」、「白黒2値」等が選択可能であってもよい。「グレースケール」が選択された場合、比較の対象となる画像はグレースケール画像となり、平準化基準ヒストグラム(基準ヒストグラム)及び平準化検知ヒストグラム(検知ヒストグラム)は、グレースケールの階調を示す画素値(明度値、濃度値等)を用いて生成される。これにより、グレースケール画像を比較する場合であっても上記と同様に処理することができる。   As the color component, in addition to the “color tone”, “gray scale”, “black and white binary” and the like may be selectable. When “gray scale” is selected, the image to be compared is a gray scale image, and the leveling reference histogram (reference histogram) and the leveling detection histogram (detection histogram) are pixel values indicating gray scale gradation. It is generated using (brightness value, density value, etc.). Thereby, even in the case of comparing gray scale images, processing can be performed in the same manner as described above.

上記のような設定処理(検知領域155、基準画像175、検知率の閾値等の設定)が完了した後、判定部110は、実際の正否判定処理を開始する(S109)。なお、実際の正否判定処理の実行中に上記設定処理を行えるようにしてもよい。   After the setting process (setting of the detection area 155, the reference image 175, the threshold of the detection rate, etc.) as described above is completed, the determination unit 110 starts the actual correctness determination process (S109). The setting process may be performed while the actual correctness determination process is being performed.

本実施形態によれば、平準化基準ヒストグラム201と平準化検知ヒストグラム202とを比較することにより、検体161a〜161cの異常以外の要因による影響を軽減して適切に正否判定を行うことが可能となる。また、基準画像175、検知画像176、平準化されたヒストグラム201,202、正否判定結果等を確認しながら検知率の閾値を設定することができるので、適切な正否判定が行われるように閾値を設定することが可能となる。これにより、正否判定の実用性を向上させることが可能となる。   According to the present embodiment, by comparing the leveling reference histogram 201 and the leveling detection histogram 202, it is possible to reduce the influence of factors other than the abnormality of the specimens 161a to 161c and to perform the correctness determination appropriately. Become. In addition, since the threshold of detection rate can be set while confirming the reference image 175, the detection image 176, the leveled histograms 201 and 202, and the correctness determination result, etc., the threshold is set so that appropriate correctness determination can be performed. It becomes possible to set. This makes it possible to improve the practicability of the correctness determination.

以下に他の実施形態について図を参照して説明するが、第1の実施形態と同一又は同様の作用効果を奏する箇所については同一の符号を付してその説明を省略する場合がある。   Other embodiments will be described below with reference to the drawings, but portions having the same or similar effects as those of the first embodiment may be denoted by the same reference numerals and description thereof may be omitted.

(第2の実施形態)
第2の実施形態に係る画像処理システム1(情報処理装置3)は、グレースケール画像を比較対象とする場合に適した構成を含んでいる。図16は、第2の実施形態に係る設定画面221の閾値設定時における第1の状態の例を示す図である。図17は、第2の実施形態に係る設定画面221の閾値設定時における第2の状態の例を示す図である。
Second Embodiment
The image processing system 1 (information processing apparatus 3) according to the second embodiment includes a configuration suitable for the case where a grayscale image is to be compared. FIG. 16 is a diagram showing an example of the first state at the time of setting the threshold of the setting screen 221 according to the second embodiment. FIG. 17 is a diagram showing an example of the second state at the time of setting the threshold of the setting screen 221 according to the second embodiment.

本実施形態に係る設定画面221には、差異画像表示部225が含まれている。差異画像表示部225には、基準画像175と検知画像176とを重ね合わせた差異画像226(第2の画像)が表示されている。   The setting screen 221 according to the present embodiment includes a difference image display unit 225. The difference image display unit 225 displays a difference image 226 (second image) in which the reference image 175 and the detection image 176 are superimposed.

本実施形態に係るヒストグラム生成部107は、基準画像175のヒストグラムである基準ヒストグラムと、差異画像226のヒストグラムである差異ヒストグラムとを生成する。このとき、両ヒストグラムの生成に用いられる画素値は、グレースケールの階調を示す明度値等である。本実施形態に係る平準化部108は、基準ヒストグラムを平準化した平準化基準ヒストグラムと、差異ヒストグラムを平準化した平準化差異ヒストグラムとを生成する。本実施形態に係る比較部109は、平準化基準ヒストグラムと平準化差異ヒストグラムとを比較することにより検知率を算出する。   The histogram generation unit 107 according to the present embodiment generates a reference histogram that is a histogram of the reference image 175 and a difference histogram that is a histogram of the difference image 226. At this time, the pixel value used to generate both histograms is a lightness value or the like indicating gray scale gradation. The leveling unit 108 according to the present embodiment generates a leveling reference histogram obtained by leveling the reference histogram and a leveling difference histogram obtained by leveling the difference histogram. The comparison unit 109 according to the present embodiment calculates the detection rate by comparing the leveling reference histogram and the leveling difference histogram.

図16に示すように、本実施形態に係るヒストグラム表示部173には、平準化基準ヒストグラム231と平準化差異ヒストグラム232とが表示されている。本実施形態に係る検知率表示部191には、平準化基準ヒストグラム231と平準化差異ヒストグラム232との比較結果を示す検知率が表示されている。   As shown in FIG. 16, the leveling reference histogram 231 and the leveling difference histogram 232 are displayed in the histogram display unit 173 according to the present embodiment. A detection rate indicating the comparison result of the leveling reference histogram 231 and the leveling difference histogram 232 is displayed in the detection rate display unit 191 according to the present embodiment.

このように、本実施形態においては、比較対象となる画像がグレースケール画像である場合には、基準画像175(平準化基準ヒストグラム)と検知画像176(平準化検知ヒストグラム)とを比較するのではなく、基準画像175(平準化基準ヒストグラム)と差異画像226(平準化差異ヒストグラム)とを比較する。これにより、色相による差別化が困難なグレースケール画像を扱う場合であっても、的確に正否判定を行うことが可能となる。   As described above, in the present embodiment, when the image to be compared is a grayscale image, the reference image 175 (leveling reference histogram) and the detection image 176 (leveling detection histogram) are compared. Instead, the reference image 175 (leveling reference histogram) and the difference image 226 (leveling difference histogram) are compared. As a result, even in the case of handling a grayscale image that is difficult to differentiate by hue, it is possible to accurately determine whether the image is correct or not.

(第3の実施形態)
図18は、第3の実施形態に係る情報処理装置251の機能構成例を示すブロック図である。本実施形態に係る情報処理装置251は、第1の実施形態に係る情報処理装置3の機能部101〜113に加え、再計算部261(除外部)及び原点移動部262を備えている。
Third Embodiment
FIG. 18 is a block diagram showing an example of the functional configuration of the information processing apparatus 251 according to the third embodiment. An information processing apparatus 251 according to the present embodiment includes a recalculation unit 261 (excluded unit) and an origin moving unit 262 in addition to the functional units 101 to 113 of the information processing apparatus 3 according to the first embodiment.

再計算部261は、所定の値を有する画素値をヒストグラムの対象から除外するように、基準画像175及び検知画像176の画素値を再計算する。例えば、画素値がHSVである場合、S成分の値が所定の下限値以下である(彩度が下限値以下である)か、V成分の値が所定の下限値以下である(明度が下限値以下である)か、又はV成分の値が所定の上限値以上である(明度が上限値以上である)画素値を無効とする。   The recalculation unit 261 recalculates the pixel values of the reference image 175 and the detection image 176 so as to exclude pixel values having predetermined values from the targets of the histogram. For example, when the pixel value is HSV, the value of the S component is less than or equal to a predetermined lower limit (the saturation is less than or equal to the lower limit), or the value of the V component is less than or equal to the predetermined lower limit A pixel value which is equal to or less than the value or whose V component value is equal to or more than a predetermined upper limit (brightness is equal to or more than the upper limit) is invalidated.

原点移動部262は、平準化基準ヒストグラム及び平準化検知ヒストグラムにおけるピークが各ヒストグラム内に設定された端部領域内に位置しないように、平準化基準ヒストグラム及び平準化検知ヒストグラムの各原点を移動させる。端部領域とは、ヒストグラムの横軸における原点付近の領域と終点付近の領域とからなる領域である。端部領域の設定の仕方は特に限定されるべきものではなく、使用状況に応じて適宜選択されるべきものである。例えば、256ビンのヒストグラムにおいて、第1ビン〜第10ビンの領域及び第247ビン〜第256ビンの領域を端部領域としてもよい。   The origin moving unit 262 moves each origin of the leveling reference histogram and the leveling detection histogram so that the peaks in the leveling reference histogram and the leveling detection histogram are not located within the end region set in each histogram. . The end area is an area including an area near the origin and an area near the end on the horizontal axis of the histogram. The method of setting the end region is not particularly limited, and should be appropriately selected in accordance with the use situation. For example, in a histogram of 256 bins, an area of bins 1 to 10 and an area of bins 247 to 256 may be set as end areas.

例えば、ヒストグラムの対象として色空間を示す画素値を利用する場合、ピークが端部領域内に位置すると、比較のための要素が原点付近と終点付近とに集中してしまい、正否判定に不具合が生じる場合がある。そこで、ピークが端部領域内に位置する場合には、ピークがヒストグラムの中央部(例えば第128ビン)付近に位置するようにヒストグラムの原点を移動させる。   For example, when a pixel value indicating a color space is used as a target of a histogram, if a peak is located in an end area, elements for comparison are concentrated near the origin and near the end point, and defects in correctness determination It may occur. Therefore, when the peak is located in the end area, the origin of the histogram is moved so that the peak is located near the center (for example, the 128th bin) of the histogram.

図19は、第3の実施形態に係る情報処理装置251による処理例を示すフローチャートである。図19に示す本実施形態に係るフローチャートと図4に示す第1の実施形態に係るフローチャートとの相違点は、主に本実施形態に係るフローチャートが再計算部261に係るステップS201と原点移動部262に係るステップS202とを含んでいる点にある。   FIG. 19 is a flowchart illustrating an example of processing performed by the information processing apparatus 251 according to the third embodiment. The difference between the flowchart according to the present embodiment shown in FIG. 19 and the flowchart according to the first embodiment shown in FIG. 4 mainly relates to the flowchart according to the present embodiment, step S201 according to the recalculation unit 261 and the origin moving unit And step S202 pertaining to 262.

ステップS101〜S103により基準画像175及び検知画像176の設定が完了した後、再計算部261は、所定の値を有する画素値をヒストグラムの対象から除外するように、基準画像175及び検知画像176のH成分を再計算する(S201)。その後、再計算された画素値(H成分)を用いて基準ヒストグラム及び検知ヒストグラムが生成され(S104)、当該基準ヒストグラム及び検知ヒストグラムから平準化基準ヒストグラム及び平準化検知ヒストグラムが生成される(S105)。   After the setting of the reference image 175 and the detection image 176 is completed in steps S101 to S103, the recalculation unit 261 removes the reference image 175 and the detection image 176 so that pixel values having predetermined values are excluded from the target of the histogram. The H component is recalculated (S201). Thereafter, a reference histogram and a detection histogram are generated using the recalculated pixel value (H component) (S104), and a leveling reference histogram and a leveling detection histogram are generated from the reference histogram and the detection histogram (S105) .

その後、原点移動部262は、上記のように再計算された画素値から生成された平準化基準ヒストグラム及び平準化検知ヒストグラムのそれぞれについて、ピークが端部領域内に位置しないように原点位置を調整する(S202)。比較部109は、上記のように生成された平準化基準ヒストグラムと平準化検知ヒストグラムとを比較して検知率を算出する(S106)。   Thereafter, the origin moving unit 262 adjusts the origin position so that the peak is not located within the end region for each of the leveling reference histogram and the leveling detection histogram generated from the pixel values recalculated as described above (S202). The comparison unit 109 compares the leveling reference histogram generated as described above with the leveling detection histogram to calculate the detection rate (S106).

図20は、第3の実施形態に係る再計算部261による具体的な処理例を示すフローチャートである。再計算部261は、基準画像と検知画像の各ピクセルについてのHSV成分を取得すると(S251)、未処理の(再計算処理が未だ行われていない)ピクセルがあるか否かを判定する(S252)。   FIG. 20 is a flowchart illustrating a specific processing example of the recalculation unit 261 according to the third embodiment. When the recalculation unit 261 obtains the HSV component for each pixel of the reference image and the detection image (S251), the recalculation unit 261 determines whether there is an unprocessed (recalculation process has not been performed) pixel (S252). ).

未処理のピクセルがある場合(S252:Yes)、再計算部261は、あるピクセルのHSV成分についてS0≦S且つV0≦V≦V1が成り立つか否かを判定する(S253)。SはS成分の値、S0はS成分の下限値、VはV成分の値、V0はV成分の下限値、そしてV1はV成分の上限値を示す。   If there is an unprocessed pixel (S252: Yes), the recalculation unit 261 determines whether S0 ≦ S and V0 ≦ V ≦ V1 hold for the HSV component of a certain pixel (S253). S indicates the value of the S component, S0 indicates the lower limit value of the S component, V indicates the value of the V component, V0 indicates the lower limit value of the V component, and V1 indicates the upper limit value of the V component.

S0≦S且つV0≦V≦V1が成り立つ場合(S253:Yes)、再計算部261は、当該ピクセルを有効なピクセルとして設定し(S254)、再度ステップS252を実行する。このとき、再計算部261は、有効なピクセルの画素値を変化させなくてもよい。一方、S0≦S且つV0≦V≦V1が成り立たない場合(S253:No)、再計算部261は、当該ピクセルを無効なピクセルとして設定し(S255)、再度ステップS252を実行する。上記処理を繰り返し、未処理のピクセルがなくなった場合(S252:No)、再計算部261は、無効なピクセルを画像(映像152、基準画像175、検知画像176等)に反映させる(S256)。   If S0 ≦ S and V0 ≦ V ≦ V1 hold (S253: Yes), the recalculation unit 261 sets the pixel as a valid pixel (S254), and executes step S252 again. At this time, the recalculation unit 261 may not change the pixel value of the valid pixel. On the other hand, when S0 ≦ S and V0 ≦ V ≦ V1 do not hold (S253: No), the recalculation unit 261 sets the pixel as an invalid pixel (S255), and executes step S252 again. The above process is repeated, and when there is no unprocessed pixel (S252: No), the recalculation unit 261 reflects the invalid pixel on the image (image 152, reference image 175, detected image 176, etc.) (S256).

図21は、第3の実施形態に係るS成分の下限値S0の例を示す図である。図22は、第3の実施形態に係るV成分の下限値V0及び上限値V1の例を示す図である。図21及び図22において、HSV色空間を示す色空間テーブル271が例示されている。彩度(S)が下限値S0より低くなると画像全体が略黒色となる。また、明度(V)が下限値V0より低くなると画面全体が略黒色となり、明度(V)が上限値V1より高くなると画面全体が略白色となる。従って、S0≦S且つV0≦V≦V1が成り立たないピクセルを無効とすることができる。   FIG. 21 is a diagram showing an example of the lower limit value S0 of the S component according to the third embodiment. FIG. 22 is a diagram showing an example of the lower limit value V0 and the upper limit value V1 of the V component according to the third embodiment. In FIG. 21 and FIG. 22, a color space table 271 showing the HSV color space is illustrated. When the saturation (S) becomes lower than the lower limit value S0, the entire image becomes substantially black. Further, when the lightness (V) becomes lower than the lower limit value V0, the whole screen becomes substantially black, and when the lightness (V) becomes higher than the upper limit value V1, the whole screen becomes substantially white. Therefore, pixels in which S0 ≦ S and V0 ≦ V ≦ V1 do not hold can be invalidated.

図23は、第3の実施形態においてピクセルを無効にする状態の例を示す図である。本例では、S0=10、V0=30、及びV1=100に設定されている。すなわち、彩度(S)の有効範囲は10以上であり、明度の有効範囲は30以上100以下となっている。図23に示す例では、3×3のピクセルのうち、上記有効範囲外のS成分又はV成分を有するピクセルは無効となっている。有効なピクセル(右側の図においてバツ印が付されていないピクセル)のH成分のみを用いてヒストグラムが生成される。   FIG. 23 is a diagram showing an example of the state in which the pixel is invalidated in the third embodiment. In this example, S0 = 10, V0 = 30, and V1 = 100 are set. That is, the effective range of the saturation (S) is 10 or more, and the effective range of the lightness is 30 or more and 100 or less. In the example shown in FIG. 23, among the 3 × 3 pixels, pixels having S component or V component outside the effective range are invalid. A histogram is generated using only the H component of valid pixels (pixels not marked in the right figure).

図24は、第3の実施形態に係る設定画面281の基準画像設定時における状態の例を示す図である。本例に係る設定画面281には、変更後画像表示部285が含まれている。変更後画像表示部285には、基準画像175に対して上記無効化処理の結果を反映した変更後画像286が表示されている。変更後画像286においては、検体161a〜161c以外の背景部分のピクセルが無効化され、黒色になっている。ユーザがOKボタン179を押す操作を行うことにより、変更後画像表示部285に表示されている変更後画像286が基準画像として記憶される。なお、ここでは基準画像について説明したが、検知画像についても同様である。   FIG. 24 is a view showing an example of a state at the time of setting a reference image of the setting screen 281 according to the third embodiment. The setting screen 281 according to this example includes an after-image display unit 285. The after-modification image display unit 285 displays an after-modification image 286 in which the result of the invalidation processing is reflected on the reference image 175. In the post-change image 286, pixels of background portions other than the specimens 161a to 161c are invalidated and turned black. When the user performs an operation of pressing the OK button 179, the after-change image 286 displayed on the after-change image display unit 285 is stored as a reference image. In addition, although the reference | standard image was demonstrated here, the same may be said of a detection image.

図25は、第3の実施形態に係る設定画面281の判定処理時における状態の例を示す図である。本例に係る設定画面281の基準画像表示部171には、無効化処理による変更後の基準画像288が表示され、検知画像表示部172には、無効化処理による変更後の検知画像289が表示されている。本例の検知画像289には検体161a〜161cが含まれていない。これらの基準画像288及び検知画像289の検体161a〜161c以外の背景部分は、上記無効化処理により黒色になっている。   FIG. 25 is a diagram illustrating an example of a state at the time of determination processing of the setting screen 281 according to the third embodiment. The reference image 288 after the change by the invalidation process is displayed on the reference image display unit 171 of the setting screen 281 according to the present example, and the detected image 289 after the change by the invalidation process is displayed on the detection image display unit 172. It is done. The detection image 289 of this example does not include the specimens 161a to 161c. The background portions of the reference image 288 and the detected image 289 other than the specimens 161a to 161c are blackened by the invalidation process.

図26は、第3の実施形態に係る原点移動部262による具体的な処理例を示すフローチャートである。平準化部108が平準化されたヒストグラムh(i)を生成すると(S281)、原点移動部262はi=0に設定する(S282)。iはヒストグラムのビンを表し、例えばi=0〜255である。h(i)は、各ビンに対応する頻度値を表す。その後、原点移動部262は、i≦256が成立するか否かを判定する(S283)。   FIG. 26 is a flowchart showing a specific processing example of the origin moving unit 262 according to the third embodiment. When the leveling unit 108 generates the leveled histogram h (i) (S281), the origin moving unit 262 sets i = 0 (S282). i represents a bin of a histogram, for example, i = 0-255. h (i) represents the frequency value corresponding to each bin. Thereafter, the origin moving unit 262 determines whether i ≦ 256 holds (S283).

i≦256が成立する場合(S283:Yes)、原点移動部262は、h(i−1)<h(i)且つh(i)≧h(i+1)が成立するか否かを判定する(S284)。但し、h(−1)=h(255)及びh(256)=h(0)である。h(i−1)<h(i)且つh(i)≧h(i+1)が成立する場合(S284:Yes)、原点移動部262は、頂点位置の候補にiを追加する(S285)。すなわち、隣接する3つのビンにおいて、真中のビンh(i)が直前のビンh(i−1)より大きく且つ直後のビンh(i+1)以上である場合には、iはピーク位置に相当するビンである可能性があると判断される。その後、原点移動部262は、iに1を追加し(S286)、再びステップS283を実行する。一方、h(i−1)<h(i)且つh(i)≧h(i+1)が成立しない場合(S284:No)、ステップS285が実行されることなく、ステップS286が実行される。   If i ≦ 256 holds (S 283: Yes), the origin moving unit 262 determines whether h (i−1) <h (i) and h (i) ≧ h (i + 1) holds (S 283: Yes) S284). However, h (-1) = h (255) and h (256) = h (0). If h (i-1) <h (i) and h (i) ≧ h (i + 1) are satisfied (S284: Yes), the origin moving unit 262 adds i to the candidate of the vertex position (S285). That is, in three adjacent bins, i corresponds to the peak position if the middle bin h (i) is greater than the immediately preceding bin h (i-1) and is greater than or equal to the immediately following bin h (i + 1) It is determined that it may be a bin. Thereafter, the origin moving unit 262 adds 1 to i (S286), and executes step S283 again. On the other hand, when h (i-1) <h (i) and h (i) ≧ h (i + 1) do not hold (S284: No), step S286 is executed without executing step S285.

上記処理を繰り返し、i≦256が成立しなくなった場合(S283:No)、原点移動部262は、頂点位置の候補となった1つ以上のiの平均値を計算し(S287)、平均値が示す頂点位置がヒストグラムの端部領域内に位置するか否かを判定する(S288)。頂点位置が端部領域内に位置する場合(S288:Yes)、原点移動部262は、頂点位置がヒストグラムの中央部に位置するように、原点位置を移動させる(S289)。例えば、256ビンのヒストグラムにおいて原点を128ビン分移動させることにより、ピークをヒストグラムの略中央に配置することができる。頂点位置が端部領域内に位置しない場合(S288:No)、原点移動部262は、原点位置を移動させることなく当該ルーチンを終了する。   The above processing is repeated, and when i ≦ 256 does not hold (S283: No), the origin moving unit 262 calculates the average value of one or more i that have become candidates for vertex positions (S287), and the average value It is determined whether the vertex position indicated by is located within the end region of the histogram (S288). If the vertex position is located within the end region (S288: Yes), the origin moving unit 262 moves the origin position so that the vertex position is located at the center of the histogram (S289). For example, by moving the origin point by 128 bins in the histogram of 256 bins, the peak can be located approximately at the center of the histogram. If the vertex position is not located within the end region (S288: No), the origin moving unit 262 ends the routine without moving the origin position.

図27は、第3の実施形態に係る原点移動処理を実行する前のヒストグラム(平準化基準ヒストグラム又は平準化検知ヒストグラム)の例を示す図である。図28は、第3の実施形態に係る原点移動処理を実行した後のヒストグラムの例を示す図である。図27に示すように、ヒストグラムのピーク291が原点付近に位置していると、比較のための要素が原点付近と終点付近とに集中してしまう。そこで、図28に示すように、ヒストグラムの原点を移動させることにより、ピーク291がヒストグラムの中央部に位置するようにする。   FIG. 27 is a diagram showing an example of a histogram (a leveling reference histogram or a leveling detection histogram) before the origin movement process according to the third embodiment is performed. FIG. 28 is a diagram illustrating an example of a histogram after the origin movement process according to the third embodiment is performed. As shown in FIG. 27, when the peak 291 of the histogram is located near the origin, the elements for comparison are concentrated near the origin and near the end point. Therefore, as shown in FIG. 28, the peak 291 is positioned at the center of the histogram by moving the origin of the histogram.

本実施形態によれば、検体161a〜161cの正否判定に寄与しないピクセルを無効とすることができる。これにより、正否判定の精度を損なうことなく、演算負荷の軽減等を図ることが可能となる。また、比較のための要素がヒストグラムの端部に集中することを防止できるので、正否判定の精度を向上させることが可能となる。   According to the present embodiment, it is possible to invalidate pixels that do not contribute to the correctness determination of the specimens 161a to 161c. As a result, it is possible to reduce the calculation load and the like without impairing the accuracy of the correctness determination. In addition, since it is possible to prevent concentration of the elements for comparison at the end of the histogram, it is possible to improve the accuracy of the positive / negative determination.

(第4の実施形態)
図29は、第4の実施形態に係る情報処理装置301の機能構成例を示すブロック図である。本実施形態に係る情報処理装置301は、図18に示す第3の実施形態に係る情報処理装置251の機能部101〜113,261,262に加え、色設定部311を備えている。
Fourth Embodiment
FIG. 29 is a block diagram showing an example of a functional configuration of the information processing apparatus 301 according to the fourth embodiment. An information processing apparatus 301 according to the present embodiment includes a color setting unit 311 in addition to the functional units 101 to 113, 261 and 262 of the information processing apparatus 251 according to the third embodiment shown in FIG.

色設定部311は、比較対象とする対象色を設定する。比較部109は、設定された対象色について生成された平準化基準ヒストグラム及び平準化検知ヒストグラムを比較する。従って、正否判定は設定された対象色についてのみ行われる。対象色の設定方法は特に限定されるべきものではないが、例えばユーザがディスプレイ15等の表示装置115に表示された映像152上でマウス18等を用いて任意の色を指定すること等により行われてもよい。   The color setting unit 311 sets a target color to be compared. The comparison unit 109 compares the leveling reference histogram and the leveling detection histogram generated for the set target color. Therefore, the correctness determination is performed only for the set target color. The method of setting the target color is not particularly limited. For example, the user may specify an arbitrary color on the image 152 displayed on the display device 115 such as the display 15 using the mouse 18 or the like. It may be

図30は、第4の実施形態に係る情報処理装置301による処理例を示すフローチャートである。図30に示す本実施形態に係るフローチャートと図19に示す第3の実施形態に係るフローチャートとの相違点は、主に本実施形態に係るフローチャートが色設定部311に係るステップS301を含んでいる点にある。   FIG. 30 is a flowchart illustrating an example of processing performed by the information processing device 301 according to the fourth embodiment. The difference between the flowchart according to the present embodiment shown in FIG. 30 and the flowchart according to the third embodiment shown in FIG. 19 is that the flowchart according to the present embodiment mainly includes step S301 according to the color setting unit 311. It is on the point.

ステップS101〜S103により基準画像175及び検知画像176の設定が完了した後、色設定部311は、対象色を設定するための処理を行う(S301)。対象色の設定方法は特に限定されるべきものではないが、設定画面上に表示された映像(映像152、基準画像175、検知画像176等)から任意の色を指定すること等により行われる。その後、ステップS201以降の処理が行われる。   After the setting of the reference image 175 and the detection image 176 is completed in steps S101 to S103, the color setting unit 311 performs a process for setting the target color (S301). The method of setting the target color is not particularly limited, but is performed by specifying an arbitrary color from the video (video 152, reference image 175, detection image 176, etc.) displayed on the setting screen. After that, the process after step S201 is performed.

図31は、第4の実施形態に係る色設定部311による具体的な処理例を示すフローチャートである。色設定部311は、先ず基準画像175と検知画像176のHSV成分を取得し(S351)、設定された色に基づいて基準色相成分h1、基準彩度成分s1、及び基準明度成分v1を設定する(S352)。基準色相成分h1、基準彩度成分s1、及び基準明度成分v1はそれぞれ、対象色のH成分、S成分、及びV成分に相当する。その後、色設定部311は、未処理のピクセルがあるか否かを判定する(S353)。   FIG. 31 is a flowchart showing a specific processing example of the color setting unit 311 according to the fourth embodiment. The color setting unit 311 first obtains the HSV components of the reference image 175 and the detection image 176 (S 351), and sets the reference hue component h 1, the reference saturation component s 1, and the reference lightness component v 1 based on the set colors. (S352). The reference hue component h1, the reference saturation component s1, and the reference lightness component v1 correspond to the H component, the S component, and the V component of the target color, respectively. Thereafter, the color setting unit 311 determines whether there is an unprocessed pixel (S353).

未処理のピクセルがある場合(S353:Yes)、色設定部311は、あるピクセルについて、h1−a≦H≦h1+b、且つs1−c≦S≦s1+d、且つv1−e≦V≦v1+fが成り立つか否かを判定する(S354)。a〜fは定数である。すなわち、対象となっているピクセルのH成分の値(H)、S成分の値(S)、及びV成分の値(V)がそれぞれ基準色相成分h1、基準彩度成分s1、及び基準明度成分v1の誤差範囲内に収まっているか否かが判定される。   When there is an unprocessed pixel (S353: Yes), the color setting unit 311 holds h1-a ≦ H ≦ h1 + b, s1-c ≦ S ≦ s1 + d, and v1-e ≦ V ≦ v1 + f for a certain pixel It is determined whether or not (S354). a to f are constants. That is, the value (H) of the H component, the value (S) of the S component, and the value (V) of the V component of the target pixel are the reference hue component h1, the reference saturation component s1, and the reference brightness component, respectively. It is determined whether it is within the error range of v1.

h1−a≦H≦h1+b、且つs1−c≦S≦s1+d、且つv1−e≦V≦v1+fが成り立つ場合(S354:Yes)、色設定部311は、当該ピクセルを有効なピクセルに設定し(S355)、再度ステップS353を実行する。一方、h1−a≦H≦h1+b、且つs1−c≦S≦s1+d、且つv1−e≦V≦v1+fが成り立たない場合(S354:No)、色設定部311は、当該ピクセルを無効なピクセルに設定し(S356)、再度ステップS353を実行する。上記処理を繰り返し、未処理のピクセルがなくなった場合(S353:No)、色設定部311は、無効なピクセルを画像(映像152、基準画像175、検知画像176等)に反映させる(S357)。   If h1-a ≦ H ≦ h1 + b, s1-c ≦ S ≦ s1 + d, and v1-e ≦ V ≦ v1 + f hold (S354: Yes), the color setting unit 311 sets the pixel as a valid pixel ( S355), execute step S353 again. On the other hand, when h1-a ≦ H ≦ h1 + b, s1-c ≦ S ≦ s1 + d, and v1-e ≦ V ≦ v1 + f do not hold (S354: No), the color setting unit 311 sets the pixel as an invalid pixel. The setting is made (S356), and step S353 is executed again. If the above process is repeated and there are no unprocessed pixels (S353: No), the color setting unit 311 reflects invalid pixels on the image (image 152, reference image 175, detected image 176, etc.) (S357).

図32は、第4の実施形態に係る設定画面321の色設定処理時における状態の例を示す図である。本例では、設定画面321に表示された映像152から直接色を指定する例が示されている。本例では、マウス18等により操作されるポインタ325によりユーザが所望の色を指定できるようになされている。本例の設定画面321には、設定色表示部327が含まれている。設定色表示部327には、ポインタ325により指定されたピクセルの色が表示されている。ユーザがOKボタン179を押す操作を行うことにより、設定色表示部327に表示された色が対象色として記憶部102に記憶される。   FIG. 32 is a diagram showing an example of a state at the time of color setting processing of the setting screen 321 according to the fourth embodiment. In this example, an example in which a color is directly specified from the image 152 displayed on the setting screen 321 is shown. In this example, the user can specify a desired color by means of the pointer 325 operated by the mouse 18 or the like. A setting color display unit 327 is included in the setting screen 321 of this example. The color of the pixel designated by the pointer 325 is displayed on the setting color display unit 327. When the user performs an operation to press the OK button 179, the color displayed on the setting color display unit 327 is stored in the storage unit 102 as a target color.

図33は、第4の実施形態に係る設定画面321の対象色反映時における状態の例を示す図である。本例では、設定画面321に表示された映像152において、上記のように設定された色以外の色を有するピクセルは無効となっている。このように対象色が反映された映像152から基準画像及び検知画像を設定してもよいし、基準画像及び検知画像から色指定を行ってもよい。   FIG. 33 is a view showing an example of a state at the time of target color reflection of the setting screen 321 according to the fourth embodiment. In this example, in the image 152 displayed on the setting screen 321, pixels having colors other than the color set as described above are invalidated. As described above, the reference image and the detection image may be set from the image 152 in which the target color is reflected, or the color specification may be performed from the reference image and the detection image.

本実施形態によれば、ヒストグラムや画像の生成の対象となるピクセルを、ユーザが所望する色相を有するピクセルのみに絞り込むことが可能となる。これにより、処理負荷の軽減等を図ることが可能となる。   According to the present embodiment, it is possible to narrow down the pixels that are targets for generating a histogram or an image to only pixels having a hue desired by the user. This makes it possible to reduce the processing load and the like.

(第5の実施形態)
第4の実施形態においては、色設定部311は、ユーザが映像152上で指定した1つの色に基づいて対象色を設定する方法を示したが、本実施形態に係る色設定部311は、ユーザが表示装置115に表示された所定の映像(映像152、基準画像175、検知画像176等)上で指定した1以上の色に基づいて、対象色の色範囲を設定する。なお、本実施形態としては、ユーザが指定した色を示す色配列(画素値)としてHSL値を用いる例を示すが、色配列の種類はこれに限定されるものではなく、例えば第4の実施形態と同様にHSV値を用いてもよい。
Fifth Embodiment
Although in the fourth embodiment, the color setting unit 311 sets the target color based on one color designated on the image 152 by the user, the color setting unit 311 according to the present embodiment is not limited to this. The color range of the target color is set based on one or more colors designated on the predetermined video (image 152, reference image 175, detected image 176, etc.) displayed on the display device 115 by the user. In the present embodiment, the HSL value is used as a color arrangement (pixel value) indicating a color designated by the user. However, the type of color arrangement is not limited to this, and, for example, the fourth embodiment The HSV value may be used as well as the form.

図34は、第5の実施形態に係る設定画面331の例を示す図である。本実施形態に係る設定画面331は、撮像装置2a〜2fのいずれかにより撮影された映像152を表示する映像表示部332、基準画像175を表示する基準画像表示部171、及び色範囲表示部333を含んでいる。   FIG. 34 is a diagram showing an example of the setting screen 331 according to the fifth embodiment. The setting screen 331 according to the present embodiment includes an image display unit 332 that displays an image 152 captured by any of the imaging devices 2a to 2f, a reference image display unit 171 that displays a reference image 175, and a color range display unit 333. Contains.

色範囲表示部333は、対象色の色範囲を表示する部分である。色範囲とは、対象色として認められる色配列(画素値:本実施形態では色相H、彩度S、及び輝度Lの各値)の幅である。本実施形態に係る色範囲表示部333は、最小値表示部341、最大値表示部342、中間値表示部343、許容誤差下限値設定部344、及び許容誤差上限値設定部345を含んでいる。最小値表示部341は、ユーザが所定の映像上で指定した複数の指定点のそれぞれに対応する複数の色配列(HSL値)のうちの最小値を表示する部分である。最大値表示部342は、ユーザが指定した複数の指定点のそれぞれに対応する複数の色配列のうちの最大値を表示する部分である。中間値表示部343は、最小値表示部341に表示された最小値と最大値表示部342に表示された最大値との中間(平均)値(例えば、小数点以下の値を四捨五入、繰上げ、又は繰下げした値)を表示する部分である。なお、色相Hは、256階調(0〜255)において環状の値をとるため、図34に示す例における最大値「18」は、255+18=「273」に相当し、中間値「221」は、(168+273)/2=220.5の四捨五入値又は繰上げ値となっている。許容誤差下限値設定部344は、誤差の許容範囲の下限値を設定するための部分であり、ユーザが任意の値を入力できるように構成されている。許容誤差上限値設定部345は、誤差の許容範囲の上限値を設定するための部分であり、ユーザが任意の値を入力できるように構成されている。   The color range display unit 333 is a portion that displays the color range of the target color. The color range is the width of a color arrangement (pixel values: values of hue H, saturation S, and luminance L in this embodiment) recognized as a target color. The color range display unit 333 according to the present embodiment includes a minimum value display unit 341, a maximum value display unit 342, an intermediate value display unit 343, an allowable error lower limit value setting unit 344, and an allowable error upper limit value setting unit 345. . The minimum value display unit 341 is a portion that displays the minimum value of the plurality of color arrays (HSL values) corresponding to each of the plurality of designated points designated by the user on the predetermined video. The maximum value display unit 342 is a portion that displays the maximum value of the plurality of color arrays corresponding to each of the plurality of designated points designated by the user. The intermediate value display unit 343 is an intermediate (average) value of the minimum value displayed on the minimum value display unit 341 and the maximum value displayed on the maximum value display unit 342 (for example, rounding off, rounding off or rounding off the value after the decimal point It is a part that displays the value that has been advanced. Since the hue H takes an annular value at 256 gradations (0 to 255), the maximum value “18” in the example shown in FIG. 34 corresponds to 255 + 18 = “273”, and the intermediate value “221” is , (168 + 273) /2=220.5 rounding value or advancing value. The allowable error lower limit value setting unit 344 is a part for setting the lower limit value of the allowable range of the error, and is configured to allow the user to input an arbitrary value. The allowable error upper limit value setting unit 345 is a part for setting the upper limit value of the allowable range of the error, and is configured to allow the user to input an arbitrary value.

図35は、第5の実施形態に係る設定画面331において1つの指定点が指定された状態の例を示す図である。映像152上の任意の位置(本例では、はさみの柄の一部)をユーザが指定(例えばマウスで位置を指定してクリック)すると、当該位置に第1のマーカM1が描画され、第1のマーカM1に対応するピクセルのHSL値(本例では254,170,87)が取得される。この時点においてはまだ1つの指定点しか指定されていないため、最小値表示部341、最大値表示部342、及び中間値表示部343には、それぞれ同一のHSL値(254,170,87)が表示されている。基準画像表示部171には、許容誤差下限値から許容誤差上限値までのHSL値を有するピクセルから構成される基準画像175が表示される。図35に示す例では、H値が234〜274(234〜255,0〜19)、S値が150〜190、及びL値が67〜107の範囲にあるピクセルから構成された基準画像175が表示される。   FIG. 35 is a diagram showing an example of a state in which one designated point is designated on the setting screen 331 according to the fifth embodiment. When the user designates an arbitrary position (in this example, a part of the handle of the scissors) on the image 152 (for example, specifying the position with a mouse and clicking), the first marker M1 is drawn at the position, and the first The HSL value (254, 170, 87 in this example) of the pixel corresponding to the marker M1 of is acquired. Since only one designated point is designated at this time, the same HSL value (254, 170, 87) is set in the minimum value display unit 341, the maximum value display unit 342, and the intermediate value display unit 343, respectively. It is displayed. In the reference image display section 171, a reference image 175 composed of pixels having HSL values from the lower limit of allowable error to the upper limit of allowable error is displayed. In the example shown in FIG. 35, a reference image 175 composed of pixels having an H value of 234 to 274 (234 to 255, 0 to 19), an S value of 150 to 190, and an L value of 67 to 107 is Is displayed.

図36は、第5の実施形態に係る設定画面331において2つの指定点が指定された状態の例を示す図である。映像152上でユーザが2つめの位置を指定すると、当該位置に第2のマーカM2が描画され、第2のマーカM2に対応するピクセルのHSL値(本例では247,138,103)が取得される。このとき、最小値表示部341には、両マーカM1,M2のHSL値の比較においてより小さい値(本例ではH:247、S:138、及びL:87)が表示され、最大値表示部342には、より大きい値(本例ではH:254、S:170、及びL:103)が表示され、中間値表示部343には、それぞれの最小値と最大値との中間値(本例ではH:251、S:154、及びL:95)が表示される。本例においては、許容誤差下限値が−20、許容誤差上限値が+20に設定され、対象色の色範囲は、HSL値の各最小値から20を減算した値から、各最大値に20を加算した値までの範囲となる。図36に例示する状態においては、基準画像表示部171に、H値が227〜274(227〜255,0〜19)、S値が118〜190、及びL値が67〜123の範囲にあるピクセルから構成された基準画像175が表示される。   FIG. 36 is a diagram showing an example of a state in which two designated points are designated on the setting screen 331 according to the fifth embodiment. When the user designates the second position on the image 152, the second marker M2 is drawn at the position, and the HSL value (247, 138, 103 in this example) of the pixel corresponding to the second marker M2 is acquired Be done. At this time, the minimum value display unit 341 displays smaller values (H: 247, S: 138, and L: 87 in this example) in comparison of the HSL values of the two markers M1 and M2, and the maximum value display unit In 342, larger values (in this example, H: 254, S: 170, and L: 103) are displayed, and in the intermediate value display unit 343, intermediate values (in this example) of the respective minimum values and maximum values. H: 251, S: 154, and L: 95) are displayed. In this example, the lower limit of allowable error is set to -20, the upper limit of allowable error is set to +20, and the color range of the target color is 20 for each maximum value from a value obtained by subtracting 20 from each minimum value of HSL value. It is a range up to the added value. In the state illustrated in FIG. 36, in the reference image display section 171, the H value is in the range of 227 to 274 (227 to 255, 0 to 19), the S value is in the range of 118 to 190, and the L value is in the range of 67 to 123. A reference image 175 composed of pixels is displayed.

図37は、第5の実施形態に係る設定画面331において3つの指定点が指定された状態の例を示す図である。映像152上でユーザが3つめの位置を指定すると、当該位置に第3のマーカM3が描画され、第3のマーカM3に対応するピクセルのHSL値(本例では253,183,82)が取得される。このとき、最小値表示部341には、全マーカM1〜M3のHSV値のうち最も小さい値(本例ではH:247、S:138、及びL:82)が表示され、最大値表示部342には、最も大きい値(本例ではH:254、S:183、及びL:103)が表示され、中間値表示部343には、それぞれの最小値と最大値との中間値(本例ではH:251、S:154、及びL:95)が表示される。基準画像表示部171には、H値が227〜274(227〜255,0〜19)、S値が118〜203、及びL値が62〜123の範囲にあるピクセルから構成された基準画像175が表示される。   FIG. 37 is a diagram showing an example of a state in which three designated points are designated on the setting screen 331 according to the fifth embodiment. When the user designates the third position on the image 152, the third marker M3 is drawn at the position, and the HSL value (253, 183, 82 in this example) of the pixel corresponding to the third marker M3 is acquired Be done. At this time, the smallest value among the HSV values of all the markers M1 to M3 (H: 247, S: 138, and L: 82 in this example) is displayed on the minimum value display unit 341, and the maximum value display unit 342 The largest value (H: 254, S: 183, and L: 103 in this example) is displayed in the middle, and the middle value display unit 343 displays the middle value (in this example) of the respective minimum and maximum values. H: 251, S: 154, and L: 95) are displayed. The reference image display section 171 is a reference image 175 composed of pixels having H values of 227 to 274 (227 to 255, 0 to 19), S values of 118 to 203, and L values of 62 to 123. Is displayed.

本実施形態においては、上記3つのマーカM1〜M3は全てはさみの柄の部分に位置し、当該柄の部分は赤色と認識される色を有するものであるとする。以下に、赤色とは色相が異なる色を有する位置を指定点とした場合の例について説明する。   In the present embodiment, it is assumed that all the three markers M1 to M3 are located in the portion of the handle of the scissors, and the portion of the handle has a color recognized as red. Hereinafter, an example in the case where a position having a color different from that of red as a designated point will be described.

図38は、第5の実施形態に係る設定画面331において4つの指定点が指定された状態の例を示す図である。ここでは、4つめの指定点として、青色と認識される位置(消しゴムの一部)が指定された場合を例示する。映像152上でユーザが4つめの位置を指定すると、当該位置に第4のマーカM4が描画され、第4のマーカM4に対応するピクセルのHSL値(本例では168,105,72)が取得される。このとき、最小値表示部341には、全マーカM1〜M4のHSL値のうち最も小さい値(本例ではH:168、S:105、及びL:72)が表示され、最大値表示部342には、最も大きい値(本例ではH:254、S:183、及びL:103)が表示され、中間値表示部343には、それぞれの最小値と最大値との中間値(本例ではH:211、S:144、及びL:88)が表示される。基準画像表示部171には、H値が148〜274(148〜255,0〜19)、S値が85〜203、及びL値が52〜123の範囲にあるピクセルから構成された基準画像175が表示される。この場合における基準画像175には、赤色と認識される赤色領域305、青色と認識される青色領域306、並びに、赤色及び青色のいずれでもない色(例えば灰色)と認識される他色領域307が含まれることとなる。これは、赤色とは色相が大きく異なる青色を指定したことにより、対象色の色範囲が大きく拡大されたことに起因する。   FIG. 38 is a diagram showing an example of a state in which four designated points are designated on the setting screen 331 according to the fifth embodiment. Here, a case where a position recognized as blue (a part of the eraser) is designated as the fourth designated point is exemplified. When the user specifies the fourth position on the image 152, the fourth marker M4 is drawn at the position, and the HSL value (168, 105, 72 in this example) of the pixel corresponding to the fourth marker M4 is acquired Be done. At this time, the smallest value (H: 168, S: 105, and L: 72 in this example) among the HSL values of all the markers M1 to M4 is displayed on the minimum value display unit 341, and the maximum value display unit 342 The largest value (H: 254, S: 183, and L: 103 in this example) is displayed in the middle, and the middle value display unit 343 displays the middle value (in this example) of the respective minimum and maximum values. H: 211, S: 144, and L: 88) are displayed. In the reference image display section 171, a reference image 175 composed of pixels having an H value of 148 to 274 (148 to 255, 0 to 19), an S value of 85 to 203, and an L value of 52 to 123. Is displayed. In this case, the reference image 175 includes a red area 305 recognized as red, a blue area 306 recognized as blue, and other color areas 307 recognized as colors other than red and blue (for example, gray). It will be included. This is caused by the fact that the color range of the target color is greatly expanded by designating the blue whose hue is largely different from that of red.

上記のように、色相が比較的大きく異なる(例えば階調値の差が所定値以上である)複数の色(例えば赤色と青色等)を同時に指定すると、ユーザが意図しない色(例えば灰色等)が対象色の色範囲に含まれてしまう場合がある。このような問題に対処する方法の1つとして、不適切な指定点を削除する方法がある。   As described above, when a plurality of colors (for example, red and blue) having a relatively large hue difference (for example, the difference between gradation values is equal to or more than a predetermined value) are simultaneously specified, a color not intended by the user (for example, gray) May be included in the target color range. One way to deal with such problems is to remove the bad designation points.

図39は、第5の実施形態に係る設定画面331において指定点を削除するときの状態の例を示す図である。図40は、第5の実施形態に係る設定画面331において指定点が削除された後の状態の例を示す図である。ここでは、第4のマーカM4に対応する指定点を削除する場合を例示する。図39に示すように映像152上でユーザが第4のマーカM4の位置をクリック操作等により再指定すると、図40に示すように映像152から第4のマーカM4が削除され、色範囲表示部333内の表示及び基準画像175が、第4のマーカM4に対応する位置を指定する前の状態(図37に示す状態)に戻る。このように、ユーザが指定点の削除を任意に行えるようにすることにより、対象色の色範囲を適切且つ簡便に調整することが可能となる。   FIG. 39 is a diagram showing an example of a state when a designated point is deleted on the setting screen 331 according to the fifth embodiment. FIG. 40 is a diagram showing an example of a state after the designated point is deleted on the setting screen 331 according to the fifth embodiment. Here, the case of deleting the designated point corresponding to the fourth marker M4 is exemplified. As shown in FIG. 39, when the user re-specifies the position of the fourth marker M4 by clicking on the image 152 as shown in FIG. 39, the fourth marker M4 is deleted from the image 152 as shown in FIG. The display in 333 and the reference image 175 return to the state (state shown in FIG. 37) before specifying the position corresponding to the fourth marker M4. Thus, by allowing the user to delete the designated point arbitrarily, it is possible to adjust the color range of the target color appropriately and simply.

また、本実施形態においては、許容誤差下限値及び許容誤差上限値をユーザが任意の値に調整できるようになされている。   Further, in the present embodiment, the user can adjust the allowable error lower limit value and the allowable error upper limit value to arbitrary values.

図41は、第5の実施形態に係る設定画面331において許容誤差下限値及び許容誤差上限値を調整するときの状態の例を示す図である。本例では、HSL各値に対応する全ての許容誤差下限値を−20から−4に変更し、H値に対応する許容誤差上限値を+20から+7に変更し、S値に対応する許容誤差上限値を+20から+8に変更し、L値に対応する許容誤差上限値を+20から+8に変更している。これにより、対象色の色範囲は、H値:243〜261(243〜255,0〜6)、S値:134〜191、及びL値:78〜111となり、基準画像表示部171には、当該調整後のHSL値を有するピクセルから構成される赤色領域305’を含む基準画像171が表示される。このように、ユーザが許容誤差下限値及び許容誤差上限値を任意に調整できるようにすることにより、対象色の色範囲をより適切且つ簡便に調整することが可能となる。   FIG. 41 is a diagram showing an example of a state in which the allowable error lower limit value and the allowable error upper limit value are adjusted on the setting screen 331 according to the fifth embodiment. In this example, all lower limit values of the allowable error corresponding to each HSL value are changed from -20 to -4, the upper limit value of the allowable error corresponding to the H value is changed from +20 to +7, and the allowable error corresponding to the S value The upper limit value is changed from +20 to +8, and the allowable error upper limit value corresponding to the L value is changed from +20 to +8. Accordingly, the color range of the target color is H value: 243 to 261 (243 to 255, 0 to 6), S value: 134 to 191, and L value: 78 to 111, and the reference image display unit 171 A reference image 171 is displayed that includes a red area 305 'composed of pixels with the adjusted HSL value. As described above, by allowing the user to arbitrarily adjust the allowable error lower limit value and the allowable error upper limit value, it is possible to more appropriately and simply adjust the color range of the target color.

図42は、第5の実施形態に係る情報処理装置301による処理例を示すフローチャートである。ここでは、上記のように、ユーザが映像152上で複数の指定点を指定し、各指定点に対応するHSL値に基づいて対象色の色範囲を設定する場合の処理例について説明する。本実施形態に係る色設定部311(図29参照)は、先ず、対象色の色範囲を設定する処理に関する初期値を記憶部101から読み込む(S501)。当該初期値には、ユーザが映像152上で指定可能な指定点の上限値(例えば10)等が含まれる。その後、色設定部311は、ユーザインターフェースを介して、ユーザが映像152上で任意の位置を指定するクリック操作を受け付ける(S502)。   FIG. 42 is a flowchart illustrating an example of processing by the information processing device 301 according to the fifth embodiment. Here, as described above, a process example in which the user designates a plurality of designated points on the image 152 and sets the color range of the target color based on the HSL value corresponding to each designated point will be described. The color setting unit 311 (see FIG. 29) according to the present embodiment first reads an initial value related to the process of setting the color range of the target color from the storage unit 101 (S501). The initial value includes an upper limit (for example, 10) of designated points that can be designated on the image 152 by the user. Thereafter, the color setting unit 311 receives a click operation by which the user designates an arbitrary position on the image 152 via the user interface (S502).

色設定部311は、ユーザが映像152上でクリックした位置にマーカが存在するか否かを判断する(S503)。クリックされた位置にマーカが存在していない場合(S503:No)、色設定部311は、マーカ数(クリック数又は指定点数)が上限値に達したか否かを判断する(S504)。マーカ数が上限値に達していない場合(S504:No)、色設定部311は、クリックされた位置にマーカを追加し(S505)、追加されたマーカの位置に対応するピクセルの色配列(HSL値)を取得し(S506)、取得した1以上の色配列に基づいて上述したように色範囲を算出する(S510)。一方、マーカ数が上限値に達している場合(S504:Yes)、例えば映像152上に既に10個のマーカが配置されている場合には、新たなマーカを追加せず、既にある複数のマーカに対応する各色配列に基づいて色範囲を算出する(S510)。   The color setting unit 311 determines whether a marker is present at the position clicked by the user on the image 152 (S503). If a marker does not exist at the clicked position (S 503: No), the color setting unit 311 determines whether the number of markers (the number of clicks or the number of designated points) has reached the upper limit (S 504). If the number of markers has not reached the upper limit (S504: No), the color setting unit 311 adds a marker at the clicked position (S505), and a color array (HSL of pixels corresponding to the position of the added marker) A value) is acquired (S506), and the color range is calculated as described above based on the acquired one or more color arrays (S510). On the other hand, if the number of markers has reached the upper limit (S504: Yes), for example, if ten markers are already arranged on the image 152, a plurality of markers already existing without adding a new marker The color range is calculated based on each color array corresponding to (S510).

また、クリックした位置にマーカがある場合(S503:Yes)、色設定部311は、クリックされた位置に存在するマーカを削除し(S507)、削除したマーカに対応する色配列を削除する(S508)。その後、色設定部311は、映像152上にマーカが1以上あるか否かを判断し(S509)、マーカが1以上ない(1つもない)場合(S509:No)にはステップS502に戻り、マーカが1以上ある場合(S509:Yes)には各マーカに対応する色配列に基づいて色範囲を算出する(S510)。   If the marker is present at the clicked position (S503: Yes), the color setting unit 311 deletes the marker present at the clicked position (S507), and deletes the color array corresponding to the deleted marker (S508). ). Thereafter, the color setting unit 311 determines whether or not there is one or more markers on the image 152 (S509), and if there is not one or more markers (no one) (S509: No), the process returns to step S502. If there is one or more markers (S509: Yes), the color range is calculated based on the color array corresponding to each marker (S510).

その後、色設定部311は、算出された色範囲に含まれる色配列を有するピクセルから構成される対象色画像(図34〜図41に示す例においては基準画像175)を更新し(S511)、ユーザから色指定の要求があるか否かを判断する(S512)。要求がない場合(S512:No)には本ルーチンを終了し、要求がある場合(S512:Yes)にはステップS502に戻る。   After that, the color setting unit 311 updates the target color image (the reference image 175 in the example shown in FIGS. 34 to 41) composed of the pixels having the color array included in the calculated color range (S511). It is determined whether there is a request for color designation from the user (S512). If there is no request (S512: No), this routine ends, and if there is a request (S512: Yes), the process returns to step S502.

なお、上記においては、色相が比較的大きく異なる複数の色(例えば赤色及び青色)を指定点とした場合に生じる問題(対象色の色範囲に意図しない色が含まれてしまうといった問題)を、一方の色(例えば青色)に対応する指定点を削除することにより解決する例を示したが、実施形態はこれに限定されるものではない。例えば、赤い部分に1以上の指定点を指定し、青い部分に1以上の指定点を指定した場合には、色範囲を赤色領域と青色領域の2つに分割して設定してもよい。また、色範囲を3以上の領域に分割してもよい。   In the above, the problem (the problem that an unintended color is included in the color range of the target color) occurs when a plurality of colors (for example, red and blue) with relatively large hues are used as designated points, Although the example solved by deleting the designated point corresponding to one color (for example, blue) has been shown, the embodiment is not limited to this. For example, when one or more designated points are designated in the red part and one or more designated points are designated in the blue part, the color range may be divided into two, red and blue. Also, the color range may be divided into three or more areas.

すなわち、複数の指定点の色配列の特徴に応じて、色範囲を複数に分割して設定してもよい。例えば、指定点が複数存在する場合において、色相を示す画素値(例えばH値)の階調値差が所定値以上である場合(例えば256階調のH値の差が50以上である場合等)には、色範囲を複数に分割して設定するようにしてもよい。   That is, the color range may be divided into a plurality of parts according to the characteristics of the color arrangement of a plurality of designated points. For example, when there are a plurality of designated points, the tone value difference of the pixel value (for example, H value) indicating the hue is equal to or greater than a predetermined value (for example, the H value difference of 256 tones is 50 or more) ) May be set by dividing the color range into a plurality.

例えば、HSV値を色配列とする3つの指定点として、第1の指定点(65,34,124)、第2の指定点(232,230,200)、及び第3の指定点(45,64,98)が指定され、許容誤差下限値が−10、許容誤差上限値が+10である場合について説明する。この場合、第1の指定点(65,34,124)と第3の指定点(45,64,98)とに基づいて、H値の範囲が35〜75、S値の範囲が24〜74、V値の範囲が88〜134である第1の色範囲を設定し、第2の指定点(232,230,200)に基づいて、H値の範囲が222〜242、S値の範囲が220〜240、V値の範囲が190〜210である第2の色範囲を設定することができる。なお、色範囲を分割して設定するためのアルゴリズムは上記に限定されるものではなく、使用条件等に応じて適宜決定されるべきものである。   For example, three designated points having HSV values as a color array include a first designated point (65, 34, 124), a second designated point (232, 230, 200), and a third designated point (45, 64, 98) are designated, the allowable error lower limit value is −10, and the allowable error upper limit value is +10. In this case, based on the first designated point (65, 34, 124) and the third designated point (45, 64, 98), the H value range is 35 to 75, and the S value range is 24 to 74. , V value range is 88 to 134, and the H value range is 222 to 242, the S value range is based on the second designated points (232, 230, 200). A second color range can be set, where the range 220-240, V-value is 190-210. The algorithm for dividing and setting the color range is not limited to the above, and should be appropriately determined in accordance with the use conditions and the like.

以上のように、本実施形態によれば、ユーザが指定した1以上の色に基づいて対象色の色範囲が設定される。これにより、対象色の設定をより簡便に行うことが可能となる。   As described above, according to the present embodiment, the color range of the target color is set based on one or more colors designated by the user. This makes it possible to set the target color more easily.

(第6の実施形態)
図43は、第6の実施形態に係る情報処理装置351の機能構成例を示すブロック図である。本実施形態に係る情報処理装置351は、図29に示す第4又は第5の実施形態に係る情報処理装置301の機能部101〜113,261,262,311に加え、拡張化部361を備えている。
Sixth Embodiment
FIG. 43 is a block diagram illustrating an example of a functional configuration of the information processing device 351 according to the sixth embodiment. The information processing apparatus 351 according to the present embodiment includes an expansion unit 361 in addition to the functional units 101 to 113, 261, 262, and 311 of the information processing apparatus 301 according to the fourth or fifth embodiment shown in FIG. ing.

拡張化部361は、平準化基準ヒストグラム及び平準化検知ヒストグラムにおけるピークを拡張させる拡張化処理を行う。比較部109は、拡張化された平準化基準ヒストグラムである拡張化基準ヒストグラム(第1の拡張化ヒストグラム)と、拡張化された平準化検知ヒストグラムである拡張化検知ヒストグラム(第2の拡張化ヒストグラム)との比較結果を示す比較情報を生成する。   The extension unit 361 performs extension processing for extending the peaks in the leveling reference histogram and the leveling detection histogram. The comparison unit 109 includes an expanded reference histogram (first expanded histogram) which is an expanded leveling reference histogram, and an expanded detection histogram (second expanded histogram) which is an expanded leveled detection histogram. The comparison information which shows the comparison result with is generated.

拡張化処理の方法は特に限定されるべきものではないが、ピーク幅を横軸(ビン軸)方向に拡張させたり、ピーク高さを縦軸(頻度値軸)方向に拡縮させたりすることにより、ピーク内に隙間が形成されないようにピーク形状を横軸方向に拡大させる処理であることが好ましい。   The method of the expansion process is not particularly limited, but the peak width may be expanded in the horizontal axis (bin axis) direction, or the peak height may be expanded or reduced in the vertical axis (frequency value axis) direction. Preferably, the peak shape is expanded in the horizontal axis direction so that no gap is formed in the peak.

図44は、第6の実施形態に係る情報処理装置351による処理例を示すフローチャートである。図44に示す本実施形態に係るフローチャートと図30に示す第4の実施形態に係るフローチャートとの相違点は、主に本実施形態に係るフローチャートが拡張化部361に係るステップS401,S402を含んでいる点にある。   FIG. 44 is a flowchart illustrating an example of processing by the information processing device 351 according to the sixth embodiment. The difference between the flowchart according to the present embodiment shown in FIG. 44 and the flowchart according to the fourth embodiment shown in FIG. 30 is that the flowchart according to the present embodiment mainly includes steps S401 and S402 according to the expanding unit 361. The point is that

ステップS202において原点移動部262によりヒストグラムの原点位置が調整された後、拡張化部361は、平準化されたヒストグラム(平準化基準ヒストグラム及び平準化検知ヒストグラム)を拡張化する(S401)。その後、比較部109は、拡張化された両ヒストグラム(拡張化基準ヒストグラム及び拡張化検知ヒストグラム)を比較して検知率を算出する(S402)。その後、ステップS107以降の処理が行われる。   After the origin position of the histogram is adjusted by the origin moving unit 262 in step S202, the expanding unit 361 expands the leveled histogram (leveling reference histogram and leveling detection histogram) (S401). Thereafter, the comparison unit 109 compares the expanded two histograms (the expanded reference histogram and the expanded detection histogram) to calculate a detection rate (S402). After that, the process after step S107 is performed.

図45は、第6の実施形態に係る拡張化部361による具体的な処理例を示すフローチャートである。拡張化部361は、平準化ベクトルH’(図8のステップS152により生成されたもの)を取得し(S451)、平準化ベクトルH’に対応するヒストグラムにおけるピークに対応する拡張化行列Eを生成する(S452)。その後、拡張化部361は、平準化ベクトルH’と拡張化行列Eとを積算し、拡張化ベクトルH’’を生成する(S453)。   FIG. 45 is a flowchart illustrating a specific processing example of the expanding unit 361 according to the sixth embodiment. The expanding unit 361 obtains the leveling vector H '(generated at step S152 in FIG. 8) (S451), and generates the expanded matrix E corresponding to the peak in the histogram corresponding to the leveling vector H' (S452). Thereafter, the expansion unit 361 integrates the leveling vector H 'and the expansion matrix E to generate an expansion vector H "(S453).

下記式(9)は平準化ベクトルH’の第1の例であり、下記式(10)は拡張化行列Eの第1の例であり、下記式(11)は拡張化ベクトルH’’の第1の例である。   The following equation (9) is a first example of the leveling vector H ′, the following equation (10) is a first example of the expansion matrix E, and the following equation (11) is an expansion vector H ′ ′. This is a first example.

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

上記式(9)〜(11)の例は、ヒストグラムのビン数が4であり、平準化ベクトルH’に対応する平準化されたヒストグラムの第1のビン及び第2のビンの部分においてピークが形成されている。   In the example of the above equations (9) to (11), the number of bins of the histogram is 4, and the peaks in the first bin and the second bin of the leveled histogram corresponding to the leveling vector H ′ It is formed.

下記式(12)は平準化ベクトルH’の第2の例であり、下記式(13)は拡張化行列Eの第2の例であり、下記式(14)は拡張化ベクトルH’’の第2の例である。   The following equation (12) is a second example of the leveling vector H ′, the following equation (13) is a second example of the expansion matrix E, and the following equation (14) is an expansion vector H ′ ′. This is a second example.

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

Figure 2019067365
Figure 2019067365

上記式(12)〜(14)の例は、ヒストグラムのビン数が4であり、平準化ベクトルH’に対応する平準化されたヒストグラムの第2のビンの部分においてピークが形成されている。   In the example of the equations (12) to (14), the number of bins of the histogram is 4, and a peak is formed in the portion of the second bin of the leveled histogram corresponding to the leveling vector H '.

平準化ベクトルH’、拡張化ベクトルH’’、及び拡張化行列Eのサイズはビン数に応じて変化する。また、拡張化行列Eは、平準化ベクトルH’のピーク位置、ピーク幅、ピーク高さ等に応じて変化する。拡張化行列Eは、ユーザにより設定されてもよいし、プログラムにより自動的且つ動的に生成されてもよい。   The sizes of the leveling vector H ', the expansion vector H' 'and the expansion matrix E change according to the number of bins. Further, the expansion matrix E changes in accordance with the peak position, peak width, peak height and the like of the leveling vector H '. The expansion matrix E may be set by the user or may be generated automatically and dynamically by the program.

その後、拡張化部361は、拡張化ベクトルH’’に基づいて拡張化されたヒストグラムを生成する(S454)。すなわち、平準化基準ヒストグラムに対応する拡張化ベクトルH’’に基づいて拡張化基準ヒストグラムを生成し、平準化検知ヒストグラムに対応する平準化ベクトルH’’に基づいて拡張化検知ヒストグラムを生成する。   Thereafter, the expansion unit 361 generates an expanded histogram based on the expansion vector H ′ ′ (S454). That is, an expanded reference histogram is generated based on the expanded vector H ′ ′ corresponding to the leveling reference histogram, and an expanded detection histogram is generated based on the leveled vector H ′ ′ corresponding to the leveled detection histogram.

図46は、第5の実施形態に係る拡張化前のヒストグラムの例を示す図である。図47は、第5の実施形態に係る拡張化後のヒストグラムの例を示す図である。図46に示す拡張化前のヒストグラムは、平準化基準ヒストグラム又は平準化検知ヒストグラムに相当する。図47に示す拡張化後のヒストグラムは、拡張化基準ヒストグラム又は拡張化検知ヒストグラムに相当する。   FIG. 46 is a diagram showing an example of a histogram before expansion according to the fifth embodiment. FIG. 47 is a diagram showing an example of a histogram after expansion according to the fifth embodiment. The histogram before expansion shown in FIG. 46 corresponds to the leveling reference histogram or the leveling detection histogram. The expanded histogram shown in FIG. 47 corresponds to the expanded reference histogram or the expanded detection histogram.

図46において、拡張化前の3つのピーク371a〜371cを含む折れ線370及び拡張化前の拡張領域373が例示されている。拡張領域373は、3つのピーク371a〜371cを含むように設定された矩形の領域である。本例の拡張領域373は、点a(0,0)、点b(30,0)、点c(0,28000)、及び点d(40,28000)を結ぶ線分により形成されている。本例の3つのピーク371a〜371cは、ビン全体のうちの一部のビン(本例では原点近傍のビン)に集中している。このような状態は、例えば検知領域155全体の面積に対する検体161a〜161c(色相を有する物体)が占める面積の割合が小さい場合に生じる。このようなヒストグラムを用いて比較を行うと、正否判定の精度が低下する場合がある。   In FIG. 46, a broken line 370 including three peaks 371a to 371c before expansion and an expansion area 373 before expansion are illustrated. The expanded area 373 is a rectangular area set to include three peaks 371 a to 371 c. The expanded area 373 in this example is formed by a line connecting the point a (0, 0), the point b (30, 0), the point c (0, 28000), and the point d (40, 28000). The three peaks 371a to 371c in this example are concentrated in some of the bins (in this example, the bins near the origin). Such a state occurs, for example, when the ratio of the area occupied by the specimens 161a to 161c (the object having a hue) to the area of the entire detection region 155 is small. When comparison is performed using such a histogram, the accuracy of the correct / incorrect determination may decrease.

図47において、拡張化後の3つのピーク371a’〜371c’を含む折れ線370’及び拡張化後の拡張領域373’が例示されている。拡張化後の拡張領域373’は、点a’(0,−450)、点b’(250,−450)、点c’(0,3400)、及び点d’(250,3400)を結ぶ線分により形成されている。このように、本例における拡張化処理は、全体のビン数(256)を変化させずに行われる。このような拡張化処理により、3つのピーク371a’〜371c’を含む折れ線370’を構成する要素がヒストグラム全体に渡って分散される。比較の対象となる要素が分散されることにより、正否判定の精度を向上させることができる。なお、上記拡張領域373,373’の大きさ、形状、拡張量は単なる一例であり、拡張領域373,373’の設定方法は使用状況に応じて適宜選択されるべきものである。   In FIG. 47, a broken line 370 'including three peaks 371a' to 371c 'after expansion and an expansion area 373' after expansion are illustrated. The expanded area 373 ′ after expansion connects the point a ′ (0, −450), the point b ′ (250, −450), the point c ′ (0, 3400), and the point d ′ (250, 3400) It is formed by line segments. Thus, the expansion process in this example is performed without changing the total number of bins (256). Such an expansion process disperses the elements constituting the polygonal line 370 'including the three peaks 371a' to 371c 'throughout the entire histogram. By distributing the elements to be compared, it is possible to improve the accuracy of the correctness determination. Note that the size, shape, and expansion amount of the expansion areas 373 and 373 'are merely examples, and the method of setting the expansion areas 373 and 373' should be appropriately selected according to the use situation.

図48は、第6の実施形態に係る設定画面371の拡張化前における状態の例を示す図である。本例の基準画像175は、背景374のみを映した画像である。本例の検知画像176は、背景374上に1つの検体161aが存在している画像である。本例の検知画像176において、検知画像176全体の面積に対する検体161aの面積が占める割合はかなり小さくなっている。   FIG. 48 is a diagram showing an example of a state before expansion of the setting screen 371 according to the sixth embodiment. The reference image 175 in this example is an image showing only the background 374. The detection image 176 in this example is an image in which one sample 161 a is present on the background 374. In the detection image 176 of this example, the ratio of the area of the subject 161a to the area of the entire detection image 176 is considerably small.

拡張化前におけるヒストグラム表示部173には、拡張化前のヒストグラム、すなわち基準画像175に対応する平準化基準ヒストグラム375と、検知画像176に対応する平準化検知ヒストグラム376とが表示されている。平準化基準ヒストグラム375は、背景374の色相に対応するピーク380aを含んでいる。平準化検知ヒストグラム376は、背景374の色相に対応するピーク380bと検体161aの色相に対応するピーク381とを含んでいる。平準化検知ヒストグラム376を構成する全要素に対するピーク381を構成する要素の割合はかなり小さい。そのため、平準化基準ヒストグラム375と平準化検知ヒストグラム376との差異は僅かとなり、検知率表示部191に表示された検知率の値は4.0%とかなり低い値になっている。   The histogram display unit 173 before expansion displays the histogram before expansion, that is, the leveling reference histogram 375 corresponding to the reference image 175 and the leveling detection histogram 376 corresponding to the detection image 176. The leveling reference histogram 375 includes a peak 380 a corresponding to the hue of the background 374. The leveling detection histogram 376 includes a peak 380 b corresponding to the hue of the background 374 and a peak 381 corresponding to the hue of the specimen 161 a. The ratio of the elements constituting the peak 381 to all the elements constituting the leveling detection histogram 376 is considerably small. Therefore, the difference between the leveling reference histogram 375 and the leveling detection histogram 376 is small, and the value of the detection rate displayed on the detection rate display unit 191 is a very low value of 4.0%.

図49は、第6の実施形態に係る設定画面371の拡張化後における状態の例を示す図である。拡張化後におけるヒストグラム表示部173には、拡張化後のヒストグラム、すなわち平準化基準ヒストグラム375を拡張化させた拡張化基準ヒストグラム391と、平準化検知ヒストグラム376を拡張化させた拡張化検知ヒストグラム392とが表示されている。拡張化基準ヒストグラム391は、背景374の色相に対応する拡張化されたピーク380a’を含んでいる。拡張化検知ヒストグラム392は、背景374の色相に対応する拡張化されたピーク380b’と検体161aの色相に対応する拡張化されたピーク381’とを含んでいる。図49に示すように、拡張化基準ヒストグラム391と拡張化検知ヒストグラム392との差異はかなり大きく、検知率表示部191に表示された検知率の値は69.0%とかなり大きい値になっている。   FIG. 49 is a diagram showing an example of a state after expansion of the setting screen 371 according to the sixth embodiment. In the histogram display unit 173 after expansion, an expanded reference histogram, that is, an expanded reference histogram 391 obtained by expanding the leveling reference histogram 375, and an expanded detection histogram 392 obtained by expanding the leveling detection histogram 376. And are displayed. The expanded reference histogram 391 includes an expanded peak 380 a ′ corresponding to the hue of the background 374. The expanded detection histogram 392 includes an expanded peak 380b 'corresponding to the hue of the background 374 and an expanded peak 381' corresponding to the hue of the specimen 161a. As shown in FIG. 49, the difference between the expanded reference histogram 391 and the expanded detection histogram 392 is quite large, and the value of the detection rate displayed in the detection rate display section 191 becomes a considerably large value of 69.0%. There is.

上記のように、平準化されたヒストグラムに拡張化処理を施すことにより、基準画像175と検知画像176との差異が小さい場合であっても、基準画像175に対応するヒストグラムと検知画像176に対応するヒストグラムとの差異を大きくすることが可能となる。これにより、正否判定の感度を向上させることが可能となる。拡張化の程度は、ユーザにより調整可能であってもよい。例えば、拡張化部361は、入力部103に感度を高くするための操作が入力された場合には、拡張化の程度が大きくなるように拡張化行列Eを生成する。これにより、ユーザは設定画面371上に表示される基準画像175、検知画像176、ヒストグラム375,376,391,392、検知率等を確認しながら、検知率の閾値や拡張化の程度を適切に調整することが可能となる。これにより、正否判定の実用性を更に向上させることが可能となる。   As described above, by subjecting the leveled histogram to expansion processing, even if the difference between the reference image 175 and the detected image 176 is small, the histogram corresponding to the reference image 175 and the detected image 176 can be handled. It is possible to make the difference with the histogram to be large. This makes it possible to improve the sensitivity of the correctness determination. The degree of dilation may be adjustable by the user. For example, when the operation to increase the sensitivity is input to the input unit 103, the expansion unit 361 generates the expansion matrix E such that the degree of expansion is increased. Thereby, the user appropriately checks the threshold of the detection rate and the degree of expansion while confirming the reference image 175, the detection image 176, the histograms 375, 376, 391, 392, the detection rate, etc. displayed on the setting screen 371. It becomes possible to adjust. This makes it possible to further improve the practicability of the correctness determination.

なお、上記第6の実施形態の説明においては、再計算部261、原点移動部262、及び色設定部311が含まれている例が示されているが、再計算部261、原点移動部262、及び色設定部311の全て又は一部が含まれていなくてもよい。   In the description of the sixth embodiment, an example in which the recalculation unit 261, the origin moving unit 262, and the color setting unit 311 are included is shown. However, the recalculation unit 261, the origin moving unit 262 , And all or part of the color setting unit 311 may not be included.

なお、上記第1〜第6の実施形態では、基準画像と検知画像は映像データが示す映像の任意の領域に基づき設定されたが、本発明は係る実施形態に限定されない。例えば、デジタルカメラ等の静止画を撮像する機器により撮像された静止画を基準画像、検知画像としてもよいし、また、基準画像は静止画を撮像する機器により撮像された静止画で、検知画像は映像データに基づいて設定されたものであってもよく、その逆であってもよい。   In the first to sixth embodiments, the reference image and the detection image are set based on an arbitrary area of the video represented by the video data, but the present invention is not limited to the embodiment. For example, a still image captured by a device for capturing a still image such as a digital camera may be used as a reference image or a detected image, or the reference image is a still image captured by a device for capturing a still image. May be set based on video data, or vice versa.

上記第1〜第6の実施形態に係る画像処理システム1及び情報処理装置3,251,301,351の各種機能の少なくとも一部がプログラムの実行によって実現される場合、プログラムはROM等に予め組み込まれて提供される。また、プログラムはインストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD等のコンピュータで読み取り可能な記録媒体に記録して提供されてもよい。また、プログラムはインターネット等のネットワークに接続されたコンピュータ上に格納され、ネットワーク経由でダウンロードさせることにより提供され得るように構成されてもよい。また、プログラムはインターネット等のネットワーク経由で提供又は配布され得るように構成されてもよい。また、プログラムは上述した各機能の少なくとも一部を含むモジュール構成となっていてもよい。   When at least a part of various functions of the image processing system 1 and the information processing devices 3, 251, 301, 351 according to the first to sixth embodiments are realized by the execution of a program, the program is incorporated in ROM etc. in advance. Provided. Also, the program may be provided as a file in an installable format or an executable format, recorded on a computer readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, a DVD, and the like. Also, the program may be stored on a computer connected to a network such as the Internet, and may be configured to be provided by being downloaded via the network. Also, the program may be configured to be provided or distributed via a network such as the Internet. Further, the program may be configured as a module including at least a part of each of the functions described above.

以上、本発明の実施形態を説明したが、上記実施形態は例として提示したものであり、発明の範囲を限定することを意図するものではない。上記新規な実施形態はその他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で種々の省略、置き換え、変更を行うことができる。上記実施形態及びその変形は発明の範囲及び要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   While the embodiments of the present invention have been described above, the above embodiments are presented as examples, and are not intended to limit the scope of the invention. The above novel embodiments can be implemented in other various forms, and various omissions, substitutions, and modifications can be made without departing from the scope of the invention. The above-described embodiment and the modifications thereof are included in the scope and spirit of the invention, and are included in the invention described in the claims and the equivalent scope thereof.

1 画像処理システム
2a〜2f 撮像装置
3,251,301,351 情報処理装置
4 ネットワーク
5 外部機器
11 CPU
12 ROM
13 RAM
14 外部記憶装置
15 ディスプレイ
16 ネットワークI/F
17 キーボード
18 マウス
19 DVDドライブ
20 DVD
21 外部機器I/F
22 スピーカ
101 映像受信部
102 記憶部
103 入力部
104 領域設定部
105 基準画像設定部
106 検知画像設定部
107 ヒストグラム生成部
108 平準化部
109 比較部
110 判定部
111 閾値設定部
112 表示制御部
113 外部出力部
115 表示装置
151,221,281,321,331,371 設定画面
152 映像
153 インジケータ
155 検知領域
161a〜161c 検体
166 設定内容表示部
171 基準画像表示部
172 検知画像表示部
173 ヒストグラム表示部
174 閾値操作部
175,288 基準画像
176,289 検知画像
177 検知率チャート表示部
179 OKボタン
181 平準化前のヒストグラム
182 平準化後のヒストグラム
191 検知率表示部
201,231 平準化基準ヒストグラム
202 平準化検知ヒストグラム
201a,201b,201c,202a,202b,202c,291,371a〜371c,371a’〜371c’,380a,380a’,380b,380b’,381,381’ ピーク
225 差異画像表示部
226 差異画像
232 平準化差異ヒストグラム
261 再計算部
262 原点移動部
271 色空間テーブル
285 変更後画像表示部
286 変更後画像
305,305’ 赤色領域
306 青色領域
307 他色領域
311 色設定部
325 ポインタ
327 設定色表示部
332 映像表示部
333 色範囲表示部
341 最小値表示部
342 最大値表示部
343 中間値表示部
344 許容誤差下限値設定部
345 許容誤差上限値設定部
361 拡張化部
370,370’ 折れ線
373,373’ 拡張領域
374 背景
391 拡張化基準ヒストグラム
392 拡張化検知ヒストグラム
M1〜M4 マーカ
DESCRIPTION OF SYMBOLS 1 Image processing system 2a-2f Imaging device 3, 251, 301, 351 Information processing apparatus 4 Network 5 External device 11 CPU
12 ROM
13 RAM
14 External Storage 15 Display 16 Network I / F
17 Keyboard 18 Mouse 19 DVD Drive 20 DVD
21 External Device I / F
Reference Signs List 22 speaker 101 image receiving unit 102 storage unit 103 input unit 104 area setting unit 105 reference image setting unit 106 detection image setting unit 107 histogram generation unit 108 equalization unit 109 comparison unit 110 determination unit 111 threshold setting unit 112 display control unit 113 external Output unit 115 Display device 151, 221, 281, 321, 331, 371 Setting screen 152 Image 153 Indicator 155 Detection area 161a to 161c Sample 166 Setting content display unit 171 Reference image display unit 172 Detection image display unit 173 Histogram display unit 174 Threshold Operation unit 175, 288 Reference image 176, 289 Detection image 177 Detection rate chart display section 179 OK button 181 Histogram before equalization 182 Histogram after equalization 191 Detection rate display unit 201, 231 Leveling reference histogram 202 leveling detection histogram 201a, 201b, 201c, 202a, 202b, 202c, 291, 371a to 371c, 371a 'to 371c', 380a, 380a ', 380b, 380b', 381, 381 'peak 225 difference Image display unit 226 Difference image 232 Leveling difference histogram 261 Recalculation unit 262 Origin moving unit 271 Color space table 285 Modified image display unit 286 Modified image 305, 305 'Red region 306 Blue region 307 Other color region 311 Color setting unit 325 pointer 327 set color display unit 332 image display unit 333 color range display unit 341 minimum value display unit 342 maximum value display unit 343 intermediate value display unit 344 tolerance lower limit value setting unit 345 tolerance upper limit value setting unit 361 expansion unit 370 , 3 0 'polygonal line 373, 373' extension region 374 background 391 Scaling reference histogram 392 Scaling detection histogram M1~M4 marker

特開2006−194869号公報JP, 2006-194869, A

Claims (19)

第1の画像の画素値のヒストグラムである第1のヒストグラムと、第2の画像の画素値のヒストグラムである第2のヒストグラムとを生成するヒストグラム生成部と、
前記第1のヒストグラム及び前記第2のヒストグラムにおける頻度値を当該頻度値に対応するビンの近傍に位置する1つ以上のビンに分散させる平準化処理を行う平準化部と、
平準化された前記第1のヒストグラムである第1の平準化ヒストグラムと、平準化された前記第2のヒストグラムである第2の平準化ヒストグラムとの比較結果を示す比較情報を生成する比較部と、
を備える画像処理装置。
A histogram generation unit that generates a first histogram that is a histogram of pixel values of the first image and a second histogram that is a histogram of pixel values of the second image;
A leveling unit that performs a leveling process of distributing the frequency values in the first histogram and the second histogram into one or more bins located near the bins corresponding to the frequency value;
A comparison unit that generates comparison information indicating a comparison result of a first leveling histogram that is the first histogram that has been leveled and a second leveling histogram that is the second histogram that is leveled. ,
An image processing apparatus comprising:
前記比較情報と閾値とに基づいて、前記第1の画像と前記第2の画像とが一致しているか否かを判定する判定処理を行う判定部と、
前記閾値を設定する閾値設定部と、
を更に備える請求項1に記載の画像処理装置。
A determination unit that performs a determination process of determining whether the first image and the second image match, based on the comparison information and a threshold value;
A threshold setting unit configured to set the threshold;
The image processing apparatus according to claim 1, further comprising:
所定の値を有する前記画素値を前記ヒストグラムの対象から除外する除外部、
を更に備える請求項1又は2に記載の画像処理装置。
An exclusion unit for excluding the pixel value having a predetermined value from the target of the histogram,
The image processing apparatus according to claim 1, further comprising:
前記画素値は、HSV成分を含み、
前記ヒストグラムの対象となる値は、H成分の値であり、
前記除外部は、S成分の値が所定の下限値以下であるか、V成分の値が所定の下限値以下であるか、又はV成分の値が所定の上限値以上であるH成分の値を前記対象から除外する、
請求項3に記載の画像処理装置。
The pixel value includes an HSV component,
The target value of the histogram is the value of the H component,
The exclusion unit is a value of the H component in which the value of the S component is less than or equal to a predetermined lower limit, the value of the V component is less than or equal to a predetermined lower limit, or the value of the V component is greater than or equal to a predetermined upper limit Exclude from
The image processing apparatus according to claim 3.
前記第1の平準化ヒストグラム及び前記第2の平準化ヒストグラムにおけるピークが所定の端部領域内に位置しないように、前記第1の平準化ヒストグラム及び前記第2の平準化ヒストグラムの原点を移動させる原点移動部、
を更に備える請求項1〜4のいずれか1項に記載の画像処理装置。
The origins of the first leveling histogram and the second leveling histogram are moved so that peaks in the first leveling histogram and the second leveling histogram are not located within a predetermined end region. Origin mover,
The image processing apparatus according to any one of claims 1 to 4, further comprising:
対象色を設定する色設定部、
を更に備え、
前記比較部は、前記対象色に対応する前記画素値を用いて生成された前記第1の平準化ヒストグラムと前記第2の平準化ヒストグラムとを比較する、
請求項1〜5のいずれか1項に記載の画像処理装置。
Color setting unit to set target color,
And further
The comparison unit compares the first leveling histogram generated using the pixel value corresponding to the target color with the second leveling histogram.
The image processing apparatus according to any one of claims 1 to 5.
前記色設定部は、表示装置に表示された所定の映像上でユーザが指定した色に基づいて前記対象色を設定する、
請求項6に記載の画像処理装置。
The color setting unit sets the target color based on a color designated by a user on a predetermined image displayed on a display device.
The image processing apparatus according to claim 6.
前記色設定部は、前記ユーザが指定した1以上の色に基づいて前記対象色の色範囲を設定する、
請求項7に記載の画像処理装置。
The color setting unit sets a color range of the target color based on one or more colors designated by the user.
The image processing apparatus according to claim 7.
前記色設定部は、画素値の階調値差が所定値以上である複数の色が指定された場合に、前記色範囲を2以上に分割して設定する、
請求項8に記載の画像処理装置。
The color setting unit divides and sets the color range into two or more when a plurality of colors having gradation value differences of pixel values equal to or greater than a predetermined value are designated.
The image processing apparatus according to claim 8.
前記平準化部は、前記第1のヒストグラムのベクトルと前記平準化処理を行うための平準化行列とを積算することにより前記第1の平準化ヒストグラムのベクトルを生成し、前記第2のヒストグラムのベクトルと前記平準化行列とを積算することにより前記第2の平準化ヒストグラムのベクトルを生成する、
請求項1〜9のいずれか1項に記載の画像処理装置。
The leveling unit generates a vector of the first leveling histogram by integrating a vector of the first histogram and a leveling matrix for performing the leveling process, and the second level histogram Generating a vector of the second leveling histogram by integrating a vector with the leveling matrix,
The image processing apparatus according to any one of claims 1 to 9.
前記第1の平準化ヒストグラム及び前記第2の平準化ヒストグラムにおけるピークを拡張化させる拡張化処理を行う拡張化部、
を更に備え、
前記比較部は、拡張化された前記第1の平準化ヒストグラムである第1の拡張化ヒストグラムと、拡張化された前記第2の平準化ヒストグラムである第2の拡張化ヒストグラムとの比較結果を示す前記比較情報を生成する、
請求項1〜10のいずれか1項に記載の画像処理装置。
An expanding unit that performs an expanding process to expand peaks in the first leveling histogram and the second leveling histogram;
And further
The comparison unit compares the result of comparison between a first expanded histogram, which is the expanded first equalization histogram, and a second expanded histogram, which is the expanded second equalization histogram. Generating the comparison information to indicate
The image processing apparatus according to any one of claims 1 to 10.
前記拡張化部は、前記第1の平準化ヒストグラムのベクトルと前記拡張化処理を行うための拡張化行列とを積算することにより第1の拡張化ヒストグラムのベクトルを生成し、前記第2の平準化ヒストグラムのベクトルと前記拡張化行列とを積算することにより前記第2の拡張化ヒストグラムのベクトルを生成する、
請求項11に記載の画像処理装置。
The expansion unit generates a vector of a first expanded histogram by integrating the vector of the first equalization histogram and the expansion matrix for performing the expansion process, and the second equalization standard is generated. Generating a vector of the second expanded histogram by integrating the vector of the generalized histogram with the expanded matrix;
The image processing apparatus according to claim 11.
前記拡張化行列は、前記ピークの位置に合わせて動的に生成される、
請求項12に記載の画像処理装置。
The expansion matrix is generated dynamically according to the position of the peak,
An image processing apparatus according to claim 12.
比較の対象となる画像がグレースケールである場合、
前記第1の画像は、比較の基準となる基準画像であり、
前記第2の画像は、前記基準画像と比較の対象となる検知画像とを重ね合わせた差異画像である、
請求項1〜13のいずれか1項に記載の画像処理装置。
If the image to be compared is grayscale,
The first image is a reference image to be a reference of comparison,
The second image is a difference image obtained by superposing the reference image and a detection image to be compared.
The image processing apparatus according to any one of claims 1 to 13.
映像データを取得する取得部と、
前記映像データに基づいて前記第1の画像及び前記第2の画像の少なくともどちらか一方を設定する画像設定部と、
を更に備える請求項1〜14のいずれか1項に記載の画像処理装置。
An acquisition unit for acquiring video data;
An image setting unit configured to set at least one of the first image and the second image based on the video data;
The image processing apparatus according to any one of claims 1 to 14, further comprising:
請求項15に記載の画像処理装置と、
前記映像データを生成する撮像装置と、
を備え、
前記取得部は、前記撮像装置から前記映像データを取得する、
画像処理システム。
An image processing apparatus according to claim 15;
An imaging device for generating the video data;
Equipped with
The acquisition unit acquires the video data from the imaging device.
Image processing system.
複数の前記撮像装置を含み、
前記画像設定部は、複数の前記撮像装置により撮影された現在又は過去の映像の中から前記第1の画像又は前記第2の画像を設定する、
請求項16に記載の画像処理システム。
Including a plurality of said imaging devices,
The image setting unit sets the first image or the second image from among current or past videos captured by a plurality of the imaging devices.
The image processing system according to claim 16.
第1の画像の画素値のヒストグラムである第1のヒストグラムと、第2の画像の画素値のヒストグラムである第2のヒストグラムとを生成するステップと、
前記第1のヒストグラム及び前記第2のヒストグラムにおける頻度値を当該頻度値に対応するビンの近傍に位置する1つ以上のビンに分散させる平準化処理を行うステップと、
平準化された前記第1のヒストグラムである第1の平準化ヒストグラムと、平準化された前記第2のヒストグラムである第2の平準化ヒストグラムとの比較結果を示す比較情報を生成するステップと、
を含む画像処理方法。
Generating a first histogram, which is a histogram of pixel values of the first image, and a second histogram, which is a histogram of pixel values of the second image;
Performing a leveling process of dispersing the frequency values in the first histogram and the second histogram into one or more bins located near the bins corresponding to the frequency values;
Generating comparison information indicating a comparison result between a first leveling histogram, which is the first histogram that has been leveled, and a second leveling histogram, which is the second histogram that is leveled;
Image processing method including:
コンピュータに、
第1の画像の画素値のヒストグラムである第1のヒストグラムと、第2の画像の画素値のヒストグラムである第2のヒストグラムとを生成する処理と、
前記第1のヒストグラム及び前記第2のヒストグラムにおける頻度値を当該頻度値に対応するビンの近傍に位置する1つ以上のビンに分散させる平準化処理と、
平準化された前記第1のヒストグラムである第1の平準化ヒストグラムと、平準化された前記第2のヒストグラムである第2の平準化ヒストグラムとの比較結果を示す比較情報を生成する処理と、
を実行させるプログラム。
On the computer
Processing to generate a first histogram that is a histogram of pixel values of the first image and a second histogram that is a histogram of pixel values of the second image;
Leveling processing for dispersing frequency values in the first histogram and the second histogram into one or more bins located near bins corresponding to the frequency values;
A process of generating comparison information indicating a comparison result of a first leveling histogram, which is the first histogram that has been leveled, and a second leveling histogram, which is the second histogram that is leveled;
A program that runs
JP2018123561A 2017-09-29 2018-06-28 Image processing device, image processing system, image processing method, and program Active JP7143649B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811142491.8A CN109600578B (en) 2017-09-29 2018-09-28 Image processing apparatus, image processing system, image processing method, and computer readable medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017191541 2017-09-29
JP2017191541 2017-09-29

Publications (2)

Publication Number Publication Date
JP2019067365A true JP2019067365A (en) 2019-04-25
JP7143649B2 JP7143649B2 (en) 2022-09-29

Family

ID=66338315

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018123561A Active JP7143649B2 (en) 2017-09-29 2018-06-28 Image processing device, image processing system, image processing method, and program

Country Status (1)

Country Link
JP (1) JP7143649B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021018600A (en) * 2019-07-19 2021-02-15 ファナック株式会社 Image processing apparatus
JP2021025889A (en) * 2019-08-06 2021-02-22 株式会社ニューフレアテクノロジー Determination method for sensitivity change of tdi(time delay integration) sensor, pattern inspection method, and pattern inspection device
JP2022017921A (en) * 2020-07-14 2022-01-26 株式会社日立製作所 Specimen property discrimination device and sample property discrimination method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04152252A (en) * 1990-10-16 1992-05-26 Sekisui Chem Co Ltd Surface state inspection device
JPH0771938A (en) * 1993-09-03 1995-03-17 Kurabo Ind Ltd Appearance inspection device
JP2002163653A (en) * 2000-11-28 2002-06-07 Minolta Co Ltd Device and method for detecting image, digital camera and printer
JP2005291988A (en) * 2004-04-01 2005-10-20 Seiko Epson Corp Wiring pattern inspection method and inspection apparatus
JP2006194869A (en) * 2004-12-16 2006-07-27 Pentax Corp Automatic inspection device and foreign matter inspection method
JP2008099149A (en) * 2006-10-13 2008-04-24 Konica Minolta Business Technologies Inc Image processor, image processing method and image processing program
JP2013156094A (en) * 2012-01-27 2013-08-15 Omron Corp Image inspection method and image inspection device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04152252A (en) * 1990-10-16 1992-05-26 Sekisui Chem Co Ltd Surface state inspection device
JPH0771938A (en) * 1993-09-03 1995-03-17 Kurabo Ind Ltd Appearance inspection device
JP2002163653A (en) * 2000-11-28 2002-06-07 Minolta Co Ltd Device and method for detecting image, digital camera and printer
JP2005291988A (en) * 2004-04-01 2005-10-20 Seiko Epson Corp Wiring pattern inspection method and inspection apparatus
JP2006194869A (en) * 2004-12-16 2006-07-27 Pentax Corp Automatic inspection device and foreign matter inspection method
JP2008099149A (en) * 2006-10-13 2008-04-24 Konica Minolta Business Technologies Inc Image processor, image processing method and image processing program
JP2013156094A (en) * 2012-01-27 2013-08-15 Omron Corp Image inspection method and image inspection device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"画素値ヒストグラムの相関係数を用いた電子透かし画像の高効率検索", 画像ラボ, vol. 第24巻 第2号, JPN6022002246, 10 February 2013 (2013-02-10), ISSN: 0004689041 *
ROBERT AMELARD, ALEXANDER WONG, DAVID A. CLAUSI: "Extracting High-Level Intuitive Features (HLIF) for Classifying Skin Lesions Using Standard Camera I", 2012 NINTH CONFERENCE ON COMPUTER AND ROBOT VISION, JPN7022000280, 28 May 2012 (2012-05-28), US, pages 396 - 403, XP032456259, ISSN: 0004689042, DOI: 10.1109/CRV.2012.59 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021018600A (en) * 2019-07-19 2021-02-15 ファナック株式会社 Image processing apparatus
JP7364381B2 (en) 2019-07-19 2023-10-18 ファナック株式会社 Image processing device
US11995742B2 (en) 2019-07-19 2024-05-28 Fanuc Corporation Image processing apparatus
JP2021025889A (en) * 2019-08-06 2021-02-22 株式会社ニューフレアテクノロジー Determination method for sensitivity change of tdi(time delay integration) sensor, pattern inspection method, and pattern inspection device
JP7525251B2 (en) 2019-08-06 2024-07-30 株式会社ニューフレアテクノロジー Method for determining sensitivity fluctuation of TDI (time delay integration) sensor, pattern inspection method, and pattern inspection device
JP2022017921A (en) * 2020-07-14 2022-01-26 株式会社日立製作所 Specimen property discrimination device and sample property discrimination method
JP7470587B2 (en) 2020-07-14 2024-04-18 株式会社日立製作所 Specimen characteristic determination device and specimen characteristic determination method

Also Published As

Publication number Publication date
JP7143649B2 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
CN109600578B (en) Image processing apparatus, image processing system, image processing method, and computer readable medium
KR102583038B1 (en) Directional scaling systems and methods
JP2008139867A (en) Color reproduction system and method
JP2021131629A (en) Information processing equipment, programs, information generation methods, information processing systems
JP2019067365A (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGE PROCESSING METHOD, AND PROGRAM
JP2018146949A (en) Image processing device and image processing method
JP2021128402A (en) Perturbation programs, perturbation methods, and information processing equipment
JP2016201026A (en) Image processing apparatus and program
JP2006024116A (en) Area division for color image
US20160203617A1 (en) Image generation device and display device
WO2010023966A1 (en) Image quality adjusting device, image quality adjusting method, and image quality adjusting program
JP2019169910A (en) Image processing apparatus, image processing method, and program
CN117315159A (en) Image processing method, device, electronic equipment and storage medium
US20250308427A1 (en) System to display gamut excursion
JP2019205104A (en) Information processing apparatus, information processing method, and program
JP6650975B2 (en) Image processing apparatus and method
WO2023026489A1 (en) Computer system and analysis method
JP2020088709A (en) Image processing apparatus, image processing method and program
WO2021102939A1 (en) Image processing method and device
JP2015204571A (en) Image processing apparatus and method
JP2016066990A (en) Evaluation method of tone correction, and arithmetic device
US12056913B2 (en) System for luminance qualified chromaticity
US20240333863A1 (en) Color matching control apparatus, control method therefor, and storage medium storing control program therefor
JP7427423B2 (en) Image processing device, image processing method and program
JP2025004663A (en) Image processing device and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220125

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220816

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220829

R151 Written notification of patent or utility model registration

Ref document number: 7143649

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151