JP7188426B2 - HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD - Google Patents

HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD Download PDF

Info

Publication number
JP7188426B2
JP7188426B2 JP2020160259A JP2020160259A JP7188426B2 JP 7188426 B2 JP7188426 B2 JP 7188426B2 JP 2020160259 A JP2020160259 A JP 2020160259A JP 2020160259 A JP2020160259 A JP 2020160259A JP 7188426 B2 JP7188426 B2 JP 7188426B2
Authority
JP
Japan
Prior art keywords
binary pattern
pixel
unit
reference value
lbp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020160259A
Other languages
Japanese (ja)
Other versions
JP2022053424A (en
Inventor
康佑 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2020160259A priority Critical patent/JP7188426B2/en
Priority to PCT/JP2021/029475 priority patent/WO2022064884A1/en
Publication of JP2022053424A publication Critical patent/JP2022053424A/en
Application granted granted Critical
Publication of JP7188426B2 publication Critical patent/JP7188426B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、ハードウェアアクセラレータ、画像処理装置及び画像処理方法に関する。 The present invention relates to a hardware accelerator, an image processing device and an image processing method.

画像の局所的な表現を特徴量としたLBP(Local Binary Pattern)は、画像認識や分類等に用いられている。LBPは、照明の変化に対して影響を受けにくく、高速に計算することができるという特徴を有している。 LBPs (Local Binary Patterns), in which local expressions of images are used as feature quantities, are used for image recognition, classification, and the like. The LBP has the characteristics of being less susceptible to changes in illumination and being able to be calculated at high speed.

特許文献1に記載された特徴点検出では、処理の迅速化等のために、処理の一部または全部を専用のハードウェア(以下、専用のハードウェアを「ハードウェアアクセラレータ」と記載する)で実現することも想定している。ところで、LBPには、Uniform LBPやImproved LBP等の派生した手法があり、用途に応じて適切な手法を選択することが好ましい。 In the feature point detection described in Patent Document 1, part or all of the processing is performed by dedicated hardware (hereinafter, dedicated hardware is referred to as a "hardware accelerator") in order to speed up the processing. It is also expected to be realized. By the way, LBP includes derived methods such as Uniform LBP and Improved LBP, and it is preferable to select an appropriate method according to the application.

特開2014-199505号公報JP 2014-199505 A

しかしながら、派生したLBPの各手法をそのまま個別にハードウェアアクセラレータで実現させると、ハードウェアアクセラレータの回路規模が増大してしまう。 However, if each method of derived LBP is individually implemented by a hardware accelerator as it is, the circuit scale of the hardware accelerator will increase.

そこで、本発明は、上記問題を解決するためになされたものであり、複数のLBPに対応させることに好適なハードウェアアクセラレータ、画像処理装置及び画像処理方法を提供することを目的とする。 Therefore, the present invention has been made to solve the above problems, and an object of the present invention is to provide a hardware accelerator, an image processing apparatus, and an image processing method suitable for supporting a plurality of LBPs.

上記目的を達成するため、本発明のハードウェアアクセラレータは、
画像の、それぞれの画素の画素値および前記それぞれの画素の周囲の複数の画素の画素値に対して、フィルタを使用することによりリファレンス値を導出する、複数種のフィルタを備えるリファレンス値導出部と、
前記画像の、それぞれの画素の画素値または前記リファレンス値と、前記それぞれの画素の周囲の複数の画素の画素値を比較することによりバイナリパターンを生成する、複数種の比較モードを備えるバイナリパターン生成部と、
前記バイナリパターンを変換後バイナリパターンに変換するバイナリパターン変換部と、
前記複数種の比較モードのうち任意に設定された比較モードで、前記複数種のフィルタのうち任意に設定されたフィルタを使用することにより導出されたリファレンス値を前記それぞれの画素の周囲の複数の画素の画素値と比較することにより生成されたバイナリパターンまたは前記変換後バイナリパターンに基づいてヒストグラムを生成するヒストグラム生成部と、を備え、
入力装置を介してユーザにより選択されたLBP(Local Binary Pattern)の生成に対応する処理に応じて、前記リファレンス値導出部と前記バイナリパターン変換部と前記ヒストグラム生成部とのうち、少なくとも1つと、前記バイナリパターン生成部と、を選択的に使用することにより得られた前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを出力する。
In order to achieve the above object, the hardware accelerator of the present invention is
a reference value derivation unit having a plurality of types of filters for deriving a reference value by using a filter for the pixel value of each pixel and the pixel values of a plurality of pixels surrounding each pixel of the image; ,
Binary pattern generation with multiple comparison modes, wherein a binary pattern is generated by comparing the pixel value of each pixel of the image or the reference value with the pixel values of a plurality of pixels surrounding each pixel. Department and
a binary pattern conversion unit that converts the binary pattern into a post-conversion binary pattern;
A reference value derived by using an arbitrarily set filter among the plurality of types of filters in a comparison mode arbitrarily set among the plurality of types of comparison modes is applied to a plurality of surrounding pixels of the respective pixels. A histogram generation unit that generates a histogram based on the binary pattern generated by comparing the pixel value of the pixel or the post-conversion binary pattern,
At least one of the reference value derivation unit, the binary pattern conversion unit, and the histogram generation unit according to processing corresponding to generation of LBP (Local Binary Pattern) selected by a user via an input device ; and outputting the binary pattern obtained by selectively using the binary pattern generation unit, the converted binary pattern, or the histogram.

本発明によれば、複数のLBPに対応させることに好適なハードウェアアクセラレータ、画像処理装置及び画像処理方法を提供することができる。 According to the present invention, it is possible to provide a hardware accelerator, an image processing apparatus, and an image processing method suitable for supporting a plurality of LBPs.

本発明の実施形態に係る画像処理装置のハードウェアアクセラレータが実行する4つの処理についての説明図である。FIG. 4 is an explanatory diagram of four processes executed by the hardware accelerator of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置のLBP設定処理での各LBPと実行する処理との組み合わせを説明する図である。FIG. 5 is a diagram illustrating combinations of each LBP and processing to be executed in the LBP setting processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置のブロック図である。1 is a block diagram of an image processing device according to an embodiment of the present invention; FIG. 本発明の実施形態に係る画像処理装置のLBP設定処理のフローチャートである。6 is a flowchart of LBP setting processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置の各種LBP特徴量生成処理の説明図である。FIG. 4 is an explanatory diagram of various LBP feature amount generation processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置の画像処理のフローチャートである。4 is a flow chart of image processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置の各種LBP特徴量生成処理のフローチャートである。4 is a flowchart of various LBP feature amount generation processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置のリファレンス値算出処理のフローチャートである。5 is a flowchart of reference value calculation processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置のバイナリパターン生成処理のフローチャートである。4 is a flowchart of binary pattern generation processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置のバイナリパターン変換処理のフローチャートである。4 is a flowchart of binary pattern conversion processing of the image processing apparatus according to the embodiment of the present invention; 本発明の実施形態に係る画像処理装置のヒストグラム生成処理のフローチャートである。4 is a flowchart of histogram generation processing of the image processing apparatus according to the embodiment of the present invention;

本発明の実施形態に係るハードウェアアクセラレータを備えた画像処理装置について、以下、図面を参照して詳細に説明する。 An image processing apparatus having a hardware accelerator according to embodiments of the present invention will be described in detail below with reference to the drawings.

本発明の実施形態に係るハードウェアアクセラレータを備えた画像処理装置は、図1に示す4つの処理を組み合わせることにより、入力された画像から、図2に示すように、Normal LBP、Improved LBP、CS(Center-Symmetric) LBP、RI(Rotation Invariant) LBP、Uniform LBP、LBP Histogram、Improved RI LBP Histogramの各種LBPのうちからユーザが選択したLBPによる特徴量を生成する。 An image processing apparatus equipped with a hardware accelerator according to an embodiment of the present invention combines the four processes shown in FIG. 1 to convert an input image into normal LBP, improved LBP, CS (Center-Symmetric) LBP, RI (Rotation Invariant) LBP, Uniform LBP, LBP Histogram, Improved RI LBP Histogram.

(画像処理装置の構成)
図3に示すように、画像処理装置10は、制御部20、特徴点検出器30、記憶部40、撮像部50、通信部60、表示部70、入力部80、を備える。
(Configuration of image processing device)
As shown in FIG. 3, the image processing apparatus 10 includes a control section 20, a feature point detector 30, a storage section 40, an imaging section 50, a communication section 60, a display section 70, and an input section 80.

制御部20は、CPU(Central Processing Unit)等で構成され、記憶部40に記憶されたプログラム等を実行することにより、後述する各部(処理選択部21、画像取得部22、特徴量送信部23)の機能を実現する。また、制御部20は、時計(図示せず)を有し、現在日時の取得や経過時間のカウント等をすることができる。 The control unit 20 is composed of a CPU (Central Processing Unit) or the like, and by executing a program or the like stored in the storage unit 40, each unit described later (processing selection unit 21, image acquisition unit 22, feature amount transmission unit 23 ) functions. The control unit 20 also has a clock (not shown), and can acquire the current date and time, count the elapsed time, and the like.

ハードウェアアクセラレータAの構成要素である特徴点検出器30は、制御部20に代わって、画像Vから特徴量を算出するための各種処理を実行するためのものである。特徴点検出器30は、CPU等を含んでおり、半導体等の電子部品を集積した集積回路(IC:Integrated Circuit)で構成され、記憶部40に記憶されたプログラム等を実行することにより、後述する各部(画素値取得部31、リファレンス値算出部32、バイナリパターン生成部33、バイナリパターン変換部34、ヒストグラム生成部35)の機能を実現する。 The feature point detector 30, which is a component of the hardware accelerator A, is for executing various processes for calculating feature amounts from the image V instead of the control unit 20. FIG. The feature point detector 30 includes a CPU and the like, and is configured by an integrated circuit (IC: Integrated Circuit) in which electronic components such as semiconductors are integrated. (pixel value acquisition unit 31, reference value calculation unit 32, binary pattern generation unit 33, binary pattern conversion unit 34, histogram generation unit 35).

また、ハードウェアアクセラレータAの構成要素である特徴点検出器記憶部36は、RAM(Random Access Memory)等で構成され、機能的に、ヒストグラム一時記憶部37を有する。ヒストグラム一時記憶部37は、後述するヒストグラム生成処理でのカウントアップのために使用される。 A feature point detector storage unit 36, which is a component of the hardware accelerator A, is configured by a RAM (Random Access Memory) or the like, and functionally has a histogram temporary storage unit 37. FIG. The histogram temporary storage unit 37 is used for counting up in histogram generation processing, which will be described later.

記憶部40は、ROM(Read Only Memory)、RAM等で構成され、ROMの一部又は全部は電気的に書き換え可能なメモリ(フラッシュメモリ等)で構成されている。記憶部40は、機能的に、撮像画像記憶部41と、リファレンス値記憶部42と、バイナリパターン記憶部43と、ヒストグラム記憶部44と、各種設定記憶部45と、を有する。ROMには制御部20および特徴点検出器30が実行するプログラム及びプログラムを実行する上で予め必要なデータが記憶されている。RAMには、プログラム実行中に作成されたり変更されたりするデータが記憶される。 The storage unit 40 is composed of ROM (Read Only Memory), RAM, etc., and part or all of the ROM is composed of electrically rewritable memory (flash memory, etc.). The storage unit 40 functionally includes a captured image storage unit 41 , a reference value storage unit 42 , a binary pattern storage unit 43 , a histogram storage unit 44 and various setting storage unit 45 . The ROM stores programs executed by the control unit 20 and the feature point detector 30 and data necessary for executing the programs. RAM stores data that is created or changed during program execution.

撮像画像記憶部41には、本実施形態では、撮像部50に撮像された画像Vが記憶される。本実施形態では、後述する撮像装置51は説明の簡略化のため1台とするが、撮像画像記憶部41は、撮像装置51が複数台稼働している場合には、撮像装置51毎に撮像された画像を記憶することができる。 In this embodiment, the captured image storage unit 41 stores an image V captured by the imaging unit 50 . In the present embodiment, one imaging device 51 to be described later is used for simplification of explanation. The captured image can be stored.

リファレンス値記憶部42には、後述するリファレンス値算出処理で算出されたリファレンス値を記憶する。 The reference value storage unit 42 stores a reference value calculated in a reference value calculation process, which will be described later.

バイナリパターン記憶部43には、後述するLBP設定処理で処理選択部21に選択された比較モード、後述するバイナリパターン生成処理で生成されたバイナリパターンBPが記憶される。また、バイナリパターンBPに基づいて後述するバイナリパターン変換処理で変換されたバイナリパターンBPLが記憶される。 The binary pattern storage unit 43 stores the comparison mode selected by the processing selection unit 21 in the LBP setting process described later and the binary pattern BP generated in the binary pattern generation process described later. Also, a binary pattern BPL converted by a binary pattern conversion process, which will be described later, based on the binary pattern BP is stored.

ヒストグラム記憶部44には、後述するヒストグラム生成処理で生成されたヒストグラムが記憶される。 The histogram storage unit 44 stores histograms generated by histogram generation processing, which will be described later.

各種設定記憶部45には、各LBPに対応する後述する比較パターン、フィルタ係数(フィルタ)、ルックアップテーブル(LUT)、図2に示すような各LBPと4つの処理との対応関係、画像Vを撮像するフレームレート、画像Vが撮像される撮像範囲L等の各種設定が、予め、またはユーザが入力部80等を介して入力または指示すること等により記憶されている。 The various setting storage unit 45 stores a comparison pattern, a filter coefficient (filter), a lookup table (LUT), a correspondence relationship between each LBP and four processes as shown in FIG. , various settings such as the imaging range L in which the image V is imaged are stored in advance or by the user's input or instruction via the input unit 80 or the like.

撮像部50は、画像Vを撮像する撮像装置51、撮像装置51の姿勢を制御するための駆動装置52を有する。 The imaging unit 50 has an imaging device 51 that captures an image V and a driving device 52 that controls the attitude of the imaging device 51 .

撮像装置51は、本実施形態では、CMOS(Complementary Metal Oxide Semiconductor)カメラを備える。撮像装置51は、撮像範囲を予め設定された、またはユーザが設定したフレームレートで撮像し画像Vを生成する。なお、フレームレートは、撮像対象物の想定移動速度等に応じて、ユーザにより手動で、または自動的に変更可能である。 The imaging device 51 includes a CMOS (Complementary Metal Oxide Semiconductor) camera in this embodiment. The imaging device 51 captures an imaging range at a preset frame rate or a user-set frame rate to generate an image V. FIG. Note that the frame rate can be changed manually or automatically by the user according to the assumed moving speed of the object to be imaged.

駆動装置52は、後述する入力装置81等の指示に従って、撮像装置51の位置や方向を移動させて撮像範囲Lを調整する。 The driving device 52 adjusts the imaging range L by moving the position and direction of the imaging device 51 according to instructions from the input device 81 or the like, which will be described later.

通信部60は、外部機器等と通信するためのモジュールである通信装置61を有する。通信装置61は、外部機器と通信する場合にはアンテナを含む無線モジュールである。例えば、通信装置61は、Bluetooth(登録商標)に基づく近距離無線通信を行うための無線モジュールである。通信部60を用いることにより、画像処理装置10は、外部機器等と画像Vや特徴量等のデータ等の受け渡しを行うことができる。 The communication unit 60 has a communication device 61 which is a module for communicating with an external device or the like. The communication device 61 is a wireless module including an antenna when communicating with an external device. For example, the communication device 61 is a wireless module for short-range wireless communication based on Bluetooth (registered trademark). By using the communication unit 60, the image processing apparatus 10 can exchange data such as the image V and the feature amount with an external device or the like.

表示部70は、液晶表示パネル(LCD:Liquid Crystal Display)から構成された表示装置71を備える。 The display unit 70 includes a display device 71 configured by a liquid crystal display panel (LCD: Liquid Crystal Display).

表示装置71としては、薄膜トランジスタ(TFT:Thin Film Transistor)、液晶、有機EL(Electro Luminescence)などを採用できる。表示装置71には、画像Vや特徴量リスト等が表示される。 As the display device 71, a thin film transistor (TFT), a liquid crystal, an organic EL (Electro Luminescence), or the like can be used. The display device 71 displays an image V, a feature amount list, and the like.

入力部80は、表示部70と近接して、または表示部70と一体に設けられた抵抗膜方式のタッチパネル(入力装置81)である。タッチパネルは、赤外線操作方式や投影型静電容量方式等であってもよいし、入力部80はタッチパネルで無くキーボードおよびマウス等であってもよい。ユーザは、入力部80を介したマニュアル操作にて、使用するLBPを選択する、或いは、表示部70を使用して使用するLBPを選択することができる。 The input unit 80 is a resistive touch panel (input device 81 ) provided close to the display unit 70 or integrated with the display unit 70 . The touch panel may be of an infrared operation system, a projective capacitive system, or the like, and the input unit 80 may be a keyboard, a mouse, or the like instead of the touch panel. The user can select the LBP to be used by manual operation via the input unit 80 or select the LBP to be used using the display unit 70 .

次に、画像処理装置10の制御部20および特徴点検出器30の機能的構成について説明する。 Next, functional configurations of the control unit 20 and the feature point detector 30 of the image processing apparatus 10 will be described.

制御部20は、処理選択部21、画像取得部22、特徴量送信部23の機能を実現し、ハードウェアアクセラレータAである特徴点検出器30とともに後述する画像処理、LBP特徴量生成処理等を行う。 The control unit 20 realizes the functions of the processing selection unit 21, the image acquisition unit 22, and the feature amount transmission unit 23, and performs image processing, LBP feature amount generation processing, etc., which will be described later, together with the feature point detector 30, which is the hardware accelerator A. conduct.

処理選択部21は、ユーザが選択したLBPに対応する処理をセット(図2、4参照)し、アクセラレータAを設定する。詳細は、LBP設定処理にて後述する。 The processing selection unit 21 sets the processing corresponding to the LBP selected by the user (see FIGS. 2 and 4) and sets the accelerator A. FIG. Details will be described later in the LBP setting process.

画像取得部22は、予め画像処理装置10に設定された、またはユーザが設定した露出条件等で撮像部50が撮像した画像Vを取得し、撮像画像記憶部41に記憶させる。 The image acquisition unit 22 acquires an image V captured by the imaging unit 50 under exposure conditions set in advance in the image processing apparatus 10 or set by the user, and stores the image V in the captured image storage unit 41 .

特徴量送信部23は、ユーザが選択したLBPに応じてバイナリパターンBP、BPL、またはヒストグラムを外部機器等に送信する。 The feature amount transmission unit 23 transmits the binary pattern BP, BPL, or histogram to an external device or the like according to the LBP selected by the user.

特徴点検出器30は、画素値取得部31、リファレンス値算出部32、バイナリパターン生成部33、バイナリパターン変換部34、ヒストグラム生成部35の機能を実現し、制御部20とともに画像処理、LBP特徴量生成処理等を行う。 The feature point detector 30 realizes the functions of a pixel value acquisition unit 31, a reference value calculation unit 32, a binary pattern generation unit 33, a binary pattern conversion unit 34, and a histogram generation unit 35, and together with the control unit 20 performs image processing, LBP feature volume generation processing, etc.

画素値取得部31は、撮像画像記憶部41に記憶された画像Vから各画素の画素値およびその画素の周囲8画素の画素値を取得する。画素値取得部31は、取得した画像Vをユーザが選択したLBPに応じて、リファレンス値算出部32、またはバイナリパターン生成部33に送信する。 The pixel value acquisition unit 31 acquires the pixel value of each pixel and the pixel values of eight pixels surrounding the pixel from the image V stored in the captured image storage unit 41 . The pixel value acquisition unit 31 transmits the acquired image V to the reference value calculation unit 32 or the binary pattern generation unit 33 according to the LBP selected by the user.

リファレンス値算出部32は、画素値取得部31から送信された画像Vの、それぞれの画素およびそれぞれの画素の周囲の8点の画素の画素値に対して、フィルタを使用することによりリファレンス値を算出する。フィルタは、図1に示すように、(1)3×3画素値の中央の画素値をリファレンス値(図1のリファレンス値算出の欄の上から1つ目のフィルタに相当)とするもの(Normal LBP、RI LBP、Uniform LBP)、(2)3×3画素値の平均値をリファレンス値(フィルタ係数は中央および周辺ともに1(図1のリファレンス値算出の欄の上から2つ目のフィルタに相当))とするもの(Improved LBP、Improved RI LBP Histogram)、(3)3×3画素値の中央の画素値を最大の重み付けをし、中央の上下左右を半分の重み付け、四隅をさらに半分の重み付けしたもの(図1のリファレンス値算出の欄の上から3つ目のフィルタに相当)がある。なお、ユーザによって任意に、フィルタの数値を変更または追加することもできる。 The reference value calculation unit 32 uses a filter to obtain a reference value for the pixel values of each pixel and eight pixels surrounding each pixel of the image V transmitted from the pixel value acquisition unit 31. calculate. As shown in FIG. 1, the filter has (1) a central pixel value of 3×3 pixel values as a reference value (corresponding to the first filter from the top of the reference value calculation column in FIG. 1) ( Normal LBP, RI LBP, Uniform LBP), (2) The average value of 3 × 3 pixel values is the reference value (the filter coefficient is 1 for both the center and the periphery (the second filter from the top of the reference value calculation column in FIG. 1) (Equivalent to)) (Improved LBP, Improved RI LBP Histogram), (3) The pixel value in the center of the 3 × 3 pixel value is given the maximum weight, the upper, lower, left, and right sides of the center are weighted by half, and the four corners are further halved. (corresponding to the third filter from the top of the reference value calculation column in FIG. 1). Note that the user can arbitrarily change or add the numerical value of the filter.

バイナリパターン生成部33は、撮像された画像の、それぞれの画素の画素値、または、リファレンス値とそれぞれの画素の周囲の8点の画素の画素値とを比較することによりバイナリパターンBPを生成する。比較の方法については、図5に示すように、(1)リファレンス値と周囲の8画素を比較するリファレンス値等比較モード、(2)中央の画素を点対称に周囲の8画素を比較する対象画素比較モード、(3)隣接する画素同士を比較する隣接画素比較モードがある。Normal LBP、Improved LBP、RI LBP、Uniform LBP、LBP Histogram、Improved RI LBP Histogramを選択した場合は(1)を、CS LBPを選択した場合は(2)のモードを使用して比較する。ユーザによって任意に、モードを変更することもできる。図1に示すように、比較元<比較先の場合0とし、それ以外の場合1とする。 The binary pattern generation unit 33 generates a binary pattern BP by comparing the pixel value of each pixel in the captured image or the reference value with the pixel values of eight pixels surrounding each pixel. . As for the comparison method, as shown in FIG. 5, (1) a reference value comparison mode for comparing the reference value and the surrounding 8 pixels, and (2) the central pixel for point-symmetrical comparison of the surrounding 8 pixels. There is a pixel comparison mode, and (3) an adjacent pixel comparison mode in which adjacent pixels are compared. When Normal LBP, Improved LBP, RI LBP, Uniform LBP, LBP Histogram, and Improved RI LBP Histogram are selected, mode (1) is used for comparison, and when CS LBP is selected, mode (2) is used for comparison. The mode can also be arbitrarily changed by the user. As shown in FIG. 1, 0 is set when the comparison source is less than the comparison destination, and 1 is set otherwise.

バイナリパターン変換部34は、バイナリパターン生成部33が生成したバイナリパターンを、図1、5に示すように、8ビットのルックアップテーブル(LUT)であるパターン変換テーブルを使用して変換後バイナリパターンBPLに変換する。例えば、RI LBP(およびImproved RI LBP Histogram)に対しては、以下のような8ビットの変換を行う。
00000001(1)→00000001(1)
00000010(2)→00000001(1)
00000100(4)→00000001(1)
00001000(8)→00000001(1)
00010000(16)→00000001(1)
00100000(32)→00000001(1)
01000000(64)→00000001(1)
10000000(128)→00000001(1)

00000011(3)→00000011(3)
00000110(6)→00000011(3)
00001100(12)→00000011(3)
00011000(24)→00000011(3)
00110000(48)→00000011(3)
01100000(96)→00000011(3)
11000000(192)→00000011(3)
10000001(129)→00000011(3)

The binary pattern conversion unit 34 converts the binary pattern generated by the binary pattern generation unit 33 into a post-conversion binary pattern using a pattern conversion table, which is an 8-bit lookup table (LUT), as shown in FIGS. Convert to BPL. For example, for RI LBP (and Improved RI LBP Histogram), the following 8-bit conversion is performed.
00000001(1)→00000001(1)
00000010 (2) → 00000001 (1)
00000100 (4) → 00000001 (1)
00001000 (8) → 00000001 (1)
00010000 (16) → 00000001 (1)
00100000 (32) → 00000001 (1)
01000000 (64) → 00000001 (1)
10000000 (128) → 00000001 (1)

00000011(3)→00000011(3)
00000110 (6) → 00000011 (3)
00001100 (12) → 00000011 (3)
00011000 (24) → 00000011 (3)
00110000 (48) → 00000011 (3)
01100000 (96)→00000011 (3)
11000000 (192)→00000011 (3)
10000001 (129)→00000011 (3)

つまり、下記のようなテーブル、ビットパターンをビットシフトによる回転に対応したテーブルとなる。
tb[1]=1
tb[2]=1
tb[3]=3
tb[4]=1
tb[6]=3
tb[8]=1
tb[12]=3
tb[16]=1
tb[24]=3
tb[32]=1
tb[48]=3
tb[64]=1
tb[96]=3
tb[128]=1
tb[129]=3
tb[192]=3
In other words, the following table corresponds to the bit pattern rotation by bit shift.
tb[1]=1
tb[2]=1
tb[3]=3
tb[4]=1
tb[6]=3
tb[8]=1
tb[12]=3
tb[16]=1
tb[24]=3
tb[32]=1
tb[48]=3
tb[64]=1
tb[96]=3
tb[128]=1
tb[129]=3
tb[192]=3

一方、Uniform LBPでは、例えば、ビットパターンを、点(spot)、フラット(spot/flat)、先端(line end)、エッジ(edge)、角(corner)に分類する、下記のようなパターン変換テーブルを使用する。WEBページ「Local Binary Patternの理論と実装」等を参照するとよい。
00000000(1)→00000001(1)=spot
11111111(255)→00000002(2)=spot/flat
00000110(6)→00000004(4)=line end
00001100(12)→00000004(4)=line end
00011000(24)→00000004(4)=line end

11000011(195)→00000008(8)=edge
10000111(135)→00000008(8)=edge
00001111(15)→00000008(8)=edge

00000111(7)→00000010(16)=corner
00001110(14)→00000010(16)=corner
00011100(28)→00000010(16)=corner
On the other hand, in Uniform LBP, for example, bit patterns are classified into spot, flat (spot/flat), line end, edge, and corner, and the following pattern conversion table is used. to use. Please refer to the web page "Theory and Implementation of Local Binary Pattern".
00000000(1)→00000001(1)=spot
11111111(255)→00000002(2)=spot/flat
00000110(6)→00000004(4)=line end
00001100(12)→00000004(4)=line end
00011000(24)→00000004(4)=line end

11000011 (195)→00000008 (8)=edge
10000111(135)→00000008(8)=edge
00001111(15)→00000008(8)=edge

00000111(7)→00000010(16)=corner
00001110(14)→00000010(16)=corner
00011100 (28)→00000010 (16)=corner

ヒストグラム生成部(度数(頻度)分布算定部)35は、バイナリパターンBPまたは変換後バイナリパターンBPLに基づいてヒストグラムを生成する。LBP Histogram、Improved RI LBP Histogramの場合、ヒストグラム生成部35は、バイナリパターンに該当するビンに対してカウントアップし、全画素分をカウントアップすることによりヒストグラムを生成する。設定された大きさ(本実施形態では64pix×64pixの画素ブロック)のブロック別のヒストグラムを算出した後、ヒストグラムを連結することによりヒストグラムを生成する。画像V全体のヒストグラムを生成してもよい。 A histogram generator (frequency distribution calculator) 35 generates a histogram based on the binary pattern BP or the converted binary pattern BPL. In the case of the LBP Histogram and the Improved RI LBP Histogram, the histogram generator 35 counts up the bin corresponding to the binary pattern and counts up all the pixels to generate the histogram. After calculating a histogram for each block of a set size (pixel block of 64 pix×64 pix in this embodiment), a histogram is generated by concatenating the histograms. A histogram of the entire image V may be generated.

以上、制御部20および特徴点検出器30の機能的構成について説明した。以下、図3から図11を用いて、撮像された画像Vのそれぞれの画素について、3×3画素値を使用して、図2に示す、Normal LBP、Improved LBP、CS LBP、RI LBP、Uniform LBP、LBP Histogram、Improved RI LBP Histogramの各種LBPの特徴量を生成するために実行される画像処理、各種LBP特徴量生成処理等について具体的に説明する。 The functional configurations of the control unit 20 and the feature point detector 30 have been described above. 3 to 11, normal LBP, improved LBP, CS LBP, RI LBP, uniform shown in FIG. Image processing, various LBP feature amount generation processing, and the like executed to generate feature amounts of various LBPs such as LBP, LBP Histogram, and Improved RI LBP Histogram will be specifically described.

(LBP設定処理)
はじめに、画像処理を行う前に、図3に示す、ハードウェアアクセラレータAで実行する処理をユーザが選択したLBPにあわせた構成とするためのLBP設定処理(図4、図2参照)を行う。
(LBP setting process)
First, before image processing is performed, LBP setting processing (see FIGS. 4 and 2) is performed to configure the processing to be executed by the hardware accelerator A according to the LBP selected by the user, as shown in FIG.

まず、ユーザは、画像Vの画素の特徴量の生成を行うLBPを選択する。処理選択部21は、各種設定記憶部45に記憶された各LBPと実行する処理との組み合わせ(図2参照)を参照し、ユーザの選択したLBPに対応する処理を確認する(ステップS101)。 First, the user selects an LBP for generating feature amounts of pixels of the image V. FIG. The processing selection unit 21 refers to the combination of each LBP and the processing to be executed stored in the various setting storage unit 45 (see FIG. 2), and confirms the processing corresponding to the LBP selected by the user (step S101).

ユーザの選択したLBPにリファレンス値算出処理が対応する場合(ステップS102;Yes)、リファレンス値算出部32を実行可能状態にする(ステップS103)。ユーザの選択したLBPにリファレンス値算出処理が対応しない場合(ステップS102;No)、リファレンス値算出部32を実行可能状態にしない。 If the reference value calculation process corresponds to the LBP selected by the user (step S102; Yes), the reference value calculation unit 32 is made executable (step S103). If the reference value calculation process does not correspond to the LBP selected by the user (step S102; No), the reference value calculation unit 32 is not enabled.

ステップS104に進み、処理選択部21は、ユーザの選択したLBPに対応する比較パターンを各種設定記憶部45から選択し、バイナリパターン記憶部43に記憶する。 Proceeding to step S<b>104 , the processing selection unit 21 selects a comparison pattern corresponding to the LBP selected by the user from the various setting storage unit 45 and stores it in the binary pattern storage unit 43 .

ステップS105に進み、ユーザの選択したLBPにバイナリパターン変換処理が対応する場合(ステップS105;Yes)、バイナリパターン変換部34を実行可能状態にする(ステップS106)。ユーザの選択したLBPにバイナリパターン変換処理が対応しない場合(ステップS105;No)、バイナリパターン変換部34を実行可能状態にしない。 Proceeding to step S105, when the binary pattern conversion process corresponds to the LBP selected by the user (step S105; Yes), the binary pattern conversion unit 34 is made executable (step S106). If the binary pattern conversion process does not correspond to the LBP selected by the user (step S105; No), the binary pattern conversion unit 34 is not enabled.

ステップS107に進み、ユーザの選択したLBPにヒストグラム生成処理が対応する場合(ステップS107;Yes)、ヒストグラム生成部35を実行可能状態にする(ステップS108)。ユーザの選択したLBPにヒストグラム生成処理が対応しない場合(ステップS107;No)、ヒストグラム生成部35を実行可能状態にしない。以上で、LBP設定処理を終了する。 Proceeding to step S107, if the histogram generation process corresponds to the LBP selected by the user (step S107; Yes), the histogram generation unit 35 is enabled (step S108). If the histogram generation process does not correspond to the LBP selected by the user (step S107; No), the histogram generation unit 35 is not enabled. With this, the LBP setting process is completed.

(画像処理)
LBP設定処理が終了した後、図6に示すように、撮像された画像Vのそれぞれの画素について、LBP特徴量を算出するための画像処理を実行する。なお、画像Vの全画素数をk個とする。
(Image processing)
After the LBP setting process is completed, as shown in FIG. 6, image processing for calculating the LBP feature amount is executed for each pixel of the imaged image V. FIG. Assume that the total number of pixels of the image V is k.

はじめに、撮像部50は、設定されたフレームレートで設定された指定撮像範囲を撮像し、画像取得部22は、撮像された画像Vを撮像画像記憶部41に記憶させる(ステップS201)。 First, the imaging unit 50 captures an image of a designated imaging range set at a set frame rate, and the image acquiring unit 22 stores the captured image V in the captured image storage unit 41 (step S201).

次に、n(1≦n≦k)画素目の画素値の取り込みを始める(ステップS202)。画素値取得部31は、撮像画像記憶部41に記憶された画像Vからn画素目の画素値およびそのn画素目の周囲8画素の画素値を取得する(ステップS203)。 Next, the acquisition of the pixel value of the n-th (1≤n≤k) pixel is started (step S202). The pixel value acquisition unit 31 acquires the pixel value of the n-th pixel and the pixel values of eight pixels surrounding the n-th pixel from the image V stored in the captured image storage unit 41 (step S203).

次のステップに進み、ユーザが設定したLBPに対応する、後述する各種LBP特徴量生成処理を実行する(ステップS204)。 Proceeding to the next step, various LBP feature amount generation processes (described later) corresponding to the LBP set by the user are executed (step S204).

ステップ205に進み、n=k画素目であるか否かを判別する。n=k画素目でない場合(ステップS205;No)、n=n+1とし(ステップS206)、ステップS203に戻る。n=k画素目である場合(ステップS205;Yes)、ステップS207へ進む。 Proceeding to step 205, it is determined whether or not n=kth pixel. If n is not the k-th pixel (step S205; No), n=n+1 is set (step S206), and the process returns to step S203. If n=kth pixel (step S205; Yes), the process proceeds to step S207.

ステップS207では、特徴量送信部23は、バイナリパターン生成処理、バイナリパターン変換処理、ヒストグラム生成処理のうち、最後に実行した処理で生成された特徴量を、バイナリパターン記憶部43またはヒストグラム記憶部44から取得し、通信部60を介して、外部機器等へ送信し、画像処理を終了する。 In step S<b>207 , the feature amount transmission unit 23 sends the feature amount generated by the last executed process among the binary pattern generation process, the binary pattern conversion process, and the histogram generation process to the binary pattern storage unit 43 or the histogram storage unit 44 . , and transmitted to an external device or the like via the communication unit 60, and the image processing ends.

引き続き、画像処理のステップS204で実行される、各種LBP特徴量生成処理について、図7を参照して説明する。 Subsequently, various LBP feature amount generation processing executed in step S204 of image processing will be described with reference to FIG.

(各種LBP特徴量生成処理)
まず、LBP設定処理でリファレンス値算出部32が実行可能状態である場合(ステップS301;Yes)、後述するリファレンス値算出処理を実行し(ステップS302)、実行後ステップS303へ進む。LBP設定処理でリファレンス値算出部32が実行可能状態でない場合(ステップS301;No)、ステップS303へ進む。
(Various LBP feature amount generation processing)
First, when the reference value calculation unit 32 is in the executable state in the LBP setting process (step S301; Yes), the reference value calculation process, which will be described later, is executed (step S302), and after the execution, the process proceeds to step S303. When the reference value calculation unit 32 is not in the executable state in the LBP setting process (step S301; No), the process proceeds to step S303.

次に、後述するバイナリパターン生成処理を実行する(ステップS303)。 Next, binary pattern generation processing, which will be described later, is executed (step S303).

その後、ステップS304に進み、LBP設定処理でバイナリパターン変換部34が実行可能状態である場合(ステップS304;Yes)、後述するバイナリパターン変換処理を実行し(ステップS305)、実行後ステップS306へ進む。LBP設定処理でバイナリパターン変換部34が実行可能でない場合(ステップS304;No)、ステップS306へ進む。 After that, the process proceeds to step S304, and when the binary pattern conversion unit 34 is in an executable state in the LBP setting process (step S304; Yes), the binary pattern conversion process described later is executed (step S305), and after execution, the process proceeds to step S306. . If the binary pattern conversion unit 34 is not executable in the LBP setting process (step S304; No), the process proceeds to step S306.

LBP設定処理でヒストグラム生成部35が実行可能状態である場合(ステップS306;Yes)、後述するヒストグラム生成処理を実行し(ステップS307)、実行後各種LBP特徴量生成処理を終了する。LBP設定処理でヒストグラム生成部35が実行可能状態でない場合(ステップS306;No)、各種LBP特徴量生成処理を終了する。 When the histogram generation unit 35 is ready for execution in the LBP setting process (step S306; Yes), the histogram generation process described later is executed (step S307), and various LBP feature amount generation processes are terminated after the execution. When the histogram generation unit 35 is not in an executable state in the LBP setting process (step S306; No), various LBP feature amount generation processes are terminated.

続いて、各種LBP特徴量生成処理で実行されるリファレンス値算出処理、バイナリパターン生成処理、バイナリパターン変換処理、ヒストグラム生成処理を順に説明する。 Subsequently, reference value calculation processing, binary pattern generation processing, binary pattern conversion processing, and histogram generation processing executed in various LBP feature amount generation processing will be described in order.

(リファレンス値算出処理)
リファレンス値算出処理では、まず、図8に示すように、リファレンス値算出部32は、各種設定記憶部45から、ユーザが選択したLBPに対応するフィルタ係数(フィルタ)を取得する(ステップS401)。
(Reference value calculation processing)
In the reference value calculation process, first, as shown in FIG. 8, the reference value calculation unit 32 acquires the filter coefficient (filter) corresponding to the LBP selected by the user from the various setting storage unit 45 (step S401).

次に、リファレンス値算出部32は、取得したフィルタ係数を使用して、n番目の画素およびn番目の画素の周囲の8画素の画素値に対してフィルタ処理を実行する(ステップS402)。 Next, the reference value calculator 32 uses the acquired filter coefficient to perform filtering on the pixel values of the n-th pixel and eight pixels surrounding the n-th pixel (step S402).

最後に、リファレンス値算出部32は、フィルタ処理の結果リファレンス値を取得し、リファレンス値をリファレンス値記憶部42に記憶し(ステップS403)、リファレンス値算出処理を終了する。 Finally, the reference value calculation unit 32 acquires the reference value as a result of the filtering process, stores the reference value in the reference value storage unit 42 (step S403), and ends the reference value calculation process.

(バイナリパターン生成処理)
引き続き、以下、図9を参照して、バイナリパターン生成処理について説明する。
(Binary pattern generation processing)
Subsequently, the binary pattern generation processing will be described below with reference to FIG.

まず、バイナリパターン生成部33は、LBP設定処理のステップS104で処理選択部21が選択した比較モードをバイナリパターン記憶部43から取得する(ステップS501)。 First, the binary pattern generation unit 33 acquires the comparison mode selected by the processing selection unit 21 in step S104 of the LBP setting process from the binary pattern storage unit 43 (step S501).

次に、バイナリパターン生成部33は、比較元の画素値Rを取得する。比較元、比較先の画素値については、図1参照(ステップS502)。 Next, the binary pattern generator 33 acquires the pixel value R of the comparison source. See FIG. 1 for the comparison source and comparison target pixel values (step S502).

続いて、バイナリパターン生成部33は、比較先の画素値Cを取得する。(ステップS503)。 Subsequently, the binary pattern generator 33 acquires the pixel value C to be compared. (Step S503).

その後、バイナリパターン生成部33は、比較元の画素値Rと比較元の画素値Cとを比較する(ステップS504)。比較元の画素値Rより比較元の画素値Cが大きい場合(ステップS504;Yes)、バイナリパターン生成部33は、0を出力し、バイナリパターン記憶部43に記憶する(ステップS505)。比較元の画素値Rと比較元の画素値Cとが等しい、或いは、比較元の画素値Rより比較元の画素値Cが小さい場合(ステップS504;No)、バイナリパターン生成部33は、1を出力し、バイナリパターン記憶部43に記憶する(ステップS506)。 After that, the binary pattern generation unit 33 compares the comparison source pixel value R and the comparison source pixel value C (step S504). When the comparison source pixel value C is larger than the comparison source pixel value R (step S504; Yes), the binary pattern generation unit 33 outputs 0 and stores it in the binary pattern storage unit 43 (step S505). If the comparison source pixel value R is equal to the comparison source pixel value C, or if the comparison source pixel value C is smaller than the comparison source pixel value R (step S504; No), the binary pattern generation unit 33 is output and stored in the binary pattern storage unit 43 (step S506).

ステップS507に進み、n=kか否かを確認する。n=kである場合(ステップS507;Yes)、バイナリパターン生成部33は、バイナリパターンBPを生成し(ステップS508)、バイナリパターン生成処理を終了する。n=kでない場合(ステップS507;No)、バイナリパターン生成処理を終了する。 Proceeding to step S507, it is checked whether or not n=k. If n=k (step S507; Yes), the binary pattern generation unit 33 generates the binary pattern BP (step S508), and ends the binary pattern generation process. If not n=k (step S507; No), the binary pattern generation process ends.

(バイナリパターン変換処理)
続いて、以下、図10を参照して、バイナリパターン変換処理について説明する。
(Binary pattern conversion processing)
Next, the binary pattern conversion process will be described below with reference to FIG.

まず、バイナリパターン変換部34は、ユーザが選択したLBPに対応するルックアップテーブルを各種設定記憶部45から参照して、バイナリパターンBPに適用する(ステップS601)。 First, the binary pattern conversion unit 34 refers to the lookup table corresponding to the LBP selected by the user from the various setting storage unit 45, and applies it to the binary pattern BP (step S601).

バイナリパターン変換部34は、ルックアップテーブルによりバイナリパターンBPから変換された変換後バイナリパターンBPLをバイナリパターン記憶部43に記憶し(ステップS602)、バイナリパターン変換処理を終了する。 The binary pattern conversion unit 34 stores the post-conversion binary pattern BPL converted from the binary pattern BP by the lookup table in the binary pattern storage unit 43 (step S602), and terminates the binary pattern conversion process.

(ヒストグラム生成処理)
引き続いて、以下、図11を参照して、ヒストグラム生成処理について説明する。
(Histogram generation processing)
Subsequently, the histogram generation processing will be described below with reference to FIG. 11 .

まず、ヒストグラム生成部35は、ユーザが選択したLBPに応じてバイナリパターンBPまたは変換後バイナリパターンBPLを事前に設定されたビンに対してヒストグラム一時記憶部37でカウントアップする(ステップS701)。このとき、画像Vを3×3画素等の大きさのブロックに分割して、ブロック内の画素に対してLBPを計算し、ブロック毎にビン数256でLBPのヒストグラムを生成し、ブロック数分のヒストグラムを連結してヒストグラムを生成する。或いは画像V全体でのヒストグラムを生成する。 First, the histogram generator 35 counts up the binary pattern BP or post-conversion binary pattern BPL in the histogram temporary storage 37 according to the user-selected LBP (step S701). At this time, the image V is divided into blocks of a size such as 3×3 pixels, the LBP is calculated for the pixels in each block, and the histogram of the LBP is generated with 256 bins for each block. Concatenate the histograms of to generate a histogram. Alternatively, a histogram of the entire image V is generated.

続いて、n=k(全画素カウントアップ完了)である場合(ステップS702;Yes)、ヒストグラム生成部35は、カウントアップによって生成したヒストグラムを出力し、ヒストグラム記憶部44に記憶し(ステップS703)、ヒストグラム生成処理を終了する。n=kでない(全画素カウントアップ未完了)場合(ステップS702;No)、ヒストグラム生成処理を終了する。 Subsequently, when n=k (completed count-up of all pixels) (step S702; Yes), the histogram generation unit 35 outputs the histogram generated by the count-up and stores it in the histogram storage unit 44 (step S703). , the histogram generation process ends. If n is not k (counting up of all pixels is not completed) (step S702; No), the histogram generation process ends.

以上、本実施形態におけるハードウェアアクセラレータAを備える画像処理装置10は、ユーザが選択したLBPに応じてハードウェアアクセラレータA内の4つの処理(リファレンス値算出処理、バイナリパターン生成処理、バイナリパターン変換処理、ヒストグラム生成処理)をこの順番で組み合わせ、バイナリパターン生成処理と、リファレンス値算出処理、バイナリパターン変換処理、ヒストグラム生成処理のうちの少なくとも1つの処理と、を実行することによって各種LBP特徴量を生成できる。従って、各種LBPに対してそれぞれハードウェアアクセラレータを構成した場合に比べて、重複する処理をまとめることができるので、ハードウェアアクセラレータAの回路規模の増大を抑制することができ、好適である。 As described above, the image processing apparatus 10 including the hardware accelerator A according to the present embodiment performs four processes (reference value calculation process, binary pattern generation process, binary pattern conversion process) in the hardware accelerator A according to the LBP selected by the user. , histogram generation processing) are combined in this order, and at least one of binary pattern generation processing, reference value calculation processing, binary pattern conversion processing, and histogram generation processing is executed to generate various LBP feature amounts. can. Therefore, compared to the case where hardware accelerators are configured for each of the LBPs, redundant processing can be grouped together, so it is possible to suppress an increase in the circuit scale of the hardware accelerator A, which is preferable.

[変形例]
上記実施形態では、画像処理装置10の特徴点検出器30をハードウェアアクセラレータAとしたが、ハードウェアアクセラレータは、例えば、リファレンス値算出部、バイナリパターン生成部およびバイナリパターン変換部を備え、リファレンス値算出部とバイナリパターン変換部とのうち、少なくとも1つとバイナリパターン生成部とを使用することにより得られたバイナリパターンまたは変換後バイナリパターンを画像処理装置に送信(出力)するものであり、Normal LBP、Improved LBP、CS(Center-Symmetric) LBP、RI(Rotation Invariant) LBP、Uniform LBPの各種LBPのうちからユーザが選択したLBPによる特徴量を生成するものであってもよい。或いは、ハードウェアアクセラレータは、リファレンス値算出部とバイナリパターン生成部とを備え、少なくともバイナリパターン生成部を使用することにより得られたバイナリパターンを画像処理装置に送信するものであってもよい。或いは、他の組合せであってもよい。
[Modification]
In the above embodiment, the hardware accelerator A is used as the feature point detector 30 of the image processing apparatus 10. The hardware accelerator includes, for example, a reference value calculator, a binary pattern generator, and a binary pattern converter. A binary pattern obtained by using at least one of a calculation unit and a binary pattern conversion unit and a binary pattern generation unit or a post-conversion binary pattern is transmitted (output) to an image processing device. , Improved LBP, CS (Center-Symmetric) LBP, RI (Rotation Invariant) LBP, and Uniform LBP. Alternatively, the hardware accelerator may include a reference value calculator and a binary pattern generator, and transmit a binary pattern obtained by using at least the binary pattern generator to the image processing apparatus. Alternatively, other combinations may be used.

或いは、ハードウェアアクセラレータにアクセラレータ記憶部40の各機能を有する特徴点検出器記憶部を設けた画像処理装置としてもよい。或いは、ハードウェアアクセラレータAを2つ以上実装した構成の画像処理装置として、より高速に特徴量の算定をできるようにしてもよい。 Alternatively, the image processing apparatus may include a feature point detector storage unit having each function of the accelerator storage unit 40 in the hardware accelerator. Alternatively, an image processing apparatus having a configuration in which two or more hardware accelerators A are mounted may be configured to be able to calculate feature amounts at a higher speed.

或いは、上記以外のフィルタ、比較モード、ルックアップテーブルやヒストグラムを使用することにより、Normal LBP、Improved LBP、CS LBP、RI LBP、Uniform LBP、LBP Histogram、Improved RI LBP Histogram以外のLBPによる特徴量を生成することもできる。 Alternatively, by using filters, comparison modes, lookup tables and histograms other than the above, the feature amount by LBP other than Normal LBP, Improved LBP, CS LBP, RI LBP, Uniform LBP, LBP Histogram, Improved RI LBP Histogram can also be generated.

また、上記実施形態でのフィルタは、3×3であったが、これに限らない。5×5や他の数のフィルタであってもよい。 Moreover, although the filter in the above embodiment is 3×3, it is not limited to this. 5×5 or other numbers of filters are possible.

上記実施形態でのフィルタには、ローパスフィルタ(LPF:Low Pass Filter)、ハイパスフィルタ(HPF:High Pass Filter)、バンドパスフィルタ(BP:Band Pass Filter)、バンドエリミネーションフィルタ(BEF:Band Elimination Filter)等を使用してもよい。或いは、εフィルタ等を使用してもよい。また、タップ数を5×5等にすることもできる。 The filters in the above embodiments include a low pass filter (LPF), a high pass filter (HPF), a band pass filter (BP), and a band elimination filter (BEF). ), etc. may be used. Alternatively, an ε filter or the like may be used. Also, the number of taps can be set to 5×5 or the like.

上記実施形態でのルックアップテーブルには、BoF(Bag of Features)等のクラスタリング用テーブルを使用してもよい。 A clustering table such as BoF (Bag of Features) may be used as the lookup table in the above embodiment.

以上、本発明の好ましい実施形態について説明したが、本発明は係る特定の実施形態に限定されるものではなく、本発明には、特許請求の範囲に記載された発明とその均等の範囲が含まれる。以下に、本願出願の当初の特許請求の範囲に記載された発明を付記する。 Although the preferred embodiments of the present invention have been described above, the present invention is not limited to such specific embodiments, and the present invention includes the invention described in the claims and their equivalents. be The invention described in the original claims of the present application is appended below.

(付記)
(付記1)
撮像された画像の、それぞれの画素および前記それぞれの画素の周囲の複数の画素の画素値に対して、フィルタを使用することによりリファレンス値を算出するリファレンス値算出部と、
前記撮像された画像の、それぞれの画素の画素値または前記リファレンス値と、前記それぞれの画素の周囲の複数の画素の画素値と、を比較することによりバイナリパターンを生成するバイナリパターン生成部と、
前記バイナリパターンを変換後バイナリパターンに変換するバイナリパターン変換部と、
前記バイナリパターンまたは前記変換後バイナリパターンに基づいてヒストグラムを生成するヒストグラム生成部と、を備え、
前記リファレンス値算出部と前記バイナリパターン変換部と前記ヒストグラム生成部とのうち、少なくとも1つと、前記バイナリパターン生成部と、を使用することにより得られた前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを出力する、
ハードウェアアクセラレータ。
(Appendix)
(Appendix 1)
a reference value calculation unit that calculates a reference value by using a filter for pixel values of each pixel and a plurality of pixels surrounding each pixel of the captured image;
a binary pattern generation unit that generates a binary pattern by comparing the pixel value of each pixel or the reference value of the captured image with the pixel values of a plurality of pixels surrounding each pixel;
a binary pattern conversion unit that converts the binary pattern into a post-conversion binary pattern;
a histogram generation unit that generates a histogram based on the binary pattern or the post-conversion binary pattern,
The binary pattern obtained by using at least one of the reference value calculator, the binary pattern converter, and the histogram generator, and the binary pattern generator, the converted binary pattern, or the output a histogram,
hardware accelerator.

(付記2)
前記リファレンス値算出部は、前記フィルタによって、前記それぞれの画素の画素値を出力する、または前記それぞれの画素の画素値および前記それぞれの画素の周囲の複数の画素の画素値の平均の画素値または重み付き平均の画素値を出力する、
付記1に記載のハードウェアアクセラレータ。
(Appendix 2)
The reference value calculation unit outputs the pixel value of each pixel by the filter, or an average pixel value of the pixel value of each pixel and the pixel values of a plurality of pixels surrounding each pixel, or outputs the weighted average pixel value,
A hardware accelerator as described in Appendix 1.

(付記3)
前記バイナリパターン生成部は、隣接する画素同士の画素値を比較する、前記画素を点対称にして画素値を比較する、または、前記それぞれの画素の周囲の複数の画素の画素値と前記リファレンス値とを比較する、
付記1または2に記載のハードウェアアクセラレータ。
(Appendix 3)
The binary pattern generation unit compares the pixel values of adjacent pixels, compares the pixel values of the pixels with point symmetry, or compares the pixel values of a plurality of pixels surrounding each of the pixels with the reference value. compare with
The hardware accelerator according to appendix 1 or 2.

(付記4)
前記バイナリパターン変換部は、8ビットのルックアップテーブルで変換を行う、
付記1から3のいずれか1つに記載のハードウェアアクセラレータ。
(Appendix 4)
The binary pattern conversion unit converts with an 8-bit lookup table,
4. The hardware accelerator according to any one of appendices 1-3.

(付記5)
前記ヒストグラム生成部は、前記バイナリパターンに該当するビンに対してカウントアップすることによりヒストグラムを生成する、
付記1から4のいずれか1つに記載のハードウェアアクセラレータ。
(Appendix 5)
The histogram generation unit generates a histogram by counting up bins corresponding to the binary pattern.
5. The hardware accelerator according to any one of appendices 1 to 4.

(付記6)
付記1から6のいずれか1つに記載のハードウェアアクセラレータと、
前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを取得する制御部と、
前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを記憶する記憶部と、
を備える、
画像処理装置。
(Appendix 6)
a hardware accelerator according to any one of Appendices 1 to 6;
a control unit that acquires the binary pattern, the post-conversion binary pattern, or the histogram;
a storage unit that stores the binary pattern, the converted binary pattern, or the histogram;
comprising
Image processing device.

(付記7)
ハードウェアアクセラレータに、
撮像された画像の、それぞれの画素および前記それぞれの画素の周囲の複数の画素の画素値に対して、フィルタを使用することによりリファレンス値を算出させ、
前記撮像された画像の、それぞれの画素の画素値または前記リファレンス値と前記それぞれの画素の周囲の複数の画素の画素値とを比較することによりバイナリパターンを生成させ、
前記バイナリパターンを変換後バイナリパターンに変換させ、
前記バイナリパターンまたは前記変換後バイナリパターンに基づいてヒストグラムを生成させ、
前記リファレンス値と前記変換後バイナリパターンと前記ヒストグラムとのうち、少なくとも1つと、前記バイナリパターンと、を出力させる、
画像処理方法。
(Appendix 7)
hardware accelerator,
calculating a reference value by using a filter for pixel values of each pixel and a plurality of pixels surrounding each pixel of the captured image;
generating a binary pattern by comparing a pixel value of each pixel or the reference value of the captured image with pixel values of a plurality of pixels surrounding each pixel;
converting the binary pattern into a post-conversion binary pattern;
generating a histogram based on the binary pattern or the converted binary pattern;
outputting at least one of the reference value, the converted binary pattern, and the histogram, and the binary pattern;
Image processing method.

10…画像処理装置、20…制御部、21…処理選択部、22…画像取得部、23…特徴量送信部、30…特徴点検出器、31…画素値取得部、32…リファレンス値算出部、33…バイナリパターン生成部、34…バイナリパターン変換部、35…ヒストグラム生成部、36…特徴点検出器記憶部、37…ヒストグラム一時記憶部、40…記憶部、41…撮像画像記憶部、42…リファレンス値記憶部、43…バイナリパターン記憶部、44…ヒストグラム記憶部、45…各種設定記憶部、50…撮像部、51…撮像装置、52…駆動装置、60…通信部、61…通信装置、70…表示部、71…表示装置、80…入力部、81…入力装置、A…ハードウェアアクセラレータ、BP…バイナリパターン、BPL…変換後バイナリパターン、L…撮像範囲、V…画像 DESCRIPTION OF SYMBOLS 10... Image processing apparatus 20... Control part 21... Processing selection part 22... Image acquisition part 23... Feature-value transmission part 30... Feature point detector 31... Pixel value acquisition part 32... Reference value calculation part , 33 Binary pattern generation unit 34 Binary pattern conversion unit 35 Histogram generation unit 36 Feature point detector storage unit 37 Histogram temporary storage unit 40 Storage unit 41 Captured image storage unit 42 Reference value storage unit 43 Binary pattern storage unit 44 Histogram storage unit 45 Various setting storage unit 50 Imaging unit 51 Imaging device 52 Driving device 60 Communication unit 61 Communication device , 70... Display unit, 71... Display device, 80... Input unit, 81... Input device, A... Hardware accelerator, BP... Binary pattern, BPL... Binary pattern after conversion, L... Imaging range, V... Image

Claims (9)

画像の、それぞれの画素の画素値および前記それぞれの画素の周囲の複数の画素の画素値に対して、フィルタを使用することによりリファレンス値を導出する、複数種のフィルタを備えるリファレンス値導出部と、
前記画像の、それぞれの画素の画素値または前記リファレンス値と、前記それぞれの画素の周囲の複数の画素の画素値を比較することによりバイナリパターンを生成する、複数種の比較モードを備えるバイナリパターン生成部と、
前記バイナリパターンを変換後バイナリパターンに変換するバイナリパターン変換部と、
前記複数種の比較モードのうち任意に設定された比較モードで、前記複数種のフィルタのうち任意に設定されたフィルタを使用することにより導出されたリファレンス値を前記それぞれの画素の周囲の複数の画素の画素値と比較することにより生成されたバイナリパターンまたは前記変換後バイナリパターンに基づいてヒストグラムを生成するヒストグラム生成部と、を備え、
入力装置を介してユーザにより選択されたLBP(Local Binary Pattern)の生成に対応する処理に応じて、前記リファレンス値導出部と前記バイナリパターン変換部と前記ヒストグラム生成部とのうち、少なくとも1つと、前記バイナリパターン生成部と、を選択的に使用することにより得られた前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを出力する、
ハードウェアアクセラレータ。
a reference value derivation unit having a plurality of types of filters for deriving a reference value by using a filter for the pixel value of each pixel and the pixel values of a plurality of pixels surrounding each pixel of the image; ,
Binary pattern generation with multiple comparison modes, wherein a binary pattern is generated by comparing the pixel value of each pixel of the image or the reference value with the pixel values of a plurality of pixels surrounding each pixel. Department and
a binary pattern conversion unit that converts the binary pattern into a post-conversion binary pattern;
A reference value derived by using an arbitrarily set filter among the plurality of types of filters in a comparison mode arbitrarily set among the plurality of types of comparison modes is applied to a plurality of surrounding pixels of the respective pixels. A histogram generation unit that generates a histogram based on the binary pattern generated by comparing the pixel value of the pixel or the post-conversion binary pattern,
At least one of the reference value derivation unit, the binary pattern conversion unit, and the histogram generation unit according to processing corresponding to generation of LBP (Local Binary Pattern) selected by a user via an input device ; Outputting the binary pattern, the converted binary pattern or the histogram obtained by selectively using the binary pattern generator,
hardware accelerator.
前記リファレンス値導出部は、前記フィルタによって、前記それぞれの画素の画素値を出力する、または前記それぞれの画素の画素値および前記それぞれの画素の周囲の複数の画素の画素値の平均の画素値または重み付き平均の画素値を出力する、
請求項1に記載のハードウェアアクセラレータ。
The reference value derivation unit outputs the pixel value of each pixel by the filter, or an average pixel value of the pixel value of each pixel and the pixel values of a plurality of pixels surrounding each pixel, or outputs the weighted average pixel value,
The hardware accelerator according to claim 1.
前記バイナリパターン生成部は、隣接する画素同士の画素値を比較する、前記画素を点対称にして画素値を比較する、または、前記それぞれの画素の周囲の複数の画素の画素値と前記リファレンス値とを比較する、
請求項1または2に記載のハードウェアアクセラレータ。
The binary pattern generation unit compares the pixel values of adjacent pixels, compares the pixel values of the pixels with point symmetry, or compares the pixel values of a plurality of pixels surrounding each of the pixels with the reference value. compare with
3. The hardware accelerator according to claim 1 or 2.
前記バイナリパターン変換部は、8ビットのルックアップテーブルで変換を行う、
請求項1から3のいずれか1項に記載のハードウェアアクセラレータ。
The binary pattern conversion unit converts with an 8-bit lookup table,
A hardware accelerator according to any one of claims 1 to 3.
前記ヒストグラム生成部は、前記バイナリパターンに該当するビンに対してカウントアップすることによりヒストグラムを生成する、
請求項1から4のいずれか1項に記載のハードウェアアクセラレータ。
The histogram generation unit generates a histogram by counting up bins corresponding to the binary pattern.
A hardware accelerator according to any one of claims 1 to 4.
外部からの選択操作に基づき、複数種のフィルタから前記リファレンス値導出部が使用するフィルタを設定することを特徴とする、
請求項1から5のいずれか1項に記載のハードウェアアクセラレータ。
Based on an external selection operation, the filter used by the reference value derivation unit is set from a plurality of types of filters,
A hardware accelerator according to any one of claims 1 to 5.
外部からの選択操作に基づき、複数種の比較モードから前記バイナリパターン生成部が実行する比較モードを設定することを特徴とする、
請求項1から6のいずれか1項に記載のハードウェアアクセラレータ。
A comparison mode to be executed by the binary pattern generation unit is set from a plurality of types of comparison modes based on an external selection operation,
A hardware accelerator according to any one of claims 1 to 6.
請求項1から7のいずれか1項に記載のハードウェアアクセラレータと、
前記ユーザによるLBP(Local Binary Pattern)の選択を受け付ける入力装置を有する入力部と、
前記入力部により受け付けられた前記LBPの生成に対応する処理を選択する処理選択部と、
前記処理選択部により選択された処理に応じた前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを取得する制御部と、
前記制御部により取得された前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを記憶する記憶部と、
を備える、
画像処理装置。
a hardware accelerator according to any one of claims 1 to 7;
an input unit having an input device that receives selection of LBP (Local Binary Pattern) by the user;
a process selection unit that selects a process corresponding to the generation of the LBP received by the input unit;
a control unit that acquires the binary pattern, the post-conversion binary pattern, or the histogram according to the processing selected by the processing selection unit ;
a storage unit that stores the binary pattern, the post-conversion binary pattern, or the histogram acquired by the control unit ;
comprising
Image processing device.
画像の、それぞれの画素の画素値および前記それぞれの画素の周囲の複数の画素の画素値に対して、フィルタを使用することによりリファレンス値を導出する、複数種のフィルタを備えるリファレンス値導出部と、
前記画像の、それぞれの画素の画素値または前記リファレンス値と、前記それぞれの画素の周囲の複数の画素の画素値を比較することによりバイナリパターンを生成する、複数種の比較モードを備えるバイナリパターン生成部と、
前記バイナリパターンを変換後バイナリパターンに変換するバイナリパターン変換部と、を備えたハードウェアアクセラレータの画像処理方法であって、
前記複数種の比較モードのうち任意に設定された比較モードで、前記複数種のフィルタのうち任意に設定されたフィルタを使用することにより導出されたリファレンス値を前記それぞれの画素の周囲の複数の画素の画素値と比較することにより生成されたバイナリパターンまたは前記変換後バイナリパターンに基づいてヒストグラムを生成する生成ステップと、
入力装置を介してユーザにより選択されたLBP(Local Binary Pattern)の生成に対応する処理に応じて、前記リファレンス値導出部と前記バイナリパターン変換部と前記生成ステップとのうち、少なくとも1つと、前記バイナリパターン生成部と、を選択的に使用することにより得られた前記バイナリパターン、前記変換後バイナリパターンまたは前記ヒストグラムを出力する出力ステップと、
を含む画像処理方法。
a reference value derivation unit having a plurality of types of filters for deriving a reference value by using a filter for the pixel value of each pixel and the pixel values of a plurality of pixels surrounding each pixel of the image; ,
Binary pattern generation with multiple comparison modes, wherein a binary pattern is generated by comparing the pixel value of each pixel of the image or the reference value with the pixel values of a plurality of pixels surrounding each pixel. Department and
An image processing method for a hardware accelerator, comprising: a binary pattern conversion unit that converts the binary pattern into a post-conversion binary pattern,
A reference value derived by using an arbitrarily set filter among the plurality of types of filters in a comparison mode arbitrarily set among the plurality of types of comparison modes is applied to a plurality of surrounding pixels of the respective pixels. generating a histogram based on the binary pattern generated by comparing pixel values of pixels or the transformed binary pattern;
At least one of the reference value derivation unit, the binary pattern conversion unit, and the generation step, according to a process corresponding to generation of an LBP (Local Binary Pattern) selected by a user via an input device; an output step of outputting the binary pattern, the converted binary pattern or the histogram obtained by selectively using a binary pattern generator ;
An image processing method including
JP2020160259A 2020-09-24 2020-09-24 HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD Active JP7188426B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2020160259A JP7188426B2 (en) 2020-09-24 2020-09-24 HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD
PCT/JP2021/029475 WO2022064884A1 (en) 2020-09-24 2021-08-10 Hardware accelerator, image processing device, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020160259A JP7188426B2 (en) 2020-09-24 2020-09-24 HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD

Publications (2)

Publication Number Publication Date
JP2022053424A JP2022053424A (en) 2022-04-05
JP7188426B2 true JP7188426B2 (en) 2022-12-13

Family

ID=80846427

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020160259A Active JP7188426B2 (en) 2020-09-24 2020-09-24 HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD

Country Status (2)

Country Link
JP (1) JP7188426B2 (en)
WO (1) WO2022064884A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211179A (en) 2008-02-29 2009-09-17 Canon Inc Image processing method, pattern detection method, pattern recognition method, and image processing device
WO2013105513A1 (en) 2012-01-12 2013-07-18 パナソニック株式会社 Feature extraction device, feature extraction method, and feature extraction program
JP2015225469A (en) 2014-05-27 2015-12-14 キヤノン株式会社 Image processor, image processing method, and program
US20160091947A1 (en) 2014-09-30 2016-03-31 Qualcomm Incorporated Hardware acceleration of computer vision feature detection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211179A (en) 2008-02-29 2009-09-17 Canon Inc Image processing method, pattern detection method, pattern recognition method, and image processing device
WO2013105513A1 (en) 2012-01-12 2013-07-18 パナソニック株式会社 Feature extraction device, feature extraction method, and feature extraction program
JP2015225469A (en) 2014-05-27 2015-12-14 キヤノン株式会社 Image processor, image processing method, and program
US20160091947A1 (en) 2014-09-30 2016-03-31 Qualcomm Incorporated Hardware acceleration of computer vision feature detection

Also Published As

Publication number Publication date
JP2022053424A (en) 2022-04-05
WO2022064884A1 (en) 2022-03-31

Similar Documents

Publication Publication Date Title
US20170229099A1 (en) Display apparatus and method for controlling display apparatus
CN109036333B (en) Display parameter correction method and device of display, terminal equipment and storage medium
US20170193884A1 (en) Display device and driving method and driving module
CN105185291B (en) display drive method, device and display device
CN107682682A (en) A kind of chromaticity coordinates of automatic correction display screen and the method and relevant device of brightness
CN1716314A (en) Automatic image correction circuit
TW201908936A (en) Display apparatus and image processing method thereof
CN109637437A (en) Image display control method, device, medium and display screen control system
JP5119054B2 (en) Capacitive touch control device and data transmission method applied thereto
EP3665644B1 (en) Image processing apparatus, method for processing image and computer-readable recording medium
CN113676713A (en) Image processing method, apparatus, device and medium
US9837026B2 (en) Backlight control method, backlight control device and display apparatus employing a system on chip and a field-programmable gate array
WO2021151278A1 (en) Method and apparatus for vehicle damage assessment based on artificial intelligence, electronic device, and medium
JP7188426B2 (en) HARDWARE ACCELERATOR, IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD
TW202209175A (en) Image correction method and system based on deep learning
CN105654909A (en) Display apparatus and method for controlling same
US20190050963A1 (en) Transmission method of display data, apparatus and mobile device
CN112862703A (en) Image correction method and device based on mobile photographing, electronic equipment and medium
US10147169B2 (en) Image processing device and program
JP2005345678A (en) Portable display unit
US20170083761A1 (en) Method and System for Identifying a Plurality of Reference Points in a Hand Drawing Track
JP2018163298A (en) Image processing device and image processing method
WO2020037630A1 (en) Image processing method, image processing device, electronic device, and storage medium
CN107390880A (en) One kind is based on the contactless multi-angle input equipment of shadow and input method
CN109410873B (en) Driving method and system and display device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210908

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210908

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211102

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220517

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220715

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221114

R150 Certificate of patent or registration of utility model

Ref document number: 7188426

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150