JP4946750B2 - Setting method, identification method and program - Google Patents

Setting method, identification method and program Download PDF

Info

Publication number
JP4946750B2
JP4946750B2 JP2007240061A JP2007240061A JP4946750B2 JP 4946750 B2 JP4946750 B2 JP 4946750B2 JP 2007240061 A JP2007240061 A JP 2007240061A JP 2007240061 A JP2007240061 A JP 2007240061A JP 4946750 B2 JP4946750 B2 JP 4946750B2
Authority
JP
Japan
Prior art keywords
identification
image
scene
sample
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007240061A
Other languages
Japanese (ja)
Other versions
JP2009070284A (en
JP2009070284A5 (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007240061A priority Critical patent/JP4946750B2/en
Publication of JP2009070284A publication Critical patent/JP2009070284A/en
Publication of JP2009070284A5 publication Critical patent/JP2009070284A5/ja
Application granted granted Critical
Publication of JP4946750B2 publication Critical patent/JP4946750B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、設定方法、識別方法及びプログラムに関する。   The present invention relates to a setting method, an identification method, and a program.

デジタルスチルカメラには撮影モードを設定するモード設定ダイヤルを持つものがある。ユーザがダイヤルで撮影モードを設定すると、デジタルスチルカメラは撮影モードに応じた撮影条件(露光時間等)を決定し、撮影を行う。撮影が行われると、デジタルスチルカメラは、画像ファイルを生成する。この画像ファイルには、撮影した画像の画像データに、撮影時の撮影条件等の付加データが付加されている。   Some digital still cameras have a mode setting dial for setting a shooting mode. When the user sets the shooting mode with the dial, the digital still camera determines shooting conditions (such as exposure time) according to the shooting mode and performs shooting. When shooting is performed, the digital still camera generates an image file. In this image file, additional data such as shooting conditions at the time of shooting is added to the image data of the shot image.

付加データを用いて画像データの示す画像のカテゴリ(クラス)を識別することも可能である。但し、この場合、識別可能なカテゴリは、付加データに記録されるデータの種類に限定されてしまう。そこで、画像データを解析し、画像データの示す画像のカテゴリを識別することも行われている(特許文献1、2参照)。
特開平10−302067号公報 特表2006−511000号公報
It is also possible to identify the category (class) of the image indicated by the image data using the additional data. However, in this case, the identifiable category is limited to the type of data recorded in the additional data. Therefore, image data is analyzed to identify the category of the image indicated by the image data (see Patent Documents 1 and 2).
Japanese Patent Laid-Open No. 10-302067 JP 2006-511000 Gazette

識別処理の結果が、ユーザの好みと合わないことがある。このような場合、ユーザの好みに合わせて識別処理の設定を変更することが望ましい。
本発明は、ユーザの好みに合わせた設定変更が容易なインターフェースを提供することを目的とする。
The result of the identification process may not match the user's preference. In such a case, it is desirable to change the setting of the identification process according to the user's preference.
It is an object of the present invention to provide an interface that can be easily changed in accordance with user preferences.

上記目的を達成するための主たる発明は、識別対象を評価する評価関数の値と所定の閾値とを比較し、比較結果に基づいて、あるクラスに前記識別対象が属するか否かを識別する識別処理の設定方法であって、前記閾値に従って前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出することによって、複数のサンプルの中から予め定められた所定数のサンプルを抽出する抽出ステップと、抽出された前記所定数の前記サンプルを前記評価関数の値の順に表示部に並べて表示すると共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示し、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示する表示ステップと、前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更する設定変更ステップとを備えることを特徴とする設定方法である。
The main invention for achieving the above object, and compares the value with a predetermined threshold of the evaluation function for evaluating the identification target based on the comparison result, the identification identifying whether the identification target to a class belongs A process setting method for extracting a predetermined number of samples from a plurality of samples by extracting samples belonging to the class and samples not belonging to the class according to the threshold And displaying the predetermined number of extracted samples arranged on the display unit in the order of the value of the evaluation function, and displaying a mark between the sample belonging to the class and the sample not belonging to the class, A step of displaying the mark between the sample and another sample by moving the position of the mark in accordance with an instruction of , Depending on the position of the mark determined of the user, a setting method characterized in that it comprises a setting change step of changing the setting of the identification process.

本発明の他の特徴については、本明細書及び添付図面の記載により明らかにする。   Other features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

本明細書及び添付図面の記載により、少なくとも、以下の事項が明らかとなる。   At least the following matters will become clear from the description of the present specification and the accompanying drawings.

あるクラスに識別対象が属するか否かを識別する識別処理の設定方法であって、
前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出する抽出ステップと、
抽出された複数の前記サンプルを表示部に並べて表示すると共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示し、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示する表示ステップと、
前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更する設定変更ステップと
を備えることを特徴とする設定方法が、明らかとなる。
この設定方法によれば、ユーザの好みに合わせた設定変更が容易なインターフェースを提供することができる。
A setting method of identification processing for identifying whether or not an identification target belongs to a certain class,
An extraction step of extracting samples belonging to the class and samples not belonging to the class;
A plurality of the extracted samples are displayed side by side on the display unit, and a mark is displayed between the sample belonging to the class and the sample not belonging to the class, and the position of the mark is moved according to a user instruction A display step of displaying the mark between another sample and the sample;
A setting method comprising: a setting changing step for changing the setting of the identification process in accordance with the position of the mark determined by the user will be apparent.
According to this setting method, it is possible to provide an interface that can be easily changed according to the user's preference.

前記設定変更ステップでは、前記マークと前記クラスに属しないサンプルとの間に前記クラスに属するサンプルが位置する状態で、前記マークの位置が決定された場合、前記マークと前記クラスに属しないサンプルとの間の前記クラスに属するサンプルが、前記クラスに属さないものと属性情報が変更され、前記マークと前記クラスに属するサンプルとの間に前記クラスに属しないサンプルが位置する状態で、前記マークの位置が決定された場合、前記マークと前記クラスに属するサンプルとの間の前記クラスに属しないサンプルが、前記クラスに属するものと属性情報が変更され、変更後の前記属性情報に基づいて再学習が行われ、再学習の結果に応じて前記識別処理の設定が変更されることが望ましい。これにより、ユーザの好みを反映した識別処理を行うことができる。   In the setting change step, when the position of the mark is determined in a state where a sample belonging to the class is located between the mark and a sample not belonging to the class, the mark and a sample not belonging to the class In the state where the samples belonging to the class between the mark and the attribute information have been changed, the samples that do not belong to the class are located between the mark and the samples belonging to the class. When the position is determined, the sample information that does not belong to the class between the mark and the sample belonging to the class is changed in attribute information to that belonging to the class, and re-learning based on the changed attribute information It is desirable that the setting of the identification process is changed according to the result of relearning. Thereby, the identification process reflecting a user preference can be performed.

前記抽出ステップでは、クラスタリングされた各クラスタの中から代表となるサンプルを抽出しており、前記設定変更ステップでは、代表となるサンプルの前記属性情報を変更するとき、そのサンプルと同じクラスタに属するサンプルの前記属性情報も変更することが望ましい。これにより、複数のサンプルの属性情報を、一括変更できる。   In the extraction step, a representative sample is extracted from each clustered cluster, and in the setting change step, when the attribute information of the representative sample is changed, the sample belonging to the same cluster as the sample It is desirable to change the attribute information. Thereby, the attribute information of a plurality of samples can be collectively changed.

予め複数の識別処理が用意されており、前記設定変更ステップでは、複数の識別処理の中から、前記ユーザの決定した前記マークの位置に応じた識別処理が選択されることが望ましい。これにより、再学習をしなくて済む。   Preferably, a plurality of identification processes are prepared in advance, and in the setting change step, an identification process corresponding to the position of the mark determined by the user is selected from the plurality of identification processes. This eliminates the need for relearning.

前記識別処理は、空間を分離する超平面に基づいて前記識別対象が前記クラスに属するか否かを識別するものであり、前記抽出ステップにおいて、前記超平面の法線に前記サンプルを投影し、前記法線上に投影された前記サンプルの位置に基づいて、抽出すべきサンプルを決定することが望ましい。これにより、確信度の高い順に、サンプルを抽出することができる。   The identification process is to identify whether the identification target belongs to the class based on a hyperplane separating a space, and in the extraction step, projects the sample onto a normal of the hyperplane, It is desirable to determine a sample to be extracted based on the position of the sample projected on the normal. Thereby, samples can be extracted in descending order of certainty.

前記識別処理は、前記識別対象を評価する評価関数の値と、所定の閾値とを比較し、比較結果に基づいて前記識別対象が前記クラスに属するか否かを識別するものであり、前記設定変更ステップでは、前記評価関数を変更することが望ましい。これにより、ユーザの好みを反映した識別処理を行うことができる。   The identification process compares an evaluation function value for evaluating the identification object with a predetermined threshold value, and identifies whether the identification object belongs to the class based on a comparison result, In the changing step, it is desirable to change the evaluation function. Thereby, the identification process reflecting a user preference can be performed.

前記識別処理は、前記識別対象を評価する評価関数の値と、所定の閾値とを比較し、比較結果に基づいて前記識別対象が前記クラスに属するか否かを識別するものであり、前記設定変更ステップでは、前記閾値を変更することが望ましい。これにより、ユーザの好みを反映した識別処理を行うことができる。   The identification process compares an evaluation function value for evaluating the identification object with a predetermined threshold value, and identifies whether the identification object belongs to the class based on a comparison result, In the changing step, it is desirable to change the threshold value. Thereby, the identification process reflecting a user preference can be performed.

あるクラスに識別対象が属するか否かを識別する識別処理を行う識別方法であって、
前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出する抽出ステップと、
抽出された複数の前記サンプルを表示部に並べて表示すると共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示し、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示する表示ステップと、
前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更する設定変更ステップと、
設定の変更された前記識別処理によって、前記識別対象が前記クラスに属するか否かを識別する識別ステップと
を備えることを特徴とする識別方法も、明らかになる。
この識別方法によれば、ユーザの好みに合わせた設定変更が容易なインターフェースを提供することができる。
An identification method for performing identification processing for identifying whether or not an identification target belongs to a certain class,
An extraction step of extracting samples belonging to the class and samples not belonging to the class;
A plurality of the extracted samples are displayed side by side on the display unit, and a mark is displayed between the sample belonging to the class and the sample not belonging to the class, and the position of the mark is moved according to a user instruction A display step of displaying the mark between another sample and the sample;
A setting change step for changing the setting of the identification process according to the position of the mark determined by the user;
An identification method characterized by comprising an identification step for identifying whether or not the identification object belongs to the class by the identification process whose setting has been changed.
According to this identification method, it is possible to provide an interface that can be easily changed according to the user's preference.

あるクラスに識別対象が属するか否かを識別する識別処理を行う識別装置に、
前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出させ、
抽出された複数の前記サンプルを表示部に並べて表示させる共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示させ、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示させ、
前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更させる
ことを特徴とするプログラムも、明らかになる。
このプログラムによれば、ユーザの好みに合わせた設定変更が容易なインターフェースを識別装置に実現させることができる。
In the identification device that performs identification processing to identify whether the identification target belongs to a certain class,
Samples belonging to the class and samples not belonging to the class are extracted,
A plurality of extracted samples are displayed side by side on the display unit, and a mark is displayed between a sample belonging to the class and a sample not belonging to the class, and the position of the mark is moved according to a user instruction. To display the mark between another sample and the sample,
A program that changes the setting of the identification process according to the position of the mark determined by the user is also made clear.
According to this program, it is possible to cause the identification apparatus to realize an interface that can be easily changed according to the user's preference.

===全体説明===
まず、識別処理の基本的な構成及び処理について説明する。この説明の後、本実施形態について詳しく説明する。
=== Overall Description ===
First, the basic configuration and processing of identification processing will be described. After this description, this embodiment will be described in detail.

<全体構成>
図1は、画像処理システムの説明図である。この画像処理システムは、デジタルスチルカメラ2と、プリンタ4とを備える。
<Overall configuration>
FIG. 1 is an explanatory diagram of an image processing system. This image processing system includes a digital still camera 2 and a printer 4.

デジタルスチルカメラ2は、被写体をデジタルデバイス(CCDなど)に結像させることによりデジタル画像を取得するカメラである。デジタルスチルカメラ2には、モード設定ダイヤル2Aが設けられている。ユーザは、ダイヤル2Aによって、撮影条件に応じた撮影モードを設定することができる。例えば、ダイヤル2Aによって「夜景」モードが設定されると、デジタルスチルカメラ2は、シャッター速度を遅くしたり、ISO感度を高くしたりして、夜景撮影に適した撮影条件にて撮影を行う。   The digital still camera 2 is a camera that acquires a digital image by forming an image of a subject on a digital device (CCD or the like). The digital still camera 2 is provided with a mode setting dial 2A. The user can set the shooting mode according to the shooting conditions by using the dial 2A. For example, when the “night scene” mode is set by the dial 2A, the digital still camera 2 performs shooting under shooting conditions suitable for night scene shooting by decreasing the shutter speed or increasing the ISO sensitivity.

デジタルスチルカメラ2は、ファイルフォーマット規格に準拠して、撮影により生成した画像ファイルをメモリカード6に保存する。画像ファイルには、撮影した画像のデジタルデータ(画像データ)だけでなく、撮影時の撮影条件(撮影データ)等の付加データも保存される。   The digital still camera 2 stores an image file generated by photographing in the memory card 6 in accordance with the file format standard. In the image file, not only digital data (image data) of a captured image but also additional data such as a shooting condition (shooting data) at the time of shooting is stored.

プリンタ4は、画像データの示す画像を紙に印刷する印刷装置である。プリンタ4には、メモリカード6を挿入するスロット21が設けられている。ユーザは、デジタルスチルカメラ2で撮影した後、デジタルスチルカメラ2からメモリカード6を取り出し、スロット21にメモリカード6を挿入することができる。   The printer 4 is a printing device that prints an image indicated by image data on paper. The printer 4 is provided with a slot 21 into which the memory card 6 is inserted. The user can take a picture with the digital still camera 2, remove the memory card 6 from the digital still camera 2, and insert the memory card 6 into the slot 21.

パネル部15は、表示部16と、各種のボタンを有する入力部17とを備える。このパネル部15はユーザインターフェースとして機能する。表示部16は、液晶ディスプレイにより構成される。表示部16がタッチパネルであれば、表示部16は入力部17としても機能する。表示部16には、プリンタ4の設定を行うための設定画面や、メモリカードから読み取った画像データの画像や、ユーザへの確認や警告のための画面などが表示される。なお、表示部16が表示する各種の画面については、後述する。   The panel unit 15 includes a display unit 16 and an input unit 17 having various buttons. The panel unit 15 functions as a user interface. The display unit 16 is configured by a liquid crystal display. If the display unit 16 is a touch panel, the display unit 16 also functions as the input unit 17. The display unit 16 displays a setting screen for setting the printer 4, an image of image data read from the memory card, a screen for confirmation and warning to the user, and the like. Various screens displayed by the display unit 16 will be described later.

図2は、プリンタ4の構成の説明図である。プリンタ4は、印刷機構10と、この印刷機構10を制御するプリンタ側コントローラ20とを備える。印刷機構10は、インクを吐出するヘッド11と、ヘッド11を制御するヘッド制御部12と、紙を搬送するため等のモータ13と、センサ14とを有する。プリンタ側コントローラ20は、メモリカード6からデータを送受信するためのメモリ用スロット21と、CPU22と、メモリ23と、モータ13を制御する制御ユニット24と、駆動信号(駆動波形)を生成する駆動信号生成部25とを有する。また、プリンタ側コントローラ20は、パネル部15を制御するパネル制御部26も備えている。   FIG. 2 is an explanatory diagram of the configuration of the printer 4. The printer 4 includes a printing mechanism 10 and a printer-side controller 20 that controls the printing mechanism 10. The printing mechanism 10 includes a head 11 that ejects ink, a head control unit 12 that controls the head 11, a motor 13 for conveying paper, and a sensor 14. The printer-side controller 20 includes a memory slot 21 for transmitting and receiving data from the memory card 6, a CPU 22, a memory 23, a control unit 24 for controlling the motor 13, and a drive signal for generating a drive signal (drive waveform). And a generation unit 25. The printer-side controller 20 also includes a panel control unit 26 that controls the panel unit 15.

メモリカード6がスロット21に挿入されると、プリンタ側コントローラ20は、メモリカード6に保存されている画像ファイルを読み出してメモリ23に記憶する。そして、プリンタ側コントローラ20は、画像ファイルの画像データを、印刷機構10で印刷するための印刷データに変換し、印刷データに基づいて印刷機構10を制御し、紙に画像を印刷する。この一連の動作は、「ダイレクトプリント」と呼ばれている。   When the memory card 6 is inserted into the slot 21, the printer-side controller 20 reads out the image file stored in the memory card 6 and stores it in the memory 23. Then, the printer-side controller 20 converts the image data of the image file into print data for printing by the printing mechanism 10, controls the printing mechanism 10 based on the printing data, and prints an image on paper. This series of operations is called “direct printing”.

なお、「ダイレクトプリント」は、メモリカード6をスロット21に挿入することによって行われるだけでなく、デジタルスチルカメラ2とプリンタ4とをケーブル(不図示)で接続することによっても可能である。   “Direct printing” is not only performed by inserting the memory card 6 into the slot 21, but also by connecting the digital still camera 2 and the printer 4 with a cable (not shown).

メモリカード6に記憶される画像ファイルは、画像データと、付加データとから構成されている。画像データは、複数の画素データから構成されている。画素データは、画素の色情報(階調値)を示すデータである。画素がマトリクス状に配置されることによって、画像が構成される。このため、画像データは、画像を示すデータである。付加データには、画像データの特性を示すデータや、撮影データや、サムネイル画像データ等が含まれる。   The image file stored in the memory card 6 is composed of image data and additional data. The image data is composed of a plurality of pixel data. The pixel data is data indicating pixel color information (gradation value). An image is formed by arranging the pixels in a matrix. Therefore, the image data is data indicating an image. The additional data includes data indicating the characteristics of image data, shooting data, thumbnail image data, and the like.

<自動補正機能の概要>
「人物」の写真を印刷するときには、肌色をきれいにしたいという要求がある。また、「風景」の写真を印刷するときには、空の青色を強調し、木や草の緑色を強調したいという要求がある。そこで、プリンタ4は、画像ファイルを分析して自動的に適した補正処理を行う自動補正機能を備えている。
<Outline of automatic correction function>
When printing a “person” photo, there is a demand to clean the skin tone. In addition, when printing a “landscape” photograph, there is a demand for emphasizing the blue of the sky and the green of trees and grass. Therefore, the printer 4 has an automatic correction function that analyzes the image file and automatically performs a suitable correction process.

図3は、プリンタ4の自動補正機能の説明図である。図中のプリンタ側コントローラ20の各要素は、ソフトウェアとハードウェアによって実現される。   FIG. 3 is an explanatory diagram of the automatic correction function of the printer 4. Each element of the printer-side controller 20 in the figure is realized by software and hardware.

記憶部31は、メモリ23の一部の領域及びCPU22によって実現される。メモリカード6から読み出された画像ファイルの全部又は一部は、記憶部31の画像記憶部31Aに展開される。また、プリンタ側コントローラ20の各要素の演算結果は、記憶部31の結果記憶部31Bに格納される。   The storage unit 31 is realized by a partial area of the memory 23 and the CPU 22. All or part of the image file read from the memory card 6 is developed in the image storage unit 31 </ b> A of the storage unit 31. In addition, the calculation result of each element of the printer-side controller 20 is stored in the result storage unit 31B of the storage unit 31.

顔識別部32は、CPU22と、メモリ23に記憶された顔識別プログラムとによって実現される。顔識別部32は、画像記憶部31Aに記憶された画像データを分析し、顔の有無を識別する。顔識別部32によって顔が有ると識別された場合、識別対象となる画像が「人物」のシーンに属すると識別される。この場合、シーン識別部33によるシーン識別処理は行われない。顔識別部32による顔識別処理は、既に広く行われている処理と同様なので、詳細な説明は省略する。   The face identification unit 32 is realized by the CPU 22 and a face identification program stored in the memory 23. The face identification unit 32 analyzes the image data stored in the image storage unit 31A and identifies the presence or absence of a face. When the face identifying unit 32 identifies that there is a face, the image to be identified is identified as belonging to the “person” scene. In this case, the scene identification process by the scene identification unit 33 is not performed. Since the face identification process by the face identification unit 32 is the same as a process that has already been widely performed, detailed description thereof is omitted.

シーン識別部33は、CPU22と、メモリ23に記憶されたシーン識別プログラムとによって実現される。シーン識別部33は、画像記憶部31Aに記憶された画像ファイルを分析し、画像データの示す画像のシーンを識別する。顔識別部32によって顔がないと識別された場合に、シーン識別部33によるシーン識別処理が行われる。後述するように、シーン識別部33は、識別対象となる画像が「風景」、「夕景」、「夜景」、「花」、「紅葉」、「その他」のいずれの画像であるかを識別する。   The scene identification unit 33 is realized by the CPU 22 and a scene identification program stored in the memory 23. The scene identification unit 33 analyzes the image file stored in the image storage unit 31A and identifies the scene of the image indicated by the image data. When the face identifying unit 32 identifies that there is no face, a scene identifying process by the scene identifying unit 33 is performed. As will be described later, the scene identifying unit 33 identifies whether the image to be identified is a “landscape”, “evening scene”, “night scene”, “flower”, “autumn leaves”, or “other” image. .

図4は、画像のシーンと補正内容との関係の説明図である。
画像補正部34は、CPU22と、メモリ23に記憶された画像補正プログラムとによって実現される。画像補正部34は、記憶部31の結果記憶部31B(後述)に記憶されている識別結果(顔識別部32やシーン識別部33の識別結果)に基づいて、画像記憶部31Aの画像データを補正する。例えば、シーン識別部33の識別結果が「風景」である場合には、青色を強調し、緑色を強調するような補正が行われる。なお、画像補正部34は、シーンの識別結果だけでなく、画像ファイルの撮影データの内容も反映して、画像データを補正しても良い。例えば、露出補正がマイナスの場合、暗い雰囲気の画像を明るくしないように画像データを補正しても良い。
FIG. 4 is an explanatory diagram of a relationship between an image scene and correction contents.
The image correction unit 34 is realized by the CPU 22 and an image correction program stored in the memory 23. The image correction unit 34 converts the image data of the image storage unit 31A based on the identification results (identification results of the face identification unit 32 and the scene identification unit 33) stored in the result storage unit 31B (described later) of the storage unit 31. to correct. For example, when the identification result of the scene identification unit 33 is “landscape”, correction is performed so that blue is emphasized and green is emphasized. The image correction unit 34 may correct the image data by reflecting not only the scene identification result but also the contents of the image data of the image file. For example, when the exposure correction is negative, the image data may be corrected so as not to brighten the dark atmosphere image.

プリンタ制御部35は、CPU22、駆動信号生成部25、制御ユニット24及びメモリ23に記憶されたプリンタ制御プログラムによって、実現される。プリンタ制御部35は、補正後の画像データを印刷データに変換し、印刷機構10に画像を印刷させる。   The printer control unit 35 is realized by a printer control program stored in the CPU 22, the drive signal generation unit 25, the control unit 24, and the memory 23. The printer control unit 35 converts the corrected image data into print data, and causes the printing mechanism 10 to print the image.

<シーン識別処理>
図5は、シーン識別部33によるシーン識別処理のフロー図である。図6は、シーン識別部33の機能の説明図である。図中のシーン識別部33の各要素は、ソフトウェアとハードウェアによって実現される。シーン識別部33は、図6に示す特徴量取得部40と、全体識別器50と、部分識別器60と、統合識別器70とを備えている。
<Scene identification processing>
FIG. 5 is a flowchart of the scene identification process performed by the scene identification unit 33. FIG. 6 is an explanatory diagram of the function of the scene identification unit 33. Each element of the scene identification unit 33 in the figure is realized by software and hardware. The scene identification unit 33 includes a feature amount acquisition unit 40, an overall classifier 50, a partial classifier 60, and an integrated classifier 70 shown in FIG.

最初に、特徴量取得部40が、記憶部31の画像記憶部31Aに展開された画像データを分析し、部分特徴量を取得する(S101)。具体的には、特徴量取得部40は、画像データを8×8の64ブロックに分割し、各ブロックの色平均と分散を算出し、この色平均と分散を部分特徴量として取得する。なお、ここでは各画素はYCC色空間における階調値のデータをもっており、各ブロックごとに、Yの平均値、Cbの平均値及びCrの平均値がそれぞれ算出され、Yの分散、Cbの分散及びCrの分散がそれぞれ算出される。つまり、各ブロックごとに3つの色平均と3つの分散が部分特徴量として算出される。これらの色平均や分散は、各ブロックにおける部分画像の特徴を示すものである。なお、RGB色空間における平均値や分散を算出しても良い。
ブロックごとに色平均と分散が算出されるので、特徴量取得部40は、画像記憶部31Aには画像データの全てを展開せずに、ブロック分の画像データをブロック順に展開する。このため、画像記憶部31Aは、必ずしも画像ファイルの全てを展開できるだけの容量を備えていなくても良い。
First, the feature amount acquisition unit 40 analyzes the image data developed in the image storage unit 31A of the storage unit 31 and acquires partial feature amounts (S101). Specifically, the feature amount acquisition unit 40 divides the image data into 8 × 8 64 blocks, calculates the color average and variance of each block, and acquires the color average and variance as partial feature amounts. Here, each pixel has gradation value data in the YCC color space, and the average value of Y, the average value of Cb, and the average value of Cr are calculated for each block, and the variance of Y and the variance of Cb are calculated. And the variance of Cr are calculated respectively. That is, three color averages and three variances are calculated as partial feature amounts for each block. These color averages and variances indicate the characteristics of the partial images in each block. Note that an average value or variance in the RGB color space may be calculated.
Since the color average and variance are calculated for each block, the feature amount acquisition unit 40 expands the image data for the blocks in the block order without expanding all the image data in the image storage unit 31A. For this reason, the image storage unit 31A does not necessarily have a capacity sufficient to expand all of the image files.

次に、特徴量取得部40が、全体特徴量を取得する(S102)。具体的には、特徴量取得部40は、画像データの全体の色平均、分散、重心及び撮影情報を、全体特徴量として取得する。なお、これらの色平均や分散は、画像の全体の特徴を示すものである。画像データ全体の色平均、分散及び重心は、先に算出した部分特徴量を用いて算出される。このため、全体特徴量を算出する際に、画像データを再度展開する必要がないので、全体特徴量の算出速度が速くなる。全体識別処理(後述)は部分識別処理(後述)よりも先に行われるにも関わらず、全体特徴量が部分特徴量よりも後に求められるのは、このように算出速度を速めるためである。なお、撮影情報は、画像ファイルの撮影データから抽出される。具体的には、絞り値、シャッター速度、フラッシュ発光の有無などの情報が全体特徴量として用いられる。但し、画像ファイルの撮影データの全てが全体特徴量として用いられるわけではない。   Next, the feature amount acquisition unit 40 acquires the entire feature amount (S102). Specifically, the feature quantity acquisition unit 40 acquires the overall color average, variance, center of gravity, and shooting information of the image data as the overall feature quantity. Note that these color averages and variances indicate the overall characteristics of the image. The color average, variance, and center of gravity of the entire image data are calculated using the partial feature values calculated previously. For this reason, it is not necessary to re-expand the image data when calculating the entire feature amount, and the calculation speed of the entire feature amount is increased. Although the overall identification process (described later) is performed prior to the partial identification process (described later), the overall feature value is obtained after the partial feature value in order to increase the calculation speed. The shooting information is extracted from the shooting data of the image file. Specifically, information such as the aperture value, shutter speed, and the presence or absence of flash emission is used as the overall feature amount. However, not all shooting data of the image file is used as the entire feature amount.

次に、全体識別器50が、全体識別処理を行う(S103)。全体識別処理とは、全体特徴量に基づいて、画像データの示す画像のシーンを識別(推定)する処理である。全体識別処理の詳細については、後述する。   Next, the overall classifier 50 performs overall identification processing (S103). The overall identification process is a process for identifying (estimating) an image scene indicated by image data based on the overall feature amount. Details of the overall identification process will be described later.

全体識別処理によってシーンの識別ができる場合(S104でYES)、シーン識別部33は、記憶部31の結果記憶部31Bに識別結果を記憶することによってシーンを決定し(S109)、シーン識別処理を終了する。つまり、全体識別処理によってシーンの識別ができた場合(S104でYES)、部分識別処理や統合識別処理が省略される。これにより、シーン識別処理の速度が速くなる。   If the scene can be identified by the overall identification process (YES in S104), the scene identification unit 33 determines the scene by storing the identification result in the result storage unit 31B of the storage unit 31 (S109), and performs the scene identification process. finish. That is, when the scene can be identified by the overall identification process (YES in S104), the partial identification process and the integrated identification process are omitted. This increases the speed of the scene identification process.

全体識別処理によってシーンの識別ができない場合(S104でNO)、次に部分識別器60が、部分識別処理を行う(S105)。部分識別処理とは、部分特徴量に基づいて、画像データの示す画像全体のシーンを識別する処理である。部分識別処理の詳細については、後述する。   If the scene cannot be identified by the overall identification process (NO in S104), the partial classifier 60 performs the partial identification process (S105). The partial identification process is a process for identifying the scene of the entire image indicated by the image data based on the partial feature amount. Details of the partial identification processing will be described later.

部分識別処理によってシーンの識別ができる場合(S106でYES)、シーン識別部33は、記憶部31の結果記憶部31Bに識別結果を記憶することによってシーンを決定し(S109)、シーン識別処理を終了する。つまり、部分識別処理によってシーンの識別ができた場合(S106でYES)、統合識別処理が省略される。これにより、シーン識別処理の速度が速くなる。   When the scene can be identified by the partial identification process (YES in S106), the scene identification unit 33 determines the scene by storing the identification result in the result storage unit 31B of the storage unit 31 (S109), and performs the scene identification process. finish. That is, when the scene can be identified by the partial identification process (YES in S106), the integrated identification process is omitted. This increases the speed of the scene identification process.

部分識別処理によってシーンの識別ができない場合(S106でNO)、次に統合識別器70が、統合識別処理を行う(S107)。統合識別処理の詳細については、後述する。   If the scene cannot be identified by the partial identification process (NO in S106), the integrated discriminator 70 performs the integrated identification process (S107). Details of the integrated identification process will be described later.

統合識別処理によってシーンの識別ができる場合(S108でYES)、シーン識別部33は、記憶部31の結果記憶部31Bに識別結果を記憶することによってシーンを決定し(S109)、シーン識別処理を終了する。一方、統合識別処理によってシーンの識別ができない場合(S108でNO)、画像データの示す画像が「その他」のシーン(「風景」、「夕景」、「夜景」、「花」又は「紅葉」以外のシーン)である旨の識別結果を結果記憶部31Bに記憶する(S110)。   When the scene can be identified by the integrated identification process (YES in S108), the scene identification unit 33 determines the scene by storing the identification result in the result storage unit 31B of the storage unit 31 (S109), and performs the scene identification process. finish. On the other hand, if the scene cannot be identified by the integrated identification process (NO in S108), the image indicated by the image data is “other” (other than “landscape”, “evening scene”, “night scene”, “flower” or “autumn leaves”. Is stored in the result storage unit 31B (S110).

<全体識別処理>
図7は、全体識別処理のフロー図である。ここでは図6も参照しながら全体識別処理について説明する。
<Overall identification process>
FIG. 7 is a flowchart of the overall identification process. Here, the overall identification process will be described with reference to FIG.

まず、全体識別器50は、複数のサブ識別器51の中から1つのサブ識別器51を選択する(S201)。全体識別器50には、識別対象となる画像(識別対象画像)が特定のシーンに属するか否かを識別するサブ識別器51が5つ設けられている。5つのサブ識別器51は、それぞれ風景、夕景、夜景、花、紅葉のシーンを識別する。ここでは、全体識別器50は、風景→夕景→夜景→花→紅葉の順に、サブ識別器51を選択する(なお、サブ識別器51の選択順序については、後述する)。このため、最初には、識別対象画像が風景のシーンに属するか否かを識別するサブ識別器51(風景識別器51L)が選択される。   First, the overall classifier 50 selects one sub-classifier 51 from the plurality of sub-classifiers 51 (S201). The overall classifier 50 is provided with five sub-classifiers 51 for identifying whether an image to be identified (identification target image) belongs to a specific scene. The five sub classifiers 51 identify scenes of scenery, evening scene, night scene, flowers, and autumn leaves, respectively. Here, the overall classifier 50 selects the sub classifier 51 in the order of landscape → evening scene → night scene → flower → autumn leaves (the selection order of the sub classifier 51 will be described later). For this reason, first, the sub classifier 51 (landscape classifier 51L) for identifying whether or not the classification target image belongs to a landscape scene is selected.

次に、全体識別器50は、識別対象テーブルを参照し、選択したサブ識別器51を用いてシーンを識別すべきか否かを判断する(S202)。   Next, the overall classifier 50 refers to the classification target table and determines whether or not a scene should be identified using the selected sub-classifier 51 (S202).

図8は、識別対象テーブルの説明図である。この識別対象テーブルは、記憶部31の結果記憶部31Bに記憶される。識別対象テーブルは、最初の段階では全ての欄がゼロに設定される。S202の処理では、「否定」欄が参照され、ゼロであればYESと判断され、1であればNOと判断される。ここでは、全体識別器50は、識別対象テーブルにおける「風景」欄の「否定」欄を参照し、ゼロであるのでYESと判断する。   FIG. 8 is an explanatory diagram of the identification target table. This identification target table is stored in the result storage unit 31B of the storage unit 31. In the identification target table, all fields are set to zero in the first stage. In the process of S202, the “No” column is referred to, and if it is zero, it is determined as YES, and if it is 1, it is determined as NO. Here, the overall classifier 50 refers to the “No” column in the “Scenery” column in the identification target table, and determines “YES” because it is zero.

次に、サブ識別器51は、全体特徴量に基づいて、識別対象画像が特定のシーンに属する確率(確信度)を算出する(S203)。サブ識別器51には、サポートベクタマシン(SVM)による識別手法が用いられている。なお、サポートベクタマシンについては、後述する。識別対象画像が特定のシーンに属する場合、サブ識別器51の判別式は、プラスの値になりやすい。識別対象画像が特定のシーンに属しない場合、サブ識別器51の判別式は、マイナスの値になりやすい。また、判別式は、識別対象画像が特定のシーンに属する確信度が高いほど、大きい値になる。このため、判別式の値が大きければ、識別対象画像が特定のシーンに属する確率(確信度)が高くなり、判別式の値が小さければ、識別対象画像が特定のシーンに属する確率が低くなる。   Next, the sub classifier 51 calculates the probability (confidence) that the classification target image belongs to a specific scene based on the entire feature amount (S203). For the sub classifier 51, a classification method using a support vector machine (SVM) is used. The support vector machine will be described later. When the classification target image belongs to a specific scene, the discriminant of the sub classifier 51 tends to be a positive value. When the classification target image does not belong to a specific scene, the discriminant of the sub classifier 51 tends to be a negative value. Further, the discriminant becomes a larger value as the certainty that the identification target image belongs to the specific scene is higher. For this reason, if the discriminant value is large, the probability (confidence) that the identification target image belongs to a specific scene is high, and if the discriminant value is small, the probability that the classification target image belongs to a specific scene is low. .

次に、サブ識別器51は、判別式の値が肯定閾値より大きいか否かを判断する(S204)。判別式の値が肯定閾値より大きければ、サブ識別器51は、識別対象画像が特定のシーンに属すると判断することになる。   Next, the sub discriminator 51 determines whether or not the value of the discriminant is larger than the positive threshold (S204). If the value of the discriminant is larger than the positive threshold, the sub discriminator 51 determines that the classification target image belongs to a specific scene.

図9は、全体識別処理の肯定閾値の説明図である。同図において、横軸は肯定閾値を示し、縦軸はRecall又はPrecisionの確率を示す。図10は、RecallとPrecisionの説明図である。判別式の値が肯定閾値以上の場合には識別結果はPositiveであり、判別式の値が肯定閾値以上でない場合には識別結果はNegativeである。   FIG. 9 is an explanatory diagram of an affirmative threshold value of the overall identification process. In the figure, the horizontal axis indicates an affirmative threshold, and the vertical axis indicates the probability of recall or precision. FIG. 10 is an explanatory diagram of Recall and Precision. If the discriminant value is greater than or equal to the positive threshold, the identification result is Positive. If the discriminant value is not greater than or equal to the positive threshold, the identification result is Negative.

Recallは、再現率や検出率を示すものである。Recallは、特定のシーンの画像の総数に対する、特定のシーンに属すると識別された画像の数の割合である。言い換えると、Recallは、特定のシーンの画像をサブ識別器51に識別させたときに、サブ識別器51がPositiveと識別する確率(特定のシーンの画像が特定のシーンに属すると識別される確率)を示すものである。例えば、風景画像を風景識別器51Lに識別させたときに、風景のシーンに属すると風景識別器51Lが識別する確率を示すものである。   Recall indicates the recall rate and detection rate. Recall is the ratio of the number of images identified as belonging to a specific scene to the total number of images of the specific scene. In other words, Recall is the probability that the sub-identifier 51 identifies the image as a positive when the image of the specific scene is identified by the sub-identifier 51 (the probability that the image of the specific scene belongs to the specific scene. ). For example, when a landscape image is identified by the landscape classifier 51L, it indicates the probability that the landscape classifier 51L identifies it as belonging to a landscape scene.

Precisionは、正答率や正解率を示すものである。Precisionは、Positiveと識別された画像の総数に対する、特定のシーンの画像の数の割合である。言い換えると、Precisionは、特定のシーンを識別するサブ識別器51がPositiveと識別したときに、識別対象の画像が特定のシーンである確率を示すものである。例えば、風景識別器51Lが風景のシーンに属すると識別したときに、その識別した画像が本当に風景画像である確率を示すものである。   Precision indicates the correct answer rate and the correct answer rate. Precision is the ratio of the number of images in a particular scene to the total number of images identified as Positive. In other words, Precision indicates the probability that the image to be identified is a specific scene when the sub-classifier 51 that identifies the specific scene identifies it as Positive. For example, when the landscape classifier 51L identifies that it belongs to a landscape scene, it indicates the probability that the identified image is really a landscape image.

図9から分かる通り、肯定閾値を大きくするほど、Precisionが大きくなる。このため、肯定閾値を大きくするほど、例えば風景のシーンに属すると識別された画像が風景画像である確率が高くなる。つまり、肯定閾値を大きくするほど、誤識別の確率が低くなる。
一方、肯定閾値を大きくするほど、Recallは小さくなる。この結果、例えば、風景画像を風景識別器51Lで識別した場合であっても、風景のシーンに属すると正しく識別しにくくなる。ところで、識別対象画像が風景のシーンに属すると識別できれば(S204でYES)、残りの別のシーン(夕景など)の識別を行わないようにして全体識別処理の速度を速めている。このため、肯定閾値を大きくするほど、全体識別処理の速度は低下することになる。また、全体識別処理によってシーンが識別できれば部分識別処理を行わないようにしてシーン識別処理の速度を速めているため(S104)、肯定閾値を大きくするほど、シーン識別処理の速度は低下することになる。
つまり、肯定閾値が小さすぎると誤識別の確率が高くなり、大きすぎると処理速度が低下することになる。ここでは、正答率(Precision)を97.5%に設定するため、風景の肯定閾値は1.27に設定されている。
As can be seen from FIG. 9, the greater the positive threshold, the greater the Precision. For this reason, the larger the positive threshold value, the higher the probability that an image identified as belonging to a landscape scene, for example, is a landscape image. That is, the greater the positive threshold, the lower the probability of misidentification.
On the other hand, the larger the positive threshold, the smaller the Recall. As a result, for example, even when a landscape image is identified by the landscape classifier 51L, it is difficult to correctly identify it as belonging to a landscape scene. By the way, if the image to be identified can be identified as belonging to a landscape scene (YES in S204), the speed of the overall identification process is increased so as not to identify other remaining scenes (such as sunsets). For this reason, the larger the positive threshold, the lower the overall identification processing speed. Further, if the scene can be identified by the overall identification process, the partial identification process is not performed and the speed of the scene identification process is increased (S104). Therefore, as the positive threshold is increased, the scene identification process speed decreases. Become.
That is, if the positive threshold is too small, the probability of misidentification increases, and if it is too large, the processing speed decreases. Here, in order to set the correct answer rate (Precision) to 97.5%, the landscape affirmation threshold is set to 1.27.

判別式の値が肯定閾値より大きければ(S204でYES)、サブ識別器51は、識別対象画像が特定のシーンに属すると判断し、肯定フラグを立てる(S205)。「肯定フラグを立てる」とは、図8の「肯定」欄を1にすることである。この場合、全体識別器50は、次のサブ識別器51による識別を行わずに、全体識別処理を終了する。例えば、風景画像であると識別できれば、夕景などの識別を行わずに、全体識別処理を終了する。この場合、次のサブ識別器51による識別を省略しているので、全体識別処理の速度を速めることができる。   If the discriminant value is greater than the affirmative threshold value (YES in S204), the sub-classifier 51 determines that the classification target image belongs to a specific scene and sets an affirmative flag (S205). “Set an affirmative flag” means that the “affirmation” column in FIG. In this case, the overall discriminator 50 ends the overall discrimination process without performing discrimination by the next sub discriminator 51. For example, if the image can be identified as a landscape image, the entire identification process is terminated without identifying the sunset scene or the like. In this case, since the identification by the next sub-identifier 51 is omitted, the speed of the overall identification process can be increased.

判別式の値が肯定閾値より大きくなければ(S204でNO)、サブ識別器51は、識別対象画像が特定のシーンに属すると判断できず、次のS206の処理を行う。   If the value of the discriminant is not greater than the positive threshold (NO in S204), the sub discriminator 51 cannot determine that the classification target image belongs to a specific scene, and performs the next process of S206.

次に、サブ識別器51は、判別式の値と否定閾値とを比較する(S206)。これにより、サブ識別器51は、識別対象画像が所定のシーンに属しないかを判断する。このような判断としては、2種類ある。第1に、ある特定のシーンのサブ識別器51の判別式の値が第1否定閾値より小さければ、その特定のシーンに識別対象画像が属しないと判断されることになる。例えば、風景識別器51Lの判別式の値が第1否定閾値より小さければ、識別対象画像が風景のシーンに属しないと判断されることになる。第2に、ある特定のシーンのサブ識別器51の判別式の値が第2否定閾値より大きければ、その特定のシーンとは別のシーンに識別対象画像が属しないと判断されることになる。例えば、風景識別器51Lの判別式の値が第2否定閾値より大きければ、識別対象画像が夜景のシーンに属しないと判断されることになる。   Next, the sub discriminator 51 compares the discriminant value with a negative threshold value (S206). Thereby, the sub classifier 51 determines whether the classification target image does not belong to a predetermined scene. There are two types of such determinations. First, if the value of the discriminant of the sub-identifier 51 of a specific scene is smaller than the first negative threshold, it is determined that the classification target image does not belong to the specific scene. For example, if the discriminant value of the landscape classifier 51L is smaller than the first negative threshold, it is determined that the classification target image does not belong to a landscape scene. Second, if the value of the discriminant of the sub-identifier 51 of a specific scene is larger than the second negative threshold, it is determined that the classification target image does not belong to a scene different from the specific scene. . For example, if the discriminant value of the landscape classifier 51L is larger than the second negative threshold, it is determined that the classification target image does not belong to the night scene.

図11は、第1否定閾値の説明図である。同図において、横軸は第1否定閾値を示し、縦軸は確率を示す。グラフの太線は、True Negative Recallのグラフであり、風景画像以外の画像を風景画像ではないと正しく識別する確率を示している。グラフの細線は、False Negative Recallのグラフであり、風景画像なのに風景画像ではないと誤って識別する確率を示している。   FIG. 11 is an explanatory diagram of the first negative threshold. In the figure, the horizontal axis indicates the first negative threshold, and the vertical axis indicates the probability. The bold line in the graph is a True Negative Recall graph, and indicates the probability of correctly identifying an image other than a landscape image as not a landscape image. The thin line in the graph is a False Negative Recall graph, which indicates the probability of erroneously identifying a landscape image that is not a landscape image.

図11から分かる通り、第1否定閾値を小さくするほど、False Negative Recallが小さくなる。このため、第1否定閾値を小さくするほど、例えば風景のシーンに属しないと識別された画像が風景画像である確率が低くなる。つまり、誤識別の確率が低くなる。
一方、第1否定閾値を小さくするほど、True Negative Recallも小さくなる。この結果、風景画像以外の画像を風景画像ではないと識別しにくくなる。その一方、識別対象画像が特定シーンでないことを識別できれば、部分識別処理の際に、その特定シーンのサブ部分識別器61による処理を省略してシーン識別処理速度を速めている(後述、図14のS302)。このため、第1否定閾値を小さくするほど、シーン識別処理速度は低下する。
つまり、第1否定閾値が大きすぎると誤識別の確率が高くなり、小さすぎると処理速度が低下することになる。ここでは、False Negative Recallを2.5%に設定するため、第1否定閾値は−1.10に設定されている。
As can be seen from FIG. 11, the smaller the first negative threshold is, the smaller False Negative Recall is. For this reason, the smaller the first negative threshold, the lower the probability that an image identified as not belonging to a landscape scene is a landscape image, for example. That is, the probability of misidentification is reduced.
On the other hand, the True Negative Recall decreases as the first negative threshold decreases. As a result, it is difficult to identify an image other than a landscape image unless it is a landscape image. On the other hand, if the identification target image can be identified as not being a specific scene, the process by the sub-partial classifier 61 for the specific scene is omitted during the partial identification process to increase the scene identification processing speed (described later in FIG. 14). S302). For this reason, the scene identification processing speed decreases as the first negative threshold is decreased.
That is, if the first negative threshold is too large, the probability of misidentification increases, and if it is too small, the processing speed decreases. Here, in order to set False Negative Recall to 2.5%, the first negative threshold is set to −1.10.

ところで、ある画像が風景のシーンに属する確率が高ければ、必然的にその画像が夜景のシーンに属する確率は低くなる。このため、風景識別器51Lの判別式の値が大きい場合には、夜景ではないと識別できる場合がある。このような識別を行うために、第2否定閾値が設けられる。   By the way, if the probability that an image belongs to a landscape scene is high, the probability that the image belongs to a night scene is inevitably low. For this reason, when the discriminant value of the landscape discriminator 51L is large, it may be identified that the scene is not a night scene. In order to perform such identification, a second negative threshold is provided.

図12は、第2否定閾値の説明図である。同図において、横軸は風景の判別式の値を示し、縦軸は確率を示す。同図には、図9のRecallとPrecisionのグラフとともに、夜景のRecallのグラフが点線で描かれている。この点線のグラフに注目すると、風景の判別式の値が−0.45よりも大きければ、その画像が夜景画像である確率は2.5%である。言い換えると、風景の判別式の値が−0.45より大きい場合にその画像が夜景画像でないと識別しても、誤識別の確率は2.5%にすぎない。そこで、ここでは、第2否定閾値が−0.45に設定されている。   FIG. 12 is an explanatory diagram of the second negative threshold. In the figure, the horizontal axis indicates the value of the landscape discriminant, and the vertical axis indicates the probability. In the same figure, the Recall graph of the night view is drawn with a dotted line together with the Recall and Precision graph of FIG. If attention is paid to this dotted line graph, if the value of the discriminant of the landscape is larger than −0.45, the probability that the image is a night scene image is 2.5%. In other words, if the landscape discriminant value is greater than −0.45, even if the image is identified as not a night scene image, the probability of misidentification is only 2.5%. Therefore, here, the second negative threshold is set to −0.45.

そして、判別式の値が第1否定閾値より小さい場合、又は、判別式の値が第2否定閾値より大きい場合(S206でYES)、サブ識別器51は、識別対象画像が所定のシーンに属しないと判断し、否定フラグを立てる(S207)。「否定フラグを立てる」とは、図8の「否定」欄を1にすることである。例えば、第1否定閾値に基づいて識別対象画像が風景のシーンに属しないと判断された場合、「風景」欄の「否定」欄が1になる。また、第2否定閾値に基づいて識別対象画像が夜景のシーンに属しないと判断された場合、「夜景」欄の「否定」欄が1になる。   When the discriminant value is smaller than the first negative threshold value, or when the discriminant value is larger than the second negative threshold value (YES in S206), the sub-classifier 51 determines that the classification target image belongs to a predetermined scene. It is determined not to do so, and a negative flag is set (S207). “Set a negative flag” means to set the “No” column in FIG. For example, when it is determined that the image to be identified does not belong to a landscape scene based on the first negative threshold, the “denial” column in the “landscape” column is 1. Further, when it is determined that the identification target image does not belong to the night scene based on the second negative threshold, the “Negation” field in the “Night scene” field is “1”.

図13Aは、閾値テーブルの説明図である。この閾値テーブルは、記憶部31に記憶されていても良いし、全体識別処理を実行させるためのプログラムの一部に組み込まれていても良い。閾値テーブルには、前述の肯定閾値や否定閾値に関するデータが格納されている。   FIG. 13A is an explanatory diagram of a threshold table. The threshold value table may be stored in the storage unit 31 or may be incorporated in a part of a program for executing the overall identification process. The threshold table stores data related to the affirmative threshold and the negative threshold described above.

図13Bは、上記で説明した風景識別器51Lにおける閾値の説明図である。風景識別器51Lには、肯定閾値及び否定閾値が予め設定されている。肯定閾値として1.27が設定されている。否定閾値には第1否定閾値と第2否定閾値とがある。第1否定閾値として−1.10が設定されている。また、第2否定閾値として、風景以外の各シーンにそれぞれ値が設定されている。   FIG. 13B is an explanatory diagram of threshold values in the landscape classifier 51L described above. An affirmative threshold value and a negative threshold value are preset in the landscape discriminator 51L. 1.27 is set as the positive threshold. The negative threshold includes a first negative threshold and a second negative threshold. -1.10 is set as the first negative threshold. In addition, a value is set for each scene other than the landscape as the second negative threshold.

図13Cは、上記で説明した風景識別器51Lの処理の概要の説明図である。ここでは、説明の簡略化のため、第2否定閾値については夜景についてのみ説明する。風景識別器51Lは、判別式の値が1.27より大きければ(S204でYES)、識別対象画像が風景のシーンに属すると判断する。また、判別式の値が1.27以下であり(S204でNO)、−0.45より大きければ(S206でYES)、風景識別器51Lは、識別対象画像が夜景のシーンに属しないと判断する。また、判別式の値が−1.10より小さければ(S206でYES)、風景識別器51Lは、識別対象画像が風景のシーンに属しないと判断する。なお、風景識別器51Lは、夕景や花や紅葉についても、第2否定閾値に基づいて、識別対象画像がそのシーンに属しないかを判断する。但し、これらの第2否定閾値は肯定閾値よりも大きいため、識別対象画像がこれらのシーンに属しないことを風景識別器51Lが判断することはない。   FIG. 13C is an explanatory diagram outlining the processing of the landscape classifier 51L described above. Here, for simplification of description, only the night view will be described for the second negative threshold. If the discriminant value is greater than 1.27 (YES in S204), the landscape classifier 51L determines that the classification target image belongs to a landscape scene. If the discriminant value is 1.27 or less (NO in S204) and is greater than −0.45 (YES in S206), the landscape classifier 51L determines that the classification target image does not belong to the night scene. To do. If the value of the discriminant is smaller than −1.10 (YES in S206), the landscape classifier 51L determines that the classification target image does not belong to a landscape scene. Note that the landscape discriminator 51L also determines whether the image to be identified does not belong to the scene based on the second negative threshold for sunset scenes, flowers, and autumn leaves. However, since these second negative threshold values are larger than the positive threshold values, the landscape discriminator 51L does not determine that the classification target image does not belong to these scenes.

S202においてNOの場合、S206でNOの場合、又はS207の処理を終えた場合、全体識別器50は、次のサブ識別器51の有無を判断する(S208)。ここでは風景識別器51Lによる処理を終えた後なので、全体識別器50は、S208において、次のサブ識別器51(夕景識別器51S)があると判断する。   In the case of NO in S202, in the case of NO in S206, or when the processing in S207 is completed, the overall discriminator 50 determines the presence or absence of the next sub discriminator 51 (S208). Here, since the process by the landscape classifier 51L is finished, the overall classifier 50 determines in S208 that there is a next sub-classifier 51 (evening scene classifier 51S).

そして、S205の処理を終えた場合(識別対象画像が特定のシーンに属すると判断された場合)、又は、S208において次のサブ識別器51がないと判断された場合(識別対象画像が特定のシーンに属すると判断できなかった場合)、全体識別器50は、全体識別処理を終了する。   Then, when the process of S205 is finished (when it is determined that the identification target image belongs to a specific scene), or when it is determined in S208 that there is no next sub-classifier 51 (the identification target image is a specific image). When it cannot be determined that the scene belongs to the scene), the overall discriminator 50 ends the overall discrimination process.

なお、既に説明した通り、全体識別処理が終了すると、シーン識別部33は、全体識別処理によってシーンの識別ができたか否かを判断する(図5のS104)。このとき、シーン識別部33は、図8の識別対象テーブルを参照し、「肯定」欄に1があるか否かを判断することになる。
全体識別処理によってシーンの識別ができた場合(S104でYES)、部分識別処理や統合識別処理が省略される。これにより、シーン識別処理の速度が速くなる。
As already described, when the overall identification process is completed, the scene identification unit 33 determines whether or not the scene has been identified by the overall identification process (S104 in FIG. 5). At this time, the scene identification unit 33 refers to the identification target table in FIG. 8 and determines whether or not there is 1 in the “affirmation” column.
If the scene can be identified by the overall identification process (YES in S104), the partial identification process and the integrated identification process are omitted. This increases the speed of the scene identification process.

ところで、上記の説明には無いが、全体識別器50は、サブ識別器51によって判別式の値を算出したときには、判別式の値に対応するPrecisionを、確信度に関する情報として結果記憶部31Bに記憶する。もちろん、判別式の値そのものを確信度に関する情報として記憶しても良い。   By the way, although not described above, the overall discriminator 50, when the sub discriminator 51 calculates the discriminant value, the Precision corresponding to the discriminant value is stored in the result storage unit 31B as information on the certainty factor. Remember. Of course, the discriminant value itself may be stored as information on the certainty factor.

<部分識別処理>
図14は、部分識別処理のフロー図である。部分識別処理は、全体識別処理によってシーンの識別ができなかった場合(図5のS104でNO)に行われる。以下に説明するように、部分識別処理は、分割された部分画像のシーンをそれぞれ識別することによって、画像全体のシーンを識別する処理である。ここでは図6も参照しながら部分識別処理について説明する。
<Partial identification processing>
FIG. 14 is a flowchart of the partial identification process. The partial identification process is performed when the scene cannot be identified by the overall identification process (NO in S104 of FIG. 5). As will be described below, the partial identification process is a process for identifying the scene of the entire image by identifying each scene of the divided partial images. Here, the partial identification process will be described with reference to FIG.

まず、部分識別器60は、複数のサブ部分識別器61の中から1つのサブ部分識別器61を選択する(S301)。部分識別器60には、サブ部分識別器61が3つ設けられている。各サブ部分識別器61は、8×8の64ブロックに分割された部分画像がそれぞれ特定のシーンに属するか否かを識別する。ここでの3つのサブ部分識別器61は、それぞれ夕景、花、紅葉のシーンを識別する。ここでは、部分識別器60は、夕景→花→紅葉の順に、サブ部分識別器61を選択する(なお、サブ部分識別器61の選択順序については、後述する)。このため、最初には、部分画像が夕景のシーンに属するか否かを識別するサブ部分識別器61(夕景部分識別器61S)が選択される。   First, the partial classifier 60 selects one sub partial classifier 61 from the plurality of sub partial classifiers 61 (S301). The partial discriminator 60 is provided with three sub partial discriminators 61. Each sub partial discriminator 61 discriminates whether or not each partial image divided into 8 × 8 64 blocks belongs to a specific scene. Here, the three sub partial classifiers 61 identify the scenes of sunset, flowers, and autumn leaves, respectively. Here, the partial discriminator 60 selects the sub partial discriminator 61 in the order of sunset scene → flower → autumn leaves (the selection order of the sub partial discriminator 61 will be described later). Therefore, first, the sub partial classifier 61 (evening scene partial classifier 61S) for identifying whether or not the partial image belongs to the sunset scene is selected.

次に、部分識別器60は、識別対象テーブル(図8)を参照し、選択したサブ部分識別器61を用いてシーンを識別すべきか否かを判断する(S302)。ここでは、部分識別器60は、識別対象テーブルにおける「夕景」欄の「否定」欄を参照し、ゼロであればYESと判断し、1であればNOと判断する。なお、全体識別処理の際に、夕景識別器51Sが第1否定閾値により否定フラグを立てたとき、又は、他のサブ識別器51が第2否定閾値により否定フラグを立てたとき、このS302でNOと判断される。仮にNOと判断されると夕景の部分識別処理は省略されることになるので、部分識別処理の速度が速くなる。但し、ここでは説明の都合上、YESと判断されるものとする。   Next, the partial discriminator 60 refers to the discrimination target table (FIG. 8) and determines whether or not the scene should be discriminated using the selected sub partial discriminator 61 (S302). Here, the partial discriminator 60 refers to the “No” column of the “Evening Scene” column in the classification target table, and determines YES if it is zero, and NO if it is 1. When the evening scene classifier 51S sets a negative flag with the first negative threshold during the overall identification process or when another sub-classifier 51 sets a negative flag with the second negative threshold, in S302 It is judged as NO. If it is determined NO, the sunset partial identification process is omitted, and the partial identification process speed increases. However, for the convenience of explanation, it is assumed that YES is determined here.

次に、サブ部分識別器61は、8×8の64ブロックに分割された部分画像の中から、1つの部分画像を選択する(S303)。
図15は、夕景部分識別器61Sが選択する部分画像の順番の説明図である。部分画像から画像全体のシーンを識別するような場合、識別に用いられる部分画像は、被写体が存在する部分であることが望ましい。そこで、数千枚のサンプルの夕景画像を用意し、各夕景画像を8×8の64ブロックに分割し、夕景部分画像(夕景の太陽と空の部分画像)を含むブロックを抽出し、抽出されたブロックの位置に基づいて各ブロックにおける夕景部分画像の存在確率を算出した。そして、存在確率の高いブロックから順番に、部分画像が選択される。なお、図に示す選択順序の情報は、プログラムの一部としてメモリ23に格納されている。
Next, the sub partial discriminator 61 selects one partial image from the partial images divided into 8 × 8 64 blocks (S303).
FIG. 15 is an explanatory diagram of the order of partial images selected by the evening scene partial classifier 61S. When a scene of the entire image is identified from the partial image, it is desirable that the partial image used for identification is a portion where the subject exists. Therefore, thousands of samples of sunset scene images are prepared, each sunset scene image is divided into 64 blocks of 8 × 8, and blocks including sunset scene partial images (sun sunset sky and sky partial images) are extracted and extracted. Based on the position of each block, the existence probability of the sunset partial image in each block was calculated. Then, partial images are selected in order from the block having the highest existence probability. Note that the selection order information shown in the figure is stored in the memory 23 as part of the program.

なお、夕景画像の場合、画像の中央付近から上半分に夕景の空が広がっていることが多いため、中央付近から上半分のブロックにおいて存在確率が高くなる。また、夕景画像の場合、画像の下1/3では逆光で陰になり、部分画像単体では夕景か夜景か区別がつかないことが多いため、下1/3のブロックにおいて存在確率が低くなる。花画像の場合、花を中央付近に配置させる構図にすることが多いため、中央付近における花部分画像の存在確率が高くなる。   In the case of an evening scene image, since the sky of the evening scene often spreads from the vicinity of the center to the upper half, the existence probability increases in the upper half block from the vicinity of the center. In the case of an evening scene image, the lower 1/3 of the image is shaded by backlight, and the partial image alone often cannot be distinguished from the evening scene or the night scene, so the existence probability is lower in the lower 1/3 block. In the case of a flower image, since the composition is often such that a flower is arranged near the center, the probability of existence of a flower partial image near the center increases.

次に、サブ部分識別器61は、選択された部分画像の部分特徴量に基づいて、その部分画像が特定のシーンに属するか否かを判断する(S304)。サブ部分識別器61には、全体識別器50のサブ識別器51と同様に、サポートベクタマシン(SVM)による判別手法が用いられている。なお、サポートベクタマシンについては、後述する。判別式の値が正の値であれば、部分画像が特定のシーンに属すると判断し、サブ部分識別器61は正カウント値をインクリメントする。また、判別式の値が負の値であれば、部分画像が特定のシーンに属しないと判断し、サブ部分識別器61は負カウント値をインクリメントする。   Next, the sub partial classifier 61 determines whether or not the partial image belongs to a specific scene based on the partial feature amount of the selected partial image (S304). Similar to the sub classifier 51 of the overall classifier 50, the sub partial classifier 61 uses a discrimination method using a support vector machine (SVM). The support vector machine will be described later. If the discriminant value is a positive value, it is determined that the partial image belongs to a specific scene, and the sub partial classifier 61 increments the positive count value. If the discriminant value is a negative value, it is determined that the partial image does not belong to a specific scene, and the sub partial discriminator 61 increments the negative count value.

次に、サブ部分識別器61は、正カウント値が肯定閾値よりも大きい否かを判断する(S305)。なお、正カウント値は、特定のシーンに属すると判断された部分画像の数を示すものである。正カウント値が肯定閾値より大きければ(S305でYES)、サブ部分識別器61は、識別対象画像が特定のシーンに属すると判断し、肯定フラグを立てる(S306)。この場合、部分識別器60は、次のサブ部分識別器61による識別を行わずに、部分識別処理を終了する。例えば、夕景画像であると識別できれば、花や紅葉の識別を行わずに、部分識別処理を終了する。この場合、次のサブ部分識別器61による識別を省略しているので、部分識別処理の速度を速めることができる。   Next, the sub partial discriminator 61 determines whether or not the positive count value is larger than the positive threshold value (S305). The positive count value indicates the number of partial images determined to belong to a specific scene. If the positive count value is larger than the affirmative threshold (YES in S305), the sub partial classifier 61 determines that the classification target image belongs to a specific scene, and sets an affirmative flag (S306). In this case, the partial discriminator 60 ends the partial discriminating process without performing discrimination by the next sub partial discriminator 61. For example, if the image can be identified as an evening scene image, the partial identification process is terminated without identifying flowers and autumn leaves. In this case, since the identification by the next sub partial classifier 61 is omitted, the speed of the partial classification process can be increased.

正カウント値が肯定閾値より大きくなければ(S305でNO)、サブ部分識別器61は、識別対象画像が特定のシーンに属すると判断できず、次のS307の処理を行う。   If the positive count value is not greater than the positive threshold value (NO in S305), the sub partial classifier 61 cannot determine that the classification target image belongs to a specific scene, and performs the next process of S307.

サブ部分識別器61は、正カウント値と残りの部分画像数との和が肯定閾値よりも小さければ(S307でYES)、S309の処理へ進む。正カウント値と残りの部分画像数との和が肯定閾値よりも小さい場合、残り全ての部分画像によって正カウント値がインクリメントされても正カウント値が肯定閾値より大きくなることがないので、S309に処理を進めることによって、残りの部分画像についてサポートベクタマシンによる識別を省略する。これにより、部分識別処理の速度を速めることができる。   If the sum of the positive count value and the number of remaining partial images is smaller than the positive threshold (YES in S307), the sub partial discriminator 61 proceeds to the process of S309. If the sum of the positive count value and the number of remaining partial images is smaller than the positive threshold value, the positive count value does not become larger than the positive threshold value even if the positive count value is incremented by all the remaining partial images. By proceeding with the process, the remaining partial images are not identified by the support vector machine. Thereby, the speed of the partial identification process can be increased.

サブ部分識別器61がS307でNOと判断した場合、サブ部分識別器61は、次の部分画像の有無を判断する(S308)。なお、ここでは、64個に分割された部分画像の全てを順に選択していない。図15において太枠で示された上位10番目までの10個の部分画像だけを順に選択している。このため、10番目の部分画像の識別を終えれば、サブ部分識別器61は、S308において次の部分画像はないと判断する(この点を考慮して、S307の「残りの部分画像数」も決定される。)。   If the sub partial discriminator 61 determines NO in S307, the sub partial discriminator 61 determines whether there is a next partial image (S308). Here, all of the partial images divided into 64 pieces are not selected in order. In FIG. 15, only the top 10 partial images indicated by thick frames are selected in order. Therefore, when the identification of the tenth partial image is completed, the sub partial discriminator 61 determines that there is no next partial image in S308 (considering this point, “the number of remaining partial images” in S307). Is also determined).

図16は、上位10番目までの10個の部分画像だけで夕景画像の識別をしたときのRecall及びPrecisionのグラフである。図に示すような肯定閾値を設定すれば、正答率(Precision)を80%程度に設定でき、再現率(Recall)を90%程度に設定でき、精度の高い識別が可能である。   FIG. 16 is a Recall and Precision graph when an evening scene image is identified using only the top 10 partial images. If an affirmative threshold as shown in the figure is set, the accuracy rate (Precision) can be set to about 80%, the recall rate (Recall) can be set to about 90%, and identification with high accuracy is possible.

部分識別処理では、10個の部分画像だけで夕景画像の識別を行っている。このため、64個の全ての部分画像を用いて夕景画像の識別を行うよりも、部分識別処理の速度を速めることができる。
また、部分識別処理では、夕景部分画像の存在確率の高い上位10番目の部分画像を用いて夕景画像の識別を行っている。このため、存在確率を無視して抽出された10個の部分画像を用いて夕景画像の識別を行うよりも、Recall及びPrecisionをともに高く設定することが可能になる。
また、部分識別処理では、夕景部分画像の存在確率の高い順に部分画像を選択している。この結果、早い段階でS305の判断がYESになりやすくなる。このため、本実施形態では、存在確率の高低を無視した順で部分画像を選択したときよりも、部分識別処理の速度を速めることができる。
In the partial identification process, the evening scene image is identified using only 10 partial images. For this reason, it is possible to increase the speed of the partial identification processing compared to the case where the evening scene image is identified using all 64 partial images.
In the partial identification process, the sunset scene image is identified using the top tenth partial image having a high existence probability of the sunset scene partial image. For this reason, it is possible to set both Recall and Precision higher than the identification of an evening scene image using 10 partial images extracted by ignoring the existence probability.
In the partial identification process, partial images are selected in descending order of the existence probability of the sunset partial image. As a result, the determination in S305 is likely to be YES at an early stage. For this reason, in the present embodiment, the speed of the partial identification process can be increased as compared with the case where the partial images are selected in the order in which the presence probability level is ignored.

S307においてYESと判断された場合、又は、S308において次の部分画像がないと判断された場合、サブ部分識別器61は、負カウント値が否定閾値よりも大きいか否かを判断する(S309)。この否定閾値は、前述の全体識別処理における否定閾値(図7のS206)とほぼ同様の機能を果たすものなので、詳しい説明は省略する。S309でYESと判断された場合、図7のS207と同様に、否定フラグを立てる。   When it is determined YES in S307, or when it is determined that there is no next partial image in S308, the sub partial discriminator 61 determines whether or not the negative count value is larger than the negative threshold (S309). . Since this negative threshold performs substantially the same function as the negative threshold (S206 in FIG. 7) in the above-described overall identification process, detailed description thereof is omitted. When YES is determined in S309, a negative flag is set as in S207 of FIG.

S302においてNOの場合、S309でNOの場合、又はS310の処理を終えた場合、部分識別器60は、次のサブ部分識別器61の有無を判断する(S311)。夕景部分識別器61Sによる処理を終えた後の場合、サブ部分識別器61として花部分識別器61Fや紅葉部分識別器61Rがまだあるので、部分識別器60は、S311において、次のサブ部分識別器61があると判断する。   In the case of NO in S302, in the case of NO in S309, or when the process of S310 is completed, the partial discriminator 60 determines whether or not there is a next sub partial discriminator 61 (S311). In the case after the processing by the evening scene partial classifier 61S is finished, since the flower partial classifier 61F and the autumnal leaves partial classifier 61R are still present as the sub partial classifier 61, the partial classifier 60 determines the next sub partial classifier in S311. It is determined that there is a container 61.

そして、S306の処理を終えた場合(識別対象画像が特定のシーンに属すると判断された場合)、又は、S311において次のサブ部分識別器61がないと判断された場合(識別対象画像が特定のシーンに属すると判断できなかった場合)、部分識別器60は、部分識別処理を終了する。   Then, when the process of S306 is completed (when it is determined that the identification target image belongs to a specific scene), or when it is determined in S311 that there is no next sub partial classifier 61 (the identification target image is specified). If it cannot be determined that the scene belongs to the scene), the partial discriminator 60 ends the partial discrimination processing.

なお、既に説明した通り、部分識別処理が終了すると、シーン識別部33は、部分識別処理によってシーンの識別ができたか否かを判断する(図5のS106)。このとき、シーン識別部33は、図8の識別対象テーブルを参照し、「肯定」欄に1があるか否かを判断することになる。
部分識別処理によってシーンの識別ができた場合(S106でYES)、統合識別処理が省略される。これにより、シーン識別処理の速度が速くなる。
As already described, when the partial identification process is completed, the scene identification unit 33 determines whether or not the scene has been identified by the partial identification process (S106 in FIG. 5). At this time, the scene identification unit 33 refers to the identification target table in FIG. 8 and determines whether or not there is 1 in the “affirmation” column.
When the scene can be identified by the partial identification process (YES in S106), the integrated identification process is omitted. This increases the speed of the scene identification process.

ところで、上記の説明では、夕景部分識別器61Sは、10個の部分画像を用いて夕景画像の識別を行っているが、識別に用いられる部分画像の数は10個に限られるものではない。また、他のサブ部分識別器61が、夕景部分識別器61Sとは異なる数の部分画像を用いて画像を識別しても良い。ここでは、花部分識別器61Fは20個の部分画像を用いて花画像を識別し、また、紅葉部分識別器61Rは15個の部分画像を用いて紅葉画像を識別するものとする。   In the above description, the evening scene partial classifier 61S identifies evening scene images using ten partial images. However, the number of partial images used for identification is not limited to ten. Further, the other sub partial classifier 61 may identify an image using a different number of partial images from the sunset scene partial classifier 61S. Here, it is assumed that the flower portion identifier 61F identifies a flower image using 20 partial images, and the autumnal leaf portion identifier 61R identifies a autumnal leaf image using 15 partial images.

<サポートベクタマシン>
統合識別処理について説明する前に、全体識別処理のサブ識別器51や部分識別処理のサブ部分識別器61において用いられているサポートベクタマシン(SVM)について説明する。
<Support vector machine>
Before describing the integrated identification process, the support vector machine (SVM) used in the sub-identifier 51 for the overall identification process and the sub-partial identifier 61 for the partial identification process will be described.

図17Aは、線形サポートベクタマシンによる判別の説明図である。ここでは、2つの特徴量x1、x2によって、学習用サンプルを2次元空間に示している。学習用サンプルは2つのクラスA、Bに分けられている。図中では、クラスAに属するサンプルは丸で示されており、クラスBに属するサンプルは四角で示されている。
学習用サンプルを用いた学習によって、2次元空間を2つに分ける境界が定義される。境界は、<w・x>+b=0で定義される(なお、x=(x1,x2)であり、wは重みベクトルであり、<w・x>はwとxの内積である)。但し、境界は、マージンが最大になるように、学習用サンプルを用いた学習によって定義される。つまり、図の場合、境界は、太点線ではなく、太実線のようになる。
判別は、判別式f(x)=<w・x>+bを用いて行われる。ある入力x(この入力xは学習用サンプルとは別である)について、f(x)>0であればクラスAに属すると判別され、f(x)<0であればクラスBに属すると判別される。
FIG. 17A is an explanatory diagram of determination by the linear support vector machine. Here, the learning sample is shown in a two-dimensional space by two feature amounts x1 and x2. The learning sample is divided into two classes A and B. In the figure, samples belonging to class A are indicated by circles, and samples belonging to class B are indicated by squares.
A boundary that divides the two-dimensional space into two is defined by learning using the learning sample. The boundary is defined by <w · x> + b = 0 (where x = (x1, x2), w is a weight vector, and <w · x> is an inner product of w and x). However, the boundary is defined by learning using a learning sample so that the margin is maximized. That is, in the case of the figure, the boundary is not a thick dotted line but a thick solid line.
The discrimination is performed using the discriminant f (x) = <w · x> + b. It is determined that a certain input x (this input x is different from the learning sample) belongs to class A if f (x)> 0, and belongs to class B if f (x) <0. Determined.

ここでは2次元空間を用いて説明しているが、これに限られない(つまり、特徴量は2以上でも良い)。この場合、境界は超平面で定義される。   Here, the description is made using a two-dimensional space, but the present invention is not limited to this (that is, the feature amount may be two or more). In this case, the boundary is defined by a hyperplane.

ところで、2つのクラスに線形関数で分離できないことがある。このような場合に線形サポートベクタマシンによる判別を行うと、判別結果の精度が低下する。そこで、入力空間の特徴量を非線形変換すれば、すなわち入力空間からある特徴空間へ非線形写像すれば、特徴空間において線形関数で分離することができるようになる。非線形サポートベクタマシンでは、これを利用している。   By the way, there are cases where the two classes cannot be separated by a linear function. In such a case, if the determination is performed by the linear support vector machine, the accuracy of the determination result is lowered. Therefore, if the feature quantity of the input space is nonlinearly transformed, that is, if the input space is nonlinearly mapped to a certain feature space, it can be separated by a linear function in the feature space. This is used in the nonlinear support vector machine.

図17Bは、カーネル関数を用いた判別の説明図である。ここでは、2つの特徴量x1、x2によって、学習用サンプルを2次元空間に示している。図17Bの入力空間からの非線形写像が図17Aのような特徴空間になれば、線形関数で2つのクラスに分離することが可能になる。この特徴空間においてマージンが最大になるように境界が定義されれば、特徴空間における境界の逆写像が、図17Bに示す境界になる。この結果、図17Bに示すように、境界は非線形になる。   FIG. 17B is an explanatory diagram of discrimination using a kernel function. Here, the learning sample is shown in a two-dimensional space by two feature amounts x1 and x2. If the nonlinear mapping from the input space of FIG. 17B becomes a feature space as shown in FIG. 17A, it can be separated into two classes by a linear function. If the boundary is defined so that the margin is maximized in this feature space, the inverse mapping of the boundary in the feature space becomes the boundary shown in FIG. 17B. As a result, the boundary becomes nonlinear as shown in FIG. 17B.

ここではガウスカーネルを利用することにより、判別式f(x)は次式のようになる(なお、Mは特徴量の数であり、Nは学習用サンプルの数(若しくは境界に寄与する学習用サンプルの数)であり、wは重み係数であり、yは学習用サンプルの特徴量であり、xは入力xの特徴量である)。

Figure 0004946750
Here, by using a Gaussian kernel, the discriminant f (x) becomes as follows (where M is the number of features, and N is the number of learning samples (or learning for contributing to the boundary) The number of samples), w i is a weighting factor, y j is the feature quantity of the learning sample, and x j is the feature quantity of the input x).
Figure 0004946750

ある入力x(この入力xは学習用サンプルとは別である)について、f(x)>0であればクラスAに属すると判別され、f(x)<0であればクラスBに属すると判別される。また、判別式f(x)の値が大きい値になるほど、入力x(この入力xは学習用サンプルとは別である)がクラスAに属する確率が高くなる。逆に、判別式f(x)の値が小さい値になるほど、入力x(この入力xは学習用サンプルとは別である)がクラスAに属する確率が低くなる。   It is determined that a certain input x (this input x is different from the learning sample) belongs to class A if f (x)> 0, and belongs to class B if f (x) <0. Determined. Further, the larger the value of the discriminant f (x), the higher the probability that the input x (this input x is different from the learning sample) belongs to the class A. On the contrary, the smaller the value of the discriminant f (x), the lower the probability that the input x (this input x is different from the learning sample) belongs to the class A.

前述の全体識別処理のサブ識別器51や部分識別処理のサブ部分識別器61では、上記のサポートベクタマシンの判別式f(x)の値を用いている。サポートベクタマシンによる判別式f(x)の値の算出には、学習用サンプルの数が多くなると時間がかかる。このため、判別式f(x)の値を複数回算出する必要があるサブ部分識別器61は、判別式f(x)の値を1回算出すれば済むサブ識別器51よりも、処理時間がかかる。   In the sub-identifier 51 for the overall identification process and the sub-partial identifier 61 for the partial identification process, the value of the discriminant f (x) of the support vector machine is used. The calculation of the value of the discriminant f (x) by the support vector machine takes time as the number of learning samples increases. For this reason, the sub partial classifier 61 that needs to calculate the value of the discriminant f (x) a plurality of times requires more processing time than the sub classifier 51 that only needs to calculate the value of the discriminant f (x) once. It takes.

なお、学習用サンプルとは別に評価用サンプルが用意されている。前述のRecallやPrecisionのグラフは、評価用サンプルに対する識別結果に基づくものである。   An evaluation sample is prepared separately from the learning sample. The above Recall and Precision graphs are based on the identification results for the evaluation samples.

<統合識別処理>
前述の全体識別処理や部分識別処理では、サブ識別器51やサブ部分識別器61における肯定閾値を比較的高めに設定し、Precision(正解率)を高めに設定している。なぜならば、例えば全体識別器の風景識別器51Lの正解率が低く設定されると、風景識別器51Lが紅葉画像を風景画像であると誤識別してしまい、紅葉識別器51Rによる識別を行う前に全体識別処理を終えてしまう事態が発生してしまうからである。ここではPrecision(正解率)が高めに設定されることにより、特定のシーンに属する画像が特定のシーンのサブ識別器51(又はサブ部分識別器61)に識別されるようになる。(例えば紅葉画像が紅葉識別器51R(又は紅葉部分識別器61R)によって識別されるようになる)
但し、全体識別処理や部分識別処理のPrecision(正解率)を高めに設定すると、全体識別処理や部分識別処理ではシーンの識別ができなくなる可能性が高くなる。そこで、全体識別処理及び部分識別処理によってシーンの識別ができなかった場合、以下に説明する統合識別処理が行われる。
<Integrated identification processing>
In the above-described overall identification process and partial identification process, the positive threshold value in the sub-classifier 51 and the sub-classifier 61 is set relatively high, and the Precision (correct answer rate) is set high. This is because, for example, if the accuracy rate of the landscape classifier 51L of the overall classifier is set low, the landscape classifier 51L misidentifies the autumnal image as a landscape image, and before the autumnal classifier 51R performs the classification. This is because a situation occurs in which the entire identification process ends. Here, by setting the Precision (accuracy rate) high, an image belonging to a specific scene is identified by the sub-identifier 51 (or sub-partial identifier 61) of the specific scene. (For example, the autumn leaves image is identified by the autumn leaves discriminator 51R (or the autumn leaf partial discriminator 61R))
However, if the Precision (accuracy rate) of the overall identification process or the partial identification process is set to be high, there is a high possibility that the scene cannot be identified by the overall identification process or the partial identification process. Therefore, when the scene cannot be identified by the overall identification process and the partial identification process, the integrated identification process described below is performed.

図18は、統合識別処理のフロー図である。以下に説明するように、統合識別処理は、全体識別処理の各サブ識別器51の判別式の値に基づいて、最も確信度の高いシーンを選択する処理である。   FIG. 18 is a flowchart of the integrated identification process. As will be described below, the integrated identification process is a process of selecting a scene with the highest certainty factor based on the discriminant value of each sub-classifier 51 in the overall identification process.

まず、統合識別器70は、5つのサブ識別器51の判別式の値に基づいて、正となるシーンを抽出する(S401)。このとき、全体識別処理の際に各サブ識別器51が算出した判別式の値が用いられる。   First, the integrated discriminator 70 extracts a positive scene based on the discriminant values of the five sub discriminators 51 (S401). At this time, the value of the discriminant calculated by each sub classifier 51 during the overall identification process is used.

次に、統合識別器70は、判別式の値が正のシーンが存在するか否かを判断する(S402)。
判別式の値が正のシーンが存在する場合(S402でYES)、最大値のシーンの欄に肯定フラグを立てて(S403)、統合識別処理を終了する。これにより、最大値のシーンに識別対象画像が属すると判断される。
一方、判別式の値が正であるシーンが存在しない場合(S402でNO)、肯定フラグを立てずに、統合識別処理を終了する。これにより、図8の識別対象テーブルの肯定欄において、1のシーンが無いままの状態になる。つまり、識別対象画像が、どのシーンに属するか識別できなかったことになる。
Next, the integrated discriminator 70 determines whether or not a scene having a positive discriminant value exists (S402).
If there is a scene with a positive discriminant value (YES in S402), an affirmative flag is set in the maximum value scene column (S403), and the integrated identification process is terminated. Accordingly, it is determined that the identification target image belongs to the maximum value scene.
On the other hand, if there is no scene having a positive discriminant value (NO in S402), the integrated identification process is terminated without setting an affirmative flag. As a result, there is no scene in the affirmative column of the identification target table in FIG. That is, it cannot be identified to which scene the identification target image belongs.

なお、既に説明した通り、統合識別処理が終了すると、シーン識別部33は、統合識別処理によってシーンの識別ができたか否かを判断する(図5のS108)。このとき、シーン識別部33は、図8の識別対象テーブルを参照し、「肯定」欄に1があるか否かを判断することになる。S402でNOとの判断の場合、S108の判断もNOになる。   As already described, when the integrated identification process is completed, the scene identification unit 33 determines whether or not the scene has been identified by the integrated identification process (S108 in FIG. 5). At this time, the scene identification unit 33 refers to the identification target table in FIG. 8 and determines whether or not there is 1 in the “affirmation” column. If it is determined NO in S402, the determination in S108 is also NO.

===本実施形態の概要説明===
ユーザの好みには個人差があるため、ある画像が「風景」に識別されることを好む人もいれば、「風景」に識別されないことを好む人もいる。そこで、本実施形態では、ユーザの好みを識別処理に反映させることを可能にしている。
=== Outline of the present embodiment ===
Because there are individual differences in user preferences, some people prefer that certain images be identified as “landscape”, while others prefer not to be identified as “landscape”. Therefore, in this embodiment, it is possible to reflect the user's preference in the identification process.

図19は、設定画面の説明図である。この設定画面161は、プリンタ4の表示部16に表示される画面である。設定画面161には、各シーンに対応して、それぞれ5個の画像が表示される。これらの画像は、いずれもサポートベクタマシン(SVM)の学習用サンプルの画像である。ここでは、「風景」に対応して最上段に表示される5個の画像L1〜L5について説明する。   FIG. 19 is an explanatory diagram of a setting screen. The setting screen 161 is a screen displayed on the display unit 16 of the printer 4. On the setting screen 161, five images are displayed corresponding to each scene. These images are all learning sample images of the support vector machine (SVM). Here, the five images L1 to L5 displayed at the top corresponding to “landscape” will be described.

5個の画像のうちの右の画像ほど風景とは無関係な画像になるように、5個の画像L1〜L5が表示されるようになっている(後述)。そして、当初の設定では、3個の画像L1〜画像L3に対応する学習用サンプルは風景に属するとされており、2個の画像L4及び画像L5に対応する学習用サンプルは風景に属さないとされている。これに応じて、設定画面161の表示の当初は、風景に属する画像と属さない画像との境界を示すように、境界設定バー161Aが画像L3と画像L4との間に表示される。   Five images L1 to L5 are displayed so that the right image of the five images becomes an image irrelevant to the landscape (described later). In the initial setting, the learning samples corresponding to the three images L1 to L3 belong to the landscape, and the learning samples corresponding to the two images L4 and L5 must not belong to the landscape. Has been. Accordingly, at the beginning of the display of the setting screen 161, a boundary setting bar 161A is displayed between the image L3 and the image L4 so as to indicate the boundary between the image belonging to the landscape and the image not belonging to the landscape.

この境界設定バー161Aは、ユーザによってその位置を変更することが可能である。例えば、表示部16に表示された画像L3が風景画像ではないとユーザが判断した場合、ユーザは、パネル部17を操作して、5個の境界設定バー161Aのうち風景に対応する境界設定バー161Aを選択し、その境界設定バー161Aを一つ左に移動して画像L2と画像L3との間にする。   The position of the boundary setting bar 161A can be changed by the user. For example, when the user determines that the image L3 displayed on the display unit 16 is not a landscape image, the user operates the panel unit 17 to select a boundary setting bar corresponding to the landscape among the five boundary setting bars 161A. 161A is selected, and the boundary setting bar 161A is moved to the left by a distance between the images L2 and L3.

そして、設定された境界設定バー161Aの位置に応じて、サブ識別器51の処理が変更される(後述)。この結果、画像L3の類似画像を風景識別器51Lが識別したとき、当初の設定のままでは風景識別器51Lは風景のシーンに属すると識別していたが、風景のシーンに属しないと識別できるようになる。つまり、ユーザの好みが識別処理に反映されるようになる。   Then, the processing of the sub classifier 51 is changed according to the set position of the boundary setting bar 161A (described later). As a result, when the landscape discriminator 51L identifies a similar image of the image L3, the landscape discriminator 51L has been identified as belonging to a landscape scene, but can be discriminated as not belonging to a landscape scene. It becomes like this. That is, the user's preference is reflected in the identification process.

以下の説明では、まず、プリンタ4のメモリ23に記憶されているデータについて説明する。次に、設定画面161をどのように表示するのかについて説明する。その次に、設定画面161にて境界が設定された後、サブ識別器51の処理がどのように変更されるのかについて説明する。   In the following description, first, data stored in the memory 23 of the printer 4 will be described. Next, how to display the setting screen 161 will be described. Next, how the processing of the sub classifier 51 is changed after the boundary is set on the setting screen 161 will be described.

===第1実施形態===
<メモリに格納されている学習用サンプルのデータ>
まず、プリンタ4のメモリ23に記憶されているデータについて説明する。以下に説明するように、メモリ23には、図20Aに示すデータ群と、図20Bの白ドットで示す学習用サンプルの画像データが記憶されている。
=== First Embodiment ===
<Learning sample data stored in memory>
First, data stored in the memory 23 of the printer 4 will be described. As will be described below, the memory 23 stores a data group shown in FIG. 20A and learning sample image data indicated by white dots in FIG. 20B.

図20Aは、メモリ23に記憶されている学習用サンプルのデータ群である。ここでは、風景識別器51Lのサポートベクタマシンに用いられるデータ群が示されている。   FIG. 20A shows a data group of learning samples stored in the memory 23. Here, a data group used for the support vector machine of the landscape classifier 51L is shown.

図に示すように、学習用サンプルの画像そのものの情報(画像データ)が記憶されるのではなく、学習用サンプルの全体特徴量がメモリ23に記憶されている。また、各学習用サンプルに対応付けて、重み係数wもメモリ23に記憶されている。この重み係数wは、学習用サンプルの全体特徴量のデータ群を用いて算出することが可能であるが、ここでは、重み係数wは予め算出されて、メモリ23に記憶されているものとする。前述の判別式f(x)の値は、このデータ群の全体特徴量yと重み係数wを用いて、前述の数1の式に基づいて算出される。なお、境界の決定に寄与しない学習用サンプルの重み係数はゼロとなるので、本来ならばその学習用サンプルの全体特徴量はメモリ23に記憶する必要はないが、本実施形態では、全ての学習用サンプルの全体特徴量をメモリ23に記憶しているものとする。   As shown in the figure, information (image data) of the learning sample image itself is not stored, but the entire feature amount of the learning sample is stored in the memory 23. Further, the weighting coefficient w is also stored in the memory 23 in association with each learning sample. The weighting factor w can be calculated using the data group of the entire feature amount of the learning sample. Here, it is assumed that the weighting factor w is calculated in advance and stored in the memory 23. . The value of the above-described discriminant f (x) is calculated based on the above-described equation 1 using the entire feature amount y and the weight coefficient w of this data group. Note that since the weighting coefficient of the learning sample that does not contribute to the determination of the boundary is zero, it is not necessary to store the entire feature amount of the learning sample in the memory 23. It is assumed that the entire feature amount of the sample for use is stored in the memory 23.

更に、本実施形態では、各学習用サンプルに対応付けて、風景のシーンに属するか否かを示す情報(属性情報)も記憶されている。風景のシーンに属するものには属性情報としてPが設定され、属さないものには属性情報としてNが設定される。後述する通り、この属性情報は、図19の設定画面161を表示する際に用いられると共に、図19の境界設定バー161Aの設定に応じて変更される。   Furthermore, in the present embodiment, information (attribute information) indicating whether or not the scene belongs to a landscape scene is also stored in association with each learning sample. P is set as attribute information for items belonging to landscape scenes, and N is set as attribute information for items that do not belong. As will be described later, this attribute information is used when displaying the setting screen 161 of FIG. 19 and is changed according to the setting of the boundary setting bar 161A of FIG.

図20Bは、各学習用サンプルの分布の説明図である。ここでは説明の簡略化のため、2つの特徴量によって、2次元空間に学習用サンプルが分布している。各ドットは、学習用サンプルの2次元空間上での位置をそれぞれ示している。   FIG. 20B is an explanatory diagram of the distribution of each learning sample. Here, for simplification of explanation, learning samples are distributed in a two-dimensional space by two feature amounts. Each dot indicates the position of the learning sample on the two-dimensional space.

各学習用サンプルは予めクラスタリングされており、図中では13個のクラスタ(クラスタA〜クラスタM)にクラスタリングされている。ここでは、公知のk−means法により、クラスタリングがされている。k−means法によるクラスタリングの手法は、以下の通りである。(1)まず、コンピュータは、クラスタの中心の位置が仮決めする。ここでは、13個の中心の位置をランダムに仮決めする。(2)次に、コンピュータは、各学習用サンプルを、最も近い中心のクラスタに分類する。これにより、新しいクラスタが決定される。(3)次に、コンピュータは、各クラスタの学習用サンプルの特徴量の平均値を算出し、その平均値を新しいクラスタの中心の位置とする。(4)新しいクラスタの中心の位置が、元のクラスタの中心の位置と変化しなければクラスタリングを終了し、変化していれば(2)に戻る。   Each learning sample is clustered in advance, and is clustered into 13 clusters (cluster A to cluster M) in the figure. Here, clustering is performed by a known k-means method. A clustering technique based on the k-means method is as follows. (1) First, the computer temporarily determines the position of the center of the cluster. Here, the positions of the 13 centers are provisionally determined at random. (2) Next, the computer classifies each learning sample into the nearest central cluster. Thereby, a new cluster is determined. (3) Next, the computer calculates the average value of the feature values of the learning samples for each cluster, and sets the average value as the position of the center of the new cluster. (4) If the position of the center of the new cluster does not change from the position of the center of the original cluster, the clustering is terminated, and if it has changed, the process returns to (2).

なお、同じクラスタ内には、似た性質の学習用サンプルが属することになる。例えば、青空の画像の学習用サンプルによってクラスタAが構成されたり、新緑の画像の学習用サンプルによってクラスタBが構成されたりする。   Note that learning samples having similar properties belong to the same cluster. For example, a cluster A is configured by a learning sample for a blue sky image, or a cluster B is configured by a learning sample for a fresh green image.

図20Bの白ドットは、各クラスタの中心の位置に最も近い学習用サンプルの位置を示している。この白ドットの学習用サンプルは、各クラスタを代表するサンプル(代表サンプル)となる。メモリ23には、白ドットで示された代表サンプルの画像データが記憶されている。言い換えると、メモリ23には、各クラスタを代表する画像の画像データが記憶される。後述する通り、この代表画像データは、図19の設定画面161の表示に用いられる。   The white dot in FIG. 20B indicates the position of the learning sample closest to the center position of each cluster. The white dot learning sample is a sample representing each cluster (representative sample). The memory 23 stores image data of representative samples indicated by white dots. In other words, the memory 23 stores image data representing an image representing each cluster. As will be described later, this representative image data is used to display the setting screen 161 in FIG.

以上説明したように、プリンタ4のメモリ23には、図20Aに示すデータ群と、図20Bの白ドットで示す代表サンプルの画像データが記憶されている。なお、各学習用サンプルの属するクラスタを示すデータは、メモリ23に格納されていても良いし、格納されていなくても良い。各学習用サンプルの属するクラスタを示すデータは、図20Aのデータ群を用いて求めることが可能だからである。   As described above, the memory 23 of the printer 4 stores the data group shown in FIG. 20A and the representative sample image data shown by white dots in FIG. 20B. Note that the data indicating the cluster to which each learning sample belongs may or may not be stored in the memory 23. This is because the data indicating the cluster to which each learning sample belongs can be obtained using the data group of FIG. 20A.

<設定画面161を表示するまでの処理>
次に、プリンタ側コントローラ20が、図19のような設定画面161をどのように表示するのかについて説明する。
<Processing until the setting screen 161 is displayed>
Next, how the printer-side controller 20 displays the setting screen 161 as shown in FIG. 19 will be described.

図21Aは、境界(f(x)=0)の法線に代表サンプルを投影する様子の説明図である。ここでも説明の簡略化のため、2次元空間に代表サンプルが分布しているものとする。また、説明の簡略化のため、この2次元空間は、図17Aのように線形関数で分離可能な空間であるものとする。このため、風景画像のサンプルと、非風景画像のサンプルを分離する境界(f(x)=0)は、直線で定義される。(なお、デフォルトの設定では、クラスタA〜Gに属する学習用サンプルは風景画像であり、クラスタH〜Mに属する学習用サンプルは非風景画像である。)
図中において、代表サンプルの2次元空間上の位置が白ドットで示されており、境界(f(x)=0)が太線で示されている。なお、この境界は、設定変更前のデフォルトの境界である。
FIG. 21A is an explanatory diagram showing a state in which the representative sample is projected onto the normal line of the boundary (f (x) = 0). Also here, for simplification of explanation, it is assumed that representative samples are distributed in a two-dimensional space. For the sake of simplicity of explanation, this two-dimensional space is assumed to be a space that can be separated by a linear function as shown in FIG. 17A. Therefore, the boundary (f (x) = 0) that separates the landscape image sample and the non-landscape image sample is defined by a straight line. (In the default setting, the learning samples belonging to the clusters A to G are landscape images, and the learning samples belonging to the clusters H to M are non-landscape images.)
In the figure, the position of the representative sample in the two-dimensional space is indicated by a white dot, and the boundary (f (x) = 0) is indicated by a bold line. This boundary is a default boundary before the setting is changed.

プリンタ側コントローラ20は、境界に対する法線を一つ定義し、この法線上に、代表サンプルを投影する。投影される位置は、代表サンプルを通り境界と平行な直線(境界が超平面であれば超平面)と、法線との交点である。このようにして、13個の代表サンプルが、法線上に投影される。言い換えると、13個の代表サンプルが一直線上に並ぶことになる。   The printer-side controller 20 defines one normal to the boundary and projects a representative sample on this normal. The projected position is the intersection of a normal line and a straight line that passes through the representative sample and is parallel to the boundary (or a hyperplane if the boundary is a hyperplane). In this way, 13 representative samples are projected onto the normal. In other words, 13 representative samples are arranged in a straight line.

図21Bは、法線上に投影された代表サンプルの説明図である。風景画像の代表サンプルが図中の左側に位置するように、言い換えると、非風景画像の代表サンプルが図中の右側に位置するように、法線を水平にして、法線上に投影された代表サンプルの位置関係を示している。   FIG. 21B is an explanatory diagram of a representative sample projected on the normal line. A representative that is projected on the normal with the normal level horizontal so that the representative sample of the landscape image is located on the left side of the figure, in other words, the representative sample of the non-landscape image is located on the right side of the figure The positional relationship of the sample is shown.

次に、プリンタ側コントローラ20は、法線上に5個の区間を定義する。図中には、第1区間〜第5区間が定義されている。各区間は、所定の長さになるように定義されている。また、図21Aの法線と境界(f(x)=0)との交点の位置が、2つの区間の境界になるように、5個の区間が定義される。ここでは、図21Aの法線と境界(f(x)=0)との交点の位置は、第3区間と第4区間の境界に相当する。なお、各区間には、複数の代表サンプルが存在することになる。   Next, the printer-side controller 20 defines five sections on the normal line. In the figure, a first section to a fifth section are defined. Each section is defined to have a predetermined length. Further, five sections are defined so that the position of the intersection of the normal line and the boundary (f (x) = 0) in FIG. 21A becomes the boundary between the two sections. Here, the position of the intersection of the normal line and the boundary (f (x) = 0) in FIG. 21A corresponds to the boundary between the third section and the fourth section. Note that there are a plurality of representative samples in each section.

次に、プリンタ側コントローラ20は、各区間の中心に位置する代表サンプルの画像データを抽出する。ここでは、第1区間から、クラスタCの代表サンプルの画像データが抽出される。同様に、第2区間、第3区間、第4区間、第5区間から、クラスタE、F、H、Lの代表サンプルの画像データがそれぞれ抽出される。このとき、デフォルトの設定において風景のシーンに属しているとされる代表サンプルが、第1区間〜第3区間から抽出される。また、デフォルトの設定において風景のシーンに属しないとされる代表サンプルが、第4区間及び第5区間から抽出される。抽出された画像データは、各区間を代表するものと考えられる。   Next, the printer-side controller 20 extracts image data of a representative sample located at the center of each section. Here, the image data of the representative sample of cluster C is extracted from the first section. Similarly, image data of representative samples of clusters E, F, H, and L are extracted from the second section, the third section, the fourth section, and the fifth section, respectively. At this time, representative samples that belong to a landscape scene in the default settings are extracted from the first to third sections. In addition, representative samples that do not belong to the landscape scene in the default setting are extracted from the fourth section and the fifth section. The extracted image data is considered to represent each section.

プリンタ側コントローラ20は、抽出した画像データを用いて、設定画面161をプリンタ4の表示部16に表示する。第1区間から抽出されたクラスタCの代表サンプルの画像データは、図19の画像L1の表示に用いられる。同様に、クラスタE、F、H、Lの代表サンプルの画像データは、それぞれ図19の画像L2、L3、L4、L5の表示に用いられる。   The printer-side controller 20 displays a setting screen 161 on the display unit 16 of the printer 4 using the extracted image data. The image data of the representative sample of the cluster C extracted from the first section is used for displaying the image L1 in FIG. Similarly, the image data of the representative samples of the clusters E, F, H, and L are used for displaying the images L2, L3, L4, and L5 in FIG. 19, respectively.

また、図21Aの法線と境界(f(x)=0)との交点の位置が第3区間と第4区間の境界に相当しているので、プリンタ側コントローラ20は、図19の画像L3(第3区間から抽出された代表サンプルの画像)と画像L4(第4区間から抽出された代表サンプルの画像)との間に境界設定バー161Aを表示する。ところで、画像L1〜画像L3は風景画像であり、画像L4及び画像L5は非風景画像であるので、境界設定バー161Aは、風景画像と非風景画像との間に表示されることになる。   Further, since the position of the intersection of the normal line in FIG. 21A and the boundary (f (x) = 0) corresponds to the boundary between the third section and the fourth section, the printer-side controller 20 causes the image L3 in FIG. A boundary setting bar 161A is displayed between (the representative sample image extracted from the third section) and the image L4 (the representative sample image extracted from the fourth section). By the way, since the images L1 to L3 are landscape images and the images L4 and L5 are non-landscape images, the boundary setting bar 161A is displayed between the landscape image and the non-landscape image.

本実施形態では、上記のように、境界の法線に代表サンプルの位置が投影され、法線上に投影された代表サンプルの位置に基づいて、抽出すべき代表サンプルが決定される。これにより、本実施形態では、判別式の値が大きいものほど左側になるように、5個の代表サンプルの画像が表示される。言い換えると、風景のシーンに属する確信度の高い順に左から並ぶように、5個の代表サンプルの画像を表示できる。   In the present embodiment, as described above, the position of the representative sample is projected onto the normal line of the boundary, and the representative sample to be extracted is determined based on the position of the representative sample projected onto the normal line. Thereby, in this embodiment, the image of five representative samples is displayed so that the larger the discriminant value is, the left side is. In other words, images of five representative samples can be displayed so that they are arranged from the left in descending order of certainty belonging to a landscape scene.

そして、上記のように図19の設定画面161が表示されるので、境界設定バー161Aの左側には、デフォルトの設定では風景画像の代表サンプルが表示される。また、境界設定バー161Aの右側には、デフォルトの設定では非風景画像の代表サンプルが表示される。そして、5個の画像のうちの右の画像ほど風景とは無関係な画像になるように、5個の画像L1〜L5が表示される。また、境界設定バー161Aの近くに表示される画像は、ユーザの好みによって風景画像か否かの判断が分かれやすい画像になる。   Then, since the setting screen 161 in FIG. 19 is displayed as described above, a representative sample of a landscape image is displayed on the left side of the boundary setting bar 161A by default. On the right side of the boundary setting bar 161A, a representative sample of a non-landscape image is displayed by default. Then, the five images L1 to L5 are displayed so that the right image of the five images becomes an image irrelevant to the landscape. In addition, an image displayed near the boundary setting bar 161A is an image in which it is easy to determine whether or not the image is a landscape image depending on the user's preference.

以上の説明では風景のシーンについて説明したが、他のシーンについても、プリンタ側コントローラ20は、同様の処理を行う。これにより、プリンタ側コントローラ20は、図19の設定画面161の風景以外の部分も表示できる。   In the above description, a landscape scene has been described, but the printer controller 20 performs the same processing for other scenes. As a result, the printer-side controller 20 can also display portions other than the scenery on the setting screen 161 in FIG.

<設定画面161にて境界が設定された後の処理>
次に、図19に示すように、ユーザが境界設定バー161Aを一つ左に移動して画像L2と画像L3との間に設定した後の処理について説明する。
<Process after border is set on setting screen 161>
Next, as shown in FIG. 19, a process after the user moves the boundary setting bar 161A to the left and sets it between the images L2 and L3 will be described.

境界設定バー161Aの移動後、境界設定バー161Aの右側において、境界設定バー161Aと、デフォルトの設定では非風景画像である画像L4との間に、デフォルトの設定では風景画像である画像L3(クラスタFの代表サンプルの画像であり、第3区間を代表する画像である)が位置する状態になる。ユーザが境界設定バー161Aを画像L3と画像L4との間から画像L2と画像L3との間に移動したということは、図21Bに示す第3区間に属するクラスタF、Gに属する学習用サンプルが風景画像ではなく非風景画像であるとユーザが考えていると想定できる。   After the boundary setting bar 161A is moved, on the right side of the boundary setting bar 161A, between the boundary setting bar 161A and the image L4 that is a non-landscape image by default, the image L3 (cluster) that is a landscape image by default is set. F is a representative sample image, which is an image representative of the third section). The fact that the user has moved the boundary setting bar 161A between the images L3 and L4 between the images L2 and L3 means that the learning samples belonging to the clusters F and G belonging to the third section shown in FIG. It can be assumed that the user thinks that the image is not a landscape image but a non-landscape image.

図22Aは、変更後のデータ群の説明図である。図22Bは、変更後の境界の説明図である。以下、これらの図を用いて、設定変更後のプリンタ側コントローラ20の処理について説明する。   FIG. 22A is an explanatory diagram of the data group after the change. FIG. 22B is an explanatory diagram of the boundary after the change. Hereinafter, the processing of the printer-side controller 20 after the setting change will be described with reference to these drawings.

まず、プリンタ側コントローラ20は、クラスタF、Gに属する学習用サンプルの属性情報をPからNに変更する。例えば、仮に図20Aのサンプル番号3がクラスタF又はクラスタGに属していれば、図22Aに示すように属性情報をPからNに変更する。   First, the printer-side controller 20 changes the learning sample attribute information belonging to the clusters F and G from P to N. For example, if sample number 3 in FIG. 20A belongs to cluster F or cluster G, the attribute information is changed from P to N as shown in FIG. 22A.

本実施形態では、クラスタFの代表サンプルの属性情報を変更するだけでなく、クラスタFに属する学習用サンプルの全ての属性情報を変更している。これにより、ユーザによる一度の操作によって、風景に属さないことをユーザが望んだ画像と似た性質の学習用サンプルの属性情報を、一括して変更することができる。   In the present embodiment, not only the attribute information of the representative sample of the cluster F is changed, but also all the attribute information of the learning samples belonging to the cluster F are changed. Thereby, the attribute information of the learning sample having properties similar to the image that the user desires not to belong to the landscape can be collectively changed by a single operation by the user.

また、本実施形態では、クラスタFの代表サンプルの属性情報を変更するだけでなく、第3区間に属する学習用サンプルの全ての属性情報を変更している。これにより、ユーザによる一度の操作によって、風景に属さないことをユーザが望んだ画像と同程度に境界から離れた学習用サンプルの属性情報を、一括して変更することができる。   In the present embodiment, not only the attribute information of the representative sample of the cluster F is changed, but also all the attribute information of the learning samples belonging to the third section are changed. Thereby, it is possible to collectively change the attribute information of the learning sample that is separated from the boundary as much as the image that the user desires not to belong to the landscape by a single operation by the user.

次に、プリンタ側コントローラ20は、全体特徴量と変更後の属性情報とに基づいてサポートベクタマシンの再学習を行い、図22Bに示すように境界を変更する。言い換えると、プリンタ側コントローラ20は、全体特徴量と変更後の属性情報とに基づいて再学習を行い、図20Aの重み係数wを図22Bに示すように変更する。ここでは、変更後の境界をf´(x)=0と表記し、変更後の重み係数をw´と表記している。なお、再学習の演算処理は通常のサポートベクタマシンの学習の演算処理と同じなので、再学習の説明は省略する。   Next, the printer-side controller 20 performs relearning of the support vector machine based on the entire feature amount and the changed attribute information, and changes the boundary as shown in FIG. 22B. In other words, the printer-side controller 20 performs relearning based on the overall feature amount and the changed attribute information, and changes the weighting coefficient w in FIG. 20A as shown in FIG. 22B. Here, the changed boundary is expressed as f ′ (x) = 0, and the changed weighting coefficient is expressed as w ′. Note that the relearning calculation process is the same as the normal support vector machine learning calculation process, and a description of the relearning will be omitted.

重み係数w(又はw´)は、境界の決定に寄与しなければゼロになる。このため、図20Aではゼロであった重み係数wが、変更によってゼロ以外の値を持つこともある。逆に、図20Aではゼロ以外の値を持っていた重み係数wが、変更によってゼロになることもある。デフォルトの設定では境界の決定に寄与しない学習用サンプルのデータまでをも図20Aのデータ群で記憶しているのは、このためである。   The weighting factor w (or w ′) becomes zero if it does not contribute to the determination of the boundary. For this reason, the weighting factor w, which was zero in FIG. 20A, may have a value other than zero due to a change. Conversely, the weighting factor w, which had a value other than zero in FIG. 20A, may become zero due to a change. This is why even the learning sample data that does not contribute to the determination of the boundary in the default setting is stored in the data group of FIG. 20A.

識別対象画像が風景のシーンに属するか否かを風景識別器51Lが判断するとき、風景識別器51Lは、図22Bのデータ群の学習用サンプルの全体特徴量と変更後の重み係数w´とに基づいて、前述の数1の判別式の値(変更後の判別式f´(x)の値)を算出する。なお、重み係数w´がゼロの学習用サンプルは除外して、風景識別器51Lは、前述の数1の判別式の値を算出する。これにより、全ての学習用サンプルを用いて判別式の値を求める場合よりも、演算速度が速くなる。   When the landscape discriminator 51L determines whether or not the classification target image belongs to a landscape scene, the landscape discriminator 51L includes the entire feature amount of the learning sample of the data group in FIG. 22B and the changed weight coefficient w ′. Based on the above, the value of the discriminant of the above formula 1 (the value of the discriminant f ′ (x) after the change) is calculated. Note that the learning classifier 51L calculates the value of the discriminant of Equation 1 described above, excluding learning samples whose weighting coefficient w ′ is zero. As a result, the calculation speed is faster than the case of obtaining the discriminant value using all the learning samples.

変更後の判別式f´(x)を用いることにより、ユーザの好みを反映した識別処理を行うことができる。例えば、仮に画像L3(図19参照)が建物の画像だとすると、識別対象画像が建物の画像である場合に、その識別対象画像が風景のシーンに属すると判断され難くなる。言い換えると、仮にクラスタF(図22B参照)が建物の画像の学習用サンプルから構成されていたとすると、識別対象画像が建物の画像である場合に、その識別対象画像が風景のシーンに属すると判断され難くなる。   By using the discriminant f ′ (x) after the change, it is possible to perform an identification process reflecting the user's preference. For example, if the image L3 (see FIG. 19) is a building image, it is difficult to determine that the identification target image belongs to a landscape scene when the identification target image is a building image. In other words, if the cluster F (see FIG. 22B) is composed of building image learning samples, when the identification target image is a building image, it is determined that the identification target image belongs to a landscape scene. It becomes difficult to be done.

本実施形態では、ユーザの好みに合わせた設定変更を、容易に行うことができる。もし仮に、1個ずつ学習用サンプルの画像を表示し、表示された学習用サンプルの画像が風景か否かをユーザが1個ずつ決定することにすると、ユーザは何度も決定作業を行う必要があるので不便である。   In the present embodiment, it is possible to easily change settings according to user preferences. If the learning sample images are displayed one by one and the user decides whether the displayed learning sample images are landscapes one by one, the user needs to repeat the determination work many times. It is inconvenient because there is.

なお、上記の説明では、ユーザが境界設定バー161Aを一つ左に移動した場合について説明した。これに対し、仮にユーザが境界設定バー161Aを一つ右に移動した場合には、境界設定バー161Aの左側において、境界設定バー161Aと、デフォルトの設定では風景画像である画像L3との間に、デフォルトの設定では非風景画像である画像L4(クラスタHの代表サンプルの画像であり、第4区間を代表する画像である)が位置する状態になる。このような場合には、プリンタ側コントローラ20は、第4区間に属するクラスタI、H、Jに属する学習用サンプルの属性情報をNからPに変更し、全体特徴量と変更後の属性情報とに基づいてサポートベクタマシンの再学習を行い、境界を変更する。この場合にも、ユーザの好みを反映した識別処理を行うことができる。   In the above description, the case where the user moves the boundary setting bar 161A to the left has been described. On the other hand, if the user moves the boundary setting bar 161A one place to the right, on the left side of the boundary setting bar 161A, between the boundary setting bar 161A and the image L3 that is a landscape image in the default setting. In the default setting, a non-landscape image L4 (a representative sample image of the cluster H and an image representative of the fourth section) is located. In such a case, the printer-side controller 20 changes the attribute information of the learning sample belonging to the clusters I, H, and J belonging to the fourth section from N to P, and the overall feature amount and the changed attribute information Re-learn the support vector machine based on, and change the boundary. Also in this case, identification processing reflecting user preferences can be performed.

===第2実施形態===
前述の第1実施形態では、ユーザが図19の境界設定バー161Aの位置を変更したときに、サポートベクタマシンの再学習を行っていた。このような形態では、プリンタ側コントローラ20が、学習処理を行うためのプログラムを実行する必要があり、また、再学習の処理時間も必要となる。そこで、第2実施形態では、予め複数の判別式が用意されており、境界設定バー161Aの位置に応じて判別式が選択されることによって、プリンタ側コントローラ20が再学習を行わなくても済むようにしている。なお、判別式は、識別対象画像を評価するための評価関数に相当する。
=== Second Embodiment ===
In the first embodiment described above, the support vector machine is relearned when the user changes the position of the boundary setting bar 161A in FIG. In such a form, the printer-side controller 20 needs to execute a program for performing learning processing, and also requires relearning processing time. Thus, in the second embodiment, a plurality of discriminants are prepared in advance, and the discriminant is selected according to the position of the boundary setting bar 161A, so that the printer-side controller 20 does not have to re-learn. I am trying. The discriminant corresponds to an evaluation function for evaluating the identification target image.

図23は、第2実施形態の学習用サンプルのデータ群である。第1実施形態のデータ群(図20A参照)と比較すると、第2実施形態では各学習用サンプル毎に複数の重み係数wが記憶されている。ここでは、第1重み係数〜第4重み係数の4種類が記憶されている。言い換えると、4種類の判別式がメモリ23に記憶されている。なお、第1実施形態のデータ群(図20A参照)と比較すると、第2実施形態では属性情報は記憶しなくても良い。第2実施形態では再学習が不要だからである。   FIG. 23 shows a data group of learning samples according to the second embodiment. Compared to the data group of the first embodiment (see FIG. 20A), in the second embodiment, a plurality of weighting factors w are stored for each learning sample. Here, four types of first weight coefficient to fourth weight coefficient are stored. In other words, four types of discriminants are stored in the memory 23. Note that the attribute information may not be stored in the second embodiment as compared with the data group of the first embodiment (see FIG. 20A). This is because re-learning is unnecessary in the second embodiment.

4種類の重み係数は、それぞれ境界設定バー161Aの位置に対応付けられている。第1重み係数は、図19の画像L1と画像L2との間に対応付けられている。同様に、第2重み係数、第3重み係数、第4重み係数は、それぞれ、図19の画像L2と画像L3との間、画像L3と画像L4との間、画像L4と画像L5との間に対応付けられている。   Each of the four types of weighting factors is associated with the position of the boundary setting bar 161A. The first weighting coefficient is associated between the image L1 and the image L2 in FIG. Similarly, the second weight coefficient, the third weight coefficient, and the fourth weight coefficient are respectively between the image L2 and the image L3 in FIG. 19, between the image L3 and the image L4, and between the image L4 and the image L5. Is associated with.

ユーザが設定を変更する前では、プリンタ側コントローラ20(風景識別器51L)は、第3重み係数と全体特徴量とに基づいて、前述の数1の判別式の値を算出する。言い換えると、デフォルトの設定では第3重み係数を用いた判別式が選択され、この判別式によって風景識別器51Lは識別処理を行う。なお、演算速度向上のため、重み係数wがゼロの学習用サンプルは除外して、判別式の値が算出される。第3重み係数は、第1実施形態のデフォルトの重み係数w(図20A参照)と同じ値である。   Before the user changes the setting, the printer-side controller 20 (landscape discriminator 51L) calculates the value of the discriminant of the above formula 1 based on the third weighting coefficient and the overall feature amount. In other words, in the default setting, a discriminant using the third weighting coefficient is selected, and the landscape discriminator 51L performs the discrimination process based on this discriminant. Note that the discriminant value is calculated by excluding learning samples with a weighting factor w of zero in order to improve the calculation speed. The third weighting factor is the same value as the default weighting factor w (see FIG. 20A) of the first embodiment.

ユーザが境界設定バー161Aを一つ左に移動して画像L2と画像L3との間に設定した場合、風景識別器51Lは、第2重み係数と全体特徴量とに基づいて、前述の数1の判別式の値を算出する。言い換えると、ユーザが境界設定バー161Aを一つ左に移動して画像L2と画像L3との間に設定した場合、第2重み係数を用いた判別式が選択され、この判別式によって風景識別器51Lが識別処理を行う。なお、演算速度向上のため、重み係数wがゼロの学習用サンプルは除外して、判別式の値が算出される。第2重み係数は、第1実施形態において再学習によって求められた重み係数w´(図22B参照)と同じである。   When the user moves the boundary setting bar 161A one place to the left and sets it between the image L2 and the image L3, the landscape discriminator 51L is based on the second weighting factor and the overall feature amount, and the above-described equation 1 The value of the discriminant is calculated. In other words, when the user moves the boundary setting bar 161A one place to the left and sets it between the images L2 and L3, a discriminant using the second weighting coefficient is selected, and the discriminant uses this discriminant to determine the landscape classifier. 51L performs the identification process. Note that the discriminant value is calculated by excluding learning samples with a weighting factor w of zero in order to improve the calculation speed. The second weighting factor is the same as the weighting factor w ′ (see FIG. 22B) obtained by relearning in the first embodiment.

以上の説明では風景の学習用サンプルのデータ群について説明したが、他のシーンについても、同様のデータ群をメモリに記憶している。   In the above description, the landscape learning sample data group has been described, but the same data group is stored in the memory for other scenes.

第2実施形態においても、第1実施形態と同様に、ユーザの好みを反映した識別処理を行うことができる。更に、第2実施形態では再学習を行わなくても良いので、サポートベクタマシンによる学習処理を行うプログラムを実行しなくても良い。また、再学習を行わなくても良いので、設定後のプリンタ側コントローラ20の処理の負荷も軽減される。   In the second embodiment, as in the first embodiment, identification processing reflecting user preferences can be performed. Furthermore, in the second embodiment, it is not necessary to perform relearning, and therefore it is not necessary to execute a program for performing learning processing by a support vector machine. In addition, since it is not necessary to perform re-learning, the processing load of the printer-side controller 20 after setting is also reduced.

===第3実施形態===
前述の第1実施形態及び第2実施形態では、ユーザの設定に応じて、判別式の内容を変更していた。第3実施形態では、肯定閾値を変更することによって、判別式の内容は変更せずに、ユーザの好みを反映した識別処理を行う。
=== Third Embodiment ===
In the first embodiment and the second embodiment described above, the content of the discriminant is changed according to the user's setting. In the third embodiment, by changing the affirmative threshold, the identification process reflecting the user's preference is performed without changing the content of the discriminant.

ここでも、ユーザが境界設定バー161A(図19参照)を一つ左に移動して画像L2と画像L3との間に設定した後の処理について説明する。   Here, the process after the user moves the boundary setting bar 161A (see FIG. 19) one place to the left and sets it between the images L2 and L3 will be described.

まず、プリンタ側コントローラ20は、第2区間(図21B参照)において最も第3区間寄りに位置するクラスタDの代表サンプルと、第3区間において最も第2区間寄りに位置するクラスタFの代表サンプルを抽出する。言い換えると、プリンタ側コントローラ20は、第2区間と第3区間のそれぞれから、第2区間と第3区間との境界の近くに位置する代表サンプルD、Fを抽出する。   First, the printer-side controller 20 selects a representative sample of the cluster D that is positioned closest to the third section in the second section (see FIG. 21B) and a representative sample of the cluster F that is positioned closest to the second section in the third section. Extract. In other words, the printer-side controller 20 extracts representative samples D and F located near the boundary between the second section and the third section from each of the second section and the third section.

次に、プリンタ側コントローラ20は、代表サンプルDの全体特徴量を用いて判別式f(x)の値を算出する。また、プリンタ側コントローラ20は、代表サンプルFの全体特徴量を用いて判別式f(x)の値を算出する。   Next, the printer-side controller 20 calculates the value of the discriminant f (x) using the entire feature amount of the representative sample D. Further, the printer-side controller 20 calculates the value of the discriminant f (x) using the entire feature amount of the representative sample F.

次に、プリンタ側コントローラ20は、代表サンプルDの判別式の値と、代表サンプルFの判別式の値との平均値を算出する。そして、プリンタ側コントローラ20は、この平均値を風景識別器51Lの肯定閾値に変更する。これにより、風景識別器51Lの設定変更が終了する。   Next, the printer-side controller 20 calculates the average value of the discriminant value of the representative sample D and the discriminant value of the representative sample F. Then, the printer-side controller 20 changes this average value to the positive threshold value of the landscape discriminator 51L. Thereby, the setting change of the landscape classifier 51L is completed.

識別対象画像が風景のシーンに属するか否かを風景識別器51Lが判断するとき、風景識別器51Lは、識別対象画像の全体特徴量に基づいて、判別式の値を算出する。そして、判別式の値が変更後の肯定閾値より大きければ(図7のS204でYES)、風景識別器51Lは、識別対象画像が風景のシーンに属すると判断し、肯定フラグを立てる(S205)。   When the landscape discriminator 51L determines whether or not the classification target image belongs to a landscape scene, the landscape discriminator 51L calculates a discriminant value based on the entire feature amount of the classification target image. If the value of the discriminant is greater than the positive threshold after the change (YES in S204 in FIG. 7), the landscape classifier 51L determines that the classification target image belongs to a landscape scene and sets an affirmative flag (S205). .

第3実施形態においても、第1実施形態と同様に、ユーザの好みを反映した識別処理を行うことができる。例えば、クラスタFに属する学習用サンプルに似た性質の画像が識別対象画像である場合、この識別対象画像は、風景のシーンに属さないと判断されることになる。   In the third embodiment, as in the first embodiment, identification processing reflecting user preferences can be performed. For example, when an image having a property similar to the learning sample belonging to the cluster F is an identification target image, it is determined that the identification target image does not belong to a landscape scene.

なお、風景識別器51Lの肯定閾値を予め複数用意しておき、複数の肯定閾値の中から境界設定バー161Aの位置に応じて肯定閾値を選択するようにしても良い。これにより、肯定閾値を求めるための演算処理の負荷を軽減できる。   Note that a plurality of positive thresholds for the landscape discriminator 51L may be prepared in advance, and the positive threshold may be selected from a plurality of positive thresholds according to the position of the boundary setting bar 161A. Thereby, the load of the arithmetic processing for calculating | requiring a positive threshold can be reduced.

===第4実施形態===
第4実施形態では、判別式も変更するし、肯定閾値も変更する。ここでも、ユーザが境界設定バー161Aを一つ左に移動して画像L2と画像L3との間に設定した後の処理について説明する。
=== Fourth Embodiment ===
In the fourth embodiment, the discriminant is also changed, and the positive threshold is also changed. Also here, a process after the user moves the boundary setting bar 161A one place to the left and sets it between the image L2 and the image L3 will be described.

まず、プリンタ側コントローラ20は、クラスタF、Gに属する学習用サンプルの属性情報をPからNに変更する。この処理は、第1実施形態と同様である。   First, the printer-side controller 20 changes the learning sample attribute information belonging to the clusters F and G from P to N. This process is the same as in the first embodiment.

次に、プリンタ側コントローラ20は、全体特徴量と変更後の属性情報とに基づいてサポートベクタマシンの再学習を行い、境界を変更する(判別式を変更する)。この処理も第1実施形態と同様である。   Next, the printer-side controller 20 re-learns the support vector machine based on the entire feature amount and the changed attribute information, and changes the boundary (changes the discriminant). This process is also the same as in the first embodiment.

次に、プリンタ側コントローラ20は、評価用サンプル(但し、この評価用サンプルの属性情報は、ユーザの境界設定バー161Aの設定に応じて変更しておく)を用いて、変更後の判別式f´(x)による識別結果のPrecisionのグラフ(図9参照)を作成する。そして、再作成されたPrecisionが97.5%になるような肯定閾値を特定する。これにより、風景識別器51Lの設定変更が終了する。   Next, the printer-side controller 20 uses the evaluation sample (however, the attribute information of the evaluation sample is changed according to the setting of the user boundary setting bar 161A), and the discriminant f after the change is made. A Precision graph (see FIG. 9) of the identification result by '(x) is created. Then, an affirmative threshold value is specified such that the recreated Precision is 97.5%. Thereby, the setting change of the landscape classifier 51L is completed.

識別対象画像が風景のシーンに属するか否かを風景識別器51Lが判断するとき、風景識別器51Lは、識別対象画像の全体特徴量に基づいて、判別式の値を算出する。そして、判別式の値が変更後の肯定閾値より大きければ(図7のS204でYES)、風景識別器51Lは、識別対象画像が風景のシーンに属すると判断し、肯定フラグを立てる(S205)。   When the landscape discriminator 51L determines whether or not the classification target image belongs to a landscape scene, the landscape discriminator 51L calculates a discriminant value based on the entire feature amount of the classification target image. If the value of the discriminant is greater than the positive threshold after the change (YES in S204 in FIG. 7), the landscape classifier 51L determines that the classification target image belongs to a landscape scene and sets an affirmative flag (S205). .

第4実施形態においても、第1実施形態と同様に、ユーザの好みを反映した識別処理を行うことができる。   Also in the fourth embodiment, as in the first embodiment, identification processing reflecting user preferences can be performed.

===その他の実施の形態===
一実施形態としてのプリンタ等を説明したが、上記の実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれることは言うまでもない。特に、以下に述べる実施形態であっても、本発明に含まれるものである。
=== Other Embodiments ===
Although a printer or the like as one embodiment has been described, the above embodiment is for facilitating understanding of the present invention, and is not intended to limit the present invention. The present invention can be changed and improved without departing from the gist thereof, and it is needless to say that the present invention includes equivalents thereof. In particular, the embodiments described below are also included in the present invention.

<プリンタについて>
前述の実施形態ではプリンタ4がシーン識別処理をしていたが、デジタルスチルカメラ2がシーン識別処理をしても良い。また、上記のシーン識別処理を行う画像識別装置は、プリンタ4やデジタルスチルカメラ2に限られるものではない。例えば、大量の画像ファイルを保存するフォトストレージのような画像識別装置が、上記のシーン識別処理を行っても良い。もちろん、パーソナルコンピュータやインターネット上に設置されたサーバーが、上記のシーン識別処理を行っても良い。
なお、シーン識別装置に上記のシーン識別処理を実行させるプログラムも、本発明の範疇である。
<About the printer>
In the above-described embodiment, the printer 4 performs the scene identification process, but the digital still camera 2 may perform the scene identification process. Further, the image identification device that performs the above-described scene identification processing is not limited to the printer 4 or the digital still camera 2. For example, an image identification device such as a photo storage that stores a large amount of image files may perform the scene identification process described above. Of course, a personal computer or a server installed on the Internet may perform the scene identification process.
Note that a program that causes the scene identification device to execute the above-described scene identification processing is also within the scope of the present invention.

<サポートベクタマシンについて>
前述のサブ識別器51やサブ部分識別器61には、サポートベクタマシン(SVM)による識別手法が用いられている。しかし、識別対象画像が特定シーンに属するか否かの識別手法は、サポートベクタマシンを用いるものに限られるものではない。例えば、ニューラルネットワーク等のパターン認識を採用しても良い。
<About Support Vector Machine>
For the above-described sub classifier 51 and sub partial classifier 61, a classification method using a support vector machine (SVM) is used. However, the method for identifying whether or not the identification target image belongs to a specific scene is not limited to using a support vector machine. For example, pattern recognition such as a neural network may be employed.

<シーンの識別について>
前述の実施形態では、サブ識別器51やサブ部分識別器61は、画像データの示す画像が特定のシーンに属するか否かを識別している。しかし、シーンの識別に限られず、何らかのクラスに属するか否かを識別するもので良い。例えば、画像データの示す画像が特定のパターン形状か否かを識別しても良い。
<About scene identification>
In the above-described embodiment, the sub classifier 51 and the sub partial classifier 61 identify whether or not the image indicated by the image data belongs to a specific scene. However, the present invention is not limited to scene identification, and may identify whether it belongs to some class. For example, you may identify whether the image which image data shows is a specific pattern shape.

画像処理システムの説明図である。It is explanatory drawing of an image processing system. プリンタの構成の説明図である。2 is an explanatory diagram of a configuration of a printer. FIG. プリンタの自動補正機能の説明図である。It is explanatory drawing of the automatic correction function of a printer. 画像のシーンと補正内容との関係の説明図である。It is explanatory drawing of the relationship between the scene of an image, and the correction content. シーン識別部によるシーン識別処理のフロー図である。It is a flowchart of the scene identification process by a scene identification part. シーン識別部の機能の説明図である。It is explanatory drawing of the function of a scene identification part. 全体識別処理のフロー図である。It is a flowchart of a whole identification process. 識別対象テーブルの説明図である。It is explanatory drawing of an identification object table. 全体識別処理の肯定閾値の説明図である。It is explanatory drawing of the affirmation threshold value of the whole identification process. RecallとPrecisionの説明図である。It is explanatory drawing of Recall and Precision. 第1否定閾値の説明図である。It is explanatory drawing of a 1st negative threshold value. 第2否定閾値の説明図である。It is explanatory drawing of a 2nd negative threshold value. 図13Aは、閾値テーブルの説明図である。図13Bは、風景識別器における閾値の説明図である。図13Cは、風景識別器の処理の概要の説明図である。FIG. 13A is an explanatory diagram of a threshold table. FIG. 13B is an explanatory diagram of threshold values in the landscape classifier. FIG. 13C is an explanatory diagram of an outline of the process of the landscape classifier. 部分識別処理のフロー図である。It is a flowchart of a partial identification process. 夕景部分識別器が選択する部分画像の順番の説明図である。It is explanatory drawing of the order of the partial image which an evening scene partial identifier selects. 上位10番目までの10個の部分画像だけで夕景画像の識別をしたときのRecall及びPrecisionのグラフである。It is a Recall and Precision graph when the evening scene image is identified only by the top 10 partial images. 図17Aは、線形サポートベクタマシンによる判別の説明図である。図17Bは、カーネル関数を用いた判別の説明図である。FIG. 17A is an explanatory diagram of determination by the linear support vector machine. FIG. 17B is an explanatory diagram of discrimination using a kernel function. 統合識別処理のフロー図である。It is a flowchart of an integrated identification process. 設定画面の説明図である。It is explanatory drawing of a setting screen. 図20Aは、メモリ23に記憶されている学習用サンプルのデータ群である。図20Bは、各学習用サンプルの分布の説明図である。FIG. 20A shows a data group of learning samples stored in the memory 23. FIG. 20B is an explanatory diagram of the distribution of each learning sample. 図21Aは、境界(f(x)=0)の法線に代表サンプルを投影する様子の説明図である。図21Bは、法線上に投影された代表サンプルの説明図である。図21Bは、法線上に投影された代表サンプルの説明図である。FIG. 21A is an explanatory diagram showing a state in which the representative sample is projected onto the normal line of the boundary (f (x) = 0). FIG. 21B is an explanatory diagram of a representative sample projected on the normal line. FIG. 21B is an explanatory diagram of a representative sample projected on the normal line. 図22Aは、変更後のデータ群の説明図である。図22Bは、変更後の境界の説明図である。FIG. 22A is an explanatory diagram of the data group after the change. FIG. 22B is an explanatory diagram of the boundary after the change. 第2実施形態の学習用サンプルのデータ群である。It is a data group of the sample for learning of 2nd Embodiment.

符号の説明Explanation of symbols

2 デジタルスチルカメラ、2A モード設定ダイヤル、
4 プリンタ、6 メモリカード、
10 印刷機構、11 ヘッド、12 ヘッド制御部、13 モータ、
14 センサ、15 パネル部、16 表示部、17 入力部、
20 プリンタ側コントローラ、21 スロット、22 CPU、23 メモリ、
24 制御ユニット、25 駆動信号生成部、
31 記憶部、31A 画像記憶部、31B 結果記憶部、32 顔識別部、
33 シーン識別部、34 画像補正部、35 プリンタ制御部、
40 特徴量取得部、50 全体識別器、51 サブ識別器、
51L 風景識別器、51S 夕景識別器、51N 夜景識別器、
51F 花識別器、51R 紅葉識別器、
60 部分識別器、61 サブ部分識別器、61S 夕景部分識別器、
61F 花部分識別器、61R 紅葉部分識別器、
70 統合識別器、161 設定画面、161A 境界設定バー
2 Digital still camera, 2A mode setting dial,
4 Printer, 6 Memory card,
10 printing mechanism, 11 head, 12 head control unit, 13 motor,
14 sensors, 15 panel section, 16 display section, 17 input section,
20 printer-side controller, 21 slots, 22 CPU, 23 memory,
24 control unit, 25 drive signal generator,
31 storage unit, 31A image storage unit, 31B result storage unit, 32 face identification unit,
33 scene identification unit, 34 image correction unit, 35 printer control unit,
40 feature quantity acquisition unit, 50 overall classifier, 51 sub classifier,
51L landscape classifier, 51S evening scene classifier, 51N night scene classifier,
51F Flower identifier, 51R Autumn leaves identifier,
60 partial classifiers, 61 sub partial classifiers, 61S evening scene partial classifiers,
61F Flower partial classifier, 61R Autumn colored partial classifier,
70 Integrated identifier, 161 setting screen, 161A Boundary setting bar

Claims (6)

識別対象を評価する評価関数の値と所定の閾値とを比較し、比較結果に基づいて、あるクラスに前記識別対象が属するか否かを識別する識別処理の設定方法であって、
前記閾値に従って前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出することによって、複数のサンプルの中から予め定められた所定数のサンプルを抽出する抽出ステップと、
抽出された前記所定数の前記サンプルを前記評価関数の値の順に表示部に並べて表示すると共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示し、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示する表示ステップと、
前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更する設定変更ステップと
を備えることを特徴とする設定方法。
The comparator compares the value with a predetermined threshold of the evaluation function for evaluating the identification target based on the comparison result, a setting method of identifying identification process whether the identification target to a class belongs,
An extraction step of extracting a predetermined number of samples from a plurality of samples by extracting samples belonging to the class according to the threshold and samples not belonging to the class;
The predetermined number of extracted samples are arranged and displayed on the display unit in the order of the value of the evaluation function, and a mark is displayed between the sample belonging to the class and the sample not belonging to the class, and a user instruction Displaying the mark between another sample and the sample by moving the position of the mark according to
A setting change step of changing the setting of the identification process in accordance with the position of the mark determined by the user.
請求項1に記載の設定方法であって、
前記識別処理は、空間を分離する超平面に基づいて前記識別対象が前記クラスに属するか否かを識別するものであり、
前記抽出ステップにおいて、前記超平面の法線に前記サンプルを投影し、前記法線上に投影された前記サンプルの位置に基づいて、抽出すべきサンプルを決定する
ことを特徴とする設定方法。
The setting method according to claim 1 ,
The identification process is to identify whether the identification object belongs to the class based on a hyperplane separating a space,
In the extracting step, the sample is projected onto the normal of the hyperplane, and the sample to be extracted is determined based on the position of the sample projected on the normal.
請求項1又は2に記載の設定方法であって、
記設定変更ステップでは、前記評価関数を変更する
ことを特徴とする設定方法。
The setting method according to claim 1 or 2 ,
Prior Symbol setting change step, setting method characterized by changing the evaluation function.
請求項1〜3のいずれかに記載の設定方法であって、
記設定変更ステップでは、前記閾値を変更する
ことを特徴とする設定方法。
It is the setting method in any one of Claims 1-3 ,
Prior Symbol setting change step, setting method characterized by changing the threshold value.
識別対象を評価する評価関数の値と所定の閾値とを比較し、比較結果に基づいて、あるクラスに前記識別対象が属するか否かを識別する識別処理を行う識別方法であって、
前記閾値に従って前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出することによって、複数のサンプルの中から予め定められた所定数のサンプルを抽出する抽出ステップと、
抽出された前記所定数の前記サンプルを前記評価関数の値の順に表示部に並べて表示すると共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示し、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示する表示ステップと、
前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更する設定変更ステップと、
設定の変更された前記識別処理によって、前記識別対象が前記クラスに属するか否かを識別する識別ステップと
を備えることを特徴とする識別方法。
The comparator compares the value with a predetermined threshold of the evaluation function for evaluating the identification target based on the comparison result, an identification method that performs an identification process of identifying whether the identification target to a class belongs,
An extraction step of extracting a predetermined number of samples from a plurality of samples by extracting samples belonging to the class according to the threshold and samples not belonging to the class;
The predetermined number of extracted samples are arranged and displayed on the display unit in the order of the value of the evaluation function, and a mark is displayed between the sample belonging to the class and the sample not belonging to the class, and a user instruction Displaying the mark between another sample and the sample by moving the position of the mark according to
A setting change step for changing the setting of the identification process according to the position of the mark determined by the user;
An identification step for identifying whether or not the identification object belongs to the class by the identification process whose setting has been changed.
識別対象を評価する評価関数の値と所定の閾値とを比較し、比較結果に基づいて、あるクラスに前記識別対象が属するか否かを識別する識別処理を行う識別装置に、
前記閾値に従って前記クラスに属するサンプルと、前記クラスに属しないサンプルとを抽出させることによって、複数のサンプルの中から予め定められた所定数のサンプルを抽出させ
抽出された前記所定数の前記サンプルを前記評価関数の値の順に表示部に並べて表示させる共に、前記クラスに属するサンプルと、前記クラスに属しないサンプルとの間にマークを表示させ、ユーザの指示に応じて前記マークの位置を移動することによって、別の前記サンプルと前記サンプルとの間に前記マークを表示させ、
前記ユーザの決定した前記マークの位置に応じて、前記識別処理の設定を変更させる
ことを特徴とするプログラム。
The comparator compares the value with a predetermined threshold of the evaluation function for evaluating the identification target based on the comparison result, the identification apparatus performs identification processing for identifying whether the identification target to a class belongs,
By extracting samples belonging to the class according to the threshold and samples not belonging to the class, a predetermined number of samples are extracted from a plurality of samples ,
The predetermined number of the extracted samples are displayed on the display unit in order of the value of the evaluation function, and at the same time, a mark is displayed between the sample belonging to the class and the sample not belonging to the class. The mark is displayed between another sample by moving the position of the mark according to
A program for changing the setting of the identification process in accordance with the position of the mark determined by the user.
JP2007240061A 2007-09-14 2007-09-14 Setting method, identification method and program Expired - Fee Related JP4946750B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007240061A JP4946750B2 (en) 2007-09-14 2007-09-14 Setting method, identification method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007240061A JP4946750B2 (en) 2007-09-14 2007-09-14 Setting method, identification method and program

Publications (3)

Publication Number Publication Date
JP2009070284A JP2009070284A (en) 2009-04-02
JP2009070284A5 JP2009070284A5 (en) 2010-10-14
JP4946750B2 true JP4946750B2 (en) 2012-06-06

Family

ID=40606441

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007240061A Expired - Fee Related JP4946750B2 (en) 2007-09-14 2007-09-14 Setting method, identification method and program

Country Status (1)

Country Link
JP (1) JP4946750B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009080556A (en) * 2007-09-25 2009-04-16 Seiko Epson Corp Setting method, identification method and program

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4992646B2 (en) * 2007-10-05 2012-08-08 セイコーエプソン株式会社 Identification method and program
JP6003444B2 (en) * 2012-09-19 2016-10-05 ブラザー工業株式会社 Display program and information processing apparatus
JP6575605B2 (en) * 2015-11-27 2019-09-18 富士通株式会社 Case data generation support program, case data generation support system, and case data generation support method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4132229B2 (en) * 1998-06-03 2008-08-13 株式会社ルネサステクノロジ Defect classification method
JP2000353246A (en) * 1999-06-11 2000-12-19 Hitachi Ltd Pattern recognition device
JP2001230289A (en) * 2000-02-15 2001-08-24 Hitachi Ltd Fault analyzing method and system
JP4616864B2 (en) * 2007-06-20 2011-01-19 株式会社日立ハイテクノロジーズ Appearance inspection method and apparatus, and image processing evaluation system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009080556A (en) * 2007-09-25 2009-04-16 Seiko Epson Corp Setting method, identification method and program

Also Published As

Publication number Publication date
JP2009070284A (en) 2009-04-02

Similar Documents

Publication Publication Date Title
JP2009093334A (en) Identification method and program
US20080292181A1 (en) Information Processing Method, Information Processing Apparatus, and Storage Medium Storing a Program
JP2008282267A (en) Scene discrimination device and scene discrimination method
US20090016616A1 (en) Category Classification Apparatus, Category Classification Method, and Storage Medium Storing a Program
JP2009080557A (en) Identification method and program
JP5040624B2 (en) Information processing method, information processing apparatus, and program
JP2008234627A (en) Category classification apparatus and method
JP4946750B2 (en) Setting method, identification method and program
JP4862720B2 (en) Information processing method, information processing apparatus, program, and storage medium
JP4992646B2 (en) Identification method and program
JP4992519B2 (en) Information processing method, information processing apparatus, and program
JP2008282085A (en) Scene discrimination device and scene discrimination method
US20080199084A1 (en) Category Classification Apparatus and Category Classification Method
JP4826531B2 (en) Scene identification device and scene identification method
JP2008284868A (en) Printing method, printer, and program
JP4910821B2 (en) Image identification method
JP2009080556A (en) Setting method, identification method and program
JP4882927B2 (en) Category identification method
JP2009044249A (en) Image identification method, image identification device, and program
US8243328B2 (en) Printing method, printing apparatus, and storage medium storing a program
JP4830950B2 (en) Information processing method, information processing apparatus, and program
JP2008271058A (en) Information processing method, information processing apparatus, and program
JP2008234624A (en) Category classification apparatus, category classification method, and program
JP2008228086A (en) Information processing method, information processor, and program
JP2008228087A (en) Information processing method, information processor, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100901

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100901

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111226

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120220

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

Free format text: PAYMENT UNTIL: 20150316

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees