JP2018156274A - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP2018156274A JP2018156274A JP2017051509A JP2017051509A JP2018156274A JP 2018156274 A JP2018156274 A JP 2018156274A JP 2017051509 A JP2017051509 A JP 2017051509A JP 2017051509 A JP2017051509 A JP 2017051509A JP 2018156274 A JP2018156274 A JP 2018156274A
- Authority
- JP
- Japan
- Prior art keywords
- feature point
- medium
- contour
- unit
- area
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は画像処理装置、画像処理方法およびプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program.
矩形や円形のような領域を形成する閉図形や、直線のように単体では領域を形成しない開図形の組み合わせ、又は単体によって成る図形の特徴点を抽出する方法が知られている。 There are known methods for extracting feature points of a closed figure that forms an area such as a rectangle or a circle, a combination of open figures that do not form an area such as a straight line, or a figure that is formed of a single piece.
特徴点とは、対象となる図形の輪郭をより簡略的に複数の直線で表現するときに、各直線の端点となる点である。特徴点を抽出することのメリットのひとつに、必要なメモリ容量の軽量化が挙げられる。例えば、図15(a)のような弧を描く図形に対して特徴点を抽出してそれらの特徴点を結ぶことで、図15(b)のように当初の弧を描いている部分を簡略化した図形を得ることが出来、必要なメモリ容量の軽量化が可能になる。 A feature point is a point that becomes an end point of each straight line when the contour of a target graphic is more simply expressed by a plurality of straight lines. One of the merits of extracting feature points is a reduction in the required memory capacity. For example, by extracting feature points from a figure that draws an arc as shown in FIG. 15 (a) and connecting the feature points, the portion where the original arc is drawn as shown in FIG. 15 (b) is simplified. Can be obtained, and the required memory capacity can be reduced.
特徴点抽出をした後に、図形をさらに簡略化する方法として、DP法(Douglas-Peuckerアルゴリズム)(非特許文献1)が知られている。DP法とは注目する2点の特徴点から引いた直線と、2点の特徴点の間にあり且つ上記直線から最も遠い特徴点との距離を閾値と比較し、当該距離が閾値以下の場合に特徴点を間引く処理を再帰的に行い、残った特徴点同士を結ぶことで図形を簡略化する方法である。DP法による間引きの方法については後の段落で詳しく説明する。 A DP method (Douglas-Peucker algorithm) (Non-Patent Document 1) is known as a method for further simplifying a figure after extracting feature points. In the DP method, the distance between a straight line drawn from two feature points of interest and the feature point farthest from the straight line between the two feature points is compared with a threshold value, and the distance is equal to or less than the threshold value. In this method, the figure is simplified by recursively performing the process of thinning out the feature points and connecting the remaining feature points. The thinning method using the DP method will be described in detail in a later paragraph.
DP法のMFP(Multi Function Printer)への適用例として、原稿台に載せられた名刺などの媒体を画像読取装置でスキャニングし、媒体の輪郭をDP法で簡略化した後に回転変換を施し、輪郭に沿って切り取ったものを画像データとして記憶する技術がある。通常、MFPで読み取ったスキャニングデータから矩形を切出す場合、スキャニングデータに含まれる媒体の4隅の頂点の座標を抽出し、媒体領域に対して回転変換を施して媒体の閉輪郭線を画像読取装置の読取方向の主走査方向と副走査方向のいずれか一方をx軸、もう一方をy軸としたときのx軸およびy軸に一致させて、切出した形が一般的な画像データの形式となるよう矩形形状に切出しを行う。通常、名刺のような媒体は長方形形状をしていることから、DP法により4隅に位置する頂点の座標が特徴点として抽出される。 As an example of application of the DP method to an MFP (Multi Function Printer), a medium such as a business card placed on a platen is scanned with an image reading device, and the outline of the medium is simplified by the DP method and then subjected to rotation conversion. There is a technique for storing the image data cut out along the line as image data. Normally, when a rectangle is cut out from scanning data read by the MFP, the coordinates of the four corner vertices of the medium included in the scanning data are extracted, and rotation conversion is performed on the medium area to read the closed contour line of the medium. A general image data format in which one of the main scanning direction and the sub-scanning direction in the reading direction of the apparatus corresponds to the x-axis and the y-axis when the other is the y-axis and is cut out. Cut out into a rectangular shape so that Usually, since a medium such as a business card has a rectangular shape, the coordinates of the vertices located at the four corners are extracted as feature points by the DP method.
抽出する媒体の内角が全て直角であれば、DP法を用いなくとも例えばHarrisアルゴリズムなどにより媒体の4隅の頂点の座標を抽出出来る。しかし、媒体の角が丸みを帯びている場合や折れ曲がっている場合、Harrisアルゴリズムではその箇所について複数個の特徴点を抽出することになる。少なくとも1つの角で複数個の特徴点を抽出した場合、結果として媒体全体では5個以上の特徴点が抽出されることとなり、切出すべき領域として認識されない。5個以上の特徴点が抽出された領域を切出すべき領域として認識しない理由は、隣り合う輪郭線同士の角度が必ずしも直角とならないため、x軸とy軸に一致させる輪郭線が定まらず、正確性の高い回転変換を行うことが出来ないからである。 If the interior angles of the medium to be extracted are all right angles, the coordinates of the vertices at the four corners of the medium can be extracted by, for example, the Harris algorithm without using the DP method. However, if the corner of the medium is rounded or bent, the Harris algorithm will extract a plurality of feature points for that location. When a plurality of feature points are extracted at at least one corner, as a result, five or more feature points are extracted from the entire medium, and are not recognized as an area to be cut out. The reason why the region where five or more feature points are extracted is not recognized as a region to be cut out is that the angle between adjacent contours is not necessarily a right angle, so that the contour line that matches the x axis and the y axis is not determined. This is because highly accurate rotation conversion cannot be performed.
そこで、隅が丸みを帯びている媒体や折れ曲がっている媒体にDP法を施すことで輪郭を簡略化し、頂点の代わりとなる4点の特徴点を抽出することで、切出すべき領域として認識することが可能になる。 Therefore, the DP method is applied to a medium with rounded corners or a bent medium, the outline is simplified, and four feature points instead of the vertices are extracted, so that it is recognized as an area to be cut out. It becomes possible.
しかしながら、MFPでスキャニングをするときのユーザの意図は、媒体を簡略化したものをスキャニングするのではなく媒体全体を抜け落ちのないようにスキャニングすることである。DP法によって角が丸みを帯びている媒体から4つの特徴点を媒体の頂点として抽出する場合、丸みを帯びている部分については、丸みを帯びている輪郭線上の1点が特徴点として抽出される。4つの特徴点の中に丸みを帯びた角の輪郭線上の点が1つでも含まれる場合、4つの特徴点を結んだ領域から媒体の領域がはみ出してしまい、媒体の本来の領域を全て含んだ領域を抽出することが出来ない。
本発明は、矩形に近い形状の画像データを媒体の画像データとして切出すことを目的とする。
However, the user's intention when scanning with the MFP is not to scan a simplified medium but to scan the entire medium so that it does not fall out. When four feature points are extracted from a medium with rounded corners as a vertex of the medium by DP method, one point on the rounded outline is extracted as a feature point for the rounded part. The If any one of the four feature points on the outline of a rounded corner is included, the area of the medium protrudes from the area connecting the four feature points, and all the original areas of the medium are included. Cannot extract the area.
An object of the present invention is to cut out image data having a shape close to a rectangle as image data of a medium.
上述した課題を解決するために、本発明における画像処理装置は、媒体を含む領域を読み取って得られた画像データに含まれるエッジ画素を抽出するエッジ抽出部と、エッジ画素の集合によって表されるエッジの内、媒体の輪郭に相当する閉輪郭線を抽出する輪郭線抽出部と、閉輪郭線上の第一の特徴点を抽出する第一特徴点抽出部と、閉輪郭線上の第一の特徴点の周辺に位置するエッジ画素を削除して、閉輪郭線を複数の輪郭線に分割する輪郭線分割部と、分割された各輪郭線の延長線上の交点となる第二の特徴点を夫々抽出する第二特徴点抽出部と、各第二の特徴点同士を結んで得られる領域を切出す切出部と、を備える。 In order to solve the above-described problem, the image processing apparatus according to the present invention is represented by an edge extraction unit that extracts edge pixels included in image data obtained by reading an area including a medium, and a set of edge pixels. Of the edges, a contour extraction unit that extracts a closed contour corresponding to the contour of the medium, a first feature point extraction unit that extracts a first feature point on the closed contour, and a first feature on the closed contour The edge pixel located around the point is deleted, and a contour dividing unit that divides the closed contour into a plurality of contours, and a second feature point that is an intersection point on the extension line of each divided contour line, respectively. A second feature point extracting unit for extracting; and a cutout unit for cutting out a region obtained by connecting the second feature points.
本発明によれば、矩形に近い形状の画像データを媒体の画像データとして切出すことが可能となる。 According to the present invention, it is possible to cut out image data having a shape close to a rectangle as image data of a medium.
DP法についてフローチャートを用いて詳しく説明する。DP法は輪郭線上に存在する特徴点の抽出を終えた図形に対して施す処理であり、以下のフローでは既に特徴点の抽出を終えている状態を仮定して説明する。また、本実施形態で説明するフローはDP法を用いた特徴点の間引きの一例であり、DP法を用いた特徴点の間引きは本実施形態におけるフローに限定されるものではない。 The DP method will be described in detail using a flowchart. The DP method is a process applied to a figure for which feature points existing on the contour line have been extracted, and the following flow will be described assuming that the feature points have already been extracted. The flow described in this embodiment is an example of thinning out feature points using the DP method, and thinning out feature points using the DP method is not limited to the flow in this embodiment.
図1は開図形に対してDP法による特徴点の間引きを行うときのフローの一例である。本実施形態における開図形とは、2つ以上の端点が存在する図形であり、図1では2つの端点が存在する図形を例に挙げている。S101では、開図形の両端点を結ぶ直線を引く。これは、DP法が2つの特徴点の間に位置する特徴点に対して再帰的に処理を行う性質があることから、両端点を選択しなかった場合に、その2つの特徴点よりも端部に位置する特徴点に対してDP法を適用することが出来ないためである。開図形の両端点の特徴点は間引きされることがないため、それぞれ間引き後の特徴点となる。DP法では、順次、間引き後の特徴点を決定していき、最終的な間引き後の図形は間引き後の特徴点を結んだものとなる。 FIG. 1 is an example of a flow when thinning out feature points by the DP method for an open figure. The open figure in the present embodiment is a figure having two or more end points. In FIG. 1, a figure having two end points is taken as an example. In S101, a straight line connecting both end points of the open figure is drawn. This is because the DP method has a property of recursively processing a feature point located between two feature points, and therefore, if both end points are not selected, the end point is higher than the two feature points. This is because the DP method cannot be applied to the feature points located in the part. Since the feature points at both end points of the open figure are not thinned out, they become feature points after thinning out. In the DP method, feature points after thinning are sequentially determined, and the final figure after thinning is obtained by connecting the feature points after thinning.
S102では、選択された2つの特徴点を結ぶ線図の間に位置し、2つの特徴点を結んだ直線から最も距離が遠い特徴点を抽出する。S103では、S102で抽出した特徴点と、2つの特徴点を結んだ直線との距離を算出し、所定の閾値と比較する。S102で抽出した特徴点と、2つの特徴点を結んだ直線との距離が閾値よりも大きい場合はS104に進み、抽出した特徴点を間引き後の特徴点の1つとして決定する。S105では、S104で新しく抽出された特徴点と、元の2つの特徴点のいずれか一方を新たに2つの特徴点として選択し、それらを結ぶ直線を引き、S102に戻る。このとき元の2つの特徴点を結んだ直線は削除する。DP法による特徴点の間引きは閾値に依存しており、閾値を大きく設定すれば間引きが行われやすくなり、より簡略化された図形を得やすくなる。閾値を小さく設定すれば間引きが行われにくくなり、より元の図形に近い形の図形を得やすくなる。S102で抽出した特徴点と、2つの特徴点を結んだ直線との距離が閾値よりも小さい場合はS106へ進み、2つの特徴点の間の区間に終了フラグを付与する。終了フラグが付与された区間に位置する特徴点は以後間引き後の特徴点として設定されず、終了フラグが付与された時点で間引き区間として決定される。 In S <b> 102, a feature point that is located between a diagram that connects two selected feature points and that is farthest from a straight line that connects the two feature points is extracted. In S103, the distance between the feature point extracted in S102 and the straight line connecting the two feature points is calculated and compared with a predetermined threshold value. If the distance between the feature point extracted in S102 and the straight line connecting the two feature points is larger than the threshold, the process proceeds to S104, and the extracted feature point is determined as one of the feature points after thinning. In S105, the feature point newly extracted in S104 and one of the original two feature points are newly selected as two feature points, a straight line connecting them is drawn, and the process returns to S102. At this time, the straight line connecting the two original feature points is deleted. The thinning out of the feature points by the DP method depends on the threshold value, and if the threshold value is set large, the thinning out is easily performed, and a more simplified figure can be easily obtained. If the threshold value is set small, it is difficult to perform thinning, and it becomes easier to obtain a figure that is closer to the original figure. If the distance between the feature point extracted in S102 and the straight line connecting the two feature points is smaller than the threshold value, the process proceeds to S106, and an end flag is assigned to the section between the two feature points. The feature points located in the section to which the end flag is assigned are not set as the feature points after the thinning, and are determined as the thinning section when the end flag is given.
S106で終了フラグを付与したらS107へ進み、全ての区間に終了フラグが付与されているか否かを判断する。全ての区間に終了フラグが付与されている場合(S107、Yes)はフローを終了する。終了フラグが付与されていない区間が残っている場合(S107、No)はS108へ進む。S108では、終了フラグが付与されていない区間の両端点を結ぶ直線を引き、S102に戻る。以上の処理を繰り返し行い、S107で全ての区間に終了フラグが付与されていると判定されたときにフローを終了する。フローの終了後に抽出された特徴点および直線が、DP法による間引き後の開図形となる。 If the end flag is assigned in S106, the process proceeds to S107, and it is determined whether or not the end flag is assigned to all the sections. If the end flag is assigned to all the sections (S107, Yes), the flow ends. If there is still a section to which the end flag is not assigned (S107, No), the process proceeds to S108. In S108, a straight line connecting both end points of the section to which no end flag is assigned is drawn, and the process returns to S102. The above process is repeated, and when it is determined in S107 that end flags are assigned to all the sections, the flow ends. The feature points and straight lines extracted after the end of the flow become an open figure after thinning by the DP method.
図2は閉図形に対してDP法による特徴点の間引きを行うときのフローの一例である。本実施形態における閉図形とは、端点が存在しない図形である。基本的なフローは開図形の場合と同様であるが、初めに図形を分割する点で開図形の場合と異なる。S201では閉図形を2つの開図形に分割する。分割方法の一例として、図形の左上端の特徴点と右下端の特徴点のように、ある程度の距離を隔てて位置する2点を抽出する。S201で2つの開図形に分割したら、それらの内の片方を選択してS202に進む。S202〜S209までのフローはS101〜S108までのフローと同様であるため、ここでは重複する説明を省略する。 FIG. 2 shows an example of a flow when thinning out feature points by the DP method for a closed figure. The closed figure in the present embodiment is a figure having no end point. The basic flow is the same as in the case of the open figure, but differs from the case of the open figure in that the figure is first divided. In S201, the closed figure is divided into two open figures. As an example of the dividing method, two points located at a certain distance are extracted, such as a feature point at the upper left corner of the figure and a feature point at the lower right corner. If it is divided into two open figures in S201, one of them is selected and the process proceeds to S202. Since the flow from S202 to S209 is the same as the flow from S101 to S108, redundant description is omitted here.
S208で全ての区間に終了フラグが付与されている場合(S208、Yes)、S210に進み、全ての開図形に対して終了フラグが付与されているか否かを判断する。全ての開図形に対して終了フラグが付与されていない場合(S210、No)はS202へ戻り、終了フラグが付与されていない開図形に対してS202〜S209のフローを適用する。全ての開図形に対して終了フラグが付与されている場合(S210、Yes)はS211へ進む。S211では、S201で分割したときの端点同士を繋ぎ合わせる処理を行う。フローの終了後に抽出された特徴点および直線が、DP法による間引き後の閉図形となる。 When the end flag is assigned to all the sections in S208 (S208, Yes), the process proceeds to S210, and it is determined whether or not the end flag is assigned to all the open figures. When the end flag is not assigned to all the open figures (S210, No), the process returns to S202, and the flow of S202 to S209 is applied to the open figure to which no end flag is assigned. When the end flag is assigned to all the open figures (S210, Yes), the process proceeds to S211. In S211, a process of connecting the end points obtained in S201 is performed. The feature points and straight lines extracted after the end of the flow become a closed figure after thinning by the DP method.
図1のフローを適用した例について図面を用いて説明する。以下では図1のどのフローに相当するかを括弧書きで記している。図3(a)は実線で表される開図形と、DP法を適用する前の特徴点a〜gを表している。DP法を適用する前の特徴点a〜gは、例えばHarrisアルゴリズムによって求められる。図1のフローに沿って、この開図形に対してDP法を適用する。まず初めに端点である特徴点aと特徴点gを直線で結び(S101)、2つの特徴点の間にあり、かつ結んだ直線から最も遠い距離にある特徴点eを抽出する(S102)。次に、図3(b)に図示するように、直線agと特徴点eとの距離α1を閾値と比較し(S103)、距離α1が閾値よりも大きかった場合は特徴点eを間引き後の特徴点(間引き後に残る特徴点)として決定する(S104)。ここでは、距離α1が閾値よりも大きかったと仮定し(S103、Yes)、特徴点eは間引き後の特徴点の1つとして設定される。 An example to which the flow of FIG. 1 is applied will be described with reference to the drawings. In the following, the flow corresponding to FIG. 1 is shown in parentheses. FIG. 3A shows an open figure represented by a solid line and feature points a to g before applying the DP method. The feature points a to g before applying the DP method are obtained by, for example, the Harris algorithm. The DP method is applied to this open figure along the flow of FIG. First, feature points a and g, which are end points, are connected by a straight line (S101), and a feature point e that is located between the two feature points and is farthest from the connected straight line is extracted (S102). Next, as shown in FIG. 3B, the distance α1 between the straight line ag and the feature point e is compared with a threshold value (S103). If the distance α1 is larger than the threshold value, the feature point e is thinned out. It is determined as a feature point (a feature point remaining after thinning) (S104). Here, it is assumed that the distance α1 is larger than the threshold (S103, Yes), and the feature point e is set as one of the feature points after thinning.
次に、図3(c)に図示するように、抽出した特徴点eと先の直線agの一端に位置する特徴点gを選択し、直線egを引き(S105)、特徴点eと特徴点gの間にあり、且つ直線egから最も遠い特徴点fと直線egとの距離α2を閾値と比較する。ここでは、距離α2が閾値よりも小さかったと仮定し(S103、No)、特徴点eと特徴点gとの間の区間に終了フラグを付与する(S106)。終了フラグが付与された区間に位置する特徴点fについては削除する。次に、全ての区間に終了フラグが付与されたか否かを判定する(S107)。ここでは特徴点aから特徴点eまでの区間に終了フラグが付与されていないため(S107、No)、図3(d)に図示するように、終了フラグが付与されていない区間の端点である特徴点aと特徴点eとを結ぶ直線aeを引き(S108)、特徴点aと特徴点eの間の区間にも同様にDP法による間引きを行う。最終的に図3(e)に図示するように、特徴点cおよび特徴点fを間引いた図形が得られる。以上がDP法による特徴点の間引き方法に関する説明である。 Next, as shown in FIG. 3C, the extracted feature point e and the feature point g positioned at one end of the previous straight line ag are selected, and the straight line eg is drawn (S105). The distance α2 between the feature point f that is between g and farthest from the straight line eg and the straight line eg is compared with a threshold value. Here, it is assumed that the distance α2 is smaller than the threshold value (S103, No), and an end flag is assigned to the section between the feature point e and the feature point g (S106). The feature point f located in the section to which the end flag is assigned is deleted. Next, it is determined whether or not an end flag has been assigned to all the sections (S107). Here, since the end flag is not given to the section from the feature point a to the feature point e (S107, No), as shown in FIG. 3D, it is the end point of the section where the end flag is not given. A straight line ae that connects the feature point a and the feature point e is drawn (S108), and the section between the feature point a and the feature point e is similarly thinned by the DP method. Finally, as shown in FIG. 3E, a figure obtained by thinning out the feature point c and the feature point f is obtained. This completes the description of the method for thinning out feature points by the DP method.
図4は本実施形態における画像処理装置100のハードウェア構成の一例について説明する図である。本実施形態における画像処理装置100は、CPU101、RAM102、ROM103、画像読取装置104(読取部)、記憶装置105、外部I/F106、入出力I/F107がそれぞれバス108を介して接続されている。
FIG. 4 is a diagram illustrating an example of a hardware configuration of the image processing apparatus 100 according to the present embodiment. In the image processing apparatus 100 according to this embodiment, a
CPU101は、画像処理装置100における演算処理装置であり、制御プログラムを実行することで画像処理装置100全体の動作の制御を行う。RAM102は、情報を高速で読み書きするための揮発性の記憶媒体であり、CPU101が制御プログラムを実行する際のワークエリアとして機能する。ROM103は制御プログラムが記憶されている読み出し専用の不揮発性の記憶媒体である。
The
画像読取装置104は原稿台の上にセットされた対象物をラインセンサで読み取った画像信号を、R(レッド)、G(グリーン)、B(ブルー)の画像データ(RGBデータ)に変換して出力する。RGBデータは、各画素のR、G、Bの値を夫々0〜255の整数値で表現したものである。画像読取装置104はデフォルトの状態で読み取るサイズが決められており、例えばデフォルトの読み取りサイズよりも小さい、名刺サイズの媒体が原稿台にセットされている場合であっても、入出力I/F107から特別な指示がない場合は、画像読取装置104はデフォルトの読み取りサイズで媒体を読み取る。デフォルトの読み取りサイズはA4サイズに設定されるのが一般的である。画像読取装置104は、原稿台の上に何も置かれていない部分については圧板を読み取ることになり、圧板部分に該当する画素には白色を表すRGB値が与えられる。
The
記憶装置105は、例えばHDD(Hard Disk Drive)であって、情報の読み書きが可能な大容量の不揮発性の記憶媒体であり、制御プログラムや画像データを記憶する。記憶装置105は、SSD(Solid State Drive)などの他の形式の記憶媒体であっても良い。
The
外部I/F106は、LANなどのネットワークに接続するための通信インターフェースであり、PC(Personal Computer)やスマートフォンなどの外部端末に接続される。外部I/F106は受信機能、送信機能を有しており、外部端末から送られてくる情報を受信する他、記憶装置105に記憶された画像データを送信する。
入出力I/F107は、画像処理装置100に対する指示や設定情報等を外部から入力し、画像処理装置100の状態を示す情報等を外部に出力するインターフェースである。入出力I/F107には、マウス、キーボード、タッチパネルディスプレイ等が接続される。
The external I /
The input / output I /
CPU101は、入出力I/F107を介してユーザによって入力された情報を基に、対応する制御プログラムをROM103から読み出してRAM102に展開して実行することにより、対象となるデバイスを制御する。CPU101はPCやスマートフォンのような外部端末からの情報を外部I/F106を通して受け取り、対応する制御プログラムをROM103から読み出して対象となるデバイスを制御することも可能である。また、CPU101の一部の機能をASIC(Application Specific integrated Circuit)のような回路を代わりに用いることで実行しても良い。また、CPU101は複数のハードウェア(マルチCPU)によって成り立つものであっても良い。
The
図5は、本実施形態に係る画像処理装置100の機能構成の一例について説明する図である。画像処理装置100は、画像読取装置104から入力されるRGBデータを処理して、切出画像データを出力する画像処理部201を備えている。画像処理部201はCPU101の命令によりRGBデータの処理を実行するものである。画像処理部201は、後に説明する画像変換部202、エッジ抽出部203、輪郭線抽出部204、特徴点抽出部205、後処理部206を有する。
FIG. 5 is a diagram illustrating an example of a functional configuration of the image processing apparatus 100 according to the present embodiment. The image processing apparatus 100 includes an
画像変換部202は、画像読取装置104で読み取って得たRGBデータをC(シアン)、M(マゼンダ)、Y(イエロー)、K(ブラック)の画像データ(CMYKデータ)に変換する。CMYKデータはRGBデータによって表される画素値を印刷により表現する際の各画素における色材使用量を表すものであり、対象の画素に用いられるCMYKそれぞれの色材量が0〜255までの整数によって表される。CMYKデータへの変換は記憶装置105に記憶されている変換テーブルを用いて行われる。変換テーブルにはRGB値に対応するCMYK値が入力されており、これらの値は定期的なキャリブレーションにより更新される。
The
エッジ抽出部203は、フィルタリング処理によってCMYKの画像データに含まれるエッジを抽出する。フィルタリング処理に使用されるフィルタ係数としては、通常使用されるデフォルトの係数に加え、使用するモードに対応した異なる係数が用意されている。エッジ抽出部203は、注目画素とその周辺画素に対してフィルタリング処理を行い、エッジを構成すると判定された注目画素に対してエッジ画素であることを示す情報を付与する。エッジ抽出部203が抽出するエッジ画素には、媒体中に含まれる文字や図形と地肌部分の境界に相当する画素の他、媒体と圧板との境界の画素がある。本実施形態において、エッジとは連続するエッジ画素によって成り立つ画素の集合体である。
The
輪郭線抽出部204は、非特許文献2に記載されている方法を用いて、エッジ抽出部203によって抽出されたエッジの内、最外周のエッジを媒体の閉輪郭線として抽出する。原稿台の上に複数の媒体が置かれている場合、各媒体の閉輪郭線が抽出される。閉輪郭線で囲まれる領域が複数存在する場合、領域それぞれに対して後段の処理を行う。
The contour
特徴点抽出部205は、輪郭線抽出部204によって抽出された閉輪郭線から、媒体の角部に相当する特徴点を抽出する。本実施形態は矩形又は矩形に近い媒体を検出対象としており、特徴点抽出部205は、媒体の角部とするに最適な位置となる4点の特徴点を抽出する。本実施形態における抽出とは、抽出対象となる点の位置を特定する処理であり、一例としてRAM102や記憶装置105に抽出対象となる点の位置座標を記憶するような処理が挙げられる。最適な位置となる特徴点とは、4点の特徴点を結んだときに得られる四角形の領域内に、媒体の領域が全て含まれるような位置にあり、且つその四角形の領域の面積が最小となる座標に位置する特徴点を意味する。特徴点抽出部205によって抽出された特徴点は後段で説明する後処理部206における処理に用いられる。
The feature
尚、本実施形態における画像処理装置100は、矩形又は矩形に近い媒体を抽出することを目的としており、画像処理装置100は媒体全体を切出すために、切出した形が一般的な画像データの形状である矩形となるように回転変換や輪郭抽出を行う。本実施形態における媒体の切出しとは、画像読取装置104が出力したサイズの画像データから切出し対象となる領域の画像データを選択的に出力することを意味する。特徴点抽出部205によって抽出される特徴点の数が4点となる媒体は、名刺のような一般的に矩形であるもの、又は矩形に近い媒体であるため、後処理部206は検出対象である媒体と判断し、4点の特徴点を結んで得られる四角形に対して処理を行う。特徴点抽出部205によって抽出される特徴点の数が5点以上、又は3点以下となる媒体は、名刺のような一般的に矩形であるもの、又は矩形に近い媒体とは異なるため、後処理部206は検出対象ではない媒体と判断する。特徴点の抽出はDP法によって行われ、対象となる図形を簡略的に表現するときの頂点として抽出される。本実施形態では角が丸い媒体や角の一部が折れ曲がっている媒体のような矩形に近いものも抽出対象としており、これらの媒体はDP法による特徴点の間引きによって4点の特徴点が抽出される。
Note that the image processing apparatus 100 in the present embodiment is intended to extract a rectangle or a medium close to a rectangle, and the image processing apparatus 100 cuts out the entire medium, so that the cut-out shape is a general image data. Rotation conversion and contour extraction are performed so that the shape is a rectangle. In the present embodiment, the term “cutting out the medium” means that image data of a region to be cut out is selectively output from the image data having the size output by the
図6は特徴点抽出部205の機能構成の一例について説明する図である。特徴点抽出部205は、第一特徴点抽出部207で閉輪郭線に対して仮の特徴点を抽出した後に、輪郭線分割部208および第二特徴点抽出部209により最適な位置となる4点の特徴点を抽出する。それぞれの処理について詳しく説明する。
FIG. 6 is a diagram illustrating an example of a functional configuration of the feature
第一特徴点抽出部207は、輪郭線抽出部204によって抽出された閉輪郭線に対してDP法を施し、媒体の輪郭を簡略化するための特徴点を抽出する。図7(a)は矩形の媒体を読み取ったときに第一特徴点抽出部207によって抽出された特徴点R1を示す図の一例であり、図7(b)は角が丸い媒体を読み取ったときに第一特徴点抽出部207によって抽出された特徴点R1を示す図の一例である。図では媒体の隅の1つを拡大したものを示しており、四角で囲まれている領域1つがエッジ抽出部によってエッジ画素として抽出された画素である。エッジ画素の内、斜線で示している画素は第一特徴点抽出部207によって抽出された特徴点R1である。本実施形態では、閉輪郭線をエッジ画素の集合体として扱い、エッジ画素によって成る点の集合体に対してDP法を適用することで特徴点を抽出している。このようにエッジ画素である点をそのまま特徴点として用いることで、改めて特徴点に相当する点を判断する処理の手間を省くことが可能になる。
The first feature
ここで、第一特徴点抽出部207によって間引きされた後の特徴点の最適性について説明する。
図8(a)は矩形の媒体に対してDP法を施した後の特徴点R01〜R04と、それらを結んだ領域Xを示しており、図8(b)は角が丸い媒体に対してDP法を施した後の特徴点R11〜R14と、それらを結んだ領域Xを示している。また、図中の斜線部は媒体領域と特徴点を結んだ領域との差分領域を示している。図中の点線部は媒体の輪郭を示しており、実線部は特徴点を結んだときの輪郭を示している。
矩形の媒体の場合、領域Xに媒体領域が全て含まれており、且つその面積が最小であることから最適な特徴点が抽出されていると言える。
これに対し、角が丸い媒体の場合、DP法によって間引きされた後の特徴点はエッジ上の点であることから、領域Xに媒体領域が収まっておらず、最適な特徴点が抽出されているとは言えない。要するに、DP法のみによって決定した特徴点に基づいて切り出す領域を決定した場合、角が丸い媒体に対しては差分領域の情報を欠落することになってしまう。また、領域Xが矩形ではないため、後処理部206で画像読取装置104における読取方向の主走査方向と副走査方向のいずれか一方をx軸、もう一方をy軸としたときのx軸およびy軸に沿った画像に精度良く回転変換することが出来ない。
Here, the optimality of the feature points after being thinned out by the first feature
FIG. 8A shows feature points R01 to R04 after the DP method is applied to a rectangular medium and a region X connecting them, and FIG. 8B shows a medium having rounded corners. The characteristic points R11 to R14 after the DP method and the region X connecting them are shown. Also, the hatched portion in the figure indicates the difference area between the medium area and the area connecting the feature points. The dotted line portion in the figure shows the outline of the medium, and the solid line portion shows the outline when the feature points are connected.
In the case of a rectangular medium, it can be said that the optimum feature points are extracted because the area X includes all the medium areas and the area is the smallest.
On the other hand, in the case of a medium with rounded corners, since the feature points after thinning out by the DP method are points on the edge, the medium region does not fit in the region X, and the optimum feature points are extracted. I can't say. In short, when a region to be cut out is determined based on a feature point determined only by the DP method, information on the difference region is lost for a medium with rounded corners. Further, since the region X is not rectangular, the
そこで、輪郭線分割部208および第二特徴点抽出部209は、第一特徴点抽出部207によって間引きされた後の4つの特徴点を仮の特徴点として、角が丸い媒体の場合であっても抽出した特徴点が最適なものとなるように新しい4つの特徴点を抽出する。
Therefore, the contour
輪郭線分割部208は、仮の特徴点の周辺に位置するエッジ画素および仮の特徴点を削除し、閉輪郭線をS1〜S4の4つの輪郭線に分割する。本実施形態における仮の特徴点の周辺とは、特徴点から所定の長さの範囲内や、特徴点を中心とするn×n画素の領域を示す。また、本実施形態における閉輪郭線の分割とは、4つの輪郭線をそれぞれ個別のものとして認識している状態を意味する。
図9は、輪郭線分割部208による角が丸い場合の媒体の閉輪郭線の分割方法の一例を説明する図である。
輪郭線分割部208は、第一特徴点抽出部207によって抽出された仮の特徴点の周辺に位置する、閉輪郭線を構成するエッジ画素を削除する。仮の特徴点の周辺のエッジ画素が削除されたことにより、丸い角の部分に相当するエッジ画素が削除される。図で、色の無いエッジ画素は削除されるエッジ画素であり、網点模様によって塗られているエッジ画素は削除後に残っているエッジ画素であり、これらのエッジ画素の集合が分割された輪郭線に相当する。図では上辺の輪郭線がS1、右辺の輪郭線がS2に相当し、図9には示されていないが、下辺の輪郭線がS3、左辺の輪郭線がS4となる。また、図では、仮の特徴点を中心とする17×17画素分の領域に含まれるエッジ画素を削除しているが、削除する領域は適宜調整することが可能である。例えば、削除する領域を大きくすることで丸い角に位置するエッジ画素を確実に削除することが出来るようになるが、読み取る媒体が小さい場合には角に位置するエッジ画素以外の画素も削除してしまい、閉輪郭線を正確に4つに分割出来なくなる可能性がある。逆に、削除する領域を小さくすることで小さい媒体であっても閉輪郭線を正確に4つに分割することが出来るようになるが、角の丸い部分に位置するエッジ画素を削除しきれない可能性がある。デフォルト値以外への調整は入出力I/F107を通してユーザによって行われる。本実施形態におけるエッジ画素の削除とはエッジ画素であることを示す情報を削除することで、エッジ画素と認識されないようにすることを意味する。また、後段の処理において削除対象のエッジ画素が後段の処理でエッジ画素と認識されないように、付加情報を削除対象のエッジ画素に加えるようなものであっても良い。
The
FIG. 9 is a diagram for explaining an example of a method for dividing the closed contour line of the medium when the
The
第二特徴点抽出部209は、分割した4つの輪郭線S1〜S4の直線方程式をそれぞれ導出し、図10に図示するように輪郭線S1および輪郭線S2の延長線上の交点R1´の座標を導出する。図では交点R1´を縦線のハッチングで表しており、本実施形態における最適な特徴点に該当する。直線方程式の導出は分割したエッジの1つに含まれるエッジ画素の何点かをランダムに選択し、それらのエッジ画素の座標に対して最小二乗法を用いることにより行われる。分割した4つの輪郭線S1〜S4の延長線上の4つの交点R1´〜R4´が最適な4つの特徴点となる。尚、直線方程式は多少の誤差が生じるため、輪郭線S1〜S4は必ずしも垂直方向に交差するわけではなく、略垂直方向に交差するものであれば良い。
The second feature
図11は角が丸い媒体に対し、第二特徴点抽出部209によって抽出された特徴点R1´〜R4´の最適性を説明する図である。図で、点線で囲まれた領域は媒体領域を示しており、実線で囲まれた領域は特徴点R1´〜R4´によって囲まれた領域X´を示している。この領域は媒体領域を全て含んでおり、且つその領域面積は最小又は最小に近い状態である。尚、直線方程式は多少の誤差が生じることから、媒体領域が領域X´から若干はみ出てしまう場合であっても、特徴点R1´〜R4´は最適な特徴点であるとみなす。このように、本実施形態における特徴点抽出部205は、DP法によって間引いて得た特徴点を仮の特徴点として設定し、そこから最適な特徴点を抽出する。特徴点抽出部205によって抽出された最適な特徴点R1´〜R4´の座標を基に、後処理部206で領域補完、回転変換、および切出しが行われる。
FIG. 11 is a diagram illustrating the optimality of the feature points R1 ′ to R4 ′ extracted by the second feature
図12は後処理部206の機能構成の一例について説明する図である。後処理部206は、抽出される特徴点の数が4点となる媒体の4点の特徴点を結んで得られる四角形に対して処理を行う。まず、判断部210で処理対象となる媒体を判断し、領域補完部211で領域X´の内、特定の領域に対して画素を補完し、スキュー補正部212でアフィン変換による回転変換を行い、切出部213で補正された媒体領域を含む領域を切出して切出画像データとして出力する。本実施形態における補完とは、対象となる画素の画素値を別の画素値で置き換えることを意味する。また、本実施形態における補完は置き換える前の画素値と置き換えた後の画素値が同一となる場合も含む。それぞれの処理について詳しく説明する。
FIG. 12 is a diagram for explaining an example of the functional configuration of the
判断部210は、特徴点が4点となる媒体を抽出する。領域補完部211は、判断部210によって抽出された媒体を対象とし、特徴点抽出部205によって抽出された最適な特徴点を結んで得られる矩形領域内であり、媒体領域と重なっていない差分領域に対して領域補完を行う。領域補完部211による差分領域の補完方法の例としては、差分領域に含まれる画素に対し、媒体領域内に位置し、且つ差分領域の周辺に位置する画素の画素値を適用する方法や、差分領域に含まれる画素に対し透過領域であることを示す画素値を適用して差分領域を透過領域とする方法が挙げられる。
差分領域を透過領域として補完する場合、あらかじめ決められている画素値を差分領域に含まれる画素に対して割り振る。透過領域による画素値の補完は、あらかじめ記憶されている複数の画素値から1つを選択して行うものであっても良い。その他、補間を行わないものであっても良い。領域補完部211による差分領域の補間方法はあらかじめROM103に設定しておく他、ユーザが任意の方法を選択するものであっても良い。
図13は差分領域の補完方法をユーザに選択させる操作画面の一例である。領域補完部211は、差分領域の補完方法をユーザに選択させることができる。ユーザは所望の処理を選択することで差分領域に対して所定の処理を施すことが出来る。
The
When complementing a difference area as a transparent area, a predetermined pixel value is allocated to pixels included in the difference area. The pixel value complementation by the transmissive region may be performed by selecting one of a plurality of pixel values stored in advance. Other than that, interpolation may not be performed. The interpolation method of the difference area by the
FIG. 13 is an example of an operation screen that allows the user to select a difference region complementing method. The
スキュー補正部212は、特徴点抽出部205によって抽出された4つの特徴点を結んで得られる領域X´に対してアフィン変換による回転変換を行い、画像読取装置104における主走査方向と副走査方向のいずれか一方をx軸、もう一方をy軸としたときのx軸およびy軸に矩形の2辺を一致させる。ただし、4つの特徴点を結んで囲まれた領域の4つの頂点の角度は直角からわずかなズレが想定されるため、必ずしも2辺が一致するものではなく、あらかじめ決められた誤差範囲内で一致するものであれば良い。即ち、スキュー補正部212は、画像読取装置104が出力した矩形状の画像データの隣接する2辺の一方をx軸、他方をy軸とした場合に、領域X´の隣接する2辺が夫々x軸、y軸と実質的に平行になるように、領域X´に対して回転変換を行う。
The
切出部213は、スキュー補正部212によって回転変換を行った画像データから領域X´を切出し、切出画像データとして出力する。切出す領域が複数存在する場合はそれら全てを別々の切出画像データとして出力する。出力先は、記憶装置105や外部I/F106を通して接続される外部端末等である。
The
このように、スキュー補正部212によって回転変換をする四角形の領域は4隅が直角又は略直角であり、回転変換をした後に切り出し部213によって媒体領域が部分的に削除されることがない。また、第二特徴点抽出部209によって最適な特徴点が抽出されるため、DP法によって閉輪郭線を簡略化したときに媒体領域が切り出し部213によって部分的に削除されることがない。
As described above, the quadrangular area whose rotation is converted by the
図14は、本実施形態における一連の処理フローの一例について説明する図である。S301では、エッジ抽出部203が画像読取装置104で取得した画像データに含まれるエッジ画素を抽出する。S302では、輪郭線抽出部204が、S301で抽出したエッジ画素の内、媒体の輪郭に相当するエッジ画素の集合を閉輪郭線として抽出する。S303では、第一特徴点抽出部207が、対象となる閉輪郭線の特徴点を抽出する。S304では、輪郭線分割部208が、閉輪郭線を複数の輪郭線に分割する。S305では、第二特徴点抽出部209が、S304で分割された輪郭線を基に最適な特徴点を抽出する。S306では、領域補完部が、媒体領域と最適な特徴点を結ぶ直線によって囲まれた領域の差分領域を所定の画素によって補完する。S307では、スキュー補正部212が最適な特徴点を結ぶ直線によって囲まれた領域に対して回転変換を施し、切出し部213が回転変換を施した後の領域の切出しを行い、切出画像データを出力する。S308では、切出部213が全ての閉輪郭線集合によって成る領域に対して切出しを行ったか否かを判断し、切出しを行っている場合(S308、Yes)はフローを終了する。切出しを行っていない場合(S308、No)は、S303に戻り、切出しを終えていない閉輪郭線集合に対してS303〜S307のフローを実施する。
FIG. 14 is a diagram illustrating an example of a series of processing flows in the present embodiment. In step S <b> 301, the
以上のように、本実施形態に係る画像処理装置100によれば、エッジ抽出部203は画像読取装置104で取得した画像データからエッジ画素を抽出し、輪郭線抽出部204は取得したエッジ画素の内、媒体の輪郭に相当するエッジ画素の集合を閉輪郭線として抽出し、第一特徴点抽出部207は閉輪郭線の仮の特徴点を抽出し、輪郭線分割部208は閉輪郭線を複数の輪郭線に分割し、第二特徴点抽出部209は分割された輪郭線を基に最適な特徴点を抽出し、領域補完部211は領域を補完し、スキュー補正部212はスキュー補正を行うことで、角が丸い媒体や角が折れ曲がっている媒体であっても本来の媒体領域を損ねることなく画像データとして記憶することが出来る。
As described above, according to the image processing apparatus 100 according to the present embodiment, the
以上、本発明の具体的な実施形態について説明したが、上述した実施形態は本発明の一例を示したものである。本発明は、上述した実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で様々な変形や変更を加えて具体化することができる。 While specific embodiments of the present invention have been described above, the above-described embodiments are examples of the present invention. The present invention is not limited to the above-described embodiments, and can be embodied with various modifications and changes without departing from the scope of the invention in the implementation stage.
上記実施形態の各装置で実行されることにより各機能を実現するプログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、CD−R、メモリカード、DVD(Digital Versatile Disk)、フレキシブルディスク(FD)等のコンピュータで読み取り可能な記憶媒体に記憶されて提供される。
また、上記プログラムをインターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するようにしてもよい。また、上記プログラムをインターネット等のネットワーク経由で提供または配布するようにしてもよい。また、上記プログラムを、ROM等に予め組み込んで提供するようにしてもよい。
A program that realizes each function by being executed by each device of the above embodiment is a file in an installable or executable format, such as a CD-ROM, a CD-R, a memory card, a DVD (Digital Versatile Disk), The program is stored in a computer-readable storage medium such as a flexible disk (FD).
Further, the program may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. The program may be provided or distributed via a network such as the Internet. Further, the program may be provided by being incorporated in advance in a ROM or the like.
〔本発明の実施態様例と作用、効果のまとめ〕
本発明の第一の実施態様に係る画像処理装置100は、媒体を含む領域を読み取って得られた画像データに含まれるエッジ画素を抽出するエッジ抽出部203と、エッジ画素の集合によって表されるエッジの内、媒体の輪郭に相当する閉輪郭線を抽出する輪郭線抽出部204と、閉輪郭線上の第一の特徴点を抽出する第一特徴点抽出部207と、閉輪郭線上の第一の特徴点の周辺に位置するエッジ画素を削除して、閉輪郭線を複数の輪郭線に分割する輪郭線分割部208と、分割された各輪郭線の延長線上の交点となる第二の特徴点を夫々抽出する第二特徴点抽出部209と、各第二の特徴点同士を結んで得られる領域を切出す切出部213と、を備える。
ここで、媒体の代表的な例としては矩形状の名刺である。
本実施態様によれば、角が丸い媒体や角の一部が折れ曲がっている媒体であっても、矩形に近い形状の画像データを媒体の画像データとして切出すことが可能となる。即ち、矩形状の媒体は、その角部が変形しても角部以外の辺が大幅に傾斜することは考えにくい。従って、閉輪郭線上の第一の特徴点の周辺に位置するエッジ画素を削除することにより得られる複数の輪郭線は、変形した角部分を除く媒体の辺に沿って延びる輪郭線を表す。その結果、分割後の各輪郭線を含む直線によって包囲される領域は矩形に近い形状となる。本態様によれば該領域の画像データとして矩形状の画像データを得ることができる。
[Summary of Embodiments, Actions, and Effects of the Present Invention]
The image processing apparatus 100 according to the first embodiment of the present invention is represented by an
Here, a typical example of the medium is a rectangular business card.
According to this embodiment, it is possible to cut out image data having a shape close to a rectangle as image data of a medium even if the medium has rounded corners or a medium in which some of the corners are bent. In other words, it is unlikely that the rectangular medium has a significantly inclined side other than the corner even when the corner is deformed. Therefore, the plurality of contour lines obtained by deleting the edge pixels located around the first feature point on the closed contour line represent contour lines extending along the side of the medium excluding the deformed corner portion. As a result, the region surrounded by the straight line including each divided contour line has a shape close to a rectangle. According to this aspect, rectangular image data can be obtained as the image data of the area.
本発明の第二の実施態様に係る画像処理装置100において、第一特徴点抽出部207は、閉輪郭線を構成するエッジ画素の集合に間引き処理を施すことにより、第一の特徴点を抽出する。
エッジ画素の集合に対して間引き処理を施すことにより、媒体の角部を表す適当な一点を機械的に定めることができる。
In the image processing apparatus 100 according to the second embodiment of the present invention, the first feature
By performing a thinning process on the set of edge pixels, an appropriate point representing the corner of the medium can be mechanically determined.
本発明の第三の実施態様に係る画像処理装置100は、各第二の特徴点同士を結んで得られる領域内部であり、媒体の領域と重複しない差分領域の画素を補完する画素補完部(領域補完部211)をさらに備える。
ここで、補完とは対象となる画素の画素値を同一又は別の画素値で置き換えることを意味する。なお、画素値には透過領域を示す画素値を含む。角が丸い媒体の場合、読取部(画像読取装置104)は、差分領域について媒体の画像データを取得できない。本態様においては、利用態様に見合った画素値で差分領域の画素を補完する。
The image processing apparatus 100 according to the third embodiment of the present invention is a pixel complementing unit that complements pixels in a difference area that is inside an area obtained by connecting the second feature points and does not overlap with a medium area ( An area complementing unit 211) is further provided.
Here, the complement means that the pixel value of the target pixel is replaced with the same or different pixel value. Note that the pixel value includes a pixel value indicating a transmissive region. In the case of a medium with rounded corners, the reading unit (image reading device 104) cannot acquire image data of the medium for the difference area. In this mode, the pixels in the difference area are complemented with pixel values that match the usage mode.
本発明の第四の実施態様に係る画像処理装置100において、画素補完部(領域補完部211)は、差分領域の周辺に位置する媒体の領域内の画素に係る画素値を用いて、該差分領域内の画素の画素値を補完する。
本態様によれば、切出部213が出力する切出画像データとして、差分領域の色合いに違和感のない画像データを得ることができる。
In the image processing apparatus 100 according to the fourth embodiment of the present invention, the pixel complementing unit (region complementing unit 211) uses the pixel value relating to the pixel in the region of the medium located around the difference region, and uses the pixel value related to the difference. Complement the pixel values of the pixels in the region.
According to this aspect, as the cut-out image data output from the cut-out
本発明の第五の実施態様に係る画像処理装置100は、各第二の特徴点同士を結んで得られる領域に対して回転変換を行う回転変換部(スキュー補正部212)を更に備え、切出部213は回転変換部によって回転変換された領域を切出す。
各第二の特徴点同士を結んで得られる領域はほぼ矩形の領域であることから、回転変換によって媒体領域が部分的に削除されることがない。本態様によれば、媒体領域が部分的に削除されることなく、ユーザの意図に沿った媒体の切出しが可能になる。
The image processing apparatus 100 according to the fifth embodiment of the present invention further includes a rotation conversion unit (skew correction unit 212) that performs rotation conversion on a region obtained by connecting the second feature points. The
Since the area obtained by connecting the second feature points is a substantially rectangular area, the medium area is not partially deleted by the rotation conversion. According to this aspect, it is possible to cut out the medium in accordance with the user's intention without partially deleting the medium area.
本発明の第六の実施態様に係る画像処理方法は、媒体を含む領域を読み取って得られた画像データを取得し、画像データに含まれるエッジ画素を抽出するエッジ抽出ステップ(S301)と、エッジ画素の集合によって表されるエッジの内、媒体の輪郭に相当する輪郭線を抽出する輪郭線抽出ステップ(S302)と、輪郭線上の第一の特徴点を抽出する第一特徴点抽出ステップ(S303)と、輪郭線上の第一の特徴点の周辺に位置するエッジ画素を削除して、閉輪郭線を複数の輪郭線に分割する輪郭線分割ステップ(S304)と、分割された各輪郭線の延長線上の交点となる第二の特徴点を夫々抽出する第二特徴点抽出ステップ(S305)と、各第二の特徴点同士を結んで得られる領域を切出す切出ステップ(S307)と、を有する。
本態様は、第一の実施態様と同様の作用、効果を奏する。
The image processing method according to the sixth embodiment of the present invention includes an edge extraction step (S301) for acquiring image data obtained by reading an area including a medium and extracting edge pixels included in the image data; A contour extraction step (S302) for extracting a contour line corresponding to the contour of the medium from the edges represented by the set of pixels, and a first feature point extraction step (S303) for extracting the first feature point on the contour line. ), The edge pixel located around the first feature point on the contour line is deleted, and a contour line dividing step (S304) for dividing the closed contour line into a plurality of contour lines, and each of the divided contour lines A second feature point extracting step (S305) for extracting second feature points that are intersections on the extension line, and a cutting step (S307) for cutting out an area obtained by connecting the second feature points to each other; Have .
This aspect has the same operations and effects as the first embodiment.
本発明の第七の実施態様に係る画像処理装置100は、コンピュータに、第六の実施態様に係る画像処理方法を実行させるためのプログラムである。
本態様は、第一の実施態様と同様の作用、効果を奏する。
The image processing apparatus 100 according to the seventh embodiment of the present invention is a program for causing a computer to execute the image processing method according to the sixth embodiment.
This aspect has the same operations and effects as the first embodiment.
100 画像処理装置 101 CPU 102 RAM 103 ROM 104 画像読取装置(読取部) 105 記憶装置 106 外部I/F 107 入力I/F 108 バス 201 画像処理部 202 画像変換部 203 エッジ抽出部 204 輪郭線抽出部 205 特徴点抽出部 206 後処理部 207 第一特頂点抽出部 208 輪郭線分割部 209 第二特徴点抽出部 210 判断部 211 領域補完部 212 スキュー補正部 213 切出部
DESCRIPTION OF SYMBOLS 100
Claims (7)
前記エッジ画素の集合によって表されるエッジの内、前記媒体の輪郭に相当する閉輪郭線を抽出する輪郭線抽出部と、
前記閉輪郭線上の第一の特徴点を抽出する第一特徴点抽出部と、
前記閉輪郭線上の第一の特徴点の周辺に位置するエッジ画素を削除して、前記閉輪郭線を複数の輪郭線に分割する輪郭線分割部と、
前記分割された各輪郭線の延長線上の交点となる第二の特徴点を夫々抽出する第二特徴点抽出部と、
前記各第二の特徴点同士を結んで得られる領域を切出す切出部と、
を備える画像処理装置。 An edge extraction unit that extracts edge pixels included in image data obtained by reading an area including a medium;
A contour extracting unit that extracts a closed contour corresponding to the contour of the medium among the edges represented by the set of edge pixels;
A first feature point extraction unit for extracting a first feature point on the closed contour line;
An edge line dividing unit that deletes edge pixels located around the first feature point on the closed outline and divides the closed outline into a plurality of outlines;
A second feature point extraction unit that extracts second feature points that are intersection points on the extended lines of the divided contour lines, and
A cutout portion for cutting out an area obtained by connecting the second feature points;
An image processing apparatus comprising:
前記切出部は前記回転変換部によって回転変換された領域を切出す請求項1乃至4記載の画像処理装置。 A rotation conversion unit that performs rotation conversion on a region obtained by connecting the second feature points;
The image processing apparatus according to claim 1, wherein the cut-out unit cuts out an area rotationally converted by the rotation conversion unit.
前記エッジ画素の集合によって表されるエッジの内、前記媒体の輪郭に相当する輪郭線を抽出する輪郭線抽出ステップと、
前記輪郭線上の第一の特徴点を抽出する第一特徴点抽出ステップと、
前記輪郭線上の第一の特徴点の周辺に位置するエッジ画素を削除して、前記閉輪郭線を複数の輪郭線に分割する輪郭線分割ステップと、
前記分割された各輪郭線の延長線上の交点となる第二の特徴点を夫々抽出する第二特徴点抽出ステップと、
前記各第二の特徴点同士を結んで得られる領域を切出す切出ステップと、
を有する画像処理方法。 An edge extraction step of acquiring image data obtained by reading an area including a medium and extracting edge pixels included in the image data;
A contour extraction step for extracting a contour corresponding to the contour of the medium from the edges represented by the set of edge pixels;
A first feature point extracting step of extracting a first feature point on the contour line;
An edge dividing step for deleting edge pixels located around the first feature point on the outline and dividing the closed outline into a plurality of outlines;
A second feature point extracting step for extracting each second feature point that is an intersection point on an extension line of each of the divided contour lines;
A step of cutting out a region obtained by connecting the second feature points;
An image processing method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017051509A JP6880867B2 (en) | 2017-03-16 | 2017-03-16 | Image processing equipment, image processing methods and programs |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017051509A JP6880867B2 (en) | 2017-03-16 | 2017-03-16 | Image processing equipment, image processing methods and programs |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018156274A true JP2018156274A (en) | 2018-10-04 |
| JP6880867B2 JP6880867B2 (en) | 2021-06-02 |
Family
ID=63718008
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017051509A Active JP6880867B2 (en) | 2017-03-16 | 2017-03-16 | Image processing equipment, image processing methods and programs |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6880867B2 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111199551A (en) * | 2020-01-06 | 2020-05-26 | 北京农业信息技术研究中心 | A target segmentation method and system for overlapping images of fish |
| CN113313664A (en) * | 2020-02-07 | 2021-08-27 | 财团法人石材暨资源产业研究发展中心 | Stone image analysis method based on stone processing |
| CN115482244A (en) * | 2022-09-14 | 2022-12-16 | 南京索图科技有限公司 | Endoscopic image processing method |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09293142A (en) * | 1996-04-25 | 1997-11-11 | Tec Corp | Method for recognizing article |
| JP2010231431A (en) * | 2009-03-26 | 2010-10-14 | Dainippon Printing Co Ltd | Article related information providing method, apparatus, program, and recording medium |
| JP2016029546A (en) * | 2014-07-25 | 2016-03-03 | 楽天株式会社 | Image processing apparatus, image processing method, and image processing program |
| JP2016126446A (en) * | 2014-12-26 | 2016-07-11 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
| JP2016521890A (en) * | 2013-06-12 | 2016-07-25 | コダック アラリス インク | Document boundary detection method |
-
2017
- 2017-03-16 JP JP2017051509A patent/JP6880867B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09293142A (en) * | 1996-04-25 | 1997-11-11 | Tec Corp | Method for recognizing article |
| JP2010231431A (en) * | 2009-03-26 | 2010-10-14 | Dainippon Printing Co Ltd | Article related information providing method, apparatus, program, and recording medium |
| JP2016521890A (en) * | 2013-06-12 | 2016-07-25 | コダック アラリス インク | Document boundary detection method |
| JP2016029546A (en) * | 2014-07-25 | 2016-03-03 | 楽天株式会社 | Image processing apparatus, image processing method, and image processing program |
| JP2016126446A (en) * | 2014-12-26 | 2016-07-11 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
Non-Patent Citations (2)
| Title |
|---|
| E. SEGAWA, 外2名: ""Minimal region extraction using expanding active contours"", PROCEEDINGS., 11TH IAPR INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION. VOL. III. CONFERENCE C: IMA, JPN6021004153, 30 August 1992 (1992-08-30), pages 688 - 691, ISSN: 0004442843 * |
| 藤尾正和, 外4名: ""文書テンプレート再現のためのPDF文書構造化"", 電子情報通信学会技術研究報告, vol. 第108巻, 第93号, JPN6021004152, 12 June 2008 (2008-06-12), JP, pages 71 - 76, ISSN: 0004442842 * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111199551A (en) * | 2020-01-06 | 2020-05-26 | 北京农业信息技术研究中心 | A target segmentation method and system for overlapping images of fish |
| CN113313664A (en) * | 2020-02-07 | 2021-08-27 | 财团法人石材暨资源产业研究发展中心 | Stone image analysis method based on stone processing |
| CN115482244A (en) * | 2022-09-14 | 2022-12-16 | 南京索图科技有限公司 | Endoscopic image processing method |
| CN115482244B (en) * | 2022-09-14 | 2024-05-07 | 南京索图科技有限公司 | Image processing method under endoscope |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6880867B2 (en) | 2021-06-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10592766B2 (en) | Image processing apparatus and medium storing program executable by image processing apparatus | |
| JP5838984B2 (en) | Image processing apparatus and computer program | |
| US20160005203A1 (en) | Information processing apparatus, information processing method, and storage medium | |
| JP2017151916A (en) | Information processing device,information processing method, and program | |
| JP6880867B2 (en) | Image processing equipment, image processing methods and programs | |
| JP2010074342A (en) | Image processing apparatus, image forming apparatus, and program | |
| JP5335581B2 (en) | Image processing apparatus, image processing method, and program | |
| JP2005045799A (en) | Image quality improvement using partial template matching | |
| JP2009271700A (en) | Image processing apparatus and image processing method | |
| JP6120824B2 (en) | Image processing apparatus, image processing method, and program | |
| JP2018117310A (en) | Scanner, scan control program, and image data generation method | |
| JP2019029884A (en) | Image processing device | |
| JP2019029882A (en) | Image processing device | |
| US20060119897A1 (en) | Output apparatus and program thereof | |
| US20140111828A1 (en) | Image processing apparatus capable of synthesizing form image with aggregate image, method of controlling the same, and storage medium | |
| KR100587979B1 (en) | Boundary and Corner-based Interpolation Methods for Magnifying Images | |
| JP2006352633A (en) | Image processing method and its program | |
| US9342769B2 (en) | Image processing apparatus and image processing method for correcting a line image | |
| JP2010020463A (en) | Line drawing processor, line drawing processing method and program | |
| JP5144356B2 (en) | Image processing apparatus and image processing method | |
| JP6844248B2 (en) | Image processing equipment and computer programs | |
| JP2005196444A (en) | Image data processor, image data processing method and its program | |
| CN111626935B (en) | Pixel map scaling method, game content generation method and device | |
| JP5499727B2 (en) | Image processing apparatus, image processing method, image processing program, and seal manufacturing system | |
| JP5146199B2 (en) | Difference extraction apparatus and difference extraction program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191220 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210201 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210209 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210324 |
|
| 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: 20210406 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210419 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 6880867 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |