JP7484229B2 - Card cutting device and program - Google Patents
Card cutting device and program Download PDFInfo
- Publication number
- JP7484229B2 JP7484229B2 JP2020036201A JP2020036201A JP7484229B2 JP 7484229 B2 JP7484229 B2 JP 7484229B2 JP 2020036201 A JP2020036201 A JP 2020036201A JP 2020036201 A JP2020036201 A JP 2020036201A JP 7484229 B2 JP7484229 B2 JP 7484229B2
- Authority
- JP
- Japan
- Prior art keywords
- card
- image
- area
- pixel
- closed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Image Analysis (AREA)
- Studio Devices (AREA)
Description
本発明は、カードが写った画像からカードの範囲を切り出すカード切出装置とそのプログラムに関する。 The present invention relates to a card cutting device and a program for cutting out the area of a card from an image of the card.
現在、運転免許証などIDカードの券面画像を用いて各種の事務処理を行うことが一般化しており、例えばIDカードの券面からの本人確認、IDカードの券面の文字情報や顔画像の取得などといったことがIDカードの券面画像を用いて行われる。 Nowadays, it is common to use images of the face of an ID card, such as a driver's license, to carry out various administrative procedures. For example, images of the face of an ID card are used to verify the identity of a person, obtain text information and facial images from the face of the ID card, etc.
これらの処理に用いるIDカードの券面画像として、特許文献1のようにスマートフォンなどの携帯端末で撮影されたものを用いることがあり、上記の処理を行う第一段階として、カードを撮影した画像からカードの範囲を切り出す場合がある。カードの範囲を切り出す際は、カードとその背景との境界を、明るさ(白さ)や色の違いによって検出することが一般的である。
The ID card face image used in these processes may be one taken with a mobile device such as a smartphone, as in
このように明るさや色の違いによってカードとその背景との境界を検出する場合、カード撮影時の背景によって境界をうまく検出できず、カードの範囲を正確に切り出すことのできないケースが生じる。例えば背景の明るさや色がカードと同じ場合、カードとその背景との境界を検出しづらく、また背景自体に模様があると、その模様を境界と誤検出することがある。 When detecting the boundary between a card and its background based on differences in brightness and color like this, there are cases where the boundary cannot be detected properly depending on the background when the card is photographed, and the area of the card cannot be accurately cut out. For example, if the background has the same brightness and color as the card, it is difficult to detect the boundary between the card and its background, and if the background itself has a pattern, the pattern may be mistakenly detected as the boundary.
本発明は上記の問題に鑑みてなされたものであり、カードが写った画像からカードの範囲をより正確に切り出すことのできるカード切出装置等を提供することを目的とする。 The present invention was made in consideration of the above problems, and aims to provide a card cutting device etc. that can more accurately cut out the area of a card from an image that shows the card.
前述した課題を解決するための第1の発明は、カードが写った画像から前記カードの範囲を切り出すカード切出装置であって、前記画像から前記カードの券面の第1の閉領域を抽出する抽出手段と、前記抽出手段で抽出した第1の閉領域のテンプレートからの差異に応じて前記カードを切り出す範囲を画定し、前記画像から前記カードの範囲を切り出す切出手段と、を有し、前記抽出手段は、開始点の画素と同じ色と判定される画素を前記開始点から外側へと順次探索することにより第1の閉領域を抽出し、前記開始点の画素は、当該画素の色が、当該画素の上下左右の画素の色と同じと判定される画素であることを特徴とするカード切出装置である。 The first invention for solving the above-mentioned problems is a card cutting device that cuts out the area of a card from an image containing the card, comprising: an extraction means that extracts a first closed area of the face of the card from the image; and a cutting means that determines the area for cutting out the card based on the difference between the first closed area extracted by the extraction means and a template, and cuts out the area of the card from the image , wherein the extraction means extracts the first closed area by sequentially searching from the starting point outward for pixels that are determined to be the same color as a pixel of a starting point, and the pixel of the starting point is a pixel whose color is determined to be the same as the colors of the pixels above, below, left and right of the pixel .
本発明では、カードの券面の閉領域を画像から抽出し、抽出した閉領域とテンプレート(正の閉領域を示す情報をいう)との差異に応じて画像からカードを切り出す範囲を画定する。これにより、カードの背景に影響されずにカードの範囲のみを切り出すことが可能になり、カードが写った画像からカードの範囲をより正確に切り出すことができる。また、画像から閉領域を好適に抽出することができ、且つ処理の開始点を上記のように定めることで、文字部分などの微細な閉領域を抽出するのを避け、券面上で支配的な閉領域を抽出することができ、切り出し精度の向上に役立つ。 In the present invention, the closed area of the card face is extracted from the image, and the range for cutting out the card from the image is determined according to the difference between the extracted closed area and a template (information indicating a positive closed area). This makes it possible to cut out only the area of the card without being influenced by the background of the card, and the area of the card can be cut out more accurately from an image in which the card appears. In addition, by being able to suitably extract the closed area from the image and determining the start point of the process as described above, it is possible to avoid extracting minute closed areas such as character parts and to extract the dominant closed area on the card face, which helps to improve the accuracy of cutting out.
前記抽出手段は、前記画像から前記カードの券面の第2の閉領域を抽出し、前記カード切出装置は、前記抽出手段で抽出した第2の閉領域と、当該第2の閉領域についてのテンプレートとに基づき、前記差異が正しいか否かを判定する判定手段をさらに有することが望ましい。
これにより、上記した差異の正しさについて確認を行うことができ、より精度の高い切り出しが可能になる。
It is desirable that the extraction means extracts a second closed area on the face of the card from the image, and that the card cutting device further has a determination means for determining whether or not the difference is correct based on the second closed area extracted by the extraction means and a template for the second closed area.
This makes it possible to check whether the above-mentioned differences are correct, enabling more accurate segmentation.
前記抽出手段で抽出した第1の閉領域と、当該第1の閉領域についてのテンプレートに関し、注目部の位置を比較することにより、前記差異が求められることが望ましい。
これにより、簡単な処理で上記した差異を求めることができる。
It is preferable that the difference be found by comparing the position of a portion of interest between the first closed region extracted by the extraction means and a template for the first closed region.
This makes it possible to obtain the above-mentioned difference through simple processing.
前記カード切出装置は、例えば前記カードを撮影するためのカメラを有する携帯端末である。
スマートフォンやタブレット端末などカメラ付きの携帯端末をカード切出装置として用いることで、ユーザが携帯端末でカードを撮影した画像からカードの範囲を切り出し、これを各種の事務処理に利用できるようになる。
The card dispenser is, for example, a mobile terminal having a camera for photographing the card.
By using a mobile device with a camera, such as a smartphone or tablet, as a card cutting device, a user can cut out the area of the card from an image of the card taken with the mobile device and use this for various administrative purposes.
第2の発明は、情報処理装置を、カードが写った画像から前記カードの範囲を切り出すカード切出装置であって、前記画像から前記カードの券面の第1の閉領域を抽出する抽出手段と、前記抽出手段で抽出した第1の閉領域のテンプレートからの差異に応じて前記カードを切り出す範囲を画定し、前記画像から前記カードの範囲を切り出す切出手段と、を有するカード切出装置として機能させるためのプログラムであって、前記抽出手段は、開始点の画素と同じ色と判定される画素を前記開始点から外側へと順次探索することにより第1の閉領域を抽出し、前記開始点の画素は、当該画素の色が、当該画素の上下左右の画素の色と同じと判定される画素であることを特徴とするプログラムである。 A second invention is a program for causing an information processing device to function as a card cutting device that cuts out the area of a card from an image containing the card, the program having an extraction means for extracting a first closed area of the face of the card from the image, and a cutting means for determining the area for cutting out the card based on the difference between the first closed area extracted by the extraction means and a template, and cutting out the area of the card from the image, wherein the extraction means extracts the first closed area by sequentially searching from the starting point outward for pixels that are determined to be the same color as a pixel of the starting point, and the pixel of the starting point is a pixel whose color is determined to be the same as the colors of the pixels above, below, left and right of the pixel .
本発明により、カードが写った画像からカードの範囲をより正確に切り出すことのできるカード切出装置等を提供することができる。 The present invention provides a card cutting device that can more accurately cut out the area of a card from an image that shows the card.
以下、図面に基づいて本発明の好適な実施形態について詳細に説明する。 The following describes in detail a preferred embodiment of the present invention with reference to the drawings.
(1.カード切出装置1)
図1は本発明の実施形態に係るカード切出装置1を示す図である。カード切出装置1はスマートフォンやタブレット端末等のカメラ付きの携帯端末であり、カード10を撮影した画像からカード10の範囲を切り出すものである。
(1. Card cutting device 1)
1 is a diagram showing a
切り出したカード10の画像(券面画像)は、前記したように本人確認や券面の文字情報、顔画像の取得などの各種の事務処理に用いられ、カード切出装置1は、必要に応じて、切り出したカード10の画像を上記の処理を行うための外部の情報処理装置(不図示)に送信する。
The cut-out image of the card 10 (image of the face of the card) is used for various administrative processes such as identity verification, obtaining text information from the face of the card, and acquiring a facial image, as described above, and the
図2はカード切出装置1のハードウェア構成を示す図である。図2に示すように、カード切出装置1は、制御部101、記憶部102、表示部103、入力部104、通信部105、カメラ106、音声入出力部107等をバス等により接続して構成された情報処理装置により実現できる。ただしこれに限ることは無く、適宜様々な構成をとることができる。
Figure 2 is a diagram showing the hardware configuration of the
制御部101はCPU、ROM、RAMなどから構成される。CPUは、記憶部102、ROMなどの記憶媒体に格納されたカード切出装置1の処理に係るプログラムをRAM上のワークエリアに呼び出して実行する。ROMは不揮発性メモリであり、ブートプログラムやBIOSなどのプログラム、データなどを恒久的に保持している。RAMは揮発性メモリであり、記憶部102、ROMなどからロードしたプログラムやデータを一時的に保持するとともに、制御部101が各種処理を行うために使用するワークエリアを備える。
The
記憶部102はフラッシュメモリ等であり、カード切出装置1が実行するプログラム、プログラム実行に必要なデータ、OSなどが格納される。これらのプログラムやデータは、制御部101により必要に応じて読み出され実行される。記憶部102には、後述の図5で説明する処理を実行するための専用のアプリケーションプログラムが格納される。
The
表示部103は液晶パネル等のディスプレイ装置を有し、カード切出装置1に入力を行うための入力部104としてタッチパネルが設けられている。
The
通信部105はネットワークを介した通信を媒介する通信インタフェースであり、外部の情報処理装置等との間で通信を行う。
The
カメラ106は、光学レンズ、CCD(Charge Coupled Device)やCMOS(Complementary Metal-Oxide Semiconductor)等の撮像素子、A/D(Analog/Digital)変換部等から構成される高解像度のエリアカメラである。カメラ106は、光学レンズを介して入力された被写体像を撮像素子により光電変換し、アナログ画像信号を生成する。そして、A/D変換部によりアナログ画像信号をデジタル画像データに変換する。
音声入出力部107は、音声の入力に用いるマイクや、音声の出力を行うスピーカーを備える。
The audio input/
(2.カード切出装置1の機能)
図3はカード切出装置1の機能構成を示す図である。図3に示すように、カード切出装置1は、抽出手段111、判定手段112、切出手段113等を有する。
(2. Functions of Card Dispenser 1)
Fig. 3 is a diagram showing the functional configuration of the
抽出手段111は、カード切出装置1の制御部101が、カード10が写った画像からカード10の券面の閉領域を抽出するものである。本実施形態では2つの閉領域を抽出し、その一方がテンプレート(正の閉領域を示す情報をいう)からの差異を算出するために用いられる。この差異は上記画像からカード10を切り出す範囲を画定するために用いられるが、その詳細については後述する。
The extraction means 111 is a means by which the
判定手段112は、カード切出装置1の制御部101が、上記の差異が正しいか否かの判定を行うものである。この判定は、抽出手段111で抽出する2つの閉領域のうち、他方を用いて行われる。
The determination means 112 is a means for the
切出手段113は、カード切出装置1の制御部101が、上記の差異に応じてカード10を切り出す範囲を画定し、カード10が写った画像からカード10の範囲を切り出すものである。
The cutting means 113 is a means for causing the
(3.カード10)
本実施形態において、カード10は例えば運転免許証、マイナンバーカード、在留カード、特別永住者カードなどのIDカード(本人確認証)であるが、これに限ることはなく、その他の各種のカードであってもよい。
(3. Card 10)
In this embodiment, the
図4はカード10の概略を示す図であり、カード10の券面を模式的に表したものである。カード10では、略矩形状のカード基材11の上に、各種の線12、顔画像13、文字14等が印刷により形成され、これら券面の構成はカード10の種類によって異なる。
Figure 4 is a diagram showing an overview of
(4.カード切出装置1の処理)
図5はカード切出装置1が実行する処理を示すフローチャートである。図5のステップS1~S10はカード切出装置1の制御部101がカード切出装置1の各部を制御して実行する。
(4. Processing of Card Dispenser 1)
Fig. 5 is a flow chart showing the processing executed by the
本実施形態では、まずユーザがカード切出装置1を操作して記憶部102に格納された専用のアプリケーションプログラムを立ち上げる。すると、カード切出装置1は表示部103にメニュー画面(不図示)を表示し、メニュー画面でのユーザの選択に応じてカメラ106を起動し、ユーザの操作に応じてカメラ106でカード10を撮影する(S1)。これにより、カード10が背景とともに写った画像が取得される。
In this embodiment, the user first operates the
図6はカード10を撮影した画像100の例である。本実施形態ではユーザによりカード10の撮影が行われるが、その背景20は様々であり、図6に示すようにカード10の背景20が模様を有することもある。本実施形態のカード切出装置1は、図5のS2以降の切り出し方法を実行することにより、背景20の影響を受けることなくカード10の範囲を切り出すことができる。
Figure 6 is an example of an image 100 captured of a
また、カード10の撮影時のカメラ106の姿勢は一定ではなく、図に示すようにカード10が平面内で傾いて撮影されるようなケースが生じる。またカメラ106の位置に起因して画像100におけるカード10の中心の位置もずれ、画像100におけるカード10の形状も、カメラ106の位置や姿勢により歪むことがある。図5のS2以降の切り出し方法では、カメラ106の位置や姿勢に起因して上記のようなカード10の傾き、位置ずれ、歪み等が生じた場合にも、これらに応じてカード10の範囲を正しく切り出すことができる。
Furthermore, the orientation of the
本実施形態では、図6に示す画像100からカード10の範囲を切り出す際、カード10の券面上の2つの閉領域を抽出する2つの領域抽出処理(第1の領域抽出処理、第2の領域抽出処理)を行う。
In this embodiment, when cutting out the area of the
本実施形態では、抽出する2つの閉領域を、図6の符号A、Bで示す領域とする。閉領域A、Bは、同じ(とみなせる)色が連続する閉じた領域であり、本実施形態では閉領域A、Bをカード10の地の色(図の例では白)の部分とする。閉領域Aは画像100の中心部に位置し、閉領域Bは閉領域Aの上に位置する。第1の領域抽出処理ではこのうち閉領域A(第1の閉領域)を抽出するものとし、領域抽出を行うに当たっては、まずその処理の開始点を決定する(S2)。 In this embodiment, the two closed regions to be extracted are the regions indicated by the symbols A and B in FIG. 6. Closed regions A and B are closed regions with a contiguous color that is the same (or can be considered to be the same), and in this embodiment, closed regions A and B are the portions of the background color of card 10 (white in the example shown). Closed region A is located in the center of image 100, and closed region B is located above closed region A. In the first region extraction process, closed region A (first closed region) is extracted, and in performing region extraction, the starting point of the process is first determined (S2).
本実施形態では、券面の文字部分などの微小な閉領域を抽出しないよう、処理の開始点を文字部分などを避けて決定する。そのため、S2では、まず画像100の中心を仮の開始点とし、図7(a)に示すように、その画素110の色を、当該画素110の上下左右に位置する1または複数の画素120の色と比較する。 In this embodiment, the starting point of the process is determined to avoid character portions and the like, so as not to extract tiny closed areas such as the character portions on the face of the document. Therefore, in S2, the center of the image 100 is first set as a tentative starting point, and the color of that pixel 110 is compared with the colors of one or more pixels 120 located above, below, to the left, and to the right of the pixel 110, as shown in FIG. 7(a).
これら全ての画素120について、画素120の色が画素110の色と同じであると判定される場合、画素110を処理の開始点に決定する。色の相違には明度の相違も含まれ、上記の判定にあたっては、画素110、120の画素値の差が所定値以下である場合、画素120の色を画素110の色と同じとすることができる。 For all of these pixels 120, if it is determined that the color of pixel 120 is the same as the color of pixel 110, pixel 110 is determined to be the starting point for processing. Differences in color also include differences in brightness, and in the above determination, if the difference in pixel value between pixels 110 and 120 is equal to or less than a predetermined value, the color of pixel 120 can be determined to be the same as the color of pixel 110.
一方、図7(b)に示すように、画素110の上下左右に位置する画素120の少なくともいずれかが文字などに被っている場合、全ての画素120の色が画素110の色と同じとならず、その画素110は処理の開始点とされない。この場合、カード切出装置1は、開始点の候補とする画素110を画像100の中心から移動させつつ、上記のように画素110、120の色の比較を繰り返す。これにより、例えば画素110’に示すように、上下左右の1または複数の画素120’の色が全て画素110’の色と同じであると判定されるような画素110’を検出すれば、その画素110’を処理の開始点に決定する。
On the other hand, as shown in FIG. 7B, if at least one of the pixels 120 located above, below, left, or right of pixel 110 is covered by text or the like, the colors of all pixels 120 will not be the same as the color of pixel 110, and pixel 110 will not be the starting point of the process. In this case, the
なお上記の移動を行う際の移動量や移動方向は特に限定されず、また所定数の比較を繰り返しても開始点が決定されない場合に、開始点の決定ができなかったとして表示部103でエラー表示を行い、処理を終了することも可能である。
The amount and direction of movement when performing the above movement are not particularly limited, and if the starting point cannot be determined even after a predetermined number of comparisons, an error message indicating that the starting point could not be determined is displayed on the
カード切出装置1は、第1の領域抽出処理を、S2で決定した開始点から開始する(S3)。この領域抽出処理は、開始点を含むカード10の閉領域Aを抽出する処理である。処理の具体的方法は特に問わないが、一例として、図8に示すような塗りつぶしのアルゴリズムを適用し、開始点の画素と同じ色と判定される画素を開始点から外側へと順次探索することにより閉領域Aを抽出することができる。上記の判定は、前記と同様、画素値の比較により行うことができる。
The
図8の例では、図8(a)に示すように画素aが開始点に決定された場合に、画素aを閉領域Aの画素として図8(b)に示すように当該画素aの元の色(地の色)とは異なる所定色で塗りつぶし、処理キューに入れる。そして、キューの先頭の画素aの上下左右に位置する、画素aの元の色と同じ色の画素b、c、d、eを閉領域Aの画素として図8(c)に示すように上記所定色で塗りつぶし、画素aを処理キューから取り出す代わりに画素b、c、d、eを処理キューに入れる。なお図の例では画素aの上の画素b→左の画素c→右の画素d→下の画素eの順番で処理キューに入れるものとする。 In the example of Figure 8, when pixel a is determined to be the starting point as shown in Figure 8(a), pixel a is treated as a pixel of closed area A, and is filled with a predetermined color different from the original color (background color) of pixel a as shown in Figure 8(b), and is then placed in the processing queue. Then, pixels b, c, d, and e, which are located above, below, to the left, and right of pixel a at the top of the queue and have the same color as pixel a's original color, are treated as pixels of closed area A and filled with the above-mentioned predetermined color as shown in Figure 8(c), and instead of removing pixel a from the processing queue, pixels b, c, d, and e are placed in the processing queue. Note that in the example shown, the pixels are placed in the processing queue in the following order: pixel b above pixel a, pixel c to the left, pixel d to the right, and pixel e below.
次に、キューの先頭の画素bの上下左右の画素を確認し、上記と同様、画素aの元の色と同じ色と判定される画素fを閉領域Aの画素として図8(d)に示すように上記所定色で塗りつぶし、画素bを処理キューから取り出す代わりに画素fを処理キューの最後尾に入れる。これによりキューの先頭が画素cとなるので、その画素cの上下左右の画素を確認し、画素aの元の色と同じ色と判定される画素gを閉領域Aの画素として図8(e)に示すように上記所定色で塗りつぶし、画素cを処理キューから取り出す代わりに画素gを処理キューの最後尾に入れる。 Next, the pixels above, below, left and right of pixel b at the top of the queue are checked, and similarly to the above, pixel f determined to be the same color as pixel a's original color is filled in with the above-mentioned predetermined color as shown in Figure 8(d) as a pixel of closed area A, and pixel f is added to the end of the processing queue instead of removing pixel b from the processing queue. This makes pixel c the top of the queue, so the pixels above, below, left and right of pixel c are checked, and pixel g determined to be the same color as pixel a's original color is filled in with the above-mentioned predetermined color as shown in Figure 8(e) as a pixel of closed area A, and pixel g is added to the end of the processing queue instead of removing pixel c from the processing queue.
この後、図8(f)に示す画素d~mが順次キューの先頭となって上記の処理が繰り返され、最終的にキューが空となる。その時所定色に塗りつぶされていた画素a~mにより閉領域Aを抽出できる。図9(a)のグレーで示される部分は、図6の画像100から抽出された閉領域Aの例である。 After this, pixels d-m shown in Figure 8(f) are sequentially placed at the top of the queue, and the above process is repeated until the queue is finally empty. At that time, closed area A can be extracted using pixels a-m that have been filled with the specified color. The gray area in Figure 9(a) is an example of closed area A extracted from image 100 in Figure 6.
次に、カード切出装置1は、上記抽出した閉領域Aを、正の閉領域Aを示すテンプレートと比較し、それらの差異を求める(S4)。
Next, the
ここで、図10の符号200は、正の閉領域A、すなわちカード10を正しく撮影した画像Pにおける閉領域Aを示したテンプレートであり、図10の例では画像P内でのカード10の傾きが無く、カード10の中心が画像Pの中心に位置し、カード10の歪みも無いことを想定したものとなっている。
Here, reference numeral 200 in FIG. 10 denotes a template showing a positive closed area A, i.e., a closed area A in an image P obtained by correctly photographing the
カード切出装置1の記憶部102には、図10の●で例示するテンプレート200の注目部210の位置が格納されている。注目部210は例えばテンプレート200の輪郭部分の角などの特徴点とするが、何を注目部210とするかは特に限定されず、注目部210として輪郭部分の辺などを用いることも可能である。
The
S4では、図9(a)の○で例示するように、S3で抽出した閉領域Aについて、上記注目部210に対応する注目部140の位置を検出し、S3で抽出した閉領域Aとテンプレート200との比較として、対応する注目部140、210の位置同士の比較を行う。 In S4, as shown by the circle in FIG. 9(a), the position of the attention portion 140 corresponding to the attention portion 210 is detected for the closed region A extracted in S3, and the positions of the corresponding attention portions 140 and 210 are compared to compare the closed region A extracted in S3 with the template 200.
例えば図9(b)に示すように、S3で抽出した閉領域Aを画像100の中心Cを基準に平面内でα°回転させたときに、対応する注目部140、210の位置の誤差が最も小さくなるとき、S3で抽出した閉領域Aのテンプレート200に対する傾き(すなわち、画像100におけるカード10の傾き)を-α°と求めることができる。
For example, as shown in FIG. 9(b), when the closed area A extracted in S3 is rotated by α° in a plane with the center C of the image 100 as the reference, when the error in the position of the corresponding attention areas 140, 210 is minimized, the inclination of the closed area A extracted in S3 with respect to the template 200 (i.e., the inclination of the
図9(b)の例では対応する注目部140、210の組が複数(12組)存在するので、上記した誤差は、対応する注目部140、210の組のそれぞれについて求めた誤差の平均や誤差の2乗の和とし、その値を閉領域Aを所定角度回転するごとに算出すればよい。誤差の最小値が所定の閾値以上であれば閉領域Aの抽出がうまくできなかったとして表示部103でエラー表示を行い、処理を終了することも可能である。なお、対応する注目部140、210の組は複数あるほうが精度の面から好ましい。
In the example of FIG. 9(b), since there are multiple pairs (12 pairs) of corresponding attention areas 140, 210, the above-mentioned error can be calculated as the average error or the sum of the squares of the errors found for each pair of corresponding attention areas 140, 210, and this value can be calculated each time closed area A is rotated a specified angle. If the minimum error value is equal to or greater than a specified threshold, it is possible to display an error on the
また、図9(b)の例ではS3で抽出した閉領域Aとテンプレート200との間に傾き以外の差異が存在しないものとしたが、閉領域Aとテンプレート200の差異がこれに限ることはない。例えばS3で抽出した閉領域Aの位置を(dx、dy)だけずらした場合に対応する注目部140、210の位置の誤差が最も小さくなるとき、S3で抽出した閉領域Aのテンプレート200に対する位置ずれ(すなわち、画像100におけるカード10の中心の位置ずれ)を(-dx、-dy)と求めることができる。なおdxは画像100の横方向の変位を、dyは画像100の縦方向の変位を示す。
In the example of FIG. 9(b), it is assumed that there are no differences between the closed region A extracted in S3 and the template 200 other than the inclination, but the differences between the closed region A and the template 200 are not limited to this. For example, when the error in the position of the corresponding attention areas 140, 210 is smallest when the position of the closed region A extracted in S3 is shifted by (dx, dy), the positional deviation of the closed region A extracted in S3 with respect to the template 200 (i.e., the positional deviation of the center of the
同様に、カード10の撮影時のカメラ106の位置や姿勢に応じて画像100におけるカード10の形状が歪むので、S3で抽出した閉領域Aに所定の射影変換を行った場合に対応する注目部140、210の位置の誤差が最も小さくなるとき、S3で抽出した閉領域Aのテンプレート200に対する歪み(すなわち、画像100におけるカード10の歪み)を、上記射影変換の逆変換として求めることができる。
Similarly, the shape of the
S4では、以上のような処理により、S3で抽出した閉領域Aのテンプレート200からの差異が、閉領域Aのテンプレート200に対する傾き、位置ずれ、歪み、若しくはこれらの複数の組み合わせとして求められる。以下の説明では、図9(b)で示したようにS3で抽出した閉領域Aがテンプレート200に対し-α°傾いていた、すなわち画像100におけるカード10の向きが-α°傾いていた(その他の差異は無い)ものとする。
In S4, the above-mentioned processing is used to determine the difference between the closed area A extracted in S3 and the template 200 as the inclination, positional deviation, distortion, or a combination of these of the closed area A relative to the template 200. In the following explanation, it is assumed that the closed area A extracted in S3 is inclined by -α° relative to the template 200 as shown in Figure 9(b), i.e., the orientation of the
次に、カード切出装置1は、カード10の券面の別の閉領域B(第2の閉領域)を抽出する第2の領域抽出処理を行い、抽出された閉領域Bと、正の閉領域Bを示すテンプレートとに基づき、S4で求めた差異が正しいか否かを判定する。ここでは、まず第2の領域抽出処理の開始点を決定する(S5)。
The
前記したように、閉領域Bは先程抽出した閉領域Aの上に位置し、本実施形態では、前記と同様、図10に示すように、正の閉領域Bを示すテンプレート300の注目部310の位置をカード切出装置1の記憶部102に格納しておく。また本実施形態では、第2の領域抽出処理の正の開始点320も、閉領域B内にあり、且つカード10の地の色の部分に位置する点として予め設定し、カード切出装置1の記憶部102に格納しておく。
As described above, closed area B is located above closed area A extracted earlier, and in this embodiment, as in the above, the position of the attention area 310 of the template 300 indicating the positive closed area B is stored in the
S5では、S4で求めた差異と、上記開始点320の位置などを参照し、図11に示すように画像100における開始点150の位置が算出できるので、この開始点150から領域抽出処理を開始する。 In S5, the difference calculated in S4 and the position of the starting point 320 can be referenced to calculate the position of the starting point 150 in the image 100 as shown in FIG. 11, and the area extraction process is started from this starting point 150.
カード切出装置1は、S3と同様の処理により、図12(a)のグレー部分で示すように、開始点150を含む閉領域Bを画像100から抽出し(S6)、前記の注目部310(図10参照)に対応する閉領域Bの注目部170の位置を検出する。
By performing a process similar to S3, the
そして、カード切出装置1は、S4で求めた差異が正しいか否かを判定する(S7)。
Then, the
S7では、S6で抽出した閉領域BをS4で求めた差異を用いて変換した場合に閉領域Bがテンプレート300と一致するかどうかにより、上記差異が正しいか否かを判定することができる。 In S7, it is possible to determine whether the difference is correct or not by checking whether closed region B extracted in S6 matches template 300 when the closed region B is transformed using the difference found in S4.
本実施形態では上記の差異が「カード10の向きが-α°傾いている」ものであるため、図12(b)に示すように、閉領域Bを画像100の中心Cを基準にα°回転させた場合の、対応する注目部170、310の位置同士を比較し、その誤差を用いて判定を行えばよい。誤差が所定値以下であればS4で求めた差異が正しいとし、所定値を超えればS4で求めた差異が正しくないとする。
In this embodiment, the difference is that the orientation of the
なお、図12(b)の例では対応する注目部170、310の組が複数(4組)存在するので、上記した誤差は、対応する注目部170、310の組のそれぞれについて求めた誤差の平均や誤差の2乗の和とすればよい。前記と同様、注目部170、310の組は複数あるほうが精度の面から好ましい。 In the example of FIG. 12(b), since there are multiple (four) pairs of corresponding attention areas 170, 310, the above-mentioned error can be the average of the errors or the sum of the squares of the errors calculated for each pair of corresponding attention areas 170, 310. As mentioned above, it is preferable from the standpoint of accuracy to have multiple pairs of attention areas 170, 310.
カード切出装置1は、S4で求めた差異が正しいと判定された場合(S7;YES)、この差異に応じてカード10の切り出し範囲を画定し、画像100からカード10の範囲を切り出す(S8)。
If the
本実施形態では、図10の符号400で示すカード10の正の切り出し範囲をカード切出装置1の記憶部102に格納しておく。S8では、S4で求めた差異と、正の切り出し範囲400の位置などを参照し、図13に示すように画像100におけるカード10の切り出し範囲180の位置を算出できる。図13の例では、切り出し範囲180がS4で求めた差異に応じて正の切り出し範囲400から傾いたものとなっている。
In this embodiment, the positive cut-out range of the
こうしてカード切出装置1は画像100からカード10の切り出しを行う切り出し範囲180を画定し、その切り出し範囲180を画像100から切出す(S8)。S8で切り出したカード10の画像(券面画像)を図14(a)に示す。
In this way, the
そして、カード切出装置1は、S4で求めた差異を用いて、図14(b)に示すように切り出した画像を補正する(S9)。図14(b)の例では、切り出した画像をS4で求めた差異に応じて回転させ、補正が行われる。
Then, the
なお、S7において、S4で求めた差異が正しくないと判定される場合(S7;NO)、カード切出装置1はエラー表示を表示部103にて行い(S10)、処理を終了する。
If it is determined in S7 that the difference found in S4 is incorrect (S7; NO), the
以上説明したように、本実施形態のカード切出装置1は、カード10の券面の閉領域Aを画像100から抽出し、抽出した閉領域Aとそのテンプレート200との差異に応じて画像100からカード10を切り出す切り出し範囲180を画定する。これにより、カード10の背景20に影響されずにカード10の範囲のみを切り出すことが可能になり、カード10が写った画像からカード10の範囲をより正確に切り出すことができる。
As described above, the
また本実施形態では、画像100から抽出した閉領域Bとそのテンプレート300とに基づき上記の差異が正しいか否かを判定し、差異の正しさについて確認を行うことで、より精度の高い切り出しが可能になる。 In addition, in this embodiment, it is determined whether the above differences are correct based on the closed region B extracted from the image 100 and its template 300, and the correctness of the differences is confirmed, enabling more accurate extraction.
さらに本実施形態では、上記の差異が、画像100から抽出した閉領域Aとそのテンプレート200の注目部140、210の位置の比較によって得られるので、簡単な処理で上記の差異を求めることができる。 Furthermore, in this embodiment, the above difference is obtained by comparing the positions of the closed area A extracted from the image 100 and the points of interest 140, 210 of the template 200, so the above difference can be found by simple processing.
また本実施形態では、図8で例示したように領域抽出処理を行うことで、画像100から閉領域Aを好適に抽出することができる。また領域抽出処理を行うに当たり、その処理の開始点を図7で説明したように決定するので、文字部分などの微細な閉領域を抽出するのを避け、券面上で支配的な閉領域Aを抽出することができ、切り出し精度の向上に役立つ。 In addition, in this embodiment, the closed area A can be suitably extracted from the image 100 by performing the area extraction process as illustrated in FIG. 8. Furthermore, when performing the area extraction process, the starting point of the process is determined as explained in FIG. 7, so that it is possible to avoid extracting minute closed areas such as character portions and to extract the dominant closed area A on the face of the card, which helps to improve the extraction accuracy.
また本実施形態ではスマートフォンやタブレット端末などカメラ付きの携帯端末をカード切出装置1として用いることで、ユーザが携帯端末でカード10を撮影した画像100からカード10の範囲を切り出し、これを各種の事務処理に利用できるようになる。
In addition, in this embodiment, by using a mobile terminal with a camera, such as a smartphone or tablet terminal, as the
しかしながら、本発明が以上の実施形態に限ることはない。例えば本実施形態ではユーザが所持するカメラ付きの携帯端末をカード切出装置1として用いているが、カード切出装置1はこれにかぎらず、サーバなど、撮影機能を持たない据え置き型の情報処理装置などであってもよい。当該情報処理装置は、例えばユーザの携帯端末から前記の画像100を受信し、当該画像100について前記のS2以降の処理を行うことにより、画像100からカード10の範囲を切り出すことができる。
However, the present invention is not limited to the above embodiment. For example, in this embodiment, a mobile terminal with a camera owned by the user is used as the
また本実施形態では2つの閉領域A、Bを抽出し、閉領域Aを用いて前記した差異を求め、閉領域Bを用いてこの差異の正否の判定を行っているが、後者は省略してもよく、この場合1つの閉領域Aのみ抽出すればよい。 In this embodiment, two closed regions A and B are extracted, the difference is determined using closed region A, and the correctness of this difference is determined using closed region B, but the latter may be omitted, in which case it is sufficient to extract only one closed region A.
また本実施形態では閉領域A、Bとしてカード10の券面の地の色の部分を抽出しているが、閉領域A、Bはこれに限らず、例えば図4の文字「1234567890」の周囲の部分など、カード基材11上に同じ色で印刷された連続する部分であってもよい。
In this embodiment, the closed areas A and B are extracted as the background color of the face of the
その他、本発明の手法は、明るさや色の違いを利用してカード10とその背景20との境界を抽出し、これをカード10の切り出し範囲とする従来手法と併用することも可能であり、例えば従来手法により切り出し範囲を画定できなかった場合に本発明の手法を適用する、といったことも可能である。
In addition, the method of the present invention can be used in conjunction with a conventional method that uses differences in brightness and color to extract the boundary between the
以上、添付図面を参照して、本発明の好適な実施形態について説明したが、本発明は係る例に限定されない。当業者であれば、本願で開示した技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。 The above describes preferred embodiments of the present invention with reference to the attached drawings, but the present invention is not limited to these examples. It is clear that a person skilled in the art can come up with various modified or revised examples within the scope of the technical ideas disclosed in this application, and it is understood that these also naturally fall within the technical scope of the present invention.
1:カード切出装置
10:カード
100:画像
111:抽出手段
112:判定手段
113:切出手段
140、170、210、310:注目部
180、400:切り出し範囲
200、300:テンプレート
A、B;閉領域A
1: Card cutting device 10: Card 100: Image 111: Extraction means 112: Determination means 113: Cutting means 140, 170, 210, 310: Part of interest 180, 400: Cutting range 200, 300: Templates A, B; Closed region A
Claims (5)
前記画像から前記カードの券面の第1の閉領域を抽出する抽出手段と、
前記抽出手段で抽出した第1の閉領域のテンプレートからの差異に応じて前記カードを切り出す範囲を画定し、前記画像から前記カードの範囲を切り出す切出手段と、
を有し、
前記抽出手段は、開始点の画素と同じ色と判定される画素を前記開始点から外側へと順次探索することにより第1の閉領域を抽出し、
前記開始点の画素は、当該画素の色が、当該画素の上下左右の画素の色と同じと判定される画素である
ことを特徴とするカード切出装置。 A card cutting device that cuts out a range of a card from an image of the card,
an extraction means for extracting a first closed area of the face of the card from the image;
a cutout means for determining an area for cutting out the card in accordance with a difference between the template of the first closed area extracted by the extraction means and the template, and for cutting out the area of the card from the image;
having
the extraction means extracts a first closed region by sequentially searching from the starting point toward the outside for pixels determined to have the same color as the pixel at the starting point;
The starting pixel is a pixel whose color is determined to be the same as the colors of the pixels above, below, left, and right of the starting pixel.
A card dispensing device characterized by the above.
前記カード切出装置は、
前記抽出手段で抽出した第2の閉領域と、当該第2の閉領域についてのテンプレートとに基づき、前記差異が正しいか否かを判定する判定手段をさらに有することを特徴とする請求項1記載のカード切出装置。 The extraction means extracts a second closed area of the face of the card from the image,
The card dispensing device is
2. The card dispensing device according to claim 1, further comprising a determination means for determining whether or not the difference is correct based on the second closed area extracted by the extraction means and a template for the second closed area.
カードが写った画像から前記カードの範囲を切り出すカード切出装置であって、
前記画像から前記カードの券面の第1の閉領域を抽出する抽出手段と、
前記抽出手段で抽出した第1の閉領域のテンプレートからの差異に応じて前記カードを切り出す範囲を画定し、前記画像から前記カードの範囲を切り出す切出手段と、
を有するカード切出装置として機能させるためのプログラムであって、
前記抽出手段は、開始点の画素と同じ色と判定される画素を前記開始点から外側へと順次探索することにより第1の閉領域を抽出し、
前記開始点の画素は、当該画素の色が、当該画素の上下左右の画素の色と同じと判定される画素である
ことを特徴とするプログラム。 An information processing device,
A card cutting device that cuts out a range of a card from an image of the card,
an extraction means for extracting a first closed area of the face of the card from the image;
a cutout means for determining an area for cutting out the card in accordance with a difference between the template of the first closed area extracted by the extraction means and the template, and for cutting out the area of the card from the image;
A program for causing a card dispensing device to function as a card dispensing device having the following:
the extraction means extracts a first closed region by sequentially searching from the starting point toward the outside for pixels determined to have the same color as the pixel at the starting point;
The starting pixel is a pixel whose color is determined to be the same as the colors of the pixels above, below, left, and right of the starting pixel.
A program characterized by :
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020036201A JP7484229B2 (en) | 2020-03-03 | 2020-03-03 | Card cutting device and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020036201A JP7484229B2 (en) | 2020-03-03 | 2020-03-03 | Card cutting device and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021140352A JP2021140352A (en) | 2021-09-16 |
| JP7484229B2 true JP7484229B2 (en) | 2024-05-16 |
Family
ID=77668657
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020036201A Active JP7484229B2 (en) | 2020-03-03 | 2020-03-03 | Card cutting device and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7484229B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7750084B2 (en) * | 2021-12-22 | 2025-10-07 | 大日本印刷株式会社 | Program, information processing method, and information processing device |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008071076A (en) | 2006-09-13 | 2008-03-27 | Oki Electric Ind Co Ltd | Image extraction device |
| JP2013114655A (en) | 2011-12-01 | 2013-06-10 | Canon Inc | Image processing device, image processing method, and computer program |
| JP2018148362A (en) | 2017-03-03 | 2018-09-20 | 富士ゼロックス株式会社 | Image processing apparatus and image forming apparatus |
-
2020
- 2020-03-03 JP JP2020036201A patent/JP7484229B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008071076A (en) | 2006-09-13 | 2008-03-27 | Oki Electric Ind Co Ltd | Image extraction device |
| JP2013114655A (en) | 2011-12-01 | 2013-06-10 | Canon Inc | Image processing device, image processing method, and computer program |
| JP2018148362A (en) | 2017-03-03 | 2018-09-20 | 富士ゼロックス株式会社 | Image processing apparatus and image forming apparatus |
Non-Patent Citations (1)
| Title |
|---|
| 増田隆(外1名),被写体認識技術+OCR技術を活用したスマートフォンアプリによるマイナンバー収集代行サービスの実用化,情報処理学会デジタルプラクティス,日本,一般社団法人情報処理学会,2017年01月15日,Vol.8, No.1,p.67-72 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021140352A (en) | 2021-09-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109977770B (en) | Automatic tracking shooting method, device, system and storage medium | |
| JP5480777B2 (en) | Object display device and object display method | |
| CN101216883B (en) | A photography method and device | |
| KR101237158B1 (en) | Image processing system and object of image capturing used therewith | |
| RU2641449C2 (en) | Method and device for area identification | |
| US20050163396A1 (en) | Captured image projection apparatus and captured image correction method | |
| CN111553251B (en) | Certificate four-corner defect detection method, device, equipment and storage medium | |
| JP2007094906A (en) | Feature point detection apparatus and method | |
| CN102648622A (en) | Image processing device, image processing method, image processing program, and recording medium with recorded image processing program | |
| JP2004062565A (en) | Image processing apparatus and method, and program storage medium | |
| US10007846B2 (en) | Image processing method | |
| US12033429B2 (en) | Image processing device of determining authenticity of object, image processing method of determining authenticity of object, and storage medium storing program of determining authenticity of object | |
| GB2598016A (en) | Biometric authentication apparatus and biometric authentication method | |
| US20130076854A1 (en) | Image processing apparatus, image processing method, and computer readable medium | |
| EP3200126B1 (en) | Biometric information process device, biometric information process method and biometric information process program | |
| JP4957607B2 (en) | Detection of facial regions in images | |
| JP7484229B2 (en) | Card cutting device and program | |
| US20070172123A1 (en) | Image processing apparatus, image processing method and computer readable medium | |
| JP2011022927A (en) | Hand image recognition device | |
| CN111698411A (en) | Automatic face image detection and shooting method | |
| KR101660596B1 (en) | Method for modifying gradient of facial shape, and system for the same | |
| KR102151474B1 (en) | Non contract fingerprint recognition method using smart terminal | |
| US20250157254A1 (en) | Face authentication device, face authentication method, and information storage medium | |
| JP2017199288A (en) | Image processing apparatus, image processing method, and program | |
| KR101766787B1 (en) | Image correction method using deep-learning analysis bassed on gpu-unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230127 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20231108 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231219 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240207 |
|
| 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: 20240402 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240415 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7484229 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |