JP5286215B2 - Outline extracting apparatus, outline extracting method, and outline extracting program - Google Patents

Outline extracting apparatus, outline extracting method, and outline extracting program Download PDF

Info

Publication number
JP5286215B2
JP5286215B2 JP2009226089A JP2009226089A JP5286215B2 JP 5286215 B2 JP5286215 B2 JP 5286215B2 JP 2009226089 A JP2009226089 A JP 2009226089A JP 2009226089 A JP2009226089 A JP 2009226089A JP 5286215 B2 JP5286215 B2 JP 5286215B2
Authority
JP
Japan
Prior art keywords
contour
image data
unit
color space
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009226089A
Other languages
Japanese (ja)
Other versions
JP2011076302A (en
Inventor
章介 鳴戸
史朗 小澤
尚生 阿部
Original Assignee
エヌ・ティ・ティ・コムウェア株式会社
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 エヌ・ティ・ティ・コムウェア株式会社 filed Critical エヌ・ティ・ティ・コムウェア株式会社
Priority to JP2009226089A priority Critical patent/JP5286215B2/en
Publication of JP2011076302A publication Critical patent/JP2011076302A/en
Application granted granted Critical
Publication of JP5286215B2 publication Critical patent/JP5286215B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Description

本発明は、輪郭抽出装置、輪郭抽出方法、および輪郭抽出プログラムに関する。   The present invention relates to a contour extraction device, a contour extraction method, and a contour extraction program.

画像および映像から対象物のみを抽出する手法として、動的輪郭法の1手法であるsnake法が、計算機の処理能力向上により、利用可能なアルゴリズムとして着目されている。このsnake法は、2次元画像と線図形形状の照合を、一種のエネルギー最小化問題として処理する手法の1つで、画像中に存在する物体の輪郭を対象にして、線図形の初期パターン(初期輪郭)を動的に変形させながら形状を照合する(例えば、非特許文献1参照)。このsnake法は、照合を収束したと判定するまで繰り返し行うため、輪郭を綺麗に抽出することが可能であるという特徴がある。図12は、snake法を用いた輪郭抽出の手順の概略を説明する図である。図12(a)は、入力画像501であり、抽出対象物511を含んでいる。この入力画像501に対して、図12(b)のように対象物511全体を囲むように初期輪郭521を設定し、snake法を用いて初期輪郭を動的に変形しながら、収束したと判定するまで演算を行う。これにより、図12(c)のように対象物531が抽出できる。   As a method for extracting only an object from an image and a video, the snake method, which is one method of the dynamic contour method, has attracted attention as an algorithm that can be used by improving the processing capability of a computer. The snake method is one of the methods for processing a matching of a two-dimensional image and a line figure shape as a kind of energy minimization problem, and targets an outline of an object existing in the image as an initial line figure pattern ( The shape is collated while dynamically deforming the initial contour (see, for example, Non-Patent Document 1). Since the snake method is repeatedly performed until it is determined that the collation has been converged, the contour can be clearly extracted. FIG. 12 is a diagram for explaining the outline of the contour extraction procedure using the snake method. FIG. 12A shows an input image 501 that includes an extraction object 511. With respect to this input image 501, an initial contour 521 is set so as to surround the entire object 511 as shown in FIG. 12B, and it is determined that the initial contour has converged while dynamically deforming using the snake method. Do computations until Thereby, the object 531 can be extracted as shown in FIG.

このsnake法を用いた初期輪郭の設定手法としては、初期輪郭を手動で与える手法(例えば、特許文献1参照)、輪郭抽出装置の利用者が目視で初期輪郭を手動で設定する手法(例えば、特許文献2参照)がある。   As an initial contour setting method using the snake method, a method of manually giving an initial contour (for example, refer to Patent Document 1), a method in which a user of the contour extraction device manually sets an initial contour (for example, Patent Document 2).

特表2004−516589号公報JP-T-2004-516589 特開平10−187936号公報Japanese Patent Laid-Open No. 10-187936

田村秀行、「コンピュータ画像処理」、オーム社、2002年12月20日、P261−262Hideyuki Tamura, “Computer Image Processing”, Ohmsha, December 20, 2002, P261-262

このようにsnake法を用いた輪郭抽出手法においては、取得した画像に対して抽出する対象物を特定するための範囲として初期輪郭を設定する必要がある。この初期輪郭を抽出する対象物の形状に合わせて適切に設定していない場合、抽出の演算が収束するまでの処理回数が多くなり、抽出に要する時間が増大するという課題があった。図13を用いて、初期輪郭の設定の違いによる収束回数の増減の一例を説明する。図13(a)は、入力画像601の対象物611に対して、対象物611の全体を囲むような初期輪郭621を設定した例であり、図13(c)の状態のように輪郭641が収束するまでの演算数は、1000回であった。一方、図13(b)は、対象物621に近似した形状の初期輪郭631を設定した例であり、図13(c)の状態のように輪郭641が収束するまでの計算回数は60回であった。このように、snake法においては、初期輪郭を適切に設定することが高速に抽出するために重要である。   Thus, in the contour extraction method using the snake method, it is necessary to set an initial contour as a range for specifying an object to be extracted from an acquired image. If the initial contour is not appropriately set in accordance with the shape of the object to be extracted, there has been a problem that the number of processes until the calculation of the extraction increases and the time required for extraction increases. An example of increase / decrease in the number of times of convergence due to the difference in initial contour setting will be described with reference to FIG. FIG. 13A shows an example in which an initial contour 621 that surrounds the entire object 611 is set for the object 611 of the input image 601, and the contour 641 is formed as in the state of FIG. The number of operations until convergence was 1000 times. On the other hand, FIG. 13B is an example in which an initial contour 631 having a shape approximate to the object 621 is set, and the number of calculations until the contour 641 converges as in the state of FIG. there were. Thus, in the snake method, it is important to set the initial contour appropriately in order to extract at high speed.

しかしながら、初期輪郭を設定する手法として、特許文献1と特許文献2の手法では、初期輪郭を手動で与える必要があるという課題があった。また、この初期輪郭を自動的に生成する手法としては、一般的な形状(四角や丸)を、例えば図12(b)や図13(a)のように生成して用いる手法があるが、この場合、すでに述べたように、収束演算回数が増大するという課題があった。   However, as a method for setting the initial contour, the methods of Patent Document 1 and Patent Document 2 have a problem that it is necessary to manually provide the initial contour. In addition, as a method of automatically generating the initial contour, there is a method of generating and using a general shape (square or circle) as shown in FIGS. 12B and 13A, for example. In this case, as already described, there has been a problem that the number of convergence calculations increases.

本発明は、上記の問題点に鑑みてなされたものであって、動的輪郭法を用いた輪郭抽出において、背景や対象物が異なっても適切な初期輪郭を入力画像から生成し、収束演算回数を減少し、抽出時間の高速化を可能にする輪郭抽出装置、輪郭抽出方法、およびプログラムを提供することを課題とする。   The present invention has been made in view of the above-described problems. In contour extraction using the dynamic contour method, an appropriate initial contour is generated from an input image even if the background and the object are different, and a convergence calculation is performed. It is an object of the present invention to provide a contour extraction device, a contour extraction method, and a program that can reduce the number of times and increase the extraction time.

上記目的を達成するため、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、入力画像を複数の色空間成分に分離する色空間分離部と、前記色空間分離部が分離した各色空間成分を二値化する色空間成分二値化部と、前記色空間成分二値化部が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成部と、前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出部とを備えることを特徴としている。   In order to achieve the above object, according to the present invention, in a contour extraction apparatus that performs contour extraction using a dynamic contour method, a color space separation unit that separates an input image into a plurality of color space components, and the color space separation unit includes: A color space component binarization unit that binarizes each separated color space component, and an initial stage that generates initial contour image data based on the image data of each color space component binarized by the color space component binarization unit A contour generation unit, and a contour extraction unit that extracts a contour of a graphic included in the input image using the initial contour image data generated by the initial contour generation unit by a dynamic contour method.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記初期輪郭生成部は、前記色空間成分二値化部が二値化した各色空間成分の画像中心部の画素が、白画素か黒画素かを判定し、黒画素と判定した場合、二値化後の前記各色空間成分の画像データを白黒反転した画像データに基づいて前記初期輪郭画像データを生成し、白画素と判定した場合、二値化後の前記各色空間成分の画像データに基づいて前記初期輪郭画像データを生成することを特徴としている。   Further, the present invention provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein the initial contour generation unit includes an image center portion of each color space component binarized by the color space component binarization unit. If the pixel is determined to be a white pixel or a black pixel, and determined to be a black pixel, the initial contour image data is generated based on image data obtained by reversing the image data of each color space component after binarization into black and white, When it is determined that the pixel is a white pixel, the initial contour image data is generated based on the image data of each color space component after binarization.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記初期輪郭生成部は、前記色空間成分二値化部が二値化した各色空間成分の画像データのうち少なくとも1つを用いて前記初期輪郭画像を生成することを特徴としている。   Further, the present invention provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein the initial contour generation unit includes image data of each color space component binarized by the color space component binarization unit. The initial contour image is generated using at least one.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記初期輪郭生成部は、前記色空間成分二値化部が二値化した各色空間成分の画像データを合成して前記初期輪郭画像データを生成することを特徴としている。   Further, the present invention provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein the initial contour generation unit synthesizes image data of each color space component binarized by the color space component binarization unit. Then, the initial contour image data is generated.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記初期輪郭生成部は、前記色空間成分二値化部が二値化した各色空間成分の画像データに対して色空間成分毎に重み付けした後、重み付けした前記色空間成分を合成して初期輪郭画像データを生成することを特徴としている。   Further, the present invention provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein the initial contour generation unit applies image data of each color space component binarized by the color space component binarization unit. Then, after weighting each color space component, initial contour image data is generated by combining the weighted color space components.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記色空間分離部が色空間成分に分離する前に、前記入力画像に対して平滑処理を行う平滑処理部とをさらに備えることを特徴としている。   The present invention also provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, and performs a smoothing process on the input image before the color space separation unit separates into color space components. And further comprising.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づき判定し、判定した結果に基づき、背景の画素値を1以上の値で定数倍して画素を薄くし、あるいは対象物の画素値を1以下の値で定数倍して画素を濃くすることで濃淡強調を行い、濃淡強調画像データを生成する濃淡強調部とをさらに備え、前記輪郭抽出部は、前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した期輪郭画像データを用いて前記入力画像の輪郭を抽出することを特徴としている。 Further, the present invention provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein the input image is grayscaled, and each pixel of the grayscaled image data includes a pixel or an object constituting a background. It is determined based on the initial contour image data generated by the initial contour generation unit whether the pixel is a constituent pixel, and based on the determination result, the background pixel value is multiplied by a constant of 1 or more to make the pixel thinner, or the object A contrast enhancement unit that performs density enhancement by multiplying the pixel value by a constant value of 1 or less to darken the pixel, and generates density enhancement image data, and the contour extraction unit includes: It is characterized by extracting the contour of the input image from the generated the grayscale enhanced image data by using the initial contour image data, wherein the initial contour generation unit has generated.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記濃淡強調部は、背景の画素値を1以上の値で定数倍し、対象物の画素値に前記背景に乗じた値の逆数を乗じることを特徴としている。   Further, the present invention provides the contour extraction apparatus that performs contour extraction using the dynamic contour method, wherein the shading emphasis unit multiplies the background pixel value by a constant of 1 or more and adds the background pixel value to the object pixel value. It is characterized by multiplying the inverse of the value multiplied by.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記濃淡強調部は、前記グレースケール化した画像データから生成したヒストグラムに基づき、コントラストに応じて対象物の画素値および背景の画素値に乗じる値を設定することを特徴としている。   Further, the present invention relates to a contour extraction device that performs contour extraction using a dynamic contour method, wherein the shading emphasis unit is based on a histogram generated from the gray-scaled image data, and is a pixel of an object according to contrast. It is characterized in that a value to be multiplied by the value and the background pixel value is set.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づいて判定し、判定した結果に基づき、前記背景のすべての画素値の平均値と前記対象物のすべての画素値の平均値を算出して、算出した平均値を比較し、比較した結果に基づき背景と対象物のそれぞれの乗数を算出して、算出したそれぞれの乗数を用いて背景と対象物の濃淡強調を行い、濃淡強調画像データを生成する濃淡強調部とをさらに備え、前記輪郭抽出部は、前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した期輪郭画像データを用いて前記入力画像の輪郭を抽出することを特徴としている。 Further, the present invention provides a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein the input image is grayscaled, and each pixel of the grayscaled image data includes a pixel or an object constituting a background. It is determined based on the initial contour image data generated by the initial contour generation unit whether the pixel is a component, and based on the determination result, the average value of all the pixel values of the background and the average of all the pixel values of the object Calculate the value, compare the calculated average value, calculate the multiplier of each of the background and the object based on the comparison result, use the calculated multipliers to emphasize the density of the background and the object, anda shading enhancement unit that generates a grayscale enhanced image data, wherein the contour extraction unit, the initial contour generator initial contour image de generated from the gray weighted image data to which the shading enhancement unit has generated It is characterized by extracting the contour of the input image using the data.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置の輪郭抽出方法において、色空間分離部が、入力画像を複数の色空間成分に分離する色空間分離工程と、色空間成分二値化部が、前記色空間分離工程が分離した各色空間成分を二値化する色空間成分二値化工程と、初期輪郭生成部が、前記色空間成分二値化工程が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成工程と、輪郭抽出部が、前記初期輪郭生成工程が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出工程とを備えることを特徴としている。   The present invention also relates to a contour extraction method of a contour extraction device that performs contour extraction using a dynamic contour method, wherein a color space separation unit separates an input image into a plurality of color space components, A space component binarization unit binarizes each color space component separated by the color space separation step, and an initial contour generation unit binarizes the color space component binarization step. An initial contour generation step for generating initial contour image data based on the converted image data of each color space component, and a contour extraction unit in the input image using the initial contour image data generated by the initial contour generation step And a contour extracting step of extracting a contour of the contained figure by a dynamic contour method.

また、本発明は、動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置の輪郭抽出プログラムにおいて、コンピューターに、入力画像を複数の色空間成分に分離する色空間分離工程と、前記色空間分離工程が分離した各色空間成分を二値化する色空間成分二値化工程と、前記色空間成分二値化工程が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成工程と、前記初期輪郭生成工程が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出工程とを実行させることを特徴としている。   According to another aspect of the present invention, there is provided a contour extraction program of a contour extraction apparatus that performs contour extraction using a dynamic contour method, wherein a computer performs a color space separation step of separating an input image into a plurality of color space components, and the color space separation. A color space component binarization step for binarizing each color space component separated in the process, and initial contour image data is generated based on the image data of each color space component binarized by the color space component binarization step. Performing an initial contour generation step, and a contour extraction step of extracting a contour of a figure included in the input image by using a dynamic contour method using the initial contour image data generated by the initial contour generation step. It is said.

本発明によれば、背景や対象物が異なっても適切な初期輪郭を入力画像から生成し、生成した初期輪郭を用いて動的輪郭法で輪郭抽出を行う収束演算回数を減少し、抽出時間の高速化を行うことが可能になる。   According to the present invention, an appropriate initial contour is generated from an input image even if the background and the object are different, and the number of convergence operations for performing contour extraction by the dynamic contour method using the generated initial contour is reduced, and the extraction time It becomes possible to speed up.

本発明の実施形態に係る輪郭抽出装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the outline extraction apparatus which concerns on embodiment of this invention. 同実施形態に係る画像素値記憶部107が記憶しているRGB成分の各画素値の構成の一例を示す図である。It is a figure which shows an example of a structure of each pixel value of the RGB component which the image elementary value memory | storage part 107 concerning the embodiment has memorize | stored. 同実施形態に係る輪郭抽出手順の概略の一例を説明する図である。It is a figure explaining an example of the outline of the outline extraction procedure concerning the embodiment. 同実施形態に係る平滑化の優位性の一例を説明する図である。It is a figure explaining an example of the predominance of smoothing concerning the embodiment. 同実施形態に係る平滑化の優位性の一例を説明する図である。It is a figure explaining an example of the predominance of smoothing concerning the embodiment. 同実施形態に係る初期輪郭画像データの生成手順の概略を示す図である。It is a figure which shows the outline of the production | generation procedure of the initial outline image data which concerns on the embodiment. 同実施形態に係る輪郭抽出手順を説明するフローチャーである。Is a flow chart for explaining the outline extraction procedure according to the embodiment. 同実施形態に係る初期輪郭画像データの生成手順のフローチャートである It is a flowchart of the production | generation procedure of the initial outline image data which concerns on the same embodiment . 同実施形態に係る初期輪郭画像データの生成手順のフローチャートである。It is a flowchart of the production | generation procedure of the initial outline image data which concerns on the embodiment. 同実施形態に係る各色空間成分のマスクデータ生成手順のフローチャートである。It is a flowchart of the mask data generation procedure of each color space component according to the embodiment. 同実施形態に係る濃淡強調手順のフローチャートである。It is a flowchart of the density emphasis procedure which concerns on the same embodiment. 従来の実施形態に係るsnake法を用いた輪郭抽出の手順の概略を説明する図である。It is a figure explaining the outline of the procedure of the contour extraction using the snake method which concerns on the conventional embodiment. 従来の実施形態に係る初期輪郭の設定の違いによる収束回数の増減の一例を説明する図である。It is a figure explaining an example of increase / decrease in the frequency | count of convergence by the difference in the setting of the initial outline which concerns on the conventional embodiment.

以下、本発明の実施形態について、図1〜図11を用いて説明する。なお、本発明は係る実施形態の構成に限定されず、本発明の技術思想の範囲内で種々の変更が可能である。   Hereinafter, an embodiment of the present invention will be described with reference to FIGS. In addition, this invention is not limited to the structure of the embodiment which concerns, A various change is possible within the range of the technical idea of this invention.

図1の輪郭抽出装置の構成の一例を示すブロック図を用いて、本実施形態における輪郭抽出装置の構成を説明する。輪郭抽出装置10は、外部設定値取り込み部101と、画像データ取り込み部102と、平滑化部103と、色空間分離部104と、色空間成分二値化部105と、初期輪郭生成部106と、画素値記憶部107と、グレースケール変換部108と、濃淡強調部109と、輪郭抽出部110と、輪郭抽出結果出力部111とを備える。また、輪郭抽出装置10には、カメラ11と、画像表示装置13が接続されている。   The configuration of the contour extraction apparatus according to this embodiment will be described with reference to a block diagram illustrating an example of the configuration of the contour extraction apparatus in FIG. The contour extracting apparatus 10 includes an external setting value capturing unit 101, an image data capturing unit 102, a smoothing unit 103, a color space separation unit 104, a color space component binarization unit 105, and an initial contour generation unit 106. A pixel value storage unit 107, a gray scale conversion unit 108, a density enhancement unit 109, a contour extraction unit 110, and a contour extraction result output unit 111. Further, a camera 11 and an image display device 13 are connected to the contour extraction device 10.

カメラ11は、例えば受光レンズとCCDカメラ等で構成され、対象物を含む入力画像を撮影し、撮影された入力画像を輪郭抽出装置10に送信する。画像表示装置13は、輪郭抽出装置10から輪郭抽出結果の表示用の画像データを受信し、受信した画像データを表示する。   The camera 11 is composed of, for example, a light receiving lens and a CCD camera, captures an input image including an object, and transmits the captured input image to the contour extraction device 10. The image display device 13 receives image data for display of the contour extraction result from the contour extraction device 10 and displays the received image data.

外部設定値取り込み部101は、外部から輪郭抽出処理に用いる各種の設定である外部設定値を取り込む。外部設定値は、平滑化部103が行う平滑化の各種パラメータ(処理手法、処理回数、処理を行う範囲、処理を行う形状、重み付け係数など)、色空間分離部104が行う色空間分離手法の種類(RGB,CMYなど)、濃淡強調部109が行う濃淡強調処理のパラメータ(処理を行うか否かの設定、処理時の乗数など)、輪郭抽出部110が行う動的輪郭法の各種パラメータ(処理手法、計算回数など)等を備えている。また、外部設定値取り込み部101は、取り込んだ外部設定値を、平滑化部103と色空間分離部104と濃淡強調部109と輪郭抽出部110に出力する。   The external setting value capturing unit 101 captures external setting values that are various settings used for the contour extraction processing from the outside. The external setting value includes various parameters of smoothing performed by the smoothing unit 103 (processing method, number of processings, range to be processed, shape to be processed, weighting coefficient, etc.), color space separation method performed by the color space separation unit 104 Types (RGB, CMY, etc.), parameters of density emphasis processing performed by the density emphasis unit 109 (setting of whether to perform processing, multiplier at the time of processing, etc.), various parameters of the dynamic contour method performed by the contour extraction unit 110 ( Processing method, number of calculations, etc.). In addition, the external setting value capturing unit 101 outputs the captured external setting value to the smoothing unit 103, the color space separation unit 104, the density enhancement unit 109, and the contour extraction unit 110.

画像データ取り込み部102は、カメラ11により撮影された対象物を含む入力画像を取り込み、取り込んだ入力画像の画像データ(以下、入力画像データという)を平滑化部103とグレースケール変換部108と輪郭抽出結果出力部111に出力する。   The image data capturing unit 102 captures an input image including an object photographed by the camera 11, and the image data (hereinafter referred to as input image data) of the captured input image is smoothed by a smoothing unit 103, a grayscale conversion unit 108, and an outline. The result is output to the extraction result output unit 111.

平滑化部103は、画像データ取り込み部102が取り込んだ入力画像データと、外部設定値取り込み部101が出力する外部設定値を取り込む。また、平滑化部102は、取り込んだ外部設定値から、平滑化手法の種類や平滑化の各種パラメータを読み出す。また、平滑化部102は、取り込んだ入力画像データを、読み出した平滑化手法の種類に基づき、例えばガウシアン・フィルタを用いて、取り込んだ外部設定値の回数の平滑化を行う。また、平滑化部103は、平滑化した画像データを色空間分離部104に出力する。   The smoothing unit 103 captures the input image data captured by the image data capturing unit 102 and the external setting value output by the external setting value capturing unit 101. Also, the smoothing unit 102 reads out the type of smoothing method and various parameters for smoothing from the acquired external setting values. Further, the smoothing unit 102 smoothes the acquired input image data by the number of acquired external setting values, for example, using a Gaussian filter, based on the type of the read smoothing method. Also, the smoothing unit 103 outputs the smoothed image data to the color space separation unit 104.

色空間分離部104は、平滑化部103が平滑化した平滑後画像データ(以下、平滑後画像データという)と外部設定値取り込み部101が出力する外部設定値を取り込む。また、色空間分離部104は、取り込んだ平滑後画像データを外部設定値の分離手法指示に基づき色空間成分の各チャンネルの画像データに分離する。色空間成分の分離手法は、RGB(赤緑青)、CMY(シアン、マゼンダ、イエロー)、HSV(色相、彩度、明度)、YCbCr(輝度、青信号色差、赤信号色差)、YPbPr(輝度、青信号色差、赤信号色差)などである。また、色空間分離部104は、色空間成分に分離した各チャンネルの画像データを色空間成分二値化部105に出力する。   The color space separation unit 104 captures the smoothed image data smoothed by the smoothing unit 103 (hereinafter referred to as smoothed image data) and the external setting value output by the external setting value capturing unit 101. Further, the color space separation unit 104 separates the captured smoothed image data into image data of each channel of the color space component based on an instruction for a separation method of external setting values. Color space component separation methods are RGB (red green blue), CMY (cyan, magenta, yellow), HSV (hue, saturation, brightness), YCbCr (luminance, blue signal color difference, red signal color difference), YPbPr (luminance, blue signal). Color difference, red signal color difference), and the like. In addition, the color space separation unit 104 outputs the image data of each channel separated into color space components to the color space component binarization unit 105.

色空間成分二値化部105は、色空間分離部104が分離した各チャンネルの画像データを取り込む。また、色空間成分二値化部105は、取り込んだ各チャンネルの画像データを、例えば1979年に大津展之によって提案された閾値設定手法(以下、大津の閾値設定手法という)を用いて二値化する。また、色空間成分二値化部105は、二値化した各チャンネルの画像データを初期輪郭生成部106に出力する。   The color space component binarization unit 105 takes in the image data of each channel separated by the color space separation unit 104. In addition, the color space component binarization unit 105 binarizes the captured image data of each channel using a threshold setting method (hereinafter referred to as Otsu's threshold setting method) proposed by, for example, Noriyuki Otsu in 1979. Turn into. Further, the color space component binarization unit 105 outputs the binarized image data of each channel to the initial contour generation unit 106.

初期輪郭生成部106は、色空間成分二値化部105が二値化した各チャンネルの画像データ(以後、二値化画像データという)を取り込む。また、初期輪郭生成部106は、取り込んだ各チャンネルの二値化画像データの各画素値を画素値記憶部106に書き込んで記憶させる。また、初期輪郭生成部106は、取り込んだ各チャンネルの二値化画像データと二値化記憶部106に記憶した画素値を用いて、後述する手順で初期輪郭画像データを生成する。また、初期輪郭生成部106は、生成した初期輪郭画像データを濃淡強調部108と輪郭抽出部110に出力する。   The initial contour generation unit 106 captures image data of each channel binarized by the color space component binarization unit 105 (hereinafter referred to as binarized image data). Further, the initial contour generation unit 106 writes and stores each pixel value of the captured binary image data of each channel in the pixel value storage unit 106. In addition, the initial contour generation unit 106 generates initial contour image data according to a procedure described later, using the captured binary image data of each channel and the pixel values stored in the binarization storage unit 106. Further, the initial contour generation unit 106 outputs the generated initial contour image data to the density enhancement unit 108 and the contour extraction unit 110.

画素値記憶部107は、各チャンネルの二値化画像データの各画素値を記憶する。図2は、画素値記憶部107が記憶しているRGB成分の各画素値の構成の一例を示す図である。色空間分離部103が、平滑後画像データをRGBに分離した場合、図2のように、表形式のデータとして実現されており、画素1のRチャンネルの画素値P(1または0)、Gチャンネルの画素値P(1または0)、Bチャンネルの画素値P(1または0)の各データを有している。 The pixel value storage unit 107 stores each pixel value of the binarized image data of each channel. FIG. 2 is a diagram illustrating an example of the configuration of each pixel value of the RGB components stored in the pixel value storage unit 107. When the color space separation unit 103 separates the smoothed image data into RGB, as shown in FIG. 2, it is realized as tabular data, and the pixel value P R (1 or 0) of the R channel of the pixel 1 Each data includes a G channel pixel value P G (1 or 0) and a B channel pixel value P B (1 or 0).

グレースケール変換部108は、画像データ取り込み部102が取り込んだ入力画像を取り込む。また、グレースケール変換部108は、取り込んだ入力画像が、カラー画像データかグレースケール画像かを判定する。また、グレースケール変換部108は、入力画像をカラー画像と判定した場合、入力画像を一般的な手法でグレースケール画像データに変換する。また、グレースケール変換部108は、変換したグレースケール画像データを濃淡強調部109と輪郭抽出部110に出力する。   The gray scale conversion unit 108 captures the input image captured by the image data capturing unit 102. Further, the gray scale conversion unit 108 determines whether the captured input image is color image data or a gray scale image. Further, when the grayscale conversion unit 108 determines that the input image is a color image, the grayscale conversion unit 108 converts the input image into grayscale image data by a general method. Further, the gray scale conversion unit 108 outputs the converted gray scale image data to the density enhancement unit 109 and the contour extraction unit 110.

濃淡強調部109は、外部設定値取り込み部101が取り込んだ外部設定値と、初期輪郭生成部106が生成した初期輪郭画像データと、グレースケール変換部108が変換したグレースケール画像データとを取り込む。また、濃淡強調部109は、取り込んだ外部設定値から、濃淡強調処理を行うか否かの指示値や濃淡強調処理の各種パラメータを読み出す。また、濃淡強調部109は、読み出した外部設定値の濃淡強調処理を行うか否かの指示値や濃淡強調処理時の乗数と、初期輪郭画像データを用いて、後述する手法でグレースケール画像データの濃淡強調を行い、濃淡強調画像データを生成する。また、濃淡強調部109は、生成した濃淡強調画像データを輪郭抽出部110に出力する。   The density enhancement unit 109 captures the external setting values captured by the external setting value capturing unit 101, the initial contour image data generated by the initial contour generation unit 106, and the grayscale image data converted by the grayscale conversion unit 108. Further, the light / dark emphasis unit 109 reads out an instruction value as to whether or not to perform light / dark emphasis processing and various parameters of the light / dark emphasis processing from the acquired external setting values. In addition, the gray level enhancement unit 109 uses the instruction value as to whether or not to perform the gray level enhancement process of the read external setting value, the multiplier at the time of the gray level enhancement process, and the initial contour image data, and the grayscale image data by a method described later. Is emphasized, and density-enhanced image data is generated. In addition, the density enhancement unit 109 outputs the generated density enhancement image data to the contour extraction unit 110.

輪郭抽出部110は、外部設定値取り込み部101が出力する外部設定値と、初期輪郭生成部106が出力する初期輪郭画像データと、グレースケール変換部108が出力するグレースケール画像データと、濃淡強調部109が生成した濃淡強調画像データを取り込む。また、輪郭抽出部110は、取り込んだ外部設定値から動的輪郭法の手法の種類を示す情報や動的輪郭法の各種パラメータを読み出す。また、輪郭抽出部110は、初期輪郭画像データと、外部設定値の動的輪郭法の各種パラメータ(処理手法、計算回数など)とを用いて、動的輪郭法で濃淡強調画像データを入力画像データに用いて、濃淡強調画像データから対象物の輪郭データを抽出する。また、輪郭抽出部110は、抽出した輪郭データを輪郭抽出結果出力部111に出力する。   The contour extraction unit 110 outputs external setting values output from the external setting value capturing unit 101, initial contour image data output from the initial contour generation unit 106, grayscale image data output from the grayscale conversion unit 108, and density enhancement. The grayscale emphasized image data generated by the unit 109 is taken in. The contour extraction unit 110 reads information indicating the type of the dynamic contour method and various parameters of the dynamic contour method from the acquired external setting values. In addition, the contour extraction unit 110 uses the initial contour image data and various parameters (processing method, number of calculations, etc.) of the dynamic contour method of the external setting value to input the grayscale emphasized image data by the dynamic contour method. Using the data, the contour data of the object is extracted from the density-enhanced image data. In addition, the contour extraction unit 110 outputs the extracted contour data to the contour extraction result output unit 111.

輪郭抽出結果出力部111は、画像データ取り込み部102が出力する入力画像と、輪郭抽出部110が抽出した対象物の輪郭データを取り込む。また、輪郭抽出結果出力部111は、取り込んだ入力画像から輪郭データを用いて、背景領域を除去した対象物の画像データを抽出する。また、輪郭抽出結果出力部110は、抽出した対象物の画像データを画像表示装置13に出力する。   The contour extraction result output unit 111 captures the input image output from the image data capturing unit 102 and the contour data of the object extracted by the contour extracting unit 110. In addition, the contour extraction result output unit 111 extracts image data of the target object from which the background region has been removed using the contour data from the input image that has been captured. The contour extraction result output unit 110 outputs the extracted image data of the object to the image display device 13.

次に、図3を用いて、本実施形態における輪郭抽出手順の概略の一例を説明する。図3(a)のような入力画像201を取得し、取得した入力画像201にぼかし処理(平滑化)を行い、図3(b)のような平滑後画像データ202を生成する。次に、ぼかし処理した平滑後画像データ202をRGBの色空間成分に分離し、分離した各チャンネルの画像データを二値化する。二値化後、二値化画像データを用いて図3(c)のような初期輪郭画像データ203を生成する。一方、取得した入力画像201をグレースケール化した後、濃淡強調を行い図3(d)のような濃淡強調画像データ204を生成する。次に、初期輪郭画像データ203と濃淡強調画像データ204を用いて動的輪郭法で対象物205の輪郭データを抽出する。次に、輪郭データを用いて、図3(e)のような入力画像から背景を除去した対象物205の画像データを抽出する。   Next, an example of the outline of the contour extraction procedure in the present embodiment will be described with reference to FIG. An input image 201 as shown in FIG. 3A is acquired, and the acquired input image 201 is subjected to blurring processing (smoothing) to generate smoothed image data 202 as shown in FIG. Next, the smoothed post-smoothing image data 202 is separated into RGB color space components, and the separated image data of each channel is binarized. After binarization, initial contour image data 203 as shown in FIG. 3C is generated using the binarized image data. On the other hand, after the acquired input image 201 is converted to gray scale, density enhancement is performed to generate density enhanced image data 204 as shown in FIG. Next, the contour data of the object 205 is extracted by the dynamic contour method using the initial contour image data 203 and the grayscale emphasized image data 204. Next, using the contour data, image data of the object 205 from which the background has been removed from the input image as shown in FIG.

次に、平滑化(ぼかし処理)を行う優位性の一例を、図4と図5を用いて説明する。図4(a)は、模様が複雑な対象物を含む入力画像の一例である。図4(b)は、図4(a)を二値化処理で生成した初期輪郭画像データの一例である。図4(a)のように対象物の模様が複雑な場合、この画像データをそのまま一般的な二値化処理で初期輪郭画像データの生成を行うと図4(b)のようになり、非常に多くのデータを含んでいる。図4(b)の画像データを初期輪郭に用いてsnake法で輪郭を抽出した場合、初期輪郭画像データに含まれる線分の総長が長いため、計算回数が増大し、結果として輪郭の抽出時間が増大する。
一方、図4(a)の入力画像にガウシアン・フィルタによる平滑化処理を3回行うと、図5(a)のように入力画像がぼける。この図5(a)の画像データから初期輪郭画像データを生成すると、図5(b)のように図4(b)に対して模様データを削減した初期輪郭画像データを生成することができる。また、このように入力画像をぼかした状態においても、図5(b)のように初期輪郭画像データは、動的輪郭法で対象物の輪郭を抽出可能な対象物の輪郭を構成する成分の情報を含んでいる。この図5(b)の初期輪郭画像データを用いて輪郭を抽出した方が、図4(b)の初期輪郭画像データを用いて輪郭を抽出するより高速に処理を行える。
すなわち、入力画像に対して、適切な手法で適切な回数の平滑化を行うことで、輪郭抽出の演算量を削減でき、この結果、輪郭抽出を高速に行うことができる。
Next, an example of superiority in performing smoothing (blurring processing) will be described with reference to FIGS. FIG. 4A is an example of an input image including an object with a complicated pattern. FIG. 4B is an example of initial contour image data generated by binarization processing of FIG. When the pattern of the object is complex as shown in FIG. 4A, if the initial contour image data is generated as it is by general binarization processing as it is, this image data becomes as shown in FIG. Contains a lot of data. When the image data of FIG. 4B is used as the initial contour and the contour is extracted by the snake method, the total length of the line segments included in the initial contour image data is long, so that the number of calculations increases, resulting in the contour extraction time. Will increase.
On the other hand, if smoothing processing using a Gaussian filter is performed three times on the input image of FIG. 4A, the input image is blurred as shown in FIG. When the initial contour image data is generated from the image data of FIG. 5A, initial contour image data in which the pattern data is reduced as compared with FIG. 4B can be generated as shown in FIG. 5B. Even in the state where the input image is blurred in this way, the initial contour image data as shown in FIG. 5B is a component of the contour of the target object that can extract the contour of the target object by the dynamic contour method. Contains information. If the contour is extracted using the initial contour image data shown in FIG. 5B, the processing can be performed at a higher speed than the case where the contour is extracted using the initial contour image data shown in FIG.
That is, by performing an appropriate number of smoothings on an input image by an appropriate method, the amount of contour extraction can be reduced, and as a result, contour extraction can be performed at high speed.

次に、輪郭抽出方法を図6の初期輪郭画像データの生成手順図と、図7〜図11のフローチャートを用いて説明する。図6は、初期輪郭画像データの生成手順の概略を示す図である。図7は、輪郭抽出手順を説明するフローチャートであり、図8と図9は、初期輪郭画像データの生成手順のフローチャートであり、図10は各色空間成分のマスクデータ生成手順のフローチャートであり、図11は、濃淡強調手順のフローチャートである。本実施形態では、入力画像はカラー画像であり、外部設定値により、色空間分離手法はRGBが指示され、平滑化手法はガウシアン処理が指示され、濃淡強調処理を行うように指示されている場合について説明する。   Next, the contour extraction method will be described with reference to the procedure for generating the initial contour image data in FIG. 6 and the flowcharts in FIGS. FIG. 6 is a diagram showing an outline of a procedure for generating initial contour image data. FIG. 7 is a flowchart for explaining a contour extraction procedure, FIGS. 8 and 9 are flowcharts for a procedure for generating initial contour image data, and FIG. 10 is a flowchart for a mask data generation procedure for each color space component. 11 is a flowchart of the contrast enhancement procedure. In the present embodiment, when the input image is a color image, RGB is designated as the color space separation method, Gaussian processing is instructed as the smoothing method, and tone enhancement processing is instructed by the external setting value Will be described.

まず、外部設定値読み込み部101は、輪郭抽出処理に用いる各種の設定である外部設定値を取り込む(ステップS1)。また、外部設定値読み込み部101は、取り込んだ外部設定値を平滑化部103と色空間分離部104と濃淡強調部109と輪郭抽出部110に出力する。   First, the external setting value reading unit 101 takes in external setting values that are various settings used in the contour extraction process (step S1). The external setting value reading unit 101 outputs the acquired external setting value to the smoothing unit 103, the color space separation unit 104, the density enhancement unit 109, and the contour extraction unit 110.

次に、輪郭抽出装置10は、初期輪郭画像データの生成処理を行う(ステップS2)。ステップS2の初期輪郭画像データの生成処理手順を、図8と図9のフローチャートと図6を用いて説明する。まず、画像データ取り込み部102は、カメラ11が撮像した図6に示す入力画像301を取り込む(ステップS101)。また、画像データ取り込み部102は、取り込んだ入力画像301を平滑化部103とグレースケール変換部108と輪郭抽出結果出力部111に出力する。   Next, the contour extracting apparatus 10 performs initial contour image data generation processing (step S2). The procedure for generating the initial contour image data in step S2 will be described with reference to the flowcharts of FIGS. 8 and 9 and FIG. First, the image data capturing unit 102 captures the input image 301 shown in FIG. 6 captured by the camera 11 (step S101). Further, the image data capturing unit 102 outputs the captured input image 301 to the smoothing unit 103, the grayscale conversion unit 108, and the contour extraction result output unit 111.

平滑化部103は、画像データ取り込み部102が取り込んだ入力画像301と、外部設定値取り込み部101が取り込んだ外部設定値を取り込む。また、二値化部103は、取り込んだ外部設定値から平滑化手法や平滑化の各種パラメータを読み出す。読み出した外部設定値に基づき、平滑化部103は、入力画像301に対して、ガウシアン処理を外部設定値で設定されている回数、例えば3回行う(ステップS102〜S104)。   The smoothing unit 103 captures the input image 301 captured by the image data capturing unit 102 and the external setting value captured by the external setting value capturing unit 101. In addition, the binarization unit 103 reads the smoothing method and various parameters for smoothing from the acquired external setting values. Based on the read external setting value, the smoothing unit 103 performs Gaussian processing on the input image 301 the number of times set by the external setting value, for example, three times (steps S102 to S104).

外部設定値の指示回数のガウシアン処理を終了した後、平滑化部103は、ガウシアン処理を行った図6に示す平滑後画像データ311を平滑部103に書き込んで記憶させる(ステップS105)。また、平滑化部103は、平滑後画像データ311を読み出し、色空間分離部104に出力する(ステップS105)。   After finishing the Gaussian processing for the number of times of external set value instruction, the smoothing unit 103 writes and stores the smoothed image data 311 shown in FIG. 6 subjected to the Gaussian processing in the smoothing unit 103 (step S105). Also, the smoothing unit 103 reads the smoothed image data 311 and outputs it to the color space separation unit 104 (step S105).

次に、色空間分離部104は、平滑化部103が平滑化した平滑後画像データ311と外部設定値取り込み部101が取り込んだ外部設定値を取り込む。また、色空間分離部104は、取り込んだ外部設定値から色空間分離手法の種類を読み出す。また、色空間分離部104は、外部設定値に基づき、画像データ311を一般的な手法を用いてRGBの各チャンネルの画像データに分離する(ステップS106)。また、色空間分離部104は、分離したRGBの各チャンネルの図6に示す画像データ(321、322、323)を色空間成分二値化部105に出力する。   Next, the color space separation unit 104 captures the smoothed image data 311 smoothed by the smoothing unit 103 and the external setting value captured by the external setting value capturing unit 101. Further, the color space separation unit 104 reads the type of the color space separation method from the acquired external setting value. In addition, the color space separation unit 104 separates the image data 311 into RGB channel image data using a general method based on the external setting value (step S106). Further, the color space separation unit 104 outputs the image data (321, 322, 323) of the separated RGB channels shown in FIG. 6 to the color space component binarization unit 105.

次に、色空間成分二値化部105は、色空間分離部104が分離したRGBの各チャンネルの画像データ(321、322、323)を取り込む。また、色空間成分二値化部105は、取り込んだRGBの各チャンネルの画像データ(321、322、323)に対して、チャンネルごとに輪郭マスク処理を行う(ステップS107〜S108)。   Next, the color space component binarization unit 105 takes in the image data (321, 322, 323) of each of the RGB channels separated by the color space separation unit 104. Further, the color space component binarization unit 105 performs contour mask processing for each channel on the captured RGB image data (321, 322, 323) (steps S107 to S108).

ステップS107〜S108のチャンネルごとの輪郭マスク処理について、図10のフローチャートを用いて説明する。なお、RGBのチャンネルごとの輪郭マスク処理は、同一のステップS301〜S306の処理を行うため、重複する箇所の説明は省略する。
まず、Rチャンネルの輪郭マスク処理について説明する。色空間成分二値化部105は、取り込んだRチャンネルの画像データ321のヒストグラムを生成する(ステップS301)。
The contour mask process for each channel in steps S107 to S108 will be described with reference to the flowchart of FIG. Note that the contour mask processing for each of the RGB channels performs the same steps S301 to S306, and thus the description of the overlapping portions is omitted.
First, R channel contour mask processing will be described. The color space component binarization unit 105 generates a histogram of the captured R channel image data 321 (step S301).

次に、色空間成分二値化部105は、生成したヒストグラムを用いて、例えば大津の閾値判定手法を用いて、二値化の閾値を算出する(ステップS302)。   Next, the color space component binarization unit 105 uses the generated histogram to calculate a binarization threshold using, for example, the Otsu threshold determination method (step S302).

次に、色空間成分二値化部105は、算出した閾値を用いて、Rチャンネルの画像データ321を二値化する(ステップS303)。また、色空間成分二値化部105は、二値化した画像データを初期輪郭生成部106に出力する。   Next, the color space component binarization unit 105 binarizes the R channel image data 321 using the calculated threshold value (step S303). Further, the color space component binarization unit 105 outputs the binarized image data to the initial contour generation unit 106.

次に、初期輪郭生成部106は、色空間成分二値化部105が二値化した画像データ(以後、二値化画像データという)321を取り込む。また、初期輪郭生成部106は、取り込んだ二値化画像データの中心部の画素331が黒画素、すなわち画素値P=0であるか、白画素P=1であるか判定する(ステップS304)。
二値化画像データの中心部の画素331が黒画素(画素値P=0)と判定した場合(ステップS304;0)、初期輪郭生成部106は、二値化画素データ321のすべての画素値の0と1を入れ替えて、白黒を反転した画像データを生成する(ステップS305)。また、初期輪郭生成部106は、反転した二値化画像データを輪郭マスク画像データとして画素値記憶部107に書き込んで記憶させる。
また、二値化画像データの中心部の画素321が白画素(画素値P=1)と判定した場合(ステップS304;1)、初期輪郭生成部106は、二値化画素データの反転は行わず、そのまま二値化画像データを輪郭マスク画像データとして初期輪郭生成部106に書き込んで記憶させる。
Rチャンネルの画像データ321の場合、初期輪郭生成部106は、二値化画像データの中心部の画素331を白画素と判定し、二値化画素データの反転は行わず、そのまま二値化画像データを輪郭マスク画像データとして初期輪郭生成部106に書き込んで記憶させる。
Next, the initial contour generation unit 106 takes in the image data (hereinafter referred to as binarized image data) 321 binarized by the color space component binarization unit 105. Further, the initial contour generation unit 106 determines whether the pixel 331 at the center of the captured binarized image data is a black pixel, that is, whether the pixel value P R = 0 or the white pixel P R = 1 (step S1). S304).
When it is determined that the pixel 331 at the center of the binarized image data is a black pixel (pixel value P R = 0) (step S304; 0), the initial contour generation unit 106 selects all the pixels of the binarized pixel data 321. The values 0 and 1 are exchanged to generate image data with black and white inverted (step S305). Further, the initial contour generation unit 106 writes and stores the inverted binarized image data in the pixel value storage unit 107 as contour mask image data.
Also, when the pixel 321 at the center of the binarized image data is determined to a white pixel (pixel value P R = 1) (Step S304; 1), the initial contour generation unit 106 inverts the binarized pixel data Instead, the binarized image data is written and stored in the initial contour generation unit 106 as contour mask image data as it is.
In the case of the R channel image data 321, the initial contour generation unit 106 determines that the pixel 331 at the center of the binarized image data is a white pixel, does not invert the binarized pixel data, and does not invert the binarized image. The data is written and stored in the initial contour generation unit 106 as contour mask image data.

Gチャンネルの画像データ322の場合、ステップ301〜ステップ306まで同様の処理が行われ、初期輪郭生成部106は、二値化画像データの中心部の画素332を白画素と判定し、二値化画素データの反転は行わず、そのまま二値化画像データを輪郭マスク画像データとして初期輪郭生成部106に書き込んで記憶させる。   In the case of the image data 322 of the G channel, the same processing is performed from step 301 to step 306, and the initial contour generation unit 106 determines that the pixel 332 at the center of the binarized image data is a white pixel and binarizes it. The pixel data is not inverted, and the binarized image data is written and stored in the initial contour generation unit 106 as contour mask image data as it is.

Bチャンネルの画像データ323の場合、ステップ301〜ステップ306まで同様の処理が行われ、初期輪郭生成部106は、二値化画像データの中心部の画素333を黒画素と判定し、反転した二値化画像データを輪郭マスク画像データとして初期輪郭生成部106に書き込んで記憶させる。   In the case of the B channel image data 323, the same processing is performed from step 301 to step 306, and the initial contour generation unit 106 determines that the pixel 333 at the center of the binarized image data is a black pixel and inverts it. The valued image data is written and stored in the initial contour generation unit 106 as contour mask image data.

二値化画像データの中心部の画素が黒画素か白画素かを判定して、二値化画像データの白黒反転を行う理由について図6を用いて説明する。図6において、RGB各チャネルに分離後、二値化した画像データが、Rチャンネル画像データ321、Gチャンネル画像データ322、Bチャンネル画像データ323である。図6において、対象物の色は青色であるため、RGB各チャネルに分離後、二値化すると、Bチャンネル画像データ323は背景だけではなく、対象物の画素値Pも0、すなわち黒で表されてしまう。これらの画像データ321〜323を重ね合わせると、画像データ343のような画像になる。すなわち、対象物が画素値=0(黒画素)で表され、対象物を抽出する初期輪郭画像データの生成が行いにくくなる。抽出する対象物は、入力画像の中心部に含まれていると仮定し、画像データの中心部の画素値が0の場合、二値化により対象物が黒画素に生成されていると判定し、画像データ全体の画素を白黒反転することで対象物の画素値を1に設定し直している。これらの処理により、RGB各チャネルの画像データを重ね合わせても画像データ341のように対象物の画素値=1を維持できる。 The reason for determining whether the pixel at the center of the binarized image data is a black pixel or a white pixel and performing the black and white inversion of the binarized image data will be described with reference to FIG. In FIG. 6, the image data binarized after being separated into RGB channels is R channel image data 321, G channel image data 322, and B channel image data 323. In FIG. 6, since the color of the object is blue, when binarized after separation into RGB channels, the B channel image data 323 is not only the background, but also the pixel value P B of the object is 0, that is, black. It will be represented. When these image data 321 to 323 are superimposed, an image like the image data 343 is obtained. That is, the object is represented by a pixel value = 0 (black pixel), and it is difficult to generate initial contour image data for extracting the object. The object to be extracted is assumed to be included in the center of the input image, and if the pixel value at the center of the image data is 0, it is determined that the object is generated as a black pixel by binarization. The pixel value of the object is reset to 1 by reversing the pixels of the entire image data in black and white. With these processes, the pixel value of the object = 1 can be maintained as in the image data 341 even when the image data of each of the RGB channels is superimposed.

図8のフローチャートに戻り、初期輪郭生成部106は、記憶したRGB各チャネルの各輪郭マスク画像データを読み出し、読み出したRGBの各輪郭マスク画像データを重ね合わせ、重ね合わせた画像データ341を生成する(ステップS110)。また、初期輪郭生成部106は、重ね合わせた画像データと、RGB各チャネルの画素値(P,P,P)を画素値記憶部108に書き込んで記憶させる(ステップS111)。
分解したRGBの各輪郭マスク画像データを重ねる理由は以下である。例えば、対象物の中心部のみが青(B)の場合、ステップS304の判定によりBチャンネルの画像データ323全体の白黒反転が行われる。この場合、例えば、分解したBチャンネルのみを使用して初期輪郭画像データを生成すると、初期輪郭画像データが適正に生成できない。このため、RGBの各輪郭マスク画像データを重ね合わせることで、1チャンネルのみで初期輪郭画像データを生成する誤検出を防ぐことができので、適正に初期輪郭画像データを生成できる。
Returning to the flowchart of FIG. 8, the initial contour generation unit 106 reads out the stored contour mask image data of each RGB channel, superimposes the read out RGB contour mask image data, and generates superimposed image data 341. (Step S110). Further, the initial contour generation unit 106 writes and stores the superimposed image data and the pixel values (P R , P G , P B ) of the RGB channels in the pixel value storage unit 108 (step S111).
The reason for superimposing the decomposed RGB contour mask image data is as follows. For example, when only the center of the object is blue (B), the entire B channel image data 323 is reversed in black and white according to the determination in step S304. In this case, for example, if the initial contour image data is generated using only the decomposed B channel, the initial contour image data cannot be generated properly. For this reason, by superimposing the RGB contour mask image data, it is possible to prevent erroneous detection of generating the initial contour image data with only one channel, so that the initial contour image data can be appropriately generated.

次に、図9のフローチャートに移り、初期輪郭生成部106は、重ね合わせた画像データのすべての画素について、RGB各チャネルの画素値(P,P,P)の合計値=3か否かの判定を繰り返す(ステップS201〜S204)。
RGB各チャネルの画素値の合計値=3以外の場合(ステップS202;No)、その画素のRGB各チャネルの各画素値に0を代入し、すなわち黒画素にする(ステップS203)。すなわち、P=0、P=0、P=0を代入し、画素値記憶部108に記憶されている画素値を書き換える。
RGB各チャネルの画素値の合計値=3、すなわち、すべての画素が白画素の場合(ステップS202;Yes)、RGB各チャネルの各画素値P、P、Pの値は変更しない(ステップS203)。
Next, moving to the flowchart of FIG. 9, the initial contour generation unit 106 determines whether the total value of the pixel values (P R , P G , P B ) of the RGB channels for all the pixels of the superimposed image data = 3. The determination of whether or not is repeated (steps S201 to S204).
When the total value of the pixel values of each RGB channel is other than 3 (step S202; No), 0 is substituted for each pixel value of each RGB channel of the pixel, that is, a black pixel is obtained (step S203). That is, P R = 0, P G = 0, and P B = 0 are substituted, and the pixel value stored in the pixel value storage unit 108 is rewritten.
Sum = 3 of the pixel values of each RGB channel, i.e., if all the pixels are white pixels (Step S202; Yes), the pixel value of each RGB channel P R, P G, the value of P B is not changed ( Step S203).

すべての画像データについて画素値の処理が終了後、初期輪郭生成部106は、画素値記憶部107に記憶されているRGB各チャネルの画素値(P,P,P)を読み出して初期輪郭画像データを生成する。また、初期輪郭生成部106は、生成した初期輪郭画像データを初期輪郭生成部106に書いて記憶させる(ステップS205)。
初期輪郭画像データの生成は、RGB各チャネルの画素値(P,P,P)のうち少なくとも1つが0、すなわち黒画素の場合、初期輪郭生成部106は、その画素の画素値を0にして、初期輪郭画像データを生成する。また、RGB各チャネルの画素値(P,P,P)がすべて1、すなわち白画素の場合、初期輪郭生成部106は、その画素の画素値を1に設定して、初期輪郭画像データ351を生成する。
After the pixel value processing for all image data is completed, the initial contour generation unit 106 reads out the pixel values (P R , P G , P B ) of the RGB channels stored in the pixel value storage unit 107 and performs initial processing. Contour image data is generated. Further, the initial contour generation unit 106 writes and stores the generated initial contour image data in the initial contour generation unit 106 (step S205).
When the initial contour image data is generated, when at least one of the pixel values (P R , P G , P B ) of each RGB channel is 0, that is, a black pixel, the initial contour generation unit 106 sets the pixel value of the pixel. Set to 0 to generate initial contour image data. Further, when the pixel values (P R , P G , P B ) of each of the RGB channels are all 1, that is, white pixels, the initial contour generation unit 106 sets the pixel value of the pixel to 1, and the initial contour image Data 351 is generated.

また、初期輪郭生成部106は、生成した初期輪郭画像データ351を濃淡強調部109と輪郭抽出部110に出力する(ステップS206)。
以上で、ステップS2の初期輪郭画像データの生成処理を終了する。
In addition, the initial contour generation unit 106 outputs the generated initial contour image data 351 to the density enhancement unit 109 and the contour extraction unit 110 (step S206).
This completes the initial contour image data generation processing in step S2.

図7のフローチャートに戻り、濃淡強調部109は、濃淡強調処理を行う(ステップS3)。濃淡強調処理手順について、図11のフローチャートを用いて説明する。   Returning to the flowchart of FIG. 7, the shading enhancement unit 109 performs shading enhancement processing (step S <b> 3). The density enhancement processing procedure will be described with reference to the flowchart of FIG.

濃淡強調部109は、外部設定値取り込む部101が取り込んだ外部設定値を取り込む。また、濃淡強調部109は、取り込んだ外部設定値から濃淡強調処理を行うか否かの指示や濃淡強調処置の各種パラメータを読み込む。濃淡強調処理を行う指示の場合、読み込んだ濃淡設定のパラメータに基づき、ステップS401〜ステップS410の処理を行い、濃淡強調処理を行なわない指示の場合、濃淡強調処理は行わず、ステップS4に進む。
濃淡強調処理を行う指示の場合、グレースケール変換部108は、画像データ取り込む部102が取り込んだ入力画像を取り込み、取り込んだ入力画像が、カラー画像データかグレースケール画像データかを判定する。また、グレースケール変換部108は、入力画像をカラー画像データと判定した場合、入力画像を一般的な手法で256階調のグレースケール画像データに変換し、変換したグレースケール画像データをグレースケール変換部108に書き込んで記憶させる(ステップS401)。
The density enhancement unit 109 captures the external setting value captured by the external setting value capturing unit 101. Also, the density enhancement unit 109 reads an instruction as to whether or not to perform density enhancement processing and various parameters of density enhancement processing from the acquired external setting value. In the case of an instruction to perform density emphasis processing, the processing in steps S401 to S410 is performed based on the read density setting parameter. In the case of an instruction not to perform density emphasis processing, the processing proceeds to step S4 without performing density emphasis processing.
In the case of an instruction to perform density enhancement processing, the grayscale conversion unit 108 captures the input image captured by the image data capturing unit 102 and determines whether the captured input image is color image data or grayscale image data. When the grayscale conversion unit 108 determines that the input image is color image data, the grayscale conversion unit 108 converts the input image into 256-level grayscale image data using a general method, and converts the converted grayscale image data to grayscale conversion. The data is written and stored in the unit 108 (step S401).

次に、グレースケール変換部108は記憶するグレースケール画像データを濃淡強調部109に出力する(ステップS402)。さらに初期輪郭生成部106が生成した初期輪郭画像データを取り込む(ステップS402)。   Next, the gray scale conversion unit 108 outputs the stored gray scale image data to the density enhancement unit 109 (step S402). Further, the initial contour image data generated by the initial contour generation unit 106 is captured (step S402).

次に、濃淡強調部109は、グレースケール変換部108が出力したグレースケール画像データと、取り込んだ初期輪郭画像データを用いて、グレースケール画像データのすべての画素についてステップS404〜ステップS410の処理を繰り返して濃淡強調を行い、濃淡強調した濃淡強調画像データを生成する。ステップS404〜ステップS410の処理は、濃淡強調処理の各種パラメータが、画素を濃くする(強調する)場合は画素値を1/2倍、画素を薄くする場合は画素値を2倍にする指示の例を説明する。   Next, the density enhancement unit 109 uses the grayscale image data output from the grayscale conversion unit 108 and the captured initial contour image data to perform the processing of steps S404 to S410 for all the pixels of the grayscale image data. The density emphasis is repeatedly performed, and the density emphasized image data in which the density is emphasized is generated. In the processing from step S404 to step S410, the various parameters of the shading enhancement processing are instructions for doubling the pixel value when the pixel is darkened (emphasized) and doubling the pixel value when thinning the pixel. An example will be described.

次に、濃淡強調部109は、読み出したグレースケール画像データの中から、まだ読み出していない1つの画素を読み出す。また、濃淡強調部109は、読み出した1つの画素を、取り込んだ初期輪郭画像データと比較して、背景か対象物かを判定する(ステップS405)。
具体的な例を、図3を用いて説明する。図3のように初期輪郭画像データ203において、背景206の画素は黒画素(画素値=0)であり、対象物207の画素は白画素(画素値=1)を有している。濃淡強調部109は、グレースケール画像データの各画素を初期輪郭画像データの同一位置の各画素と比較する。濃淡強調部109は、比較の結果、初期輪郭画像データの画素値が0であれば背景と判定し、初期輪郭画像データの画素値が1であれば対象物であると判定する。
Next, the shading enhancement unit 109 reads one pixel that has not been read out from the read grayscale image data. Also, the density enhancement unit 109 compares the read one pixel with the captured initial contour image data to determine whether it is a background or an object (step S405).
A specific example will be described with reference to FIG. As shown in FIG. 3, in the initial contour image data 203, the pixel of the background 206 is a black pixel (pixel value = 0), and the pixel of the object 207 has a white pixel (pixel value = 1). The density enhancement unit 109 compares each pixel of the grayscale image data with each pixel at the same position in the initial contour image data. If the pixel value of the initial contour image data is 0 as a result of the comparison, the density enhancement unit 109 determines that the background is present, and if the pixel value of the initial contour image data is 1, it determines that the object is an object.

ステップ405の判定の結果、読み出した画素が対象物であると判定した場合(ステップS405;1(対象物))、濃淡強調部109は、外部設定値に基づき、その画素の画素値を1/2倍することで画素値を薄くする(ステップS406)。   As a result of the determination in step 405, when it is determined that the read pixel is an object (step S405; 1 (object)), the shading enhancement unit 109 sets the pixel value of the pixel to 1 / based on the external setting value. The pixel value is reduced by doubling the pixel value (step S406).

ステップ405の判定の結果、読み出した画素が背景であると判定した場合(ステップS405;0(背景))、濃淡強調部109は、外部設定値に基づき、その画素の画素値を2倍することで画素値を薄くする(ステップS407)。   As a result of the determination in step 405, when it is determined that the read pixel is the background (step S405; 0 (background)), the shading enhancement unit 109 doubles the pixel value of the pixel based on the external setting value. Thus, the pixel value is reduced (step S407).

また、濃淡強調部109は、ステップS407終了後、画素値が255より大きいか否かを判定する(S408)。
ステップS408の判定の結果、255以下であると判定した場合(ステップS407;false)、濃淡強調部109は、この画素の濃淡強調処理を終了し、まだ処理の終了していない画素があればすべての画素の濃淡強調処理が終了するまでステップS404〜ステップS410を繰り返す(ステップS410)。
ステップS408の判定の結果、255より大きいと判定した場合(ステップS407;true)、濃淡強調部109は、この画素値に255を代入し、この画素の濃淡強調処理を終了する。また、濃淡強調部109は、まだ処理の終了していない画素があればすべての画素の濃淡強調処理が終了するまでステップS404〜ステップS410を繰り返す(ステップS410)。
本実施形態において、入力画像を256階調のグレースケール画像データに変換しているため、ステップS408〜ステップS409の処理で、255より大きな値はすべて255を代入し、すべての画素値が256階調に収まるようにしている。
In addition, after the step S407 ends, the density emphasis unit 109 determines whether the pixel value is greater than 255 (S408).
As a result of the determination in step S408, when it is determined that the value is 255 or less (step S407; false), the density enhancement unit 109 ends the density enhancement process for this pixel, and if there are pixels that have not been processed yet, Steps S404 to S410 are repeated until the tone emphasis processing for the pixel is completed (step S410).
As a result of the determination in step S408, if it is determined that it is greater than 255 (step S407; true), the density enhancement unit 109 substitutes 255 for this pixel value, and ends the density enhancement process for this pixel. In addition, if there is a pixel that has not been processed yet, the gray level enhancement unit 109 repeats Steps S404 to S410 until the gray level enhancement process for all pixels is completed (Step S410).
In this embodiment, since the input image is converted into grayscale image data of 256 gradations, 255 is substituted for all values greater than 255 in the processing from step S408 to step S409, and all pixel values are 256th floor. To make it fit.

すべての画素について濃淡強調処理が終了後、濃淡強調部109は、濃淡強調処理が終了した画素値を用いて、濃淡強調画像データを生成し、生成した濃淡強調画像データを輪郭抽出部110に出力する。
以上で、ステップS3の濃淡強調処理を終了し、図7に戻る。
After the density enhancement processing is completed for all the pixels, the density enhancement unit 109 generates the density enhanced image data using the pixel values for which the density enhancement processing has been completed, and outputs the generated density enhanced image data to the contour extraction unit 110. To do.
Thus, the shading enhancement process in step S3 is completed, and the process returns to FIG.

次に、グレースケール変換部108は記憶するグレースケール画像データを輪郭抽出部110に出力する。また、輪郭抽出部110は、外部設定値取り込み部101が取り込んだ外部設定値と、初期輪郭生成部106が出力する初期輪郭画像データと、グレースケール変換部108が出力するグレースケール画像データと、濃淡強調部109が生成した濃淡強調画像データを取り込む。また、輪郭抽出部110は、取り込んだ外部設定値から動的輪郭手法の種類とsnake処理の各種パラメータを読み出す。また、輪郭抽出部110は、読み出したsnake処理の各種パラメータと、初期輪郭画像データを用いて、濃淡強調画像データから既知であるsnake法で輪郭データの抽出を行う(ステップS4)。また、輪郭抽出部110は、抽出した輪郭データを輪郭抽出結果出力部111に出力する。   Next, the gray scale conversion unit 108 outputs the stored gray scale image data to the contour extraction unit 110. The contour extraction unit 110 also includes an external setting value captured by the external setting value capturing unit 101, initial contour image data output by the initial contour generation unit 106, grayscale image data output by the grayscale conversion unit 108, The grayscale emphasized image data generated by the grayscale enhancement unit 109 is captured. In addition, the contour extraction unit 110 reads the type of the dynamic contour method and various parameters of the snack process from the acquired external setting values. In addition, the contour extraction unit 110 extracts contour data by the known snake method from the grayscale emphasized image data using the various parameters of the read snake process and the initial contour image data (step S4). In addition, the contour extraction unit 110 outputs the extracted contour data to the contour extraction result output unit 111.

次に、輪郭抽出結果出力部111は、画像データ取り込み部102が取り込んだ入力画像と、輪郭抽出部110が抽出した輪郭データを取り込む。また、輪郭抽出結果出力部111は、取り込んだ入力画像から輪郭データを用いて、背景領域を除去した対象物の画像データを抽出する。また、輪郭抽出結果出力部110は、抽出した対象物の画像データを画像表示装置13に出力する(ステップS4)。   Next, the contour extraction result output unit 111 captures the input image captured by the image data capturing unit 102 and the contour data extracted by the contour extracting unit 110. In addition, the contour extraction result output unit 111 extracts image data of the target object from which the background region has been removed using the contour data from the input image that has been captured. The contour extraction result output unit 110 outputs the extracted image data of the object to the image display device 13 (step S4).

画像表示装置13は、輪郭抽出結果出力部111から取り込んだ輪郭抽出結果のデータを表示する。
以上で、入力画像から対象物の輪郭抽出処理を終了する。
The image display device 13 displays the contour extraction result data fetched from the contour extraction result output unit 111.
This completes the contour extraction process for the object from the input image.

以上のように、本実施形態によれば、入力画像に対して平滑化を行い、平滑化後に色空間成分に分離後に二値化し、二値化後の各色空間成分を合成して初期輪郭画像データを生成するようにした。さらに入力画像に対してグレースケール変換を行い、グレースケール変換後に初期輪郭画像データを用いて背景と対象物の濃淡強調処理を行い、濃淡強調処理により濃淡強調画像データを生成するようにした。そして、生成した初期輪郭画像データを用いて、濃淡強調画像データから動的輪郭法の1つであるsnake法で入力画像から対象物の輪郭を抽出するようにしたので、背景や対象物が異なっても適切な初期輪郭を入力画像から生成できる。このため、動的輪郭法で輪郭抽出を行う収束演算回数を減少し、抽出時間の高速化を実現することができる。
また、取得した画像が不鮮明な場合においても、入力画像をグレースケールに変換し、グレースケール変換後に濃淡強調処理を行った後、濃淡強調処理後の画像データから初期輪郭を用いて輪郭データを抽出するようにしたので、動的輪郭法で輪郭抽出を行う収束演算回数を減少し、抽出時間の高速化を可能行うことが可能になる。
As described above, according to the present embodiment, the input image is smoothed, binarized after being separated into color space components after smoothing, and the initial color image components are synthesized by combining the binarized color space components. Generate data. Further, gray scale conversion is performed on the input image, and after the gray scale conversion, the gray level enhancement processing is performed on the background and the object using the initial contour image data, and the gray level enhancement image data is generated by the gray level enhancement processing. Then, using the generated initial contour image data, the contour of the object is extracted from the input image by the snake method, which is one of the dynamic contour methods, from the grayscale emphasized image data. However, an appropriate initial contour can be generated from the input image. For this reason, it is possible to reduce the number of convergence calculations for performing contour extraction by the dynamic contour method, and to realize a faster extraction time.
Even if the acquired image is unclear, the input image is converted to grayscale, and after performing grayscale conversion, after performing grayscale enhancement processing, contour data is extracted from the image data after grayscale enhancement processing using the initial contour. Thus, it is possible to reduce the number of convergence calculations for performing contour extraction by the dynamic contour method and to increase the extraction time.

さらにまた、本実施形態によれば、予め対象物が写っていない背景画像を取得し、この背景画と入力画像を比較して初期輪郭を生成して対象物の輪郭を抽出しなくても、撮像した画像から適正な初期輪郭を自動的に生成することが可能になる。さらにまた、本実施形態によれば、予め取得してある対象物を正面から撮像した標準画像(背景無地か背景無し)、この標準画像から初期輪郭を生成して対象物の輪郭を抽出しなくても、撮像した画像から適正な初期輪郭を自動的に生成することが可能になる。  Furthermore, according to the present embodiment, it is possible to obtain a background image in which the object is not captured in advance, compare the background image with the input image, generate an initial contour, and extract the contour of the target. An appropriate initial outline can be automatically generated from the captured image. Furthermore, according to the present embodiment, a standard image (a plain background or no background) obtained by imaging an object acquired in advance from the front, an initial outline is not generated from the standard image, and the outline of the object is not extracted. However, it is possible to automatically generate an appropriate initial contour from the captured image.

なお、本実施形態では、平滑化部103がガウシアン・フィルタを使って平滑化する例について説明したが、他の一般的なメディアン・フィルタ、バイラテラル・フィルタ、ブラー・フィルタ等を用いて平滑化を行っても良い。   In the present embodiment, the example in which the smoothing unit 103 performs smoothing using a Gaussian filter has been described, but smoothing is performed using other general median filters, bilateral filters, blur filters, and the like. May be performed.

また、本実施形態では、平滑化部103の平滑回数を外部設定値取り込み部101が取り込んだ外部設定値で指定する例について説明したが、予め設定しておいた回数でも良く、または入力画像や対象物に応じて回数を設定するようにしても良い。この場合、例えば、高周波成分の大小や、ヒストグラムにおける成分の分布度合いなどから入力画像の複雑さを判定して、複雑な画像データに対して平滑化回数を増やすようにしても良い。また、このようにして算出した結果、平均化回数が例えば1回であった場合、平均化処理を行わずに色空間分離を行うようにしても良い。   Further, in the present embodiment, the example in which the smoothing number of the smoothing unit 103 is designated by the external setting value captured by the external setting value capturing unit 101 has been described. The number of times may be set according to the object. In this case, for example, the complexity of the input image may be determined based on the magnitude of the high-frequency component, the distribution degree of the component in the histogram, and the like, and the number of times of smoothing may be increased for complex image data. Further, as a result of the calculation as described above, when the number of times of averaging is 1, for example, color space separation may be performed without performing the averaging process.

また、本実施形態では、平滑後画像データを平滑化部103に記憶する例について説明したが、図示しない輪郭抽出装置の図示しないCPU(中央演算装置)に接続されたROM(Read Only Memory)、HDD(Hard Disk Drive)もしくはUSB(Universal Serial Bus) I/Fを介して接続されるUSBメモリー等の記憶装置に書き込んで記憶させても良い。   In this embodiment, an example in which the smoothed image data is stored in the smoothing unit 103 has been described. However, a ROM (Read Only Memory) connected to a CPU (Central Processing Unit) (not shown) of a contour extraction device (not shown), You may write in and memorize | store in memory | storage devices, such as a USB memory connected via HDD (Hard Disk Drive) or USB (Universal Serial Bus) I / F.

また、本実施形態では、色空間成分二値化部105および初期輪郭生成部106をそれぞれ1つで行う例を説明したが、分離する色空間の手法に応じて、例えばRGBに分離する場合、RGBそれぞれの色空間成分二値化部105、あるいはRGBそれぞれの初期輪郭生成部106を有するようにしても良い。   Further, in the present embodiment, an example in which the color space component binarization unit 105 and the initial contour generation unit 106 are each performed is described. However, according to the method of the color space to be separated, for example, when separating into RGB, The RGB color space component binarization unit 105 or the RGB initial contour generation unit 106 may be included.

また、本実施形態では、色空間成分二値化部105は、大津の閾値選定手法で設定する例について説明したが、他の一般的な閾値選定手法を用いても良い。   In the present embodiment, the color space component binarization unit 105 has been described as an example of setting with the Otsu threshold selection method. However, another general threshold selection method may be used.

また、本実施形態では、初期輪郭生成部106は、RGBの各チャンネルの色空間成分に分離後、分離した画像データを二値化し、二値化した各チャンネルの画像データを合成して初期輪郭画像データを生成する例を説明したが、各チャンネルの合成手法は重み付けなどを用いても良い。図6のような場合、例えば、各チャンネルのヒストグラムを生成して、生成したヒストグラムに基づき、各成分の分離度合いが高いと思われるRチャンネルの画像データ321の重み付けを一番高くして合成する。または、各チャンネルの画像データのうちどれか1つを用いて初期輪郭画像データを生成するようにしても良い。   In this embodiment, the initial contour generation unit 106 binarizes the separated image data after separation into RGB color space components, and combines the binarized image data of each channel to generate an initial contour. Although an example of generating image data has been described, weighting or the like may be used as a synthesis method for each channel. In the case of FIG. 6, for example, a histogram of each channel is generated, and based on the generated histogram, the R channel image data 321 that is considered to have a high degree of separation of each component is synthesized with the highest weight. . Alternatively, the initial contour image data may be generated using any one of the image data of each channel.

また、本実施形態では、初期輪郭画像データをそのままsnake法で輪郭抽出する例を説明したが、対象物の初期輪郭画像データに穴状の黒領域がある場合、例えば図6の黒画素による小領域352を、初期輪郭生成部106が一般的なラベリング処理の手法などにより抽出する。さらに、初期輪郭生成部106は、抽出した穴状の黒画素領域を白画素に変換することで、対象物内の周辺を白画素で囲まれた黒画素の小領域である穴状の黒画素を白画素で埋めることができ、さらに高速に輪郭抽出を行える初期輪郭を生成することができる。   Further, in this embodiment, the example in which the initial contour image data is extracted as it is by the snake method has been described. However, when the initial contour image data of the target object has a hole-like black region, for example, a small pixel by a black pixel in FIG. The area 352 is extracted by the initial contour generation unit 106 using a general labeling technique or the like. Further, the initial contour generation unit 106 converts the extracted hole-shaped black pixel region into a white pixel, thereby forming a hole-shaped black pixel that is a small region of the black pixel surrounded by the white pixel around the object. Can be filled with white pixels, and an initial contour capable of extracting a contour at high speed can be generated.

また、周辺を黒画素で囲まれた白画素の小領域は、初期輪郭画像データからみればノイズであり、背景にこのようなノイズである場合、同様に初期輪郭生成部106が一般的なラベリング処理の手法などにより抽出する。さらに、初期輪郭生成部106は、抽出したノイズの白画素領域を黒画素に変換することで、背景のノイズとなる白画素を黒画素に変換することで除去することができ、さらに高速に輪郭抽出を行える初期輪郭を生成することができる。   In addition, a small area of white pixels surrounded by black pixels is noise when viewed from the initial contour image data, and in the case of such noise in the background, the initial contour generation unit 106 similarly performs general labeling. Extracted by processing method. Further, the initial contour generation unit 106 converts the extracted white pixel area of the noise into black pixels, thereby removing the white pixels that are the background noise by converting them into black pixels. An initial contour that can be extracted can be generated.

また、本実施形態では、濃淡強調処理について、背景の画素を薄くし、対象物を濃くすることで濃淡強調を行う例について説明したが、この手法は背景が明るく対象物が暗い入力画像に有効である。このため、背景が暗く、対象物が明るい入力画像を考慮し、濃淡強調部109は、グレースケール画像データと初期輪郭画像データを用いて、グレースケール画像データで背景と判定した領域の画素値の平均値と、グレースケール画像データで対象物と判定した領域の画素値の平均値を算出する。次に、濃淡強調部109は、算出したそれぞれの画素値の平均値に基づき、背景か対象物のどちらの画素領域の方が明るいかを判定し、この判定結果に基づき、明るい方をより明るく(薄く)、暗い方をより暗く(濃く)する乗数を算出して濃淡強調処理を行うことで、さらに多様な条件での輪郭抽出が可能になる。   Further, in the present embodiment, the example of performing the grayscale enhancement by thinning the background pixels and darkening the target object for the grayscale enhancement process has been described, but this method is effective for an input image with a bright background and a dark target object. It is. For this reason, in consideration of an input image with a dark background and a bright object, the shading enhancement unit 109 uses the grayscale image data and the initial contour image data to determine the pixel value of the region determined as the background by the grayscale image data. The average value and the average value of the pixel values of the area determined as the object by the grayscale image data are calculated. Next, the shading enhancement unit 109 determines which pixel area of the background or the object is brighter based on the calculated average value of each pixel value, and based on this determination result, the brighter one becomes brighter By calculating a multiplier for making (darker) and darker (darker) darker ones and performing density enhancement processing, it is possible to extract contours under various conditions.

また、本実施形態では、色空間成分に分離した各チャンネルの二値化画像データについて、入力画像の中心部の画素値が黒画素か白画素かを判定して、各チャンネルの二値化画像データの白黒を反転する例について説明したが、判定に用いる中心部の画素は1画素でなくても中心付近の複数画素を用いて判定しても良い。また、二値化画像データの中心部は、二値化画像データの図心や重心でも良い。または二値化画像データに対してラベリング処理を行い、各ラベルの重心位置を求めて、重心位置が二値化画像データの画像中心にもっとも近い領域の画素値を抽出し、この画素値を1、すなわち白になるように白黒反転を行う判定を行うようにしても良い。   In the present embodiment, the binarized image data of each channel separated into color space components is determined whether the pixel value at the center of the input image is a black pixel or a white pixel, and the binarized image of each channel is determined. Although the example of inverting the black and white of the data has been described, the central pixel used for the determination may be determined using a plurality of pixels near the center instead of one pixel. The central portion of the binarized image data may be the centroid or the center of gravity of the binarized image data. Alternatively, labeling processing is performed on the binarized image data, the barycentric position of each label is obtained, and the pixel value of the area where the barycentric position is closest to the image center of the binarized image data is extracted. In other words, it may be determined to perform black and white reversal so as to be white.

また、本実施形態では、画像データ取り込み部103が出力する入力画像に初期輪郭画像データを用いて濃淡強調処理を行って濃淡強調画像データを生成し、濃淡強調画像データから初期輪郭画像データを用いて輪郭データを抽出する例について説明したが、入力画像や対象物に応じて、入力画像から初期輪郭画像データを用いて輪郭抽出を行うようにしても良い。   In the present embodiment, the contrast enhancement process is performed on the input image output from the image data capturing unit 103 using the initial contour image data to generate the density enhancement image data, and the initial contour image data is used from the density enhancement image data. Although the example of extracting the contour data has been described, contour extraction may be performed using the initial contour image data from the input image according to the input image or the object.

また、本実施形態では、生成した初期輪郭画像データを動的輪郭法の1つであるsnake法で用いて輪郭を抽出する例について説明したが、他の動的輪郭法を用いて輪郭抽出を行っても良く、また別の輪郭抽出方法を用いて輪郭抽出を行っても良い。さらにまた、生成した初期輪郭画像データを、例えば抽出したい対象物の範囲の限定に利用し、この初期輪郭画像データを図形認識における特徴点の抽出などを行う場合の領域指定に使用しても良い。   Further, in this embodiment, the example in which the contour is extracted by using the generated initial contour image data by the snake method which is one of the dynamic contour methods has been described, but the contour extraction is performed by using another dynamic contour method. Alternatively, contour extraction may be performed using another contour extraction method. Furthermore, the generated initial contour image data may be used, for example, for limiting the range of an object to be extracted, and this initial contour image data may be used for specifying a region when performing feature point extraction in graphic recognition. .

なお、実施形態の図1の各部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリーのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
It should be noted that a program for realizing the function of each unit in FIG. 1 of the embodiment is recorded on a computer-readable recording medium, and the program recorded on this recording medium is read into a computer system and executed, thereby executing each unit. Processing may be performed. Here, the “computer system” includes an OS and hardware such as peripheral devices.
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, it also includes those that hold a program for a certain period of time, such as a volatile memory inside a computer system serving as a server or client in that case. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.

10・・・輪郭抽出装置
11・・・カメラ
13・・・画像表示装置
101・・・外部設定値取り込み部
102・・・画像データ取り込み部
103・・・平滑化部
104・・・色空間分離部
105・・・色空間成分二値化部
106・・・初期輪郭生成部
107・・・画素値記憶部
108・・・グレースケール変換部
109・・・濃淡強調部
110・・・輪郭抽出部
111・・・輪郭抽出結果出力部
DESCRIPTION OF SYMBOLS 10 ... Contour extraction apparatus 11 ... Camera 13 ... Image display apparatus 101 ... External setting value taking-in part 102 ... Image data taking-in part 103 ... Smoothing part 104 ... Color space separation Unit 105 ... color space component binarization unit 106 ... initial contour generation unit 107 ... pixel value storage unit 108 ... gray scale conversion unit 109 ... shade enhancement unit 110 ... contour extraction unit 111 ... contour extraction result output unit

Claims (8)

動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、
入力画像を複数の色空間成分に分離する色空間分離部と、
前記色空間分離部が分離した各色空間成分を二値化する色空間成分二値化部と、
前記色空間成分二値化部が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成部と、
前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出部と、
前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づき判定し、判定した結果に基づき、背景の画素値を1以上の値で定数倍して画素を薄くし、あるいは対象物の画素値を1以下の値で定数倍して画素を濃くすることで濃淡強調を行い、濃淡強調画像データを生成する濃淡強調部と、
を備え、
前記輪郭抽出部は、
前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像の輪郭を抽出する
ことを特徴とする輪郭抽出装置。
In a contour extraction apparatus that performs contour extraction using the dynamic contour method,
A color space separation unit that separates an input image into a plurality of color space components;
A color space component binarization unit that binarizes each color space component separated by the color space separation unit;
An initial contour generation unit that generates initial contour image data based on the image data of each color space component binarized by the color space component binarization unit;
A contour extracting unit that extracts a contour of a figure included in the input image by using an initial contour image data generated by the initial contour generating unit;
The input image is grayscaled, and whether each pixel of the grayscaled image data constitutes a background or a pixel constituting an object is determined based on the initial contour image data generated by the initial contour generation unit, Based on the result of the determination, the background pixel value is multiplied by a constant of 1 or more to make the pixel thinner, or the object pixel value is multiplied by a constant of 1 or less to make the pixel darker, thereby enhancing the shading. And a tone emphasis unit for generating tone emphasis image data,
With
The contour extraction unit
A contour extracting apparatus, wherein the contour of the input image is extracted from the grayscale emphasized image data generated by the grayscale emphasizing unit using the initial contour image data generated by the initial contour generating unit.
前記濃淡強調部は、
背景の画素値を1以上の値で定数倍し、対象物の画素値に前記背景に乗じた値の逆数を乗じる
ことを特徴とする請求項に記載の輪郭抽出装置。
The shading emphasis part is
Multiplied by a constant pixel value of the background with one or more values, a contour extraction apparatus according to claim 1, characterized in that multiplying the reciprocal of the value obtained by multiplying the background pixel value of the object.
前記濃淡強調部は、
前記グレースケール化した画像データから生成したヒストグラムに基づき、コントラストに応じて対象物の画素値および背景の画素値に乗じる値を設定する
ことを特徴とする請求項または請求項に記載の輪郭抽出装置。
The shading emphasis part is
Based on said histogram generated from the gray scale of image data, the contour of claim 1 or claim 2, characterized in that setting the value to be multiplied by the pixel value of the pixel value and the background object in accordance with the contrast Extraction device.
動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置において、
入力画像を複数の色空間成分に分離する色空間分離部と、
前記色空間分離部が分離した各色空間成分を二値化する色空間成分二値化部と、
前記色空間成分二値化部が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成部と、
前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出部と、

前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づいて判定し、判定した結果に基づき、前記背景のすべての画素値の平均値と前記対象物のすべての画素値の平均値を算出して、算出した平均値を比較し、比較した結果に基づき背景と対象物のそれぞれの乗数を算出して、算出したそれぞれの乗数を用いて背景と対象物の濃淡強調を行い、濃淡強調画像データを生成する濃淡強調部と、
を備え、
前記輪郭抽出部は、
前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像の輪郭を抽出する
ことを特徴とする輪郭抽出装置。
In a contour extraction apparatus that performs contour extraction using the dynamic contour method,
A color space separation unit that separates an input image into a plurality of color space components;
A color space component binarization unit that binarizes each color space component separated by the color space separation unit;
An initial contour generation unit that generates initial contour image data based on the image data of each color space component binarized by the color space component binarization unit;
A contour extracting unit that extracts a contour of a figure included in the input image by using an initial contour image data generated by the initial contour generating unit;

The input image is grayscaled, and it is determined based on the initial contour image data generated by the initial contour generation unit whether each pixel of the grayscaled image data is a pixel constituting a background or a pixel constituting an object. The average value of all the pixel values of the background and the average value of all the pixel values of the object are calculated based on the determined result, the calculated average values are compared, and the background and the target are calculated based on the comparison result. Calculating the respective multipliers of the objects, and using the calculated multipliers to perform density emphasis on the background and the object, and generating a density emphasized image data,
With
The contour extraction unit
The gray highlighted portion contour extractor you and extracts the contour of the input image using the initial contour image data, wherein the initial contour generation unit is generated from the gray weighted image data generated.
動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置の輪郭抽出方法において、
色空間分離部が、入力画像を複数の色空間成分に分離する色空間分離工程と、
色空間成分二値化部が、前記色空間分離工程が分離した各色空間成分を二値化する色空間成分二値化工程と、
初期輪郭生成部が、前記色空間成分二値化工程が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成工程と、
輪郭抽出部が、前記初期輪郭生成工程が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出工程と、
濃淡強調部が、前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づき判定し、判定した結果に基づき、背景の画素値を1以上の値で定数倍して画素を薄くし、あるいは対象物の画素値を1以下の値で定数倍して画素を濃くすることで濃淡強調を行い、濃淡強調画像データを生成する濃淡強調過程と
を備え
前記輪郭抽出過程にて、前記輪郭抽出部は、前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像の輪郭を抽出する
ことを特徴とする輪郭抽出方法。
In the contour extraction method of the contour extraction apparatus that performs contour extraction using the dynamic contour method,
A color space separation unit that separates the input image into a plurality of color space components;
A color space component binarization unit that binarizes each color space component separated by the color space separation step; and
An initial contour generation step for generating initial contour image data based on the image data of each color space component binarized by the color space component binarization step;
A contour extracting step in which a contour extracting unit extracts a contour of a figure included in the input image using the initial contour image data generated by the initial contour generating step by a dynamic contour method;
The initial contour image data generated by the initial contour generation unit, in which the gray level enhancement unit grayscales the input image and whether each pixel of the grayscaled image data is a pixel constituting a background or a pixel constituting an object Based on the determination result, the background pixel value is multiplied by a constant of 1 or more to make the pixel thinner, or the object pixel value is multiplied by a value of 1 or less to make the pixel darker. And a light / dark emphasis process for generating light / dark emphasis image data .
In the contour extraction process, the contour extraction unit extracts the contour of the input image using the initial contour image data generated by the initial contour generation unit from the grayscale emphasized image data generated by the grayscale enhancement unit. An outline extraction method characterized by the above.
動的輪郭法を用いて輪郭抽出を行う輪郭抽出装置の輪郭抽出方法において、
色空間分離部が、入力画像を複数の色空間成分に分離する色空間分離工程と、
色空間成分二値化部が、前記色空間分離工程が分離した各色空間成分を二値化する色空間成分二値化工程と、
初期輪郭生成部が、前記色空間成分二値化工程が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成工程と、
輪郭抽出部が、前記初期輪郭生成工程が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出工程と、
濃淡強調部が、前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づいて判定し、判定した結果に基づき、前記背景のすべての画素値の平均値と前記対象物のすべての画素値の平均値を算出して、算出した平均値を比較し、比較した結果に基づき背景と対象物のそれぞれの乗数を算出して、算出したそれぞれの乗数を用いて背景と対象物の濃淡強調を行い、濃淡強調画像データを生成する濃淡強調過程と、
を備え、
前記輪郭抽出過程にて、前記輪郭抽出部は、前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像の輪郭を抽出する
ことを特徴とする輪郭抽出方法。
In the contour extraction method of the contour extraction apparatus that performs contour extraction using the dynamic contour method,
A color space separation unit that separates the input image into a plurality of color space components;
A color space component binarization unit that binarizes each color space component separated by the color space separation step; and
An initial contour generation step for generating initial contour image data based on the image data of each color space component binarized by the color space component binarization step;
A contour extracting step in which a contour extracting unit extracts a contour of a figure included in the input image using the initial contour image data generated by the initial contour generating step by a dynamic contour method;
The initial contour image data generated by the initial contour generation unit, in which the gray level enhancement unit grayscales the input image and whether each pixel of the grayscaled image data is a pixel constituting a background or a pixel constituting an object Based on the determination result, the average value of all the pixel values of the background and the average value of all the pixel values of the object are calculated, and the calculated average values are compared and compared. A gray scale emphasizing process in which a multiplier for each of the background and the object is calculated based on the image, and a gray scale emphasis of the background and the object is performed using each of the calculated multipliers, and a gray scale emphasized image data is generated.
With
In the contour extraction process, the contour extraction unit extracts the contour of the input image using the initial contour image data generated by the initial contour generation unit from the grayscale emphasized image data generated by the grayscale enhancement unit. Contour extraction method characterized by
コンピューターに、
入力画像を複数の色空間成分に分離する色空間分離工程と、
前記色空間分離工程が分離した各色空間成分を二値化する色空間成分二値化工程と、
前記色空間成分二値化工程が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成工程と、
前記初期輪郭生成工程が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出工程と、
濃淡強調部が、前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づき判定し、判定した結果に基づき、背景の画素値を1以上の値で定数倍して画素を薄くし、あるいは対象物の画素値を1以下の値で定数倍して画素を濃くすることで濃淡強調を行い、濃淡強調画像データを生成する濃淡強調過程と
を実行させるための輪郭抽出プログラムであって、
前記輪郭抽出過程にて、前記輪郭抽出部は、前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像の輪郭を抽出すること
を特徴とする輪郭抽出プログラム
On the computer,
A color space separation step of separating the input image into a plurality of color space components;
A color space component binarization step for binarizing each color space component separated by the color space separation step;
An initial contour generation step of generating initial contour image data based on the image data of each color space component binarized by the color space component binarization step;
A contour extraction step of extracting a contour of a figure included in the input image by an active contour method using the initial contour image data generated by the initial contour generation step;
The initial contour image data generated by the initial contour generation unit, in which the gray level enhancement unit grayscales the input image and whether each pixel of the grayscaled image data is a pixel constituting a background or a pixel constituting an object Based on the determination result, the background pixel value is multiplied by a constant of 1 or more to make the pixel thinner, or the object pixel value is multiplied by a value of 1 or less to make the pixel darker. A contour extraction program for performing a grayscale enhancement process and a grayscale enhancement process for generating grayscale-weighted image data ,
In the contour extraction process, the contour extraction unit extracts the contour of the input image using the initial contour image data generated by the initial contour generation unit from the grayscale emphasized image data generated by the grayscale enhancement unit.
Contour extraction program characterized by
コンピューターに、
入力画像を複数の色空間成分に分離する色空間分離工程と、
前記色空間分離工程が分離した各色空間成分を二値化する色空間成分二値化工程と、
前記色空間成分二値化工程が二値化した各色空間成分の画像データに基づいて、初期輪郭画像データを生成する初期輪郭生成工程と、
前記初期輪郭生成工程が生成した初期輪郭画像データを用いて前記入力画像中に含まれる図形の輪郭を動的輪郭法で抽出する輪郭抽出工程と、
濃淡強調部が、前記入力画像をグレースケール化し、前記グレースケール化した画像データの各画素が背景を構成する画素か対象物を構成する画素かを前記初期輪郭生成部が生成した初期輪郭画像データに基づいて判定し、判定した結果に基づき、前記背景のすべての画素値の平均値と前記対象物のすべての画素値の平均値を算出して、算出した平均値を比較し、比較した結果に基づき背景と対象物のそれぞれの乗数を算出して、算出したそれぞれの乗数を用いて背景と対象物の濃淡強調を行い、濃淡強調画像データを生成する濃淡強調過程と
を実行させるための輪郭抽出プログラムであって、
前記輪郭抽出過程にて、前記輪郭抽出部は、前記濃淡強調部が生成した前記濃淡強調画像データから前記初期輪郭生成部が生成した初期輪郭画像データを用いて前記入力画像の輪郭を抽出すること
を特徴とする輪郭抽出プログラム
On the computer,
A color space separation step of separating the input image into a plurality of color space components;
A color space component binarization step for binarizing each color space component separated by the color space separation step;
An initial contour generation step of generating initial contour image data based on the image data of each color space component binarized by the color space component binarization step;
A contour extraction step of extracting a contour of a figure included in the input image by an active contour method using the initial contour image data generated by the initial contour generation step;
The initial contour image data generated by the initial contour generation unit, in which the gray level enhancement unit grayscales the input image and whether each pixel of the grayscaled image data is a pixel constituting a background or a pixel constituting an object Based on the determination result, the average value of all the pixel values of the background and the average value of all the pixel values of the object are calculated, and the calculated average values are compared and compared. The contours for calculating the respective multipliers of the background and the object based on the image, and performing the gradation enhancement process for performing the gradation enhancement of the background and the object using the calculated multipliers and generating the gradation-enhanced image data An extraction program ,
In the contour extraction process, the contour extraction unit extracts the contour of the input image using the initial contour image data generated by the initial contour generation unit from the grayscale emphasized image data generated by the grayscale enhancement unit.
Contour extraction program characterized by
JP2009226089A 2009-09-30 2009-09-30 Outline extracting apparatus, outline extracting method, and outline extracting program Expired - Fee Related JP5286215B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009226089A JP5286215B2 (en) 2009-09-30 2009-09-30 Outline extracting apparatus, outline extracting method, and outline extracting program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009226089A JP5286215B2 (en) 2009-09-30 2009-09-30 Outline extracting apparatus, outline extracting method, and outline extracting program

Publications (2)

Publication Number Publication Date
JP2011076302A JP2011076302A (en) 2011-04-14
JP5286215B2 true JP5286215B2 (en) 2013-09-11

Family

ID=44020227

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009226089A Expired - Fee Related JP5286215B2 (en) 2009-09-30 2009-09-30 Outline extracting apparatus, outline extracting method, and outline extracting program

Country Status (1)

Country Link
JP (1) JP5286215B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810155B (en) * 2011-05-31 2015-04-15 富士通株式会社 Method and device for extracting text stroke images from image
KR101929560B1 (en) * 2013-01-29 2019-03-14 삼성전자주식회사 Method and apparatus for detecting edge in image
JP6599697B2 (en) 2015-08-31 2019-10-30 株式会社ミツトヨ Image measuring apparatus and control program therefor
JP7010783B2 (en) * 2018-07-23 2022-01-26 株式会社東芝 Image processing equipment, image processing system, image processing method and program
CN112489014B (en) * 2020-11-27 2024-07-02 广州高新兴机器人有限公司 Chemical fiber drifting impurity detection method based on vision

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05263411A (en) * 1992-03-19 1993-10-12 Hitachi Ltd Object observation method and device
JPH09186935A (en) * 1995-12-28 1997-07-15 Canon Inc Image extraction device
JP3679512B2 (en) * 1996-07-05 2005-08-03 キヤノン株式会社 Image extraction apparatus and method
JP4251635B2 (en) * 2004-06-30 2009-04-08 キヤノン株式会社 Image processing apparatus and method
JP2009015735A (en) * 2007-07-07 2009-01-22 Keyence Corp Edge connection method for edge image, contour extraction method, contour extraction device, contour extraction program, and computer readable recording medium

Also Published As

Publication number Publication date
JP2011076302A (en) 2011-04-14

Similar Documents

Publication Publication Date Title
US9569827B2 (en) Image processing apparatus and method, and program
JP5362878B2 (en) Image processing apparatus and image processing method
KR102523505B1 (en) Method and Apparatus for Inverse Tone Mapping
JP4542528B2 (en) Image contrast enhancement method and image contrast enhancement system
CN103973977B (en) Virtualization processing method, device and the electronic equipment of a kind of preview interface
JP6635799B2 (en) Image processing apparatus, image processing method, and program
JP6818463B2 (en) Image processing equipment, image processing methods and programs
JP2020129276A (en) Image processing device, image processing method, and program
JP5767064B2 (en) Image edge enhancement method
JP5286215B2 (en) Outline extracting apparatus, outline extracting method, and outline extracting program
JP2004310475A (en) Image processor, cellular phone for performing image processing, and image processing program
WO2011067755A1 (en) Method and system for automatically recovering chromaticity and image variation of colour clipped image regions
JP5024574B2 (en) Image processing apparatus and image processing program
JP6375138B2 (en) Purple fringe removal processing method and purple fringe removal processing apparatus performing the processing
CN110136085B (en) Image noise reduction method and device
CN116468636A (en) Low-illumination enhancement method, device, electronic equipment and readable storage medium
JP7030425B2 (en) Image processing device, image processing method, program
JP2001045303A (en) Image thresholding method
US8873862B2 (en) Product image processor, product image processing method, information recording medium, and program
JP5810778B2 (en) Image processing apparatus and image processing method
CN110140150B (en) Image processing method and device and terminal equipment
CN113674158A (en) Image processing method, device, equipment and storage medium
JP2021022263A (en) Image processing program, image processing device, image processing system, and image processing method
KR102265887B1 (en) Edge-preserving device, method thereof, and digital signal processor
JP6314281B1 (en) Image processing method and foreground region acquisition method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120111

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121211

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130212

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130603

R150 Certificate of patent or registration of utility model

Ref document number: 5286215

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees