JP5562774B2 - Graphic correction device - Google Patents
Graphic correction deviceInfo
- Publication number
- JP5562774B2 JP5562774B2 JP2010205163A JP2010205163A JP5562774B2 JP 5562774 B2 JP5562774 B2 JP 5562774B2 JP 2010205163 A JP2010205163 A JP 2010205163A JP 2010205163 A JP2010205163 A JP 2010205163A JP 5562774 B2 JP5562774 B2 JP 5562774B2
- Authority
- JP
- Japan
- Prior art keywords
- graphic
- correction
- unit
- correction target
- corrected
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
Description
本発明は、平面図形や立体図形の修正処理を行う図形修正装置に関するものである。 The present invention relates to a graphic correction apparatus that performs correction processing of a plane graphic or a three-dimensional graphic.
従来から、平面図形や立体図形を簡単に修正するため、様々な手法が提案されている。これら従来の手法としては、(1)ユーザが入力装置を介して1つの平面図形に対して修正線を入力することにより、修正線に基づいて2次元領域を削り取る又は2次元領域を拡張する第1の手法、(2)ユーザが入力装置を介して複数の平面図形に対して修正線を入力することにより、修正線に基づいて2次元領域を削り取る又は複数の平面図形を接続する第2の手法、あるいは、(3)ユーザが入力装置を介して立体図形に対して修正線を入力することにより、修正線に基づいて3次元領域を削り取る又は3次元領域を拡張する第3の手法などがある。 Conventionally, various methods have been proposed for easily correcting a plane figure and a three-dimensional figure. As these conventional methods, (1) a user inputs a correction line to one plane figure via an input device, and thereby a two-dimensional area is scraped or expanded based on the correction line. (2) A second method in which a user inputs correction lines to a plurality of plane figures via an input device, thereby scraping a two-dimensional region based on the correction lines or connecting a plurality of plane figures. A technique, or (3) a third technique in which a user inputs a correction line to a three-dimensional figure via an input device, thereby scraping or expanding the three-dimensional area based on the correction line. is there.
第1の手法を採用するものとしては、特許文献1がある。特許文献1では、装置が、追加された修正線によって分割された領域の重心を求め、求めた重心によって削り取るか又は拡張するかを判定する。
第2の手法を採用するものとしては、特許文献2がある。特許文献2では、装置が、追加された修正線が同一の平面図形上にあるか異なる平面図形上にあるかを求め、求めた図形と修正指示図形との関係によって領域を削り取るか又は図形を接続するかを判定する。
第3の手法を採用するものとしては、特許文献3がある。特許文献3では、装置が、立体図形に追加された修正線の端点が立体図形内にあるか立体図形外にあるかを求め、求めた立体図形と修正線の端点の関係によって領域を削り取るか拡張するかを判定する。尚、特許文献3では、第1の手法も採用されている。
特許文献1乃至3によれば、ユーザが、修正線を削り取りに使うのか又は拡張に使うのか(あるいは2つの図形を接続するのか)を選ぶ必要がないので、平面図形や立体図形の修正作業が簡便になる。
Japanese Patent Application Laid-Open No. 2004-133826 employs the first method. In
Japanese Patent Laid-Open No. 2004-151867 discloses a method that employs the second method. In
Japanese Patent Laid-Open No. 2004-151867 is one that employs the third method. In
According to
しかしながら、前述の特許文献1乃至3では、いずれも削り取り及び拡張を1つの修正線によって行なうことができないため、直感的な修正作業の妨げになっている。
However, in the above-mentioned
本発明は、前述した問題点に鑑みてなされたものであり、その目的とすることは、1つの修正指示図形の入力に基づいて修正対象図形の削り取り及び拡張を実行する図形修正装置を提供することである。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a graphic correction apparatus that performs cutting and expansion of a graphic to be corrected based on input of one correction instruction graphic. That is.
前述した目的を達成するために、本発明は、修正対象図形を表示し、前記修正対象図形の一部と重畳する修正指示図形の入力に基づいて前記修正対象図形を修正する図形修正装置であって、前記修正指示図形に基づいて前記修正対象図形を複数の分割図形に分割する分割手段と、前記分割図形のいずれか1つを選択図形として選択する選択手段と、前記選択図形を拡張し、前記修正対象図形の修正後の図形である修正後図形とする拡張手段と、前記修正対象図形の内部に存在する孔を抽出する抽出手段と、前記抽出手段によって抽出された孔を前記修正後図形に復元する復元手段と、を備えることを特徴とする図形修正装置である。 In order to achieve the above-described object, the present invention is a graphic correction device that displays a correction target graphic and corrects the correction target graphic based on an input of a correction instruction graphic superimposed on a part of the correction target graphic. Dividing means for dividing the figure to be corrected into a plurality of divided figures based on the correction instruction figure, selection means for selecting one of the divided figures as a selected figure, and expanding the selected figure, An expansion means for making a corrected figure which is a corrected figure of the correction target figure, an extraction means for extracting a hole existing inside the correction target figure, and a hole extracted by the extraction means as the corrected figure And a restoring means for restoring the figure.
本発明により、1つの修正指示図形の入力に基づいて修正対象図形の削り取り及び拡張を実行する図形修正装置を提供することができる。 According to the present invention, it is possible to provide a graphic correction apparatus that performs cutting and expansion of a correction target graphic based on input of one correction instruction graphic.
以下、図面に基づいて、本発明の実施形態を詳細に説明する。
以下では、図形とは、平面図形又は立体図形を意味する。より詳細には、図形とは、直線、曲線、楕円、楕円体、長方形及び直方体などの幾何図形、幾何図形の組み合わせ、並びに、それらの輪郭及び閉領域を意味する。また、処理対象は、画像(静止画像又は動画像)データに含まれる対象物、数値データを可視化することにより得られる画像データに係る注目領域、平面分布図及び空間分布図に係る注目領域など、図形として切り出し可能であれば特に制限はない。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
Below, a figure means a plane figure or a solid figure. More specifically, the figure means a geometric figure such as a straight line, a curve, an ellipse, an ellipsoid, a rectangle and a rectangular parallelepiped, a combination of geometric figures, and their outline and closed region. In addition, the processing target is an object included in image (still image or moving image) data, an attention area related to image data obtained by visualizing numerical data, an attention area related to a plane distribution map and a spatial distribution map, etc. There is no particular limitation as long as it can be cut out as a figure.
最初に、図1を参照しながら、図形修正装置10のハードウエア構成について説明する。尚、図1のハードウエア構成は一例であり、用途、目的に応じて様々な構成を採ることが可能である。 First, the hardware configuration of the graphic correction device 10 will be described with reference to FIG. Note that the hardware configuration in FIG. 1 is an example, and various configurations can be adopted depending on applications and purposes.
図形修正装置10は、図形の修正処理を行うコンピュータである。
図形修正装置10は、CPU(Central Processing Unit)11、主メモリ12、記憶装置13、表示メモリ15、コントローラ16、表示装置17、マウス18、キーボード19等を備え、各部はバス14を介して接続されている。
The graphic correction device 10 is a computer that performs graphic correction processing.
The graphic correction device 10 includes a CPU (Central Processing Unit) 11, a
CPU11は、主メモリ12または記憶装置13等に格納されるプログラムを主メモリ12のRAM上のワークメモリ領域に呼び出して実行し、バス14を介して接続された各部を駆動制御し、図形修正装置10が行う各種処理を実現する。CPU11は、本発明の実施の形態において、図形修正処理を実行する。
The
主メモリ12は、ROM(Read Only Memory)、RAM( Access Memory)等により構成される。ROMは、コンピュータのブートプログラムやBIOS等のプログラム、データ等を恒久的に保持している。また、RAMは、ROM、記憶装置13等からロードしたプログラム、データ等を一時的に保持するとともに、CPU11が各種処理を行う為に使用するワークエリアを備える。
The
記憶装置13は、HDD(ハードディスクドライブ)や他の記録媒体へのデータの読み書きを行う装置であり、CPU11が実行するプログラム、プログラムの実行に必要なデータ、OS(オペレーティングシステム)等が格納される。プログラムに関しては、OSに相当する制御プログラムや、後述する処理を実行するためのアプリケーションプログラムが格納されている。これらの各プログラムコードは、CPU11により必要に応じて読み出されて主メモリ12のRAMに移され、各種の手段として実行される。
The
表示メモリ15は、CPU11から入力される表示データを一時的に蓄積するバッファである。蓄積された表示データは所定のタイミングで表示装置17に出力される。
表示装置17は、液晶パネル、CRTモニタ等のディスプレイ装置と、ディスプレイ装置と連携して表示処理を実行するための論理回路で構成され、表示メモリ15を介してCPU11に接続される。表示装置17はCPU11の制御により表示メモリ15に蓄積された表示データをディスプレイ装置に表示する。
The
The
コントローラ16は、マウス18をバス14に接続させるためのインタフェースであり、マウス18とのデータの送受信を行う。
マウス18、キーボード19は、入力装置であり、ユーザからの指示を受け付けて、データの入力を行う。
ユーザは、表示装置17、マウス18、キーボード19等を使用して対話的に図形修正装置10を操作する。
尚、入力装置は、マウス18、キーボード19に限られず、トラックボール、タッチパネル等であっても良い。
The
The mouse 18 and the keyboard 19 are input devices, and receive data from the user and input data.
The user interactively operates the graphic correction device 10 using the
Note that the input device is not limited to the mouse 18 and the keyboard 19, and may be a trackball, a touch panel, or the like.
<第1の実施の形態>
以下、図2〜図8を参照しながら、第1の実施の形態に係る図形修正装置10aについて説明する。
図形修正装置10aは、内部に孔がない図形を修正対象図形とし、入力される1つの修正指示図形に基づいて、修正対象図形の削り取り及び拡張を行う。
<First Embodiment>
Hereinafter, the graphic correction device 10a according to the first embodiment will be described with reference to FIGS.
The graphic correction device 10a sets a graphic with no hole inside as a correction target graphic, and scrapes and expands the correction target graphic based on one input correction instruction graphic.
以下では、説明を簡単にする為、修正対象図形及び修正指示図形は2値画像とし、各図形を構成する画素を真値(図7等では白として図示)、背景を構成する画素を偽値(図7等では黒として図示)とする。
但し、基になる画像は、グレースケール画像であってもカラー画像であっても良い。
In the following, in order to simplify the description, the correction target graphic and the correction instruction graphic are binary images, the pixels constituting each graphic are true values (shown as white in FIG. 7 and the like), and the pixels constituting the background are false values. (Shown as black in FIG. 7 and the like).
However, the base image may be a gray scale image or a color image.
最初に、図2〜図6を参照しながら、図形修正装置10aの構成及び図形修正処理について説明する。
図2に示すように、図形修正装置10aは、修正対象図形入力部1、表示部2、修正指示図形入力部3、修正部7から構成される。修正部7は、分割部4、選択部5、拡張部6を含む。
図形修正装置10aのコントローラ16、マウス18、キーボード19等は、CPU11による制御によって、修正指示図形入力部3として機能する。図形修正装置10aの表示メモリ15、表示装置17は、CPU11による制御によって、表示部2として機能する。図形修正装置10aのCPU11は、記憶装置13に記憶されているプログラムを主メモリ12のRAMに読み出して実行することにより、修正部7として機能する。
First, the configuration of the graphic correction device 10a and the graphic correction processing will be described with reference to FIGS.
As shown in FIG. 2, the graphic correction device 10 a includes a correction target
The
修正対象図形入力部1は、ユーザがマウス18等の入力装置を介して行う指示に従い、例えば、記憶装置13等に記憶されている修正対象図形を入力し、表示部2、分割部4に出力する。
修正指示図形入力部3は、ユーザがマウス18等の入力装置を介して表示装置17に描画させる修正指示図形を入力し、表示部2、分割部4、拡張部6に出力する。ここで、修正指示図形の一部の領域は、修正対象図形の一部の領域と重畳する(共通の画素を含む。)ものとする。仮に修正指示図形が修正対象図形と重畳しない場合、修正対象図形は修正されない。
表示部2は、入力される各種の図形を表示する。
The correction target
The correction instruction
The
修正部7は、1つの修正指示図形に基づいて修正対象図形の一部の領域を削り取るとともに、一部の領域を拡張することにより、修正対象図形の修正後の図形(以下、「修正後図形」と表記する。)を生成する。
分割部4は、修正指示図形に基づいて修正対象図形を複数の小図形(以下、「分割図形」と表記する。)に分割し、複数の分割図形を選択部5に出力する。
選択部5は、入力される複数の分割図形の1つを選択し、選択した分割図形(以下、「選択図形」と表記する。)を拡張部6に出力する。選択されない分割図形は、「削り取り」の対象となり、修正後図形に含まれない。
拡張部6は、修正指示図形に基づいて選択図形を拡張し、拡張した選択図形を修正後図形とし、修正後図形を表示部2に出力する。
The correction unit 7 cuts off a partial area of the correction target graphic based on one correction instruction graphic and expands the partial area, thereby correcting the correction target graphic (hereinafter, “corrected graphic”). ").) Is generated.
The dividing
The
The expansion unit 6 expands the selected graphic based on the correction instruction graphic, sets the expanded selected graphic as a corrected graphic, and outputs the corrected graphic to the
図3は、図形修正装置10aによる図形修正処理の手順を示している。
最初に、ユーザの指示に従い、修正対象図形入力部1が修正対象図形を入力し、表示部2(表示装置17)が、CPU11の制御により、修正対象図形を表示する(S101)。
次に、ユーザが、マウス18等の入力装置を介して表示装置17に修正指示図形を描画させることにより、修正指示図形入力部3が修正指示図形を入力する(S102)。
次に、修正部7(CPU11)が、S102にて入力される修正指示図形に基づいて修正対象図形を修正し、修正後図形を生成する(S103)。
最後に、表示部2(表示装置17)が、CPU11の制御により、修正後図形を表示する(S104)。
FIG. 3 shows a procedure of graphic correction processing by the graphic correction device 10a.
First, the correction target
Next, when the user causes the
Next, the correction unit 7 (CPU 11) corrects the correction target graphic based on the correction instruction graphic input in S102, and generates a corrected graphic (S103).
Finally, the display unit 2 (display device 17) displays the corrected figure under the control of the CPU 11 (S104).
ユーザは、S104における修正結果を見ながら、必要に応じて処理を繰り返すことができる。処理を繰り返す場合、図形修正装置10aは、S104における修正後図形を、S101における修正対象図形として入力する。 The user can repeat the process as necessary while viewing the correction result in S104. When the process is repeated, the graphic correction device 10a inputs the graphic after correction in S104 as the graphic to be corrected in S101.
図4は、分割部4の詳細を示している。分割部4は、論理否定部41及び論理積部42を含む。
論理否定部41は、修正指示図形入力部3から入力される修正指示図形の真偽値を反転し、論理積部42に出力する。
論理積部42は、論理否定部41によって真偽値が反転される修正指示図形と、修正対象図形との論理積を算出し、選択部5に出力する。
FIG. 4 shows details of the
The
The
例えば、修正指示図形が、修正対象図形の一部を横断する曲線の場合、論理積部42から出力される論理積算出結果は、真値の画素が連結していない複数の島、すなわち複数の分割図形を含むものとなる。
For example, when the correction instruction graphic is a curve crossing a part of the correction target graphic, the logical product calculation result output from the
図5は、選択部5の詳細を示している。選択部5は、図形面積算出部51及び最大面積図形選択部52を含む。
図形面積算出部51は、分割部4の論理積部42から出力される複数の分割図形を入力し、各分割図形の面積を算出し、分割図形と面積算出結果とを対応付けて、最大面積図形選択部52に出力する。面積の算出処理は、公知の手法を用いることができる。例えば、図形面積算出部51は、最初に、全ての画素を探索し、分割図形ごとに異なるラベルを画素に付す処理(ラベリング処理)を行う。そして、図形面積算出部51は、ラベルごとに画素数を計数することによって面積を算出する。
最大面積図形選択部52は、図形面積算出部51から出力される面積算出結果に基づいて、最大の面積を有する分割図形を選択図形とし、選択図形を拡張部6に出力する。
FIG. 5 shows details of the
The graphic area calculation unit 51 receives a plurality of divided graphics output from the
Based on the area calculation result output from the graphic area calculation unit 51, the maximum area graphic selection unit 52 sets the divided graphic having the maximum area as the selected graphic and outputs the selected graphic to the expansion unit 6.
選択部5の処理によって、ユーザが、マウス18等の入力装置を介して、どの部分を削り取り、どの部分を残すかということを指示する必要がなく、修正作業が簡便になる。
By the processing of the
図6は、拡張部6の詳細を示している。拡張部6は、論理和部61及び埋立部62を含む。
論理和部61は、選択部5の最大面積図形選択部52から出力される選択図形と、修正指示図形と論理和を算出し、埋立部62に出力する。
例えば、修正指示図形が、修正対象図形の入江領域(背景が鋭角に修正対象図形に入り込んでいる領域)を塞ぐような曲線の場合、論理和部61から出力される論理和算出結果は、内部に孔(背景である偽値の画素が連結している領域)があり、かつ全ての真値の画素が連結している図形となる。
FIG. 6 shows details of the expansion unit 6. The expansion unit 6 includes a
The
For example, when the correction instruction graphic is a curve that closes the inlet area of the correction target graphic (the area where the background enters the correction target graphic at an acute angle), the logical sum calculation result output from the
埋立部62は、論理和部61から出力される論理和算出結果である図形の内部に存在する孔の画素を真値に置き換える、すなわち内部に存在する孔を埋める。埋立処理は、公知の手法を用いることができる。例えば、埋立部62は、論理和算出結果である図形の真偽値を反転し、反転後の真値の画素が連結している各領域をラベリングする。次に、埋立部62は、ラベルごとの画素数を計数することにより面積を算出し、面積が最大の領域を背景領域とする。そして、埋立部62は、背景領域を除く残りのラベルが付されている領域と、論理和部61から出力される論理和算出結果である図形との論理和を算出する。
The burying unit 62 replaces the pixel of the hole existing inside the graphic as the logical sum calculation result output from the
尚、背景領域の選択条件としては、「面積最大の領域」に代えて、「全体領域の端部の画素を含む領域」(但し、修正対象図形が、全体領域の端部の画素を含まないように表示させておくことが前提となる。)としても良い。また、修正指示図形が、円や楕円などの閉曲線の場合、背景領域の選択条件は、「閉曲線の外部領域」としても良い。 The selection condition for the background region is that instead of “region having the largest area”, “region including pixels at the end of the entire region” (however, the modification target graphic does not include pixels at the end of the entire region) It is a premise that the information is displayed as follows.) When the correction instruction figure is a closed curve such as a circle or an ellipse, the selection condition for the background area may be “external area of the closed curve”.
拡張部6の処理によって、ユーザが、マウス18等の入力装置を介して、どの部分を拡張し、どの部分を拡張しないかということを指示する必要がなく、修正作業が簡便になる。
更に、選択部5及び拡張部6の処理によって、1つの修正指示図形によって、修正対象図形の「削り取り」及び「拡張」が実行される。
By the processing of the expansion unit 6, the user does not need to instruct which part is expanded and which part is not expanded via the input device such as the mouse 18, and the correction work is simplified.
Further, by the processing of the
次に、図7、図8を参照しながら、図形修正装置10aによる図形修正処理の1例について説明する。
図7、図8に示す例では、修正指示図形が、修正対象図形の一部を横断し、かつ、修正対象図形の入江領域を塞ぐような曲線である。従って、前述した通り、分割部4の論理積部42から出力される論理積算出結果は、複数の分割図形を含むものとなる。また、拡張部6の論理和部61から出力される論理和算出結果は、内部に孔があり、かつ全ての真値が連結している図形となる。
Next, an example of the graphic correction process performed by the graphic correction device 10a will be described with reference to FIGS.
In the example shown in FIGS. 7 and 8, the correction instruction graphic is a curve that crosses a part of the correction target graphic and closes the inlet area of the correction target graphic. Therefore, as described above, the logical product calculation result output from the
図7に示すように、修正対象図形20aは、3箇所の入り江を有する図形である。また、修正指示図形30aは、1本の曲線であり、端部は連結していない(閉曲線ではない)。
図8では、修正対象図形20aの内部に斜線を付し、修正指示図形30aを白線とし、修正対象図形20aと修正指示図形30aの位置関係を図示している。図8に示すように、修正指示図形30aは、修正対象図形20aの一部と重畳している。より詳細には、修正指示図形30aは、修正対象図形20aの2箇所の入り江を塞ぎ、かつ、2箇所の入り江に挟まれている凸部を横断している。
As shown in FIG. 7, the correction target graphic 20a is a graphic having three inlets. Moreover, the correction instruction | indication figure 30a is one curve, and the edge part is not connected (it is not a closed curve).
In FIG. 8, the correction target graphic 20a is shaded, the correction instruction graphic 30a is a white line, and the positional relationship between the correction target graphic 20a and the correction instruction graphic 30a is illustrated. As shown in FIG. 8, the correction instruction graphic 30a is superimposed on a part of the correction target graphic 20a. More specifically, the correction instruction graphic 30a blocks two bays of the correction target graphic 20a and crosses the convex portions sandwiched between the two bays.
図7に示すように、分割部4は、修正指示図形30aの論理否定101及び修正対象図形20aとの論理積102を算出する。論理積102は、真値の画素(図7では白の画素)が連結していない2つの島、すなわち2つの分割図形が含まれている。このように、分割部4は、修正指示図形30aを境界とし、修正対象図形20aを分割する。
次に、選択部5は、面積最大の図形を選択し、選択図形103とする。選択図形103は、修正対象図形20aの凸部が削り取られている。このように、選択部5は、修正指示図形30aの一部を削り取る。
次に、拡張部6は、選択図形103及び修正指示図形30aの論理和104を算出し、埋立処理を行い、修正後図形105を生成する。修正後図形105は、2箇所の入り江が埋められている。このように、拡張部6は、修正対象図形20aの一部を拡張する。
尚、図形修正装置10aは、必要に応じて、修正後図形105の輪郭部分に対して平滑化処理(スムージング処理)を施しても良い。
As shown in FIG. 7, the dividing
Next, the
Next, the expansion unit 6 calculates a
In addition, the figure correction apparatus 10a may perform a smoothing process (smoothing process) on the contour portion of the corrected figure 105 as necessary.
以上、第1の実施の形態に係る図形修正装置10aによれば、1つの修正指示図形に基づいて、内部に孔がない修正対象図形の削り取りと拡張を合わせて実行する。これによって、ユーザは、直感的な図形修正作業ができる。
尚、前述の例では、選択部5は、面積最大の分割図形を選択図形とするとしたが、これに限られるものではなく、ユーザが、マウス18等の入力装置を介して、選択図形を決定するように構成することも有用である。またた、修正指示図形が、円や楕円などの閉曲線の場合、選択図形の選択条件は、「閉曲線の内部」としても良い。
As mentioned above, according to the figure correction apparatus 10a which concerns on 1st Embodiment, based on one correction instruction | indication figure, cutting and expansion of the correction object figure which does not have a hole are performed in combination. Thus, the user can perform intuitive graphic correction work.
In the above example, the
また、修正対象図形は2値画像としたが、これに限るものではなく、多値画像(グレースケール画像、カラー画像)であれば、閾値処理により2値化すれば良く、2次元に分布するデータであれば分布密度を2値化して扱えば良く、輪郭を示す座標群データであれば、輪郭によって囲まれる領域を真値とし、その外側を偽値として2値化して扱えば良い。いずれの2値化処理も、公知の手法を適用できる。
また、色空間分布図、立体画像、動画像から検出する時系列輪郭など3次元によって表現される図形の場合、当業者が3次元の立体を表示する際に通常行なう処理、いわゆる投影処理を実行して表示し、投影される像を見ながらユーザが修正指示図形を入力し、修正指示図形を投影方向に向かって3次元化し、3次元の修正対象図形と3次元化の修正指示図形とによって前述した処理と同様の処理を行えばよい。
Moreover, although the figure to be corrected is a binary image, it is not limited to this, and if it is a multi-value image (grayscale image, color image), it may be binarized by threshold processing and distributed in two dimensions. If it is data, the distribution density may be binarized, and if it is coordinate group data indicating an outline, the area surrounded by the outline may be treated as a true value and the outside thereof may be binarized as a false value. A publicly known method can be applied to any binarization processing.
In the case of a figure expressed in three dimensions, such as a color space distribution diagram, a three-dimensional image, or a time-series contour detected from a moving image, a process that is usually performed by a person skilled in the art when displaying a three-dimensional solid is executed. The user inputs a correction instruction figure while viewing the projected image, and three-dimensionalizes the correction instruction figure in the projection direction, using the three-dimensional correction target figure and the three-dimensional correction instruction figure. What is necessary is just to perform the process similar to the process mentioned above.
<第2の実施の形態>
以下、図9〜図12を参照しながら、第2の実施の形態に係る図形修正装置10bについて説明する。
図形修正装置10bは、内部に孔がある図形を修正対象図形とし、入力される1つの修正指示図形に基づいて、修正対象図形の削り取り及び拡張を行う。
尚、第1の実施の形態と同じ要素には同じ符号を付し、重複する説明は省略する。
<Second Embodiment>
Hereinafter, the graphic correction device 10b according to the second embodiment will be described with reference to FIGS.
The graphic correction device 10b sets a graphic with a hole inside as a correction target graphic, and scrapes and expands the correction target graphic based on one input correction instruction graphic.
In addition, the same code | symbol is attached | subjected to the same element as 1st Embodiment, and the overlapping description is abbreviate | omitted.
最初に、図9、図10を参照しながら、図形修正装置10bの構成及び図形修正処理について説明する。
図9に示すように、図形修正装置10bは、修正対象図形入力部1、表示部2、修正指示図形入力部3、修正部7、孔抽出部8、孔復元部9から構成される。
図形修正装置10aのCPU11は、記憶装置13に記憶されているプログラムを主メモリ12のRAMに読み出して実行することにより、修正部7に加えて、孔抽出部8、孔復元部9として機能する。
First, the configuration of the graphic correction device 10b and the graphic correction processing will be described with reference to FIGS.
As shown in FIG. 9, the graphic correction device 10 b includes a correction target
The
修正対象図形入力部1は、修正対象図形を入力し、表示部2、修正部7、孔抽出部8に出力する。
修正指示図形入力部3は、修正指示図形を入力し、表示部2、修正部7に出力する。
The correction target
The correction instruction
孔抽出部8は、修正対象図形の内部に存在する孔を抽出し、抽出した孔を孔復元部9に出力する。より詳細には、孔抽出部8は、修正対象図形の真偽値を反転し、反転後の真値の画素が連結している各領域をラベリングする。次に、孔抽出部8は、ラベルごとの画素数を計数することにより面積を算出し、面積が最大の領域を背景領域とする。次に、孔抽出部8は、背景領域を除く残りのラベルが付されている領域の論理否定を算出し、算出結果を孔復元部9に出力する。
尚、背景領域の選択条件としては、「面積最大の領域」に代えて、「全体領域の端部の画素を含む領域」(但し、修正対象図形が、全体領域の端部の画素を含まないように表示させておくことが前提となる。)としても良い。また、修正対象図形の輪郭が、閉曲線の場合、背景領域の選択条件は、「修正対象図形の輪郭の外部領域」としても良い。
The hole extracting unit 8 extracts holes existing in the correction target graphic and outputs the extracted holes to the hole restoring unit 9. More specifically, the hole extraction unit 8 inverts the true / false value of the correction target graphic, and labels each region where the inverted true value pixels are connected. Next, the hole extraction unit 8 calculates the area by counting the number of pixels for each label, and sets the area with the largest area as the background area. Next, the hole extraction unit 8 calculates the logical negation of the remaining region except for the background region, and outputs the calculation result to the hole restoration unit 9.
The selection condition for the background region is that instead of “region having the largest area”, “region including pixels at the end of the entire region” (however, the modification target graphic does not include pixels at the end of the entire region) It is a premise that the information is displayed as follows.) When the contour of the correction target graphic is a closed curve, the selection condition for the background region may be “external region of the contour of the correction target graphic”.
孔復元部9は、孔抽出部8によって抽出された孔を修正後図形に復元し、復元結果を表示部2に出力する。より詳細には、孔復元部9は、修正部7から出力される修正後図形と、孔抽出部8によって抽出された孔との論理積を算出し、算出結果を表示部2に出力する。
孔抽出部8及び孔復元部9の処理によって、修正部7の処理によって埋められてしまう修正対象図形の内部の孔を復元し、表示部2に出力することができる。
The hole restoration unit 9 restores the hole extracted by the hole extraction unit 8 into a corrected figure, and outputs the restoration result to the
Through the processing of the hole extraction unit 8 and the hole restoration unit 9, it is possible to restore the holes inside the correction target graphic that are filled by the processing of the correction unit 7 and output the holes to the
図10は、図形修正装置10bによる図形修正処理の手順を示している。
最初に、ユーザの指示に従い、修正対象図形入力部1が修正対象図形を入力し、表示部2(表示装置17)が、CPU11の制御により、修正対象図形を表示する(S201)。
次に、ユーザが、マウス18等の入力装置を介して修正指示図形の入力を指示することにより、修正指示図形入力部3が修正指示図形を入力する(S202)。
次に、孔抽出部8(CPU11)が、S201にて入力される修正対象図形の内部に存在する孔を抽出する(S203)。
次に、修正部7(CPU11)が、S202にて入力される修正指示図形に基づいて修正対象図形を修正し、修正後図形を生成する(S204)。
次に、孔復元部9(CPU11)が、S203にて抽出される修正対象図形の内部に存在する孔を、S204にて生成される修正後図形に復元する(S205)。
最後に、表示部2(表示装置17)が、CPU11の制御により、S205にて孔が復元される修正後図形を表示する(S206)。
FIG. 10 shows a procedure of graphic correction processing by the graphic correction device 10b.
First, according to a user instruction, the correction target
Next, when the user instructs the input of the correction instruction graphic via the input device such as the mouse 18, the correction instruction
Next, the hole extraction unit 8 (CPU 11) extracts holes existing in the correction target graphic input in S201 (S203).
Next, the correction unit 7 (CPU 11) corrects the correction target graphic based on the correction instruction graphic input in S202, and generates a corrected graphic (S204).
Next, the hole restoration unit 9 (CPU 11) restores the hole existing in the correction target graphic extracted in S203 to the corrected graphic generated in S204 (S205).
Finally, the display unit 2 (display device 17) displays the corrected figure whose hole is restored in S205 under the control of the CPU 11 (S206).
ユーザは、S206における修正結果を見ながら、必要に応じて処理を繰り返すことができる。処理を繰り返す場合、図形修正装置10bは、S206における孔が復元された修正後図形を、S201における修正対象図形として入力する。 The user can repeat the process as necessary while viewing the correction result in S206. When the process is repeated, the graphic correction device 10b inputs the corrected graphic with the hole restored in S206 as the correction target graphic in S201.
次に、図11、図12を参照しながら、図形修正装置10bによる図形修正処理の1例について説明する。
図11、図12に示す例では、修正対象図形の内部に孔が存在する。修正指示図形については、第1の実施の形態と同様、修正対象図形の一部を横断し、かつ、修正対象図形の入江領域を塞ぐような曲線である。
Next, an example of the graphic correction process performed by the graphic correction device 10b will be described with reference to FIGS.
In the example shown in FIG. 11 and FIG. 12, a hole exists inside the correction target graphic. As in the first embodiment, the correction instruction graphic is a curve that crosses a part of the correction target graphic and closes the inlet area of the correction target graphic.
図11に示すように、修正対象図形20bは、3箇所の入り江を有し、内部の上方に1つの孔が存在する図形である。また、修正指示図形30bは、1本の曲線であり、端部は連結していない(閉曲線ではない)。
図12では、修正対象図形20bの内部(但し、孔は除く。)に斜線を付し、修正指示図形30bを白線とし、修正対象図形20bと修正指示図形30bの位置関係を図示している。図12に示すように、修正指示図形30bは、修正対象図形20bの一部と重畳している。より詳細には、修正指示図形30bは、修正対象図形20bの2箇所の入り江を塞ぎ、かつ、2箇所の入り江に挟まれている凸部を横断している。
As shown in FIG. 11, the correction target graphic 20b is a graphic having three inlets and one hole above the inside. Moreover, the correction instruction | indication figure 30b is one curve, and the edge part is not connected (it is not a closed curve).
FIG. 12 shows the positional relationship between the correction target graphic 20b and the correction instruction graphic 30b, in which the inside of the correction target graphic 20b (however, excluding holes) is hatched and the correction instruction graphic 30b is a white line. As shown in FIG. 12, the correction instruction graphic 30b is superimposed on a part of the correction target graphic 20b. More specifically, the correction instruction graphic 30b closes the two inlets of the correction target graphic 20b and crosses the convex portion sandwiched between the two inlets.
図11に示すように、修正部7は、修正対象図形20b及び修正指示図形30bに基づいて、修正後図形106を生成する。
次に、孔抽出部8は、修正対象図形20bの論理否定107を算出し、例えば、面積最大の領域を背景とし、背景を除く領域を孔108として選択し、選択された孔108の論理否定109を算出し、孔復元部9に出力する。このように、孔抽出部8は、修正対象図形20bの内部に存在する孔を抽出する。
次に、孔復元部9は、修正部7によって生成される修正後図形106と、孔抽出部8によって抽出される孔109との論理積110を算出し、表示部2に出力する。このように、孔復元部9は、修正後図形106では消失していた孔109を復元する。
尚、図形修正装置10bは、必要に応じて、孔復元後の修正後図形の輪郭部分に対して平滑化処理(スムージング処理)を施しても良い。
As shown in FIG. 11, the correction unit 7 generates a corrected graphic 106 based on the correction target graphic 20b and the correction instruction graphic 30b.
Next, the hole extraction unit 8 calculates a logical negation 107 of the correction target graphic 20b, selects, for example, a region having the largest area as a background and a region excluding the background as a
Next, the hole restoration unit 9 calculates a
In addition, the figure correction apparatus 10b may perform a smoothing process (smoothing process) on the contour portion of the corrected figure after the hole restoration, if necessary.
以上、第2の実施の形態に係る図形修正装置10bによれば、1つの修正指示図形に基づいて、内部に孔がある修正対象図形の削り取りと拡張を合わせて実行し、修正部7の処理において消失してしまう内部の孔を復元する。これによって、ユーザは、直感的な図形修正作業ができる。また、図形修正装置10bによれば、内部に消失させたくない孔が存在する場合にも、誤って消失させてしまうという不具合が生じない。 As described above, according to the graphic correction device 10b according to the second embodiment, based on one correction instruction graphic, the correction target graphic having a hole inside is cut and expanded together, and the processing of the correction unit 7 is performed. Recover the internal holes that disappear in Thus, the user can perform intuitive graphic correction work. Moreover, according to the figure correction apparatus 10b, even if there is a hole that is not desired to be eliminated, there is no problem that it is accidentally erased.
本発明によれば、1つの修正指示図形によって修正対象図形の削り取りと拡張ができ、直感的な図形修正作業ができる。特に、各種の算出処理を論理演算(論理和、論理積、論理否定等)によって行う為、計算処理を高速に実行することができる。更に、本発明では、基のデータを2値化し、2値画像として取り扱うので、非常に広範囲のデータに対して汎用的に適用できる。 According to the present invention, it is possible to cut and expand a correction target graphic with one correction instruction graphic, and to perform an intuitive graphic correction operation. In particular, since various types of calculation processing are performed by logical operations (logical sum, logical product, logical negation, etc.), the calculation processing can be executed at high speed. Furthermore, in the present invention, since the base data is binarized and handled as a binary image, it can be applied universally to a very wide range of data.
本発明は、コンピュータ支援設計によって扱う図形の修正や、地下資源探査に必要な地下構造物の切り出し、画像編集や動画編集やフォント設計に使用される輪郭修正技術、経済分析や金融取引などの統計解析でのデータ抽出結果の修正、クロマキー処理などに代表される色空間での色分離技術などに応用できる。 The present invention is based on computer-aided design correction of graphics, extraction of underground structures necessary for underground resource exploration, contour correction technology used for image editing, video editing and font design, statistics such as economic analysis and financial transactions. It can be applied to color separation technology in color spaces such as correction of data extraction results in analysis and chroma key processing.
以上、添付図面を参照しながら、本発明に係る図形修正装置の好適な実施形態について説明したが、本発明はかかる例に限定されない。当業者であれば、本願で開示した技術的思想の範疇内において、各種の変更例又は修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。 The preferred embodiments of the graphic correction device according to the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to such examples. It will be apparent to those skilled in the art that various changes or modifications can be conceived within the scope of the technical idea disclosed in the present application, and these naturally belong to the technical scope of the present invention. Understood.
1………修正対象図形入力部
2………表示部
3………修正指示図形入力部
4………分割部
5………選択部
6………拡張部
7………修正部
8………孔抽出部
9………孔復元部
10、10a、10b………図形修正装置
20a、20b………修正対象図形
30a、30b………修正指示図形
DESCRIPTION OF
Claims (5)
前記修正指示図形に基づいて前記修正対象図形を複数の分割図形に分割する分割手段と、
前記分割図形のいずれか1つを選択図形として選択する選択手段と、
前記選択図形を拡張し、前記修正対象図形の修正後の図形である修正後図形とする拡張手段と、
前記修正対象図形の内部に存在する孔を抽出する抽出手段と、
前記抽出手段によって抽出された孔を前記修正後図形に復元する復元手段と、
を備えることを特徴とする図形修正装置。 A graphic correction device that displays a correction target graphic and corrects the correction target graphic based on an input of a correction instruction graphic superimposed on a part of the correction target graphic,
A dividing unit that divides the correction target graphic into a plurality of divided figures based on the correction instruction figure;
Selecting means for selecting any one of the divided figures as a selected figure;
Expansion means for expanding the selected graphic and making it a corrected graphic that is a corrected graphic of the correction target graphic;
Extraction means for extracting holes existing in the figure to be corrected;
Restoring means for restoring the hole extracted by the extracting means to the corrected figure;
A graphic correction device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010205163A JP5562774B2 (en) | 2010-09-14 | 2010-09-14 | Graphic correction device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010205163A JP5562774B2 (en) | 2010-09-14 | 2010-09-14 | Graphic correction device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012063811A JP2012063811A (en) | 2012-03-29 |
JP5562774B2 true JP5562774B2 (en) | 2014-07-30 |
Family
ID=46059498
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010205163A Expired - Fee Related JP5562774B2 (en) | 2010-09-14 | 2010-09-14 | Graphic correction device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5562774B2 (en) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1742180A1 (en) * | 2004-04-27 | 2007-01-10 | Hitachi Medical Corporation | Image plotting device and method thereof |
-
2010
- 2010-09-14 JP JP2010205163A patent/JP5562774B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2012063811A (en) | 2012-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100587720C (en) | Rendering apparatus and method, and shape data generation apparatus and method | |
CA2903818C (en) | Method for emphasizing differences in graphical appearance between an original document and a modified document with annotations | |
CN101529468B (en) | System and method for recovering three-dimensional particle systems from two-dimensional images | |
JP3030206B2 (en) | Method and apparatus for clipping a graphic polygon to a clipping area | |
JP5097133B2 (en) | Apply effects to merged text paths | |
CN104732479A (en) | Resizing An Image | |
CN112132164B (en) | Target detection method, system, computer device and storage medium | |
JP2021165888A (en) | Information processing apparatus, information processing method of information processing apparatus, and program | |
CN103218135B (en) | Screenshotss method on mobile terminal and device, mobile terminal | |
Patel et al. | Accelerated seam carving for image retargeting | |
CN114049488A (en) | Multi-dimensional information fusion remote weak and small target detection method and terminal | |
JP5067882B2 (en) | Image processing apparatus, image processing method, and program | |
JP5562774B2 (en) | Graphic correction device | |
CN111133474B (en) | Image processing apparatus, image processing method, and computer-readable recording medium | |
JP6337680B2 (en) | Image processing system, image processing apparatus, program, and image processing method | |
JP2004520660A (en) | Depth map calculation | |
JP2015215637A (en) | Image forming apparatus, image processing apparatus, and program | |
CN110580274B (en) | GIS data rendering method | |
EP3566144B1 (en) | Method of visually interacting with a document by dynamically displaying a fill area in a boundary | |
JP5325744B2 (en) | Image processing apparatus and image processing program | |
WO2023152810A1 (en) | Image processing device, image processing method, and program | |
GB2514410A (en) | Image scaling for images including low resolution text | |
JP6950436B2 (en) | Computer program for image capture, image capture device and image capture method | |
JP2003196674A (en) | Image processing method, image processing device and storage medium readable by computer | |
KR100917834B1 (en) | Method for transforming asc file to geomania gcd file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130614 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140227 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140401 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140421 |
|
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: 20140603 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140611 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5562774 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |