JP5663951B2 - Image processing program and image processing apparatus - Google Patents

Image processing program and image processing apparatus Download PDF

Info

Publication number
JP5663951B2
JP5663951B2 JP2010118550A JP2010118550A JP5663951B2 JP 5663951 B2 JP5663951 B2 JP 5663951B2 JP 2010118550 A JP2010118550 A JP 2010118550A JP 2010118550 A JP2010118550 A JP 2010118550A JP 5663951 B2 JP5663951 B2 JP 5663951B2
Authority
JP
Japan
Prior art keywords
target area
image
editing
color
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010118550A
Other languages
Japanese (ja)
Other versions
JP2011249926A (en
Inventor
弘樹 上井
弘樹 上井
伸彰 関
関  伸彰
真由美 中山
真由美 中山
正永 中村
正永 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2010118550A priority Critical patent/JP5663951B2/en
Publication of JP2011249926A publication Critical patent/JP2011249926A/en
Application granted granted Critical
Publication of JP5663951B2 publication Critical patent/JP5663951B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理プログラム、および画像処理装置に関する。   The present invention relates to an image processing program and an image processing apparatus.

次のようなデジタル画像内の不所望なオブジェクト等の消去方法が知られている。この方法では、ユーザが指定した不所望なオブジェクト等を含む領域内の画素を、生成したテクスチャにより置き換えることで、デジタル画像内から不所望なオブジェクト等を消去することによって画像を修正する(例えば、特許文献1)。   There are known methods for erasing an undesired object in a digital image as follows. In this method, an image is corrected by erasing an undesired object or the like from the digital image by replacing pixels in an area including the undesired object or the like specified by the user with the generated texture (for example, Patent Document 1).

特開2005−63433号公報Japanese Patent Laid-Open No. 2005-63433

しかしながら、従来の方法では、使用者が指定した領域内から、必ずしも所望の被写体が消去されるとは限らず、使用者が望む被写体とは異なる被写体が消去されてしまう可能性があった。   However, in the conventional method, a desired subject is not necessarily deleted from the area designated by the user, and a subject different from the subject desired by the user may be deleted.

本発明の請求項1に係る画像処理プログラムは、画像内に編集対象領域を設定する領域設定手順と、前記編集対象領域の画像における色相の頻度を算出し、前記色相の頻度が最も高い色を不要な被写体の特徴色として抽出する抽出手順と、前記色相の頻度が2番目に高い色の画素の画素値を編集用データとして生成する生成手順と、前記編集用データを用いて前記編集対象領域の前記特徴色の画素の画素値を置換する画像処理手順と、をコンピュータに実行させることを特徴とする
本発明の請求項2に係る画像処理プログラムは、画像内に被写体領域と背景領域とを含む編集対象領域を設定する領域設定手順と、前記編集対象領域の画像における色相の頻度を算出し、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれる場合には前記色相の頻度が2番目に高い色を不要な被写体の特徴色として抽出し、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれない場合には前記色相の頻度が最も高い色を前記特徴色として抽出する抽出手順と、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれる場合には前記色相の頻度が最も高い色の画素の画素値を編集用データとして生成し、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれない場合には前記色相の頻度が2番目に高い色の画素の画素値を前記編集用データとして生成する生成手順と、前記編集用データを用いて前記編集対象領域の前記特徴色の画素の画素値を置換する画像処理手順と、をコンピュータに実行させることを特徴とする。
An image processing program according to claim 1 of the present invention calculates an area setting procedure for setting an edit target area in an image, a hue frequency in an image of the edit target area, and selects a color having the highest hue frequency. An extraction procedure for extracting as a characteristic color of an unnecessary subject, a generation procedure for generating a pixel value of a pixel having the second highest hue frequency as editing data, and the editing target area using the editing data an image processing procedure for replacing the pixel value of the characteristic color of the pixels, and characterized by causing a computer to execute the.
An image processing program according to claim 2 of the present invention calculates an area setting procedure for setting an edit target area including a subject area and a background area in an image, a hue frequency in the image of the edit target area, When the background area is larger than the subject area and included in the edit target area, the color having the second highest hue frequency is extracted as a characteristic color of the unnecessary subject, and the background area is larger than the subject area. When not included in the edit target area, an extraction procedure for extracting the color with the highest hue frequency as the characteristic color, and when the background area is included in the edit target area more than the subject area A pixel value of a pixel having a color with the highest hue frequency is generated as editing data, and when the background area is larger than the subject area and not included in the editing target area, the hue A generation procedure for generating a pixel value of a pixel having the second highest frequency as the editing data, and an image processing procedure for replacing the pixel value of the characteristic color pixel in the editing target area using the editing data And making the computer execute.

本発明によれば、使用者が望む被写体を消去できる可能性を向上させることができる。   According to the present invention, it is possible to improve the possibility that the subject desired by the user can be deleted.

パソコンの一実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of one Embodiment of a personal computer. 画像内に写り込んでいる電線Aを消去する場合の具体例を示す図である。It is a figure which shows the specific example in the case of deleting the electric wire A reflected in the image. 画像修正処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of an image correction process.

図1は、本実施の形態における画像処理装置の一実施の形態の構成を示すブロック図である。画像処理装置としては、例えば、パーソナルコンピュータ(パソコン)100が用いられ、このパソコン100は、操作部材101と、接続IF(インターフェース)102と、制御装置103と、HDD(ハードディスクドライブ)104と、モニタ105とを備えている。   FIG. 1 is a block diagram showing a configuration of an embodiment of an image processing apparatus according to the present embodiment. As the image processing apparatus, for example, a personal computer (personal computer) 100 is used. The personal computer 100 includes an operation member 101, a connection IF (interface) 102, a control device 103, an HDD (hard disk drive) 104, a monitor. 105.

操作部材101は、使用者によって操作される種々の装置、例えばキーボードやマウスを含む。接続IF102は、パソコン100と外部機器とを接続するためのインターフェースである。本実施の形態では、パソコン100は、この接続IF102を介してデジタルカメラと接続され、デジタルカメラからは撮影によって得られた画像ファイルが取り込まれる。なお、接続IF102としては、パソコン100とデジタルカメラとを有線接続するためのUSBインターフェースや、無線接続するための無線LANモジュールなどが用いられる。   The operation member 101 includes various devices operated by the user, such as a keyboard and a mouse. The connection IF 102 is an interface for connecting the personal computer 100 and an external device. In the present embodiment, the personal computer 100 is connected to the digital camera via the connection IF 102, and an image file obtained by photographing is taken from the digital camera. As the connection IF 102, a USB interface for connecting the personal computer 100 and the digital camera by wire, a wireless LAN module for wireless connection, or the like is used.

制御装置103は、CPU、メモリ、およびその他の周辺回路によって構成され、パソコン100の全体を制御する。なお、制御装置103を構成するメモリは、例えばSDRAM等の揮発性のメモリである。このメモリは、CPUがプログラム実行時にプログラムを展開するためのワークメモリや、データを一時的に記録するためのバッファメモリを含む。   The control device 103 includes a CPU, a memory, and other peripheral circuits, and controls the entire personal computer 100. The memory constituting the control device 103 is a volatile memory such as SDRAM, for example. This memory includes a work memory for the CPU to expand the program when the program is executed, and a buffer memory for temporarily recording data.

HDD104は、接続IF102を介して取り込まれた画像ファイルのデータや、制御装置103で実行される種々のプログラムのデータ等を記録するための記録装置である。なお、HDD104に記録されるプログラムのデータは、CD−ROMやDVD−ROMなどの記憶媒体に記録されて提供され、使用者が当該記憶媒体を用いてプログラムのデータをHDD104にインストールすることによって、制御装置103がプログラムを実行できるようになる。モニタ105は、例えば液晶モニタであって、制御装置103から出力される種々の表示用データが表示される。   The HDD 104 is a recording device for recording image file data fetched via the connection IF 102 and data of various programs executed by the control device 103. The program data recorded in the HDD 104 is provided by being recorded on a storage medium such as a CD-ROM or DVD-ROM, and the user installs the program data in the HDD 104 using the storage medium. The control device 103 can execute the program. The monitor 105 is a liquid crystal monitor, for example, and displays various display data output from the control device 103.

本実施の形態におけるパソコン100では、使用者は、画像処理アプリケーションを実行してHDD104に記録されている画像ファイルの画像を表示し、表示中の画像を編集することができる。例えば、図2(a)に示すように、画像内に電線Aが写り込んでいる場合に、使用者は、画像内から電線Aを消去して画像を修復することができる。具体的には、使用者は、図2(b)に示すように、画像処理アプリケーションが備える編集ツールの1つである矩形ツールを用いて電線Aを含む領域2aを指定したり、図2(c)に示すように、画像処理アプリケーションが備える編集ツールの1つである修復ブラシツールを用いて電線Aを含む領域2bを指定したりする。   In personal computer 100 in the present embodiment, a user can execute an image processing application to display an image of an image file recorded in HDD 104 and edit the image being displayed. For example, as shown in FIG. 2A, when the electric wire A is reflected in the image, the user can restore the image by deleting the electric wire A from the image. Specifically, as shown in FIG. 2B, the user designates the region 2a including the electric wire A by using a rectangular tool which is one of editing tools included in the image processing application, As shown in c), the region 2b including the electric wire A is designated by using a repair brush tool which is one of editing tools included in the image processing application.

制御装置103は、使用者が指定した領域(2aまたは2b)を編集対象領域として特定し、当該編集対象領域内に含まれる不要な被写体(この場合は電線A)を消去するための画像処理(以下、「画像修正処理」と呼ぶ)を実行する。具体的な画像修正処理の方法については後述する。   The control device 103 identifies an area (2a or 2b) designated by the user as an editing target area, and performs image processing for deleting an unnecessary subject (in this case, the electric wire A) included in the editing target area ( Hereinafter, this is referred to as “image correction processing”. A specific image correction processing method will be described later.

編集対象領域の指定方法として修復ブラシツールを用いる場合には、使用者は、使用するブラシの大きさを選択してから、その大きさのブラシを画像上の消去したい被写体、すなわち上述した電線A等の不要な被写体上で移動させることにより、ブラシが移動した範囲内の領域を編集対象領域として指定することができる。なお、ブラシの大きさは、段階的に大きくなるように複数の大きさが用意されており、使用者は、その中から任意のブラシの大きさを選択する。   When the restoration brush tool is used as a method for designating the editing target area, the user selects the size of the brush to be used, and then selects the brush whose size is to be erased on the image, that is, the above-described electric wire A. By moving on an unnecessary subject such as, it is possible to designate an area within the range where the brush has moved as an editing target area. Note that a plurality of sizes of brushes are prepared in a stepwise manner, and the user selects an arbitrary brush size from among them.

このとき、使用者は、消去したい被写体を含むように編集対象領域を設定することになるが、制御装置103は、使用者が編集対象領域内のどの被写体を消去しようとしているかを特定することができないと、画像修正処理の結果、使用者が消去したいと考えていた被写体が正しく消去されない可能性がある。   At this time, the user sets the editing target area so as to include the subject to be erased, but the control device 103 may specify which subject in the editing target area is to be erased by the user. Otherwise, as a result of the image correction process, there is a possibility that the subject that the user wanted to delete is not correctly deleted.

例えば、使用者は、図2(d)に示すように、図2(a)に示した画像内の被写体のうち、電線A以外の被写体はそのまま残し、電線Aのみが消去された画像を得たいと考えて編集対象領域を指定したとする。しかしながら、画像修正処理の結果、図2(e)に示すように、本来消去したかった電線Aは残ったまま、領域2c内にあった花が消去されてしまう可能性がある。あるいは、図2(f)に示すように、電線Aと花の両方が消去されてしまう可能性もある。   For example, as shown in FIG. 2 (d), the user leaves an object other than the wire A among the subjects in the image shown in FIG. 2 (a), and obtains an image in which only the wire A is erased. Suppose you want to edit and specify the editing area. However, as a result of the image correction process, as shown in FIG. 2E, the flower A in the region 2c may be erased while the electric wire A originally intended to be erased remains. Or as shown in FIG.2 (f), both the electric wire A and a flower may be erase | eliminated.

このような場合には、使用者は、その後、改めて編集対象領域を設定し直して画像修正処理を実行する必要がある。さらに、そのときの画像修正処理の結果が使用者の望むものでない場合には、使用者は、再び編集対象領域を設定し直す必要があり、所望の結果が得られるまでこれを繰り返さなければならない。本実施の形態では、使用者がこのような煩雑な操作を行わなくても、使用者が意図した被写体を画像から消去できるように、制御装置103は、以下に示す処理を行う。   In such a case, after that, the user needs to reset the edit target area and execute the image correction process. Furthermore, when the result of the image correction processing at that time is not what the user desires, the user needs to set the editing target area again, and must repeat this until a desired result is obtained. . In the present embodiment, the control device 103 performs the following process so that the subject intended by the user can be erased from the image without the user performing such a complicated operation.

具体的には、制御装置103は、使用者によってブラシを用いて画像上に編集対象領域が指定された場合には、指定された編集対象領域内の画像を抽出し、抽出した編集対象領域内の画像の色空間、例えばRGB空間をLCH空間に変換する。制御装置103は、LCH空間に変換した後の編集対象領域内の画像を対象として各画素の色相を算出する。そして、制御装置103は、色相環を複数の領域に分割する。例えば、制御装置103は、色相環を16度幅で10分割、または22.5度幅で16分割する。   Specifically, when the editing target area is specified on the image using a brush by the user, the control device 103 extracts an image in the specified editing target area, and within the extracted editing target area The color space of the image, for example, the RGB space is converted into the LCH space. The control device 103 calculates the hue of each pixel with respect to the image in the editing target area after conversion into the LCH space. Then, the control device 103 divides the hue circle into a plurality of regions. For example, the control device 103 divides the hue circle into 10 parts with a 16 degree width or 16 parts with a 22.5 degree width.

その後、制御装置103は、色相環の各分割領域ごとに、編集対象領域内における各画素の色相の出現頻度を算出することにより、編集対象領域内の色相の分布を算出する。そして、制御装置103は、算出した色相の分布に基づいて、編集対象領域内において最も出現頻度の高い色相を編集対象領域における特徴色として抽出する。また、編集対象領域内において特徴色が算出された画素を編集対象の画素として特定する。   After that, the control device 103 calculates the hue distribution in the editing target region by calculating the appearance frequency of the hue of each pixel in the editing target region for each divided region of the hue circle. Then, based on the calculated hue distribution, the control device 103 extracts a hue having the highest appearance frequency in the editing target area as a characteristic color in the editing target area. Further, the pixel for which the characteristic color is calculated in the editing target area is specified as the editing target pixel.

次に、制御装置103は、編集対象領域内における上述した特徴色以外の色に基づいて、編集対象領域内に含まれる不要な被写体を消去するために用いる編集用データを生成する。具体的には、制御装置103は、編集対象領域内において2番目に出現頻度の高い色相を特定し、編集対象領域内において該2番目に出現頻度の高い色相が算出された画素を編集用の画素として特定する。そして、制御装置103は、特定した編集用の画素のそれぞれの画素値を求め、その画素値の平均値を編集用データとして算出する。そして、制御装置103は、上述した編集対象領域内で特定した編集対象の画素の画素値を、上記編集用データで置換することによって、編集対象領域内に含まれる不要な被写体を消去する。   Next, the control device 103 generates editing data to be used for erasing unnecessary subjects included in the editing target area based on the colors other than the above-described characteristic colors in the editing target area. Specifically, the control device 103 identifies the hue with the second highest appearance frequency in the editing target area, and edits the pixel for which the hue with the second highest appearance frequency is calculated in the editing target area. It is specified as a pixel. Then, the control device 103 obtains each pixel value of the identified editing pixel, and calculates an average value of the pixel values as editing data. Then, the control device 103 deletes an unnecessary subject included in the editing target area by replacing the pixel value of the editing target pixel specified in the editing target area with the editing data.

このように、使用者によって設定された編集対象領域内において最も出現頻度の高い色相を特徴色として算出し、該特徴色が算出された画素を編集対象の画素として特定することにより、使用者は、消去したい被写体を大きく含むように編集対象領域を設定する可能性が高いことを加味して、使用者が消去したい被写体を精度高く特定することができる。また、編集対象領域内において2番目に出現頻度の高い色相が算出された画素を編集用の画素として特定し、その画素値の平均値を編集用データとして用いて編集対象の画素の画素値を置換することにより、編集対象の画素の周辺画素を用いて、使用者が消去したい被写体を精度高く消去することが可能となる。   In this way, by calculating the hue with the highest appearance frequency in the edit target area set by the user as the feature color and specifying the pixel for which the feature color is calculated as the pixel to be edited, the user can Considering that there is a high possibility that the edit target area is set so as to largely include the subject to be erased, the user can specify the subject to be erased with high accuracy. Further, the pixel having the second highest appearance hue in the editing target area is specified as the editing pixel, and the pixel value of the editing target pixel is determined using the average value of the pixel values as the editing data. By substituting, it becomes possible to erase the subject that the user wants to erase with high accuracy using the peripheral pixels of the pixel to be edited.

図3は、本実施の形態における画像修正処理の流れを示すフローチャートである。この図3に示す処理は、使用者によって画像修正処理用アプリケーションの実行が指示されると起動するプログラムとして、制御装置103によって実行される。   FIG. 3 is a flowchart showing the flow of image correction processing in the present embodiment. The processing shown in FIG. 3 is executed by the control device 103 as a program that is activated when the user instructs execution of the image correction processing application.

ステップS10において、制御装置103は、使用者によって画像の編集ツールとして修復ブラシツールが選択され、該修復ブラシツールが操作されて画像内に編集対象領域が指定されたか否かを判断する。ステップS10で肯定判断した場合には、ステップS20へ進み、制御装置103は、画像内から編集対象領域内の画像を抽出して、ステップS30へ進む。ステップS30では、制御装置103は、ステップS20で抽出した編集対象領域内の画像の色空間、例えばRGB空間をLCH空間に変換して、ステップS40へ進む。   In step S10, the control device 103 determines whether or not the repair brush tool is selected as the image editing tool by the user, and the repair brush tool is operated to specify the editing target area in the image. When an affirmative determination is made in step S10, the process proceeds to step S20, and the control device 103 extracts an image in the editing target area from the image, and proceeds to step S30. In step S30, the control device 103 converts the color space of the image in the editing target area extracted in step S20, for example, the RGB space into the LCH space, and proceeds to step S40.

ステップS40では、制御装置103は、上述したように、LCH空間に変換した後の編集対象領域内の画像を対象として各画素の色相を算出する。そして、制御装置103は、色相環を複数の領域に分割して、色相環の各分割領域ごとに、編集対象領域内における各画素の色相の出現頻度を算出することにより、編集対象領域内の色相の分布を算出する。さらに、制御装置103は、算出した色相の分布に基づいて、編集対象領域内において最も出現頻度の高い色相を編集対象領域における特徴色として抽出する。また、制御装置103は、編集対象領域内において特徴色が算出された画素を編集対象の画素として特定する。   In step S40, as described above, the control device 103 calculates the hue of each pixel for the image in the editing target area after conversion to the LCH space. Then, the control device 103 divides the hue circle into a plurality of regions, and calculates the appearance frequency of the hue of each pixel in the editing target region for each divided region of the hue ring, thereby Calculate the hue distribution. Further, based on the calculated hue distribution, the control device 103 extracts a hue having the highest appearance frequency in the edit target area as a characteristic color in the edit target area. In addition, the control device 103 identifies the pixel whose characteristic color is calculated in the editing target area as the editing target pixel.

その後、ステップS50へ進み、制御装置103は、上述したように、編集対象領域内において2番目に出現頻度の高い色相を特定し、編集対象領域内において該2番目に出現頻度の高い色相が算出された画素を編集用の画素として特定する。そして、制御装置103は、特定した編集用の画素のそれぞれの画素値を求め、その画素値の平均値を編集用データとして算出する。その後、ステップS60へ進む。   Thereafter, the process proceeds to step S50, and as described above, the control device 103 identifies the hue having the second highest appearance frequency in the editing target area, and calculates the hue having the second highest appearance frequency in the editing target area. The designated pixel is specified as a pixel for editing. Then, the control device 103 obtains each pixel value of the identified editing pixel, and calculates an average value of the pixel values as editing data. Thereafter, the process proceeds to step S60.

ステップS60では、制御装置103は、ステップS40で特定した編集対象の画素の画素値を、ステップS50で算出した編集用データで置換することによって、編集対象領域内に含まれる不要な被写体を消去する。その後、処理を終了する。   In step S60, the control device 103 deletes an unnecessary subject included in the editing target area by replacing the pixel value of the editing target pixel specified in step S40 with the editing data calculated in step S50. . Thereafter, the process ends.

以上説明した本実施の形態によれば、以下のような作用効果を得ることができる。
(1)制御装置103は、使用者によって画像内に設定された編集対象領域内の画像から特徴色を抽出し、抽出した特徴色以外の色に基づいて、編集対象領域内に含まれる不要な被写体を消去するために用いる編集用データを生成し、生成した編集用データを用いて、編集対象領域内に含まれる不要な被写体を消去するようにした。これによって、編集対象領域内における特徴色が使用者が消去したい被写体の色である可能性が高いことを加味して、使用者が消去したい被写体を精度高く特定して消去することができる。
According to the present embodiment described above, the following operational effects can be obtained.
(1) The control device 103 extracts a feature color from the image in the edit target area set in the image by the user, and is unnecessary in the edit target area based on the color other than the extracted feature color. Editing data used for erasing a subject is generated, and an unnecessary subject included in the editing target area is erased using the generated editing data. Thus, taking into account that the characteristic color in the editing target area is likely to be the color of the subject that the user wants to erase, the subject that the user wants to erase can be identified and erased with high accuracy.

(2)制御装置103は、編集対象領域内における各画素の色相の出現頻度を算出し、編集対象領域内において最も出現頻度の高い色相を編集対象領域における特徴色として抽出するようにした。これによって、使用者は消去したい被写体を大きく含むように編集対象領域を設定する可能性が高いことから、最も出現頻度が高い色相を特徴色として抽出して編集対象の画素を特定することにより、使用者が消去したい被写体を精度高く特定することができる。 (2) The control device 103 calculates the appearance frequency of the hue of each pixel in the editing target area, and extracts the hue having the highest appearance frequency in the editing target area as a characteristic color in the editing target area. As a result, the user is highly likely to set the edit target area so as to largely include the subject to be deleted, so by extracting the hue with the highest appearance frequency as a characteristic color and specifying the pixel to be edited, The subject that the user wants to erase can be specified with high accuracy.

(3)制御装置103は、編集対象領域内において2番目に出現頻度の高い色相が算出された画素を編集用の画素として特定し、特定した編集用の画素の画素値の平均値を編集用データとして算出するようにした。そして、制御装置103は、編集対象領域内で特定した編集対象の画素の画素値を、編集用データで置換することによって、編集対象領域内に含まれる不要な被写体を消去するようにした。これによって、編集対象の画素の周辺画素を用いて、使用者が消去したい被写体を精度高く消去することが可能となる。 (3) The control device 103 identifies the pixel for which the hue having the second highest appearance frequency in the editing target area is calculated as an editing pixel, and edits the average value of the pixel values of the identified editing pixel. It was calculated as data. Then, the control device 103 deletes an unnecessary subject included in the editing target area by replacing the pixel value of the editing target pixel specified in the editing target area with the editing data. As a result, it is possible to erase the subject that the user wants to erase with high accuracy using the peripheral pixels of the pixel to be edited.

―変形例―
なお、上述した実施の形態の画像処理装置は、以下のように変形することもできる。
(1)上述した実施の形態では、制御装置103は、編集対象領域内において最も出現頻度の高い色相を編集対象領域における特徴色として抽出し、編集対象領域内において該特徴色が算出された画素を編集対象の画素として特定するようにした。また、制御装置103は、編集対象領域内において2番目に出現頻度の高い色相が算出された画素を編集用の画素として特定し、特定した編集用の画素の画素値の平均値を編集用データとして算出するようにした。しかしながら、制御装置103は、編集対象領域内において2番目に出現頻度の高い色相を編集対象領域における特徴色として抽出し、編集対象領域内において該特徴色が算出された画素を編集対象の画素として特定するようにし、編集対象領域内において最も出現頻度の高い色相が算出された画素を編集用の画素として特定し、特定した編集用の画素の画素値の平均値を編集用データとして算出するようにしてもよい。これによって、使用者が消去したい被写体の領域よりも背景領域を多く含むように編集対象領域を設定した場合でも、使用者が消去したい被写体を精度高く特定し、背景領域の画素を用いて被写体を消去することが可能となる。
-Modification-
The image processing apparatus according to the above-described embodiment can be modified as follows.
(1) In the above-described embodiment, the control device 103 extracts a hue having the highest appearance frequency in the editing target area as a characteristic color in the editing target area, and the pixel in which the characteristic color is calculated in the editing target area. Is specified as a pixel to be edited. In addition, the control device 103 identifies the pixel for which the hue with the second highest appearance frequency is calculated in the editing target area as the editing pixel, and determines the average value of the pixel values of the identified editing pixel as the editing data. It was made to calculate as. However, the control device 103 extracts a hue having the second highest appearance frequency in the editing target area as a characteristic color in the editing target area, and uses the pixel in which the characteristic color is calculated in the editing target area as the editing target pixel. The pixel for which the hue having the highest appearance frequency is calculated in the editing target area is specified as the editing pixel, and the average value of the pixel values of the specified editing pixel is calculated as the editing data. It may be. As a result, even when the editing target area is set so as to include more background areas than the area of the subject that the user wants to erase, the subject that the user wants to erase is specified with high accuracy, and the subject is detected using the pixels in the background area. It can be erased.

(2)また、上述した実施の形態と上記変形例(1)とを組み合わせてもよい。すなわち、制御装置103は、上述した実施の形態における画像修正処理を行なって被写体を消去した後の画像と、上記変形例(1)における画像修正処理を行なって被写体を消去した後の画像とをモニタ105上に並べて表示し、その中から使用者によって選択された画像を最終的な編集後の画像として採用するようにしてもよい。 (2) Moreover, you may combine embodiment mentioned above and the said modification (1). That is, the control device 103 performs the image correction process in the above-described embodiment to delete the subject and the image after the image correction process in the modification (1) to delete the subject. The images displayed side by side on the monitor 105 may be used as the final edited image.

(3)上述した実施の形態では、制御装置103は、編集対象領域内において最も出現頻度の高い色相を編集対象領域における特徴色として抽出する例について説明した。しかしながら、制御装置103は、編集対象領域内の画像の色情報に基づいて、編集対象領域内の中央部分に存在する色を特定し、これを編集対象領域における特徴色として特定するようにしてもよい。なお、編集対象領域内の中央部分に存在する色とは、例えば、設定された編集対象領域が円形の場合や縦横比が大きく異ならない矩形の場合には、設定された編集対象領域の中心部分またはその近傍の一部分の色成分を意味する。また、設定された編集対象領域が縦横比が大きく異なる矩形の場合には、設定された編集対象領域の短辺方向の中心、かつ長辺方向の全体に分布する色成分を意味する。 (3) In the above-described embodiment, the example has been described in which the control device 103 extracts the hue having the highest appearance frequency in the editing target area as the characteristic color in the editing target area. However, the control device 103 may specify a color that exists in the central portion of the editing target area based on the color information of the image in the editing target area, and specify this as a characteristic color in the editing target area. Good. Note that the color existing in the central portion of the editing target area is, for example, the central portion of the set editing target area when the set editing target area is a circle or a rectangle whose aspect ratio is not significantly different. Or a color component of a part in the vicinity thereof. Further, when the set edit target area is a rectangle having a greatly different aspect ratio, it means a color component distributed in the center of the set edit target area in the short side direction and in the entire long side direction.

そして、この場合には、制御装置103は、画像内の編集対象領域内において特徴色が算出された画素の画素値を、編集対象領域内における特徴色以外の画素の画素値を用いて置き換えることにより、編集対象領域内に含まれる不要な被写体を消去すればよい。これによって、使用者は、消去したい被写体が中央部分に位置するように編集対象領域を指定する可能性が高いことを加味して、使用者が消去したい被写体を精度高く特定し、これを消去することが可能となる。   In this case, the control device 103 replaces the pixel value of the pixel whose characteristic color is calculated in the editing target area in the image with the pixel value of the pixel other than the characteristic color in the editing target area. Thus, an unnecessary subject included in the editing target area may be deleted. This allows the user to specify the subject to be erased with high accuracy and to erase it, considering that the subject to be erased is likely to designate the editing target area so that the subject is located in the center. It becomes possible.

(4)あるいは、制御装置103は、編集対象領域内で最も大きな面積を占める色を特徴的な色として特定するようにしてもよい。これによって、使用者は、消去したい被写体を大きく含むように編集対象領域を設定する可能性が高いことを加味して、使用者が消去したい被写体を精度高く特定し、これを消去することが可能となる。 (4) Alternatively, the control device 103 may specify the color that occupies the largest area in the editing target region as a characteristic color. This allows the user to specify the subject to be erased with high accuracy and erase it, taking into account that it is highly likely that the edit target area will be set to include the subject to be erased. It becomes.

(5)あるいは、制御装置103は、編集対象領域内に含まれる複数の色をユーザに提示し、その中からユーザによって選択された色を特徴的な色として特定するようにするようにしてもよい。これによって、使用者は、消去したい被写体の色を直接指定することができるため、使用者が消去したい被写体を精度高く特定し、これを消去することが可能となる。 (5) Alternatively, the control device 103 presents a plurality of colors included in the edit target area to the user, and specifies the color selected by the user as a characteristic color. Good. As a result, the user can directly specify the color of the subject to be erased, so that the user can specify the subject to be erased with high accuracy and erase it.

(6)上述した実施の形態では、制御装置103は、編集対象領域内の画像を抽出し、抽出した編集対象領域内の画像を対象として画像修正処理を行う例について説明した。しかしながら、制御装置103は、編集対象領域を複数の分割領域に分割して各分割領域ごとに画像修正処理を行なうようにしてもよい。これによって、例えば使用者によって設定された編集対象領域の面積が大きい場合でも、分割領域ごとに画像修正処理を行なうことができ、処理精度を向上させることができる。 (6) In the above-described embodiment, an example in which the control device 103 extracts an image in the editing target area and performs image correction processing on the extracted image in the editing target area has been described. However, the control device 103 may divide the editing target area into a plurality of divided areas and perform image correction processing for each divided area. Thereby, for example, even when the area of the edit target region set by the user is large, the image correction processing can be performed for each divided region, and the processing accuracy can be improved.

(7)上述した実施の形態では、使用者は、画像処理アプリケーションが備える編集ツールの1つである矩形ツールや修復ブラシツールを用いて編集対象領域を指定する例について説明した。しかしながら、使用者は、その他の方法によって編集対象領域を指定してもよい。例えば、描画ツールを用いてフリーハンドで画像上に編集対象領域を描画することによって指定してもよい。あるいは、使用者がマウスを使用して画像内で消去したい被写体上の1点をクリックしたときに、制御装置103は、クリックされた位置の画素と連続し、かつ色が類似している画素が存在する領域を自動的に認識し、認識した領域、または認識した領域とその周辺画素とを含んだ領域を編集対象領域としてもよい。 (7) In the above-described embodiment, the user has described an example in which the editing target area is specified using a rectangular tool or a repair brush tool which is one of editing tools included in the image processing application. However, the user may designate the editing target area by other methods. For example, it may be specified by drawing a region to be edited on an image freehand using a drawing tool. Alternatively, when the user uses the mouse to click on a point on the subject to be erased in the image, the control device 103 displays a pixel that is continuous with the pixel at the clicked position and has a similar color. An existing area may be automatically recognized, and a recognized area or an area including the recognized area and its surrounding pixels may be set as an editing target area.

(8)上述した実施の形態、および変形例では、制御装置103は、使用者によって指定された編集対象領域内の画像を抽出し、該編集対象領域内の画像を対象として画像修正処理を行う例について説明した。しかしながら、制御装置103は、編集対象領域内の画像の代わりに、編集対象領域の周辺領域内の画像、または編集対象領域内および編集対象領域の周辺領域内の画像を抽出して、これらの画像を対象として画像修正処理を行うようにしてもよい。 (8) In the embodiment and the modification described above, the control device 103 extracts an image in the edit target area designated by the user, and performs image correction processing on the image in the edit target area. An example was described. However, the control device 103 extracts, instead of the images in the editing target area, images in the peripheral area of the editing target area or images in the editing target area and the peripheral area of the editing target area, and these images are extracted. Image correction processing may be performed on the subject.

(9)上述した実施の形態では、画像処理装置としては、パソコン100を使用する例について説明したが、これに限定されず、カメラ等の他の機器にも本発明は適用可能である。 (9) In the above-described embodiment, the example in which the personal computer 100 is used as the image processing apparatus has been described. However, the present invention is not limited to this, and the present invention can be applied to other devices such as a camera.

なお、本発明の特徴的な機能を損なわない限り、本発明は、上述した実施の形態における構成に何ら限定されない。また、上述の実施の形態と複数の変形例を組み合わせた構成としてもよい。   Note that the present invention is not limited to the configurations in the above-described embodiments as long as the characteristic functions of the present invention are not impaired. Moreover, it is good also as a structure which combined the above-mentioned embodiment and a some modification.

100 パソコン、101 操作部材、102 接続IF、103 制御装置、104 HDD、105 モニタ 100 PC, 101 operation member, 102 connection IF, 103 control device, 104 HDD, 105 monitor

Claims (7)

画像内に編集対象領域を設定する領域設定手順と、
前記編集対象領域の画像における色相の頻度を算出し、前記色相の頻度が最も高い色を不要な被写体の特徴色として抽出する抽出手順と、
前記色相の頻度が2番目に高い色の画素の画素値を編集用データとして生成する生成手順と、
前記編集用データを用いて前記編集対象領域の前記特徴色の画素の画素値を置換する画像処理手順と、
をコンピュータに実行させることを特徴とする画像処理プログラム。
An area setting procedure for setting an area to be edited in an image,
An extraction procedure for calculating the frequency of hue in the image of the edit target region and extracting the color having the highest hue frequency as a characteristic color of an unnecessary subject;
A generation procedure for generating a pixel value of a pixel of the color having the second highest hue frequency as editing data;
An image processing procedure for replacing pixel values of the characteristic color pixels in the editing target area using the editing data;
An image processing program for causing a computer to execute.
画像内に被写体領域と背景領域とを含む編集対象領域を設定する領域設定手順と、
前記編集対象領域の画像における色相の頻度を算出し、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれる場合には前記色相の頻度が2番目に高い色を不要な被写体の特徴色として抽出し、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれない場合には前記色相の頻度が最も高い色を前記特徴色として抽出する抽出手順と、
前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれる場合には前記色相の頻度が最も高い色の画素の画素値を編集用データとして生成し、前記背景領域が前記被写体領域よりも多く前記編集対象領域に含まれない場合には前記色相の頻度が2番目に高い色の画素の画素値を前記編集用データとして生成する生成手順と、
前記編集用データを用いて前記編集対象領域の前記特徴色の画素の画素値を置換する画像処理手順と、
をコンピュータに実行させることを特徴とする画像処理プログラム。
An area setting procedure for setting an edit target area including an object area and a background area in the image;
The frequency of the hue in the image of the edit target area is calculated, and when the background area is included in the edit target area more than the subject area, the color of the subject that does not require the second highest color of the hue An extraction procedure for extracting the color having the highest hue frequency as the feature color when the background area is larger than the subject area and not included in the edit target area;
When the background region is included in the editing target region more than the subject region, the pixel value of the pixel having the highest hue frequency is generated as editing data, and the background region is more than the subject region. A generation procedure for generating a pixel value of a pixel of a color having the second highest frequency of hue as the editing data when not included in the editing target region;
An image processing procedure for replacing pixel values of the characteristic color pixels in the editing target area using the editing data;
An image processing program for causing a computer to execute.
請求項1または2に記載の画像処理プログラムにおいて、
前記抽出手順は、前記編集対象領域の画像の中央部分に存在する色を前記特徴色として抽出すること
を特徴とする画像処理プログラム。
The image processing program according to claim 1 or 2,
An image processing program characterized in that the extraction procedure extracts a color existing in a central portion of an image of the edit target area as the characteristic color.
請求項1または2に記載の画像処理プログラムにおいて、
前記抽出手順は、前記編集対象領域の画像に含まれる複数の色をユーザに提示し、その中からユーザによって選択された色を前記特徴色として特定すること
を特徴とする画像処理プログラム。
The image processing program according to claim 1 or 2,
The extraction procedure presents a plurality of colors included in an image of the editing target area to a user, and specifies a color selected by the user as the characteristic color.
請求項3または4に記載の画像処理プログラムにおいて、
前記生成手順は、前記編集対象領域の画像における前記特徴色以外の画素の画素値を前記編集用データとして生成し、
前記画像処理手順は、前記編集用データを用いて前記編集対象領域の画像における前記特徴色の画素の画素値を置換すること
を特徴とする画像処理プログラム。
In the image processing program according to claim 3 or 4,
The generation procedure generates pixel values of pixels other than the characteristic color in the image of the editing target area as the editing data,
In the image processing procedure, the editing data is used to replace pixel values of pixels of the characteristic color in the image of the editing target area.
請求項1〜5のいずれか一項に記載の画像処理プログラムにおいて、
前記抽出手順は、前記編集対象領域の画像を複数の分割領域に分割し、前記分割領域ごとに前記特徴色を抽出し、
前記生成手順は、前記分割領域ごとに前記編集用データを生成すること
を特徴とする画像処理プログラム。
In the image processing program according to any one of claims 1 to 5,
The extraction procedure divides the image of the editing target area into a plurality of divided areas, extracts the characteristic colors for each of the divided areas,
The image processing program characterized in that the generation procedure generates the editing data for each of the divided areas.
請求項1〜6のいずれか一項に記載の画像処理プログラムを実行する実行手段を備えること
を特徴とする画像処理装置。
An image processing apparatus comprising execution means for executing the image processing program according to claim 1.
JP2010118550A 2010-05-24 2010-05-24 Image processing program and image processing apparatus Active JP5663951B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010118550A JP5663951B2 (en) 2010-05-24 2010-05-24 Image processing program and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010118550A JP5663951B2 (en) 2010-05-24 2010-05-24 Image processing program and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2011249926A JP2011249926A (en) 2011-12-08
JP5663951B2 true JP5663951B2 (en) 2015-02-04

Family

ID=45414691

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010118550A Active JP5663951B2 (en) 2010-05-24 2010-05-24 Image processing program and image processing apparatus

Country Status (1)

Country Link
JP (1) JP5663951B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013179560A1 (en) * 2012-05-30 2013-12-05 パナソニック株式会社 Image processing device and image processing method
KR102238812B1 (en) * 2017-07-04 2021-04-09 주식회사 케이티 Appratus and method for providing image from search result page displayed by web browser

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6434269B1 (en) * 1999-04-26 2002-08-13 Adobe Systems Incorporated Smart erasure brush

Also Published As

Publication number Publication date
JP2011249926A (en) 2011-12-08

Similar Documents

Publication Publication Date Title
WO2020107297A1 (en) Video clipping control method, terminal device, system
US7822295B2 (en) Image processing apparatus, image searching method, and program
JP3539553B2 (en) Animation creation method, animation creation device, and computer-readable recording medium recording animation creation program
JP4817881B2 (en) Image processing method and image processing apparatus
US20090183078A1 (en) Instant feedback media editing system
JP5663951B2 (en) Image processing program and image processing apparatus
JP2007043506A (en) Image processing apparatus, image processing method thereof, program, and storage medium
JP6314427B2 (en) Imaging apparatus, information processing apparatus, control method, and program
JP2008147850A (en) Design editing method, design editing device, and design editing program
JP2006094053A (en) Photo movie creating method and apparatus thereof, and photo movie creating program
JP5531636B2 (en) Image processing program and image processing apparatus
JP2011228897A (en) Image processing program and image processing apparatus
JP5556194B2 (en) Display control apparatus and display control program
JP2007293582A (en) Image processor, setting method of image processing condition in the image processor, and program
US9122923B2 (en) Image generation apparatus and control method
JP2006345094A (en) Image processor and processing method
EP2811732A2 (en) Image processing apparatus, image processing method, computer-readable storage medium and program
JP2007201935A (en) Control method of image processing apparatus, and image processing apparatus
JP4498245B2 (en) Color processing method and apparatus
JP2006094030A (en) Image pickup device, and composite image creating method, and program
JP2010176235A (en) Image interface and image search program
JP2009005081A (en) Apparatus and method for creating profile
JP2011015280A (en) Image editing apparatus, program and image playback apparatus
JP2006268153A (en) Image processing device, image processing method, and program
JP2006211140A (en) Image correction device, image correction program, data converter, and data conversion program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130329

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140218

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140520

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140812

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141014

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141124

R150 Certificate of patent or registration of utility model

Ref document number: 5663951

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