JP2021060875A - Frame extraction method and program - Google Patents

Frame extraction method and program Download PDF

Info

Publication number
JP2021060875A
JP2021060875A JP2019185450A JP2019185450A JP2021060875A JP 2021060875 A JP2021060875 A JP 2021060875A JP 2019185450 A JP2019185450 A JP 2019185450A JP 2019185450 A JP2019185450 A JP 2019185450A JP 2021060875 A JP2021060875 A JP 2021060875A
Authority
JP
Japan
Prior art keywords
frame
extraction
cartoon image
clustering
frames
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2019185450A
Other languages
Japanese (ja)
Other versions
JP7370574B2 (en
JP2021060875A5 (en
Inventor
大作 萬田
Daisaku Manda
大作 萬田
信介 菅谷
Shinsuke Sugaya
信介 菅谷
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.)
Comici Inc
Original Assignee
Comici Inc
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 Comici Inc filed Critical Comici Inc
Priority to JP2019185450A priority Critical patent/JP7370574B2/en
Publication of JP2021060875A publication Critical patent/JP2021060875A/en
Publication of JP2021060875A5 publication Critical patent/JP2021060875A5/ja
Priority to JP2023133897A priority patent/JP2023144121A/en
Application granted granted Critical
Publication of JP7370574B2 publication Critical patent/JP7370574B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To provide a frame extraction method that can extract frames from a cartoon image simply and accurately.SOLUTION: A frame extraction method includes: a binarization step of binarizing a cartoon image into black and white; a first extraction step of extracting an outline of the cartoon image and extracting areas surrounded by frames in the cartoon image as frames; a clustering step of clustering black areas with respect to a remaining area not extracted as the frames by the first extraction step in the cartoon image; and a second extraction step of setting each of the clustered areas as a rectangular area and extracting the rectangular area as a frame.SELECTED DRAWING: Figure 1

Description

本発明は、コマ抽出方法及びプログラムに関する。 The present invention relates to a frame extraction method and a program.

近年、スマートフォンなどの携帯端末で漫画を読む機会が非常に多くなってきている。しかし、スマートフォンなどの携帯端末で漫画を読む場合、紙に印刷された漫画を読む場合に比べて読みにくい場合が多い。例えば、漫画の1ページには複数のコマが描かれており、1ページを1つの画像として表示して読む場合、1つのコマが小さくなってしまい読みにくい。また、ページ中の対象のコマを拡大して読み進める場合、操作が煩雑になり読みにくい。 In recent years, there have been an increasing number of opportunities to read manga on mobile terminals such as smartphones. However, when reading a manga on a mobile terminal such as a smartphone, it is often more difficult to read than when reading a manga printed on paper. For example, a plurality of frames are drawn on one page of a manga, and when one page is displayed and read as one image, one frame becomes small and difficult to read. In addition, when the target frame on the page is enlarged and read, the operation becomes complicated and difficult to read.

これに対して、漫画画像からコマを抽出して各コマをバラバラに表示することで、携帯端末でも読みやすくすることが考えられる。従来より、コマを抽出する技術が提案されているが、コマ抽出の精度を向上させることが求められている。例えば、特許文献1では、コマの枠線が途切れている場合でもコマ抽出を行えることが開示されている。また、特許文献2では、漫画画像の全体から境界線で区画されているコマが検出された後、コマの検出領域を狭くして、境界線で区画されているコマ、又はコマに内包されたコマを検出することが開示されている。 On the other hand, it is conceivable to extract frames from the cartoon image and display each frame separately to make it easier to read even on a mobile terminal. Conventionally, a technique for extracting frames has been proposed, but it is required to improve the accuracy of frame extraction. For example, Patent Document 1 discloses that frame extraction can be performed even when the frame line of a frame is interrupted. Further, in Patent Document 2, after a frame defined by a boundary line is detected from the entire cartoon image, the detection area of the frame is narrowed and the frame or a frame defined by the boundary line is included. It is disclosed to detect coma.

しかし、特許文献1、2では、特定のコマを有する漫画画像に対しては、コマ抽出の精度は向上すると考えられるが、その他のコマを有する漫画画像に対しては、精度良くコマ抽出を行えない。これに対して、特許文献3では、機械学習の技術を用いてコマ等を認識する技術が提案されている。特許文献3では、漫画のコマ部分等を検出するよう機械学習された状態にある検出手段を用いることにより、認識精度を向上させている。 However, in Patent Documents 1 and 2, it is considered that the accuracy of frame extraction is improved for a cartoon image having a specific frame, but the frame can be extracted with high accuracy for a cartoon image having other frames. Absent. On the other hand, Patent Document 3 proposes a technique for recognizing a frame or the like by using a machine learning technique. In Patent Document 3, the recognition accuracy is improved by using the detection means in the state of being machine-learned to detect the frame portion of the cartoon.

特開2017−45219号公報JP-A-2017-45219 特開2014−212476号公報Japanese Unexamined Patent Publication No. 2014-212476 特開2019−46253号公報Japanese Unexamined Patent Publication No. 2019-46253

しかしながら、特許文献3で提案されている漫画のコマ部分を検出するための機械学習の技術では、大量の教師データが必要となり、非常に手間がかかるという問題がある。 However, the machine learning technique for detecting the frame portion of the cartoon proposed in Patent Document 3 requires a large amount of teacher data, and has a problem that it takes a lot of time and effort.

そこで、本発明は、漫画画像から簡易に精度良くコマ抽出を行うことができるコマ抽出方法を提供することを目的とする。 Therefore, an object of the present invention is to provide a frame extraction method capable of easily and accurately extracting frames from a cartoon image.

上記課題を解決するために、本発明のコマ抽出方法は、漫画画像を黒色と白色に二値化する二値化工程と、前記漫画画像に対して輪郭抽出を行い、前記漫画画像における枠線で囲まれた領域をコマとして抽出する第1の抽出工程と、前記漫画画像における、前記第1の抽出工程によって前記コマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングするクラスタリング工程と、前記クラスタリングされた各領域を矩形領域とし、該矩形領域をコマとして抽出する第2の抽出工程と、を有することを特徴とする。 In order to solve the above problems, the frame extraction method of the present invention performs a binarization step of binarizing a cartoon image into black and white, and contour extraction of the cartoon image to form a border in the cartoon image. A first extraction step of extracting the region surrounded by the frame as a frame, and a clustering step of clustering a black region with respect to the remaining region not extracted as the frame by the first extraction step in the cartoon image. It is characterized by having a second extraction step in which each of the clustered regions is a rectangular region and the rectangular region is extracted as a frame.

本発明によれば、漫画画像から簡易に精度良くコマ抽出を行うことができる。 According to the present invention, frame extraction can be easily and accurately performed from a cartoon image.

本発明に係るコマ抽出方法の一例におけるフローチャートである。It is a flowchart in an example of the frame extraction method which concerns on this invention. 本発明に係るコマ抽出方法の一例における漫画画像を説明するための図である。It is a figure for demonstrating the cartoon image in an example of the frame extraction method which concerns on this invention. クラスタリング工程を説明するための図である。It is a figure for demonstrating the clustering process. 本発明に係るコマ抽出方法の一例における他の漫画画像を説明するための図である。It is a figure for demonstrating another cartoon image in an example of the frame extraction method which concerns on this invention. 本発明に係るコマ抽出方法の他の例におけるフローチャートである。It is a flowchart in another example of the frame extraction method which concerns on this invention. 並べ替え工程を説明するための図である。It is a figure for demonstrating the sorting process. 並べ替え工程を説明するための他の図である。It is another figure for demonstrating the sorting process. 並べ替え工程を説明するための他の図である。It is another figure for demonstrating the sorting process.

以下、本発明に係るコマ抽出方法及びプログラムについて図面を参照しながら説明する。なお、本発明は以下に示す実施形態に限定されるものではなく、他の実施形態、追加、修正、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。 Hereinafter, the frame extraction method and the program according to the present invention will be described with reference to the drawings. The present invention is not limited to the embodiments shown below, and can be modified within the range conceivable by those skilled in the art, such as other embodiments, additions, modifications, and deletions. However, as long as the action and effect of the present invention are exhibited, it is included in the scope of the present invention.

(第1の実施形態)
本発明に係るコマ抽出方法の一実施形態について説明する。
本実施形態のコマ抽出方法は、漫画画像を黒色と白色に二値化する二値化工程と、前記漫画画像に対して輪郭抽出を行い、前記漫画画像における枠線で囲まれた領域をコマとして抽出する第1の抽出工程と、前記漫画画像における、前記第1の抽出工程によって前記コマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングするクラスタリング工程と、前記クラスタリングされた各領域を矩形領域とし、該矩形領域をコマとして抽出する第2の抽出工程と、を有することを特徴とする。
(First Embodiment)
An embodiment of the frame extraction method according to the present invention will be described.
The frame extraction method of the present embodiment has a binarization step of binarizing the cartoon image into black and white, and contour extraction of the cartoon image, and the area surrounded by the frame in the cartoon image is framed. A first extraction step of extracting as, a clustering step of clustering a black region with respect to the remaining region not extracted as the frame by the first extraction step in the cartoon image, and each of the clustered regions. It is characterized by having a second extraction step in which the region is a rectangular region and the rectangular region is extracted as a frame.

本実施形態によれば、漫画画像から簡易に精度良くコマ抽出を行うことができる。本実施形態によれば、枠線がないコマの他、手描きなどの直線ではなく波打っている線に囲まれたコマ等の抽出を行うことができる。ここでいう「精度良くコマ抽出を行う」とは、人間がコマであると認識するものを抽出することをいい、従来の技術に比べて人間の認識に近いことをいう。人間の認識とできるだけ一致することが好ましいが、完全一致することを要するものではない。 According to this embodiment, frame extraction can be easily and accurately performed from a cartoon image. According to the present embodiment, it is possible to extract not only frames without a border but also frames surrounded by wavy lines instead of straight lines such as hand-drawn lines. Here, "performing frame extraction with high accuracy" means extracting what a human recognizes as a frame, and means that it is closer to human recognition than the conventional technology. It is preferable to match human perception as much as possible, but it is not necessary to match it exactly.

また、本実施形態では、教師なし学習による機械学習の技術を利用してコマ抽出を行うことができ、従来の技術に比べて簡易にコマ抽出を行うことができる。従来の技術では、教師データを用意することが必要であり、正解付きの教師あり学習による機械学習を行う場合、手間とコストが必要であった。これに対して、本実施形態によれば、教師データを用意することなく機械学習の技術を利用してコマ抽出を行うことができるため、簡易に精度良くコマ抽出を行うことができる。また、教師データなし機械学習と領域抽出を組み合わせることにより、コマ枠がないコマなども精度良くコマ抽出を行うことができる。 Further, in the present embodiment, frame extraction can be performed by using the machine learning technique by unsupervised learning, and the frame extraction can be performed more easily than the conventional technique. In the conventional technique, it is necessary to prepare teacher data, and when performing machine learning by supervised learning with a correct answer, labor and cost are required. On the other hand, according to the present embodiment, frame extraction can be performed by using the machine learning technique without preparing teacher data, so that frame extraction can be performed easily and accurately. In addition, by combining machine learning without teacher data and area extraction, it is possible to accurately extract frames even if there is no frame frame.

本実施形態のコマ抽出方法のフローチャートを図1に示す。
本実施形態では、二値化工程(S101)、第1の抽出工程(S102)、クラスタリング工程(S103)、第2の抽出工程(S104)を行い、必要に応じてその他の工程を行う。
FIG. 1 shows a flowchart of the frame extraction method of the present embodiment.
In the present embodiment, the binarization step (S101), the first extraction step (S102), the clustering step (S103), and the second extraction step (S104) are performed, and other steps are performed as needed.

<二値化工程>
二値化工程では、漫画画像を黒色と白色に二値化する(S101)。
二値化は、特に制限されるものではないが、例えば漫画画像をHSV色空間に変換して二値化する。HSV色空間に変換して二値化する場合、例えば、明度80%以下及び色相70%以下の領域を黒色とし、それ以外を白色とする。
なお、二値化工程では、HSV色空間に限られるものではなく、その他の色空間を用いて二値化してもよい。
<Binarization process>
In the binarization step, the cartoon image is binarized into black and white (S101).
The binarization is not particularly limited, but for example, a cartoon image is converted into an HSV color space and binarized. When converting to the HSV color space and binarizing, for example, the region having a brightness of 80% or less and a hue of 70% or less is made black, and the other regions are made white.
The binarization step is not limited to the HSV color space, and may be binarized using another color space.

本実施形態においては、後述の第1の抽出工程におけるコマ抽出の精度を向上させるため、二値化の精度を上げることが好ましい。本実施形態において二値化の精度を上げるには、例えばエッジ検出を利用してグレースケールによる二値化の補完を行うことが挙げられる。 In the present embodiment, in order to improve the accuracy of frame extraction in the first extraction step described later, it is preferable to increase the accuracy of binarization. In order to improve the accuracy of binarization in the present embodiment, for example, edge detection is used to complement binarization by gray scale.

<第1の抽出工程>
第1の抽出工程では、漫画画像に対して輪郭抽出を行い、前記漫画画像における枠線で囲まれた領域をコマとして抽出する(S102)。
<First extraction step>
In the first extraction step, contour extraction is performed on the cartoon image, and the area surrounded by the frame line in the cartoon image is extracted as a frame (S102).

本実施形態の第1の抽出工程について、図2を用いて説明する。図2(A)には漫画画像の一例が示されており、漫画画像10にはコマA〜Eが描かれている。漫画画像10に対して輪郭抽出を行うと、図2(B)に示されるように、コマA〜C、Eが抽出される。 The first extraction step of this embodiment will be described with reference to FIG. FIG. 2A shows an example of a cartoon image, and frames A to E are drawn in the cartoon image 10. When contour extraction is performed on the cartoon image 10, frames A to C and E are extracted as shown in FIG. 2 (B).

輪郭抽出では、対象となる画像において、枠線で囲まれた領域を認識して枠線で囲まれた領域を切り出して出力する。そのため、漫画画像10に対して輪郭抽出を行うと、コマA〜C、Eをそれぞれ抽出して出力することができる。 In contour extraction, in the target image, the area surrounded by the frame line is recognized, and the area surrounded by the frame line is cut out and output. Therefore, when contour extraction is performed on the cartoon image 10, frames A to C and E can be extracted and output, respectively.

本例の第1の抽出工程では、漫画画像10におけるコマDは抽出対象外となる。
コマDは、枠線に途切れている箇所があるため、輪郭抽出において枠線で囲まれた領域として認識されない。このようなコマDに対しては、後述のクラスタリング及び第2の抽出工程を経ることで抽出される。
In the first extraction step of this example, the frame D in the cartoon image 10 is excluded from the extraction target.
Since the frame D has a break in the frame line, it is not recognized as an area surrounded by the frame line in the contour extraction. Such a frame D is extracted through the clustering and the second extraction step described later.

なお、コマEの枠線は、手書きなどによる波打った線であるが、本例ではコマとして抽出可能である。コマEが抽出されない場合であっても、後述のクラスタリング及び第2の抽出工程を経ることで抽出対象となり得る。 The frame line of the frame E is a wavy line by handwriting or the like, but in this example, it can be extracted as a frame. Even when the frame E is not extracted, it can be an extraction target by going through the clustering and the second extraction step described later.

輪郭抽出としては、領域成長法(watershedアルゴリズム)、領域統合法等を用いることができる。 As the contour extraction, a region growth method (watershed algorithm), a region integration method, or the like can be used.

<クラスタリング工程>
クラスタリング工程では、漫画画像における、前記第1の抽出工程によって前記コマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングする(S103)。
<Clustering process>
In the clustering step, a black region is clustered with respect to the remaining region of the cartoon image that was not extracted as the frame by the first extraction step (S103).

第1の抽出工程によってコマとして抽出されなかった残りの領域に対してクラスタリングを行うことにより、第1の抽出工程で抽出されなかったコマに対しても抽出することができる。実際には、後述の第2の抽出工程でコマを抽出することになるが、クラスタリング工程では、その前準備を行うことに相当する。 By clustering the remaining regions that were not extracted as coma by the first extraction step, it is possible to extract the coma that were not extracted by the first extraction step. Actually, the coma is extracted in the second extraction step described later, but the clustering step corresponds to the preparation.

本実施形態のクラスタリング工程について、図3に例を挙げて説明する。
図3(A)は図2におけるコマDを示しており、図3(B)はコマDにおける枠線20の拡大図を示している。また、図3(B)は、クラスタリングを行った後の状態を示すものであり、クラスタリングを行うことにより、枠線20において途切れた部分があっても、1つのまとまり(クラスタリング領域30)として扱うことができる。
The clustering step of this embodiment will be described with reference to FIG.
FIG. 3 (A) shows the frame D in FIG. 2, and FIG. 3 (B) shows an enlarged view of the frame line 20 in the frame D. Further, FIG. 3B shows a state after clustering, and by performing clustering, even if there is a break in the frame line 20, it is treated as one unit (clustering area 30). be able to.

これにより、図3(C)に示されるように、コマDの途切れた枠線20はクラスタリング領域30として扱うことができる。枠線が途切れている場合など、一続きの枠線がない場合は細かい領域がバラバラに検出されてしまうため、クラスタリングを行うことにより、細かい領域で近いものを結合する。 As a result, as shown in FIG. 3C, the broken frame line 20 of the frame D can be treated as the clustering region 30. If there is no continuous border, such as when the border is interrupted, fine areas will be detected separately. Therefore, by performing clustering, close objects are combined in the fine areas.

本実施形態におけるクラスタリング工程では、上記の例における枠線に限られず、様々な領域に対してクラスタリングを行い、塊(クラスタ)にしている。クラスタにすることで、後述の第2の抽出工程において、コマを抽出するための矩形領域を形成することができる。 In the clustering step in the present embodiment, not only the frame line in the above example but also various regions are clustered to form a cluster. By forming a cluster, a rectangular area for extracting coma can be formed in the second extraction step described later.

クラスタリングは、DBSCAN(Density based spatial clustering of applications with noise)により行うことが好ましい。DBSCANは、精度良くクラスタリングを行うことができるという利点があり、第2のコマ抽出において精度良くコマ抽出を行うことができる。 Clustering is preferably performed by DBSCAN (Density based spatial clustering of applications with noise). DBSCAN has an advantage that clustering can be performed with high accuracy, and frame extraction can be performed with high accuracy in the second frame extraction.

クラスタリングを行う際のパラメータとしては、例えば、ドットどうしがどの程度離れていてもクラスタとして扱うのかを表すパラメータや、特定のドットの周りに何個のドットがあればクラスタとして扱うのかを表すパラメータ等が挙げられる。例えばDBSCANを用いる場合は、εやminPtsが挙げられる。DBSCANは、教師なし学習であるため、教師データを作成する必要がなく、手間やコストを抑えることができる。 Parameters for clustering include, for example, a parameter indicating how far the dots are treated as a cluster, a parameter indicating how many dots around a specific dot are treated as a cluster, and the like. Can be mentioned. For example, when DBSCAN is used, ε and minPts can be mentioned. Since DBSCAN is unsupervised learning, it is not necessary to create teacher data, and labor and cost can be reduced.

<第2の抽出工程>
第2の抽出工程では、前記クラスタリングされた各領域を矩形領域とし、該矩形領域をコマとして抽出する(S104)。
<Second extraction process>
In the second extraction step, each clustered region is defined as a rectangular region, and the rectangular region is extracted as a frame (S104).

図3(C)に示されるように、コマDのクラスタリング領域30は矩形領域であるため、第2の抽出工程によりコマDがコマとして抽出される。 As shown in FIG. 3C, since the clustering region 30 of the frame D is a rectangular region, the frame D is extracted as a frame by the second extraction step.

第2の抽出工程において、「各領域」とあるのは、上述のクラスタのことであり、クラスタリングされた領域を矩形領域とする。矩形領域の作成の方法としては、適宜変更することができる。例えば、クラスタから4つの点を選び出し、4つの点の配置を考慮し、矩形となるように配置されている場合を矩形領域としてもよいし、クラスタから複数の直線を選び出し、直線が矩形となるように配置されている場合を矩形領域としてもよい。 In the second extraction step, the “each region” refers to the above-mentioned cluster, and the clustered region is defined as a rectangular region. The method of creating the rectangular area can be changed as appropriate. For example, four points may be selected from the cluster and the arrangement of the four points may be taken into consideration and arranged so as to be a rectangle as a rectangular area, or a plurality of straight lines may be selected from the cluster and the straight lines become rectangular. The case where they are arranged in such a manner may be a rectangular area.

このようにして、本実施形態における第2の抽出工程では、例えばクラスタリングされた各領域から矩形領域を作成し、作成した矩形領域をコマとして抽出することができる。これにより、従来の技術に比べて、更に精度よくコマ抽出を行うことができる。 In this way, in the second extraction step in the present embodiment, for example, a rectangular area can be created from each clustered area, and the created rectangular area can be extracted as a frame. As a result, frame extraction can be performed more accurately than in the conventional technique.

なお、本実施形態では、第1の抽出工程によってコマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングした後、第2の抽出工程を行っているが、二値化された漫画画像に対してクラスタリングした後、第2の抽出工程を行ってもよい。 In the present embodiment, the black region is clustered with respect to the remaining region not extracted as a frame by the first extraction step, and then the second extraction step is performed. However, the binarized cartoon After clustering the images, a second extraction step may be performed.

<その他の例>
ここで、本実施形態におけるその他の例について説明する。本実施形態によれば、コマ枠線がない漫画画像においてもコマ抽出を行うことができる。例を図4に示す。図4(A)は漫画画像の例を示す図であり、図4(B)はコマ抽出されたコマを示す図である。本実施形態によれば、図2に示されるような漫画画像だけでなく、図4に示されるような枠線がない漫画画像に対しても簡易に精度良くコマ抽出を行うことができる。
<Other examples>
Here, other examples in this embodiment will be described. According to this embodiment, frame extraction can be performed even in a cartoon image having no frame border. An example is shown in FIG. FIG. 4A is a diagram showing an example of a cartoon image, and FIG. 4B is a diagram showing a frame extracted from frames. According to the present embodiment, it is possible to easily and accurately extract frames not only for a cartoon image as shown in FIG. 2 but also for a cartoon image without a border as shown in FIG.

<プログラム>
本実施形態のプログラムは、漫画画像を黒色と白色に二値化する二値化処理と、前記漫画画像に対して輪郭抽出を行い、前記漫画画像における枠線で囲まれた領域をコマとして抽出する第1の抽出処理と、前記漫画画像における、前記第1の抽出処理によって前記コマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングするクラスタリング処理と、前記クラスタリングされた漫画画像において、矩形領域を判定して該矩形領域をコマとして抽出する第2の抽出処理と、をコンピュータに実行させることを特徴とする。
<Program>
The program of the present embodiment performs binarization processing for binarizing a cartoon image into black and white, contour extraction for the cartoon image, and extracting an area surrounded by a frame in the cartoon image as a frame. In the first extraction process to be performed, a clustering process for clustering black regions with respect to the remaining regions not extracted as the frames by the first extraction process in the cartoon image, and the clustered cartoon image. A second extraction process of determining a rectangular area and extracting the rectangular area as a frame is performed by a computer.

(第2の実施形態)
本発明に係るコマ抽出方法の他の実施形態について説明する。
本実施形態のコマ抽出方法のフローチャートを図5に示す。なお、本実施形態における二値化工程(S202)、第1の抽出工程(S205)、クラスタリング工程(S206)、第2の抽出工程(S207)としては、上記実施形態と同様の工程とすることができるため、説明を省略する。
(Second embodiment)
Other embodiments of the frame extraction method according to the present invention will be described.
The flowchart of the frame extraction method of this embodiment is shown in FIG. The binarization step (S202), the first extraction step (S205), the clustering step (S206), and the second extraction step (S207) in the present embodiment are the same steps as those in the above embodiment. Therefore, the description is omitted.

<正規化工程>
正規化工程では、二値化工程の前に、前記漫画画像の横幅のサイズを正規化する(S201)。正規化を行うことにより、第1の抽出工程や第2の抽出工程の精度を向上させることができる。漫画画像の横幅のサイズとしては、適宜変更することが可能であるが、例えば、300pixel〜500pixelにすることができる。
<Normalization process>
In the normalization step, the width size of the cartoon image is normalized before the binarization step (S201). By performing the normalization, the accuracy of the first extraction step and the second extraction step can be improved. The width size of the cartoon image can be changed as appropriate, and can be, for example, 300pixel to 500pixel.

正規化は必須ではなく、省略することも可能であるが、その場合、漫画画像の横幅が所定のサイズであることが好ましい。 Normalization is not essential and can be omitted, but in that case, it is preferable that the width of the cartoon image is a predetermined size.

<直線判定工程>
直線判定工程では、二値化工程の後であり、かつ、前記第1の抽出工程の前に、前記漫画画像に対してハフ変換を行い、直線が検出されるかどうかを判定する(S203)。
<Straight line judgment process>
In the straight line determination step, Hough transform is performed on the cartoon image after the binarization step and before the first extraction step, and it is determined whether or not a straight line is detected (S203). ..

直線が判定されるか判定を行い(S205)、直線判定工程において直線が検出されたと判定された場合(S205でYESの場合)、第1の抽出工程(S205)、クラスタリング工程(S206)、第2の抽出工程(S207)を行うようにする。これにより、不要な工程を行うことを防止でき、処理の高速化を図ることができる。 When it is determined whether or not a straight line is determined (S205) and it is determined that a straight line is detected in the straight line determination step (YES in S205), the first extraction step (S205), the clustering step (S206), and the first The extraction step (S207) of 2 is performed. As a result, it is possible to prevent unnecessary steps from being performed, and it is possible to speed up the processing.

漫画画像の中には、枠自体がない一コマ画像も相当数存在する。一コマ画像である場合、直線がないことが多いため、漫画画像に直線がない場合は、一コマ画像であると判定して、第1の抽出工程以降の工程を行わず、一コマとして出力する(S209)。これにより、行う工程を省くことができ、コマ抽出にかかる時間を省くことができる。 Among the cartoon images, there are a considerable number of single-frame images without the frame itself. In the case of a one-frame image, there are often no straight lines, so if there is no straight line in the cartoon image, it is determined that it is a one-frame image, and it is output as one frame without performing the steps after the first extraction step. (S209). As a result, the steps to be performed can be omitted, and the time required for frame extraction can be omitted.

ハフ変換による直線の検出は、一般的に用いられている手法を使用できる。例えば、あるドットを通る直線は、
ρ=x・cosθ+y・sinθ
と表すことができる。ρとθの座標軸における曲線は、ドットの数だけ描くことができ、曲線が交わる個所が複数のドットを通る直線となる。
For the detection of straight lines by Hough transform, a commonly used method can be used. For example, a straight line passing through a dot
ρ = x · cos θ + y · sin θ
It can be expressed as. Curves on the coordinate axes of ρ and θ can be drawn as many as the number of dots, and the intersection of the curves becomes a straight line passing through a plurality of dots.

直線判定工程では、ハフ変換をした後、例えば漫画画像の横幅に対して50%以上の長さの水平な直線が検出された場合、漫画画像に直線があると判定することができる。なお、正規化した場合は、正規化後の漫画画像の横幅に対して50%以上の長さの水平な直線が検出された場合、漫画画像に直線があると判定することができる。 In the straight line determination step, if a horizontal straight line having a length of 50% or more with respect to the width of the cartoon image is detected after the Hough transform, it can be determined that the cartoon image has a straight line. In the case of normalization, if a horizontal straight line having a length of 50% or more with respect to the width of the normalized cartoon image is detected, it can be determined that the cartoon image has a straight line.

<並び替え工程>
並び替え工程では、前記第1の抽出工程及び前記第2の抽出工程によって抽出されたコマを、前記漫画画像におけるコマを読み進める順番に沿うように並び替える(S208)。並び替え工程を行うことにより、スマートフォンなどの携帯端末で抽出したコマを読む場合に、読みやすくなる。
<Sort process>
In the rearrangement step, the frames extracted by the first extraction step and the second extraction step are rearranged in the order in which the frames in the cartoon image are read (S208). By performing the sorting process, it becomes easier to read the frames extracted by a mobile terminal such as a smartphone.

本実施形態における並び替え工程について、図6、図7を用いて説明する。
ここでは、漫画画像10として、左上から右下へ読み進める場合を例に挙げて説明する。図6に示される例では、A、B、C、D、Eの順に読み進める。原点(0,0)とし、横方向をx軸、縦方向をy軸としている。また、各コマにおける左上の点をa〜eとし、それぞれの値は、x1<x2<x3であり、y1<y2<y3である。
The sorting process in this embodiment will be described with reference to FIGS. 6 and 7.
Here, a case where the cartoon image 10 is read from the upper left to the lower right will be described as an example. In the example shown in FIG. 6, A, B, C, D, and E are read in this order. The origin (0,0) is set, the horizontal direction is the x-axis, and the vertical direction is the y-axis. Further, the upper left points in each frame are a to e, and the respective values are x1 <x2 <x3 and y1 <y2 <y3.

第1の抽出工程及び第2の抽出工程の段階では、並べ替えは行われておらず、番号付け(ナンバリングとも称する)は行われていない。第1の抽出工程及び第2の抽出工程でコマを抽出したときにナンバリングしてもよいが、抽出された順がコマを読み進める順に対応していないことがあるため、並べ替え工程を行うことが好ましい。 At the stage of the first extraction step and the second extraction step, the sorting is not performed and the numbering (also referred to as numbering) is not performed. Numbering may be performed when the frames are extracted in the first extraction step and the second extraction step, but the order in which they are extracted may not correspond to the order in which the frames are read, so a sorting step is performed. Is preferable.

図7(A)は、並べ替え工程を行った場合の例である。並べ替えの処理は、適宜変更することが可能であるが、左上から右下へ読み進める場合、まず、y軸の値の小さなコマの順に並べる。次いで、y軸の値が同じコマがある場合、y軸の値が同じコマにおいてx軸の値が小さなコマの順に並べ替える。 FIG. 7A is an example in which the sorting step is performed. The sorting process can be changed as appropriate, but when reading from the upper left to the lower right, first, the frames with the smallest y-axis values are arranged in order. Next, when there are frames having the same y-axis value, the frames having the same y-axis value are sorted in ascending order of the x-axis values.

このように並べ替えることで、図7(B)のような順序とすることができる。ここでは、並べ替えた結果、表示の番号として1〜5の番号を付けている。並べ替え工程では、上記のように表示の番号を付けてもよいし、付けなくてもよい。表示の番号は、例えばスマートフォンなどの携帯端末で抽出されたコマを表示する場合の表示の順番として用いることができる。 By rearranging in this way, the order can be as shown in FIG. 7 (B). Here, as a result of sorting, numbers 1 to 5 are assigned as display numbers. In the sorting step, the display numbers may or may not be assigned as described above. The display number can be used as the display order when displaying the frames extracted by a mobile terminal such as a smartphone.

本実施形態における並び替え工程は、抽出されたコマに対して、横幅を調整する工程を行ってもよい。横幅調整を行うことにより、スマートフォンなどの携帯端末で表示する際に、抽出されたコマが読みやすくなる。図7(B)において、コマBの横幅を基準として、各コマの横幅を調整する例を示す。例えば、コマA、コマEは、横幅がコマBの横幅よりも小さいため、横幅を広げてコマBと同じ横幅にする。このとき、コマA、コマEの縦と横の比(アスペクト比)は一定のままで横幅を基準の大きさにすることが好ましい。このようにすることで、コマ内の絵を崩すことなく表示することができる。同様に、コマC、コマDの横幅を基準の大きさに狭める。 In the rearrangement step in the present embodiment, a step of adjusting the width of the extracted frames may be performed. By adjusting the width, the extracted frames can be easily read when displayed on a mobile terminal such as a smartphone. FIG. 7B shows an example of adjusting the width of each frame with reference to the width of frame B. For example, since the width of the frame A and the frame E is smaller than the width of the frame B, the width is widened to be the same width as the frame B. At this time, it is preferable that the aspect ratio of the frames A and E remains constant and the width is set to the reference size. By doing so, the picture in the frame can be displayed without being destroyed. Similarly, the widths of the frames C and D are narrowed to the reference size.

本実施形態においては、横幅調整は必須ではなく、適宜実施すればよい。必要に応じて、横幅を調整するのではなく、基準の大きさに足りない箇所を黒塗りしてもよい。例えば、基準の横幅(コマBの横幅)よりも横幅が小さいコマEにおいて、横幅を大きくせずに、基準の横幅に足りない部分を黒塗りにしてもよい。この場合の例を図7(C)に示す。このようにすることで、小さいコマが拡大されすぎて、かえって見えにくくなることを防ぐことができる。なお、黒塗りでなくても、白塗りなど他の色を用いてもよい。 In the present embodiment, the width adjustment is not essential and may be performed as appropriate. If necessary, instead of adjusting the width, the part that is not the standard size may be painted black. For example, in the frame E whose width is smaller than the reference width (width of frame B), the portion insufficient in the reference width may be painted black without increasing the width. An example of this case is shown in FIG. 7 (C). By doing so, it is possible to prevent a small frame from being enlarged too much and becoming difficult to see. It should be noted that other colors such as white paint may be used instead of black paint.

本実施形態においては、左上から右下へ読み進めていく漫画画像に限られるものではなく、右上から左下へ読み進めていく漫画画像であってもよい。この場合の例について図8を用いて説明する。図8は、図6と同様の図であり、漫画画像10に対してコマ抽出を行い、並べ替えを行い、横幅を調整したものである。 The present embodiment is not limited to the cartoon image that is read from the upper left to the lower right, and may be a cartoon image that is read from the upper right to the lower left. An example in this case will be described with reference to FIG. FIG. 8 is a diagram similar to that of FIG. 6, in which frame extraction is performed on the cartoon image 10, rearrangement is performed, and the width is adjusted.

ここで、図8では、各コマにおける右上の点をa〜eとし、それぞれの値は、x1<x2<x3であり、y1<y2<y3である。並べ替えの処理は、適宜変更することが可能であるが、右上から左下へ読み進める場合、まず、y軸の値の小さなコマの順に並べる。次いで、y軸の値が同じコマがある場合、y軸の値が同じコマにおいてx軸の値が大きなコマの順に並べ替える。
このように並べ替えることで、図6(C)と同様に、漫画画像を読み進める方向に沿うような順序とすることができる。
このように、本実施形態では、右上から左下へ読み進める漫画画像であっても、コマ抽出して並べ替えることが可能となる。
Here, in FIG. 8, the upper right points in each frame are a to e, and the respective values are x1 <x2 <x3 and y1 <y2 <y3. The sorting process can be changed as appropriate, but when reading from the upper right to the lower left, first, the frames with the smallest y-axis values are arranged in order. Next, when there are frames having the same y-axis value, the frames having the same y-axis value are sorted in descending order of the x-axis value.
By rearranging in this way, the order can be set along the direction in which the cartoon images are read, as in FIG. 6C.
As described above, in the present embodiment, even a cartoon image that is read from the upper right to the lower left can be frame-extracted and rearranged.

並び替え工程においては、小さすぎるコマはノイズとして除去するようにしてもよい。「小さすぎるコマ」としては、例えば、絵の一部に矩形領域が描かれており、この矩形領域が抽出されてしまった場合などが想定される。 In the rearrangement process, frames that are too small may be removed as noise. As the "too small frame", for example, a case where a rectangular area is drawn in a part of the picture and this rectangular area is extracted is assumed.

ノイズとして除去するコマの大きさとしては、適宜変更することが可能であり、例えば、横幅が漫画画像の横幅の1/5以下であるコマを除去の対象としてもよい。なお、正規化した場合は、横幅が正規化後の漫画画像の横幅の1/5以下であるコマを除去の対象としてもよい。ノイズとして除去することにより、不要な画像が取り除かれ、漫画画像が読みやすくなる。 The size of the frame to be removed as noise can be changed as appropriate. For example, a frame having a width of 1/5 or less of the width of the cartoon image may be removed. When normalized, frames whose width is 1/5 or less of the width of the normalized cartoon image may be removed. By removing it as noise, unnecessary images are removed and the cartoon image becomes easier to read.

10 漫画画像
20 枠線
30 クラスタリング領域
10 cartoon image 20 border 30 clustering area

Claims (9)

漫画画像を黒色と白色に二値化する二値化工程と、
前記漫画画像に対して輪郭抽出を行い、前記漫画画像における枠線で囲まれた領域をコマとして抽出する第1の抽出工程と、
前記漫画画像における、前記第1の抽出工程によって前記コマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングするクラスタリング工程と、
前記クラスタリングされた各領域を矩形領域とし、該矩形領域をコマとして抽出する第2の抽出工程と、を有することを特徴とするコマ抽出方法。
The binarization process that binarizes the cartoon image into black and white,
The first extraction step of extracting the outline of the cartoon image and extracting the area surrounded by the frame in the cartoon image as a frame, and
A clustering step of clustering black regions with respect to the remaining regions not extracted as the frames by the first extraction step in the cartoon image.
A frame extraction method comprising: a second extraction step of extracting each of the clustered regions as a rectangular region and extracting the rectangular region as a coma.
前記クラスタリング工程は、DBSCAN(Density based spatial clustering of applications with noise)により行うことを特徴とする請求項1に記載のコマ抽出方法。 The frame extraction method according to claim 1, wherein the clustering step is performed by DBSCAN (Density based spatial clustering of applications with noise). 前記二値化工程は、HSV色空間に変換して二値化することを特徴とする請求項1又は2に記載のコマ抽出方法。 The frame extraction method according to claim 1 or 2, wherein the binarization step is converted into an HSV color space and binarized. 前記輪郭抽出は、領域成長法又は領域統合法により行うことを特徴とする請求項1〜3のいずれかに記載のコマ抽出方法。 The frame extraction method according to any one of claims 1 to 3, wherein the contour extraction is performed by a region growth method or a region integration method. 前記二値化工程の後であり、かつ、前記第1の抽出工程の前に、前記漫画画像に対してハフ変換を行い、直線が検出されるかどうかを判定する直線判定工程を有し、
前記直線判定工程において直線が検出されたと判定された場合、前記第1の抽出工程、前記クラスタリング工程及び前記第2の抽出工程を行うことを特徴とする請求項1〜4のいずれかに記載のコマ抽出方法。
It has a straight line determination step of determining whether or not a straight line is detected by performing a Hough transform on the cartoon image after the binarization step and before the first extraction step.
The method according to any one of claims 1 to 4, wherein when it is determined that a straight line is detected in the straight line determination step, the first extraction step, the clustering step, and the second extraction step are performed. Frame extraction method.
前記二値化工程の前に、前記漫画画像の横幅のサイズを正規化する正規化工程を有することを特徴とする請求項1〜5のいずれかに記載のコマ抽出方法。 The frame extraction method according to any one of claims 1 to 5, further comprising a normalization step of normalizing the width size of the cartoon image before the binarization step. 前記第1の抽出工程及び前記第2の抽出工程によって抽出されたコマを、前記漫画画像におけるコマを読み進める順番に沿うように並び替える並び替え工程を有することを特徴とする請求項1〜6のいずれかに記載のコマ抽出方法。 Claims 1 to 6 include a rearrangement step of rearranging the frames extracted by the first extraction step and the second extraction step so as to read the frames in the cartoon image. The frame extraction method described in any of the above. 前記並び替え工程は、前記第1の抽出工程及び前記第2の抽出工程で抽出されたコマが前記漫画画像の横幅の1/5以下である場合、並び替えの対象外とすることを特徴とする請求項7に記載のコマ抽出方法。 The sorting step is characterized in that when the frames extracted in the first extraction step and the second extraction step are 1/5 or less of the width of the cartoon image, they are excluded from the sorting. The frame extraction method according to claim 7. 漫画画像を黒色と白色に二値化する二値化処理と、
前記漫画画像に対して輪郭抽出を行い、前記漫画画像における枠線で囲まれた領域をコマとして抽出する第1の抽出処理と、
前記漫画画像における、前記第1の抽出処理によって前記コマとして抽出されなかった残りの領域に対して黒色の領域をクラスタリングするクラスタリング処理と、
前記クラスタリングされた各領域を矩形領域とし、該矩形領域をコマとして抽出する第2の抽出処理と、をコンピュータに実行させることを特徴とするプログラム。
Binarization process that binarizes cartoon images into black and white,
The first extraction process of performing contour extraction on the cartoon image and extracting the area surrounded by the frame in the cartoon image as a frame, and
A clustering process for clustering black regions with respect to the remaining regions not extracted as the frames by the first extraction process in the cartoon image.
A program characterized by having a computer execute a second extraction process in which each clustered area is a rectangular area and the rectangular area is extracted as a frame.
JP2019185450A 2019-10-08 2019-10-08 Frame extraction method and program Active JP7370574B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019185450A JP7370574B2 (en) 2019-10-08 2019-10-08 Frame extraction method and program
JP2023133897A JP2023144121A (en) 2019-10-08 2023-08-21 Frame extraction method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019185450A JP7370574B2 (en) 2019-10-08 2019-10-08 Frame extraction method and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2023133897A Division JP2023144121A (en) 2019-10-08 2023-08-21 Frame extraction method and program

Publications (3)

Publication Number Publication Date
JP2021060875A true JP2021060875A (en) 2021-04-15
JP2021060875A5 JP2021060875A5 (en) 2022-09-13
JP7370574B2 JP7370574B2 (en) 2023-10-30

Family

ID=75380271

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2019185450A Active JP7370574B2 (en) 2019-10-08 2019-10-08 Frame extraction method and program
JP2023133897A Pending JP2023144121A (en) 2019-10-08 2023-08-21 Frame extraction method and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2023133897A Pending JP2023144121A (en) 2019-10-08 2023-08-21 Frame extraction method and program

Country Status (1)

Country Link
JP (2) JP7370574B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011128924A (en) * 2009-12-18 2011-06-30 Kddi Corp Comic image analysis apparatus, program, and search apparatus and method for extracting text from comic image
JP2012038286A (en) * 2010-07-13 2012-02-23 Fujifilm Corp Content analyzing apparatus, method and program
JP2013125426A (en) * 2011-12-15 2013-06-24 Fujifilm Corp Content display device, method, and program
JP2014071556A (en) * 2012-09-28 2014-04-21 Hitachi Omron Terminal Solutions Corp Image processor, image processing method, and program
JP2014212476A (en) * 2013-04-19 2014-11-13 富士フイルム株式会社 Comic image frame detection device, method and program
JP2017045219A (en) * 2015-08-26 2017-03-02 北川 悦司 Frame extraction device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011128924A (en) * 2009-12-18 2011-06-30 Kddi Corp Comic image analysis apparatus, program, and search apparatus and method for extracting text from comic image
JP2012038286A (en) * 2010-07-13 2012-02-23 Fujifilm Corp Content analyzing apparatus, method and program
JP2013125426A (en) * 2011-12-15 2013-06-24 Fujifilm Corp Content display device, method, and program
JP2014071556A (en) * 2012-09-28 2014-04-21 Hitachi Omron Terminal Solutions Corp Image processor, image processing method, and program
JP2014212476A (en) * 2013-04-19 2014-11-13 富士フイルム株式会社 Comic image frame detection device, method and program
JP2017045219A (en) * 2015-08-26 2017-03-02 北川 悦司 Frame extraction device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石井 大祐、外4名: ""コミック画像におけるコマの角検出に関する一検討"", 電子情報通信学会技術研究報告, vol. 110, no. 128, JPN6023029239, 8 July 2010 (2010-07-08), JP, pages 33 - 38, ISSN: 0005108211 *

Also Published As

Publication number Publication date
JP2023144121A (en) 2023-10-06
JP7370574B2 (en) 2023-10-30

Similar Documents

Publication Publication Date Title
CN107330979B (en) Vector diagram generation method and device for building house type and terminal
CN113139445B (en) Form recognition method, apparatus, and computer-readable storage medium
US8385651B2 (en) Character recognition device, image-reading device, computer readable medium, and character recognition method
JP4694613B2 (en) Document orientation determination apparatus, document orientation determination method, program, and recording medium therefor
WO2014160433A2 (en) Systems and methods for classifying objects in digital images captured using mobile devices
WO2023284502A1 (en) Image processing method and apparatus, device, and storage medium
CN109993161B (en) Text image rotation correction method and system
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
CN110598566A (en) Image processing method, device, terminal and computer readable storage medium
JP2012199901A (en) Document modification detecting method by character comparison using character shape feature
CN107659799B (en) Image pickup apparatus, image processing method, and storage medium
JP5337563B2 (en) Form recognition method and apparatus
US9235757B1 (en) Fast text detection
CN104156941A (en) Method and system for determining geometric outline area on image
US20150010233A1 (en) Method Of Improving Contrast For Text Extraction And Recognition Applications
JP2016162420A (en) Attention area detection device, attention area detection method and program
CN112507782A (en) Text image recognition method and device
CN103530625A (en) Optical character recognition method based on digital image processing
JP2019528543A (en) Digital object unique identifier (DOI) recognition method and apparatus
JP6122988B1 (en) Image processing apparatus, image processing method, and program
CN115619656A (en) Digital file deviation rectifying method and system
KR20150099116A (en) Method for recognizing a color character using optical character recognition and apparatus thereof
JP2010186246A (en) Image processing apparatus, method, and program
JP7370574B2 (en) Frame extraction method and program
CN116030472A (en) Text coordinate determining method and device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20220810

RD07 Notification of extinguishment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7427

Effective date: 20220817

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20220819

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220901

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220901

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20220817

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230718

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230821

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230912

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230913

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231011

R150 Certificate of patent or registration of utility model

Ref document number: 7370574

Country of ref document: JP

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