JP4715888B2 - Image processing apparatus and computer program - Google Patents
Image processing apparatus and computer program Download PDFInfo
- Publication number
- JP4715888B2 JP4715888B2 JP2008224709A JP2008224709A JP4715888B2 JP 4715888 B2 JP4715888 B2 JP 4715888B2 JP 2008224709 A JP2008224709 A JP 2008224709A JP 2008224709 A JP2008224709 A JP 2008224709A JP 4715888 B2 JP4715888 B2 JP 4715888B2
- Authority
- JP
- Japan
- Prior art keywords
- candidate
- opposite side
- image processing
- rectangular
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
本発明は、被写体の輪郭を含む矩形領域を抽出する画像処理装置及びコンピュータプログラムに関する。 The present invention relates to an image processing apparatus and a computer program for extracting a rectangular area including a contour of a subject.
従来より、撮影画像中に含まれる被写体画像に対して座標変換等の画像処理を実行可能にするために、被写体の輪郭を含む矩形領域を抽出する輪郭矩形抽出機能を備える撮像装置が知られている。このような撮像装置は、ハフ変換を利用して被写体の輪郭を示すエッジ画像から被写体の輪郭を構成する複数の直線を検出し、検出された複数の直線の中から矩形領域を形成する直線を特定することにより、矩形領域を抽出する(特許文献1参照)。
従来の撮像装置は、直線上に存在するエッジ画像の画素数を検出された複数の直線毎に算出し、算出された画素数が多い直線の順に基づいて矩形領域を形成する直線を特定する。しかしながらこのような構成によれば、抽出する矩形領域の大きさが明らかでない場合や1つの画像内に複数の被写体画像が存在する場合には、不適格な矩形領域が抽出されることがある。 The conventional imaging device calculates the number of pixels of the edge image existing on the straight line for each of the detected plurality of straight lines, and identifies the straight line forming the rectangular region based on the order of the straight lines having the largest number of calculated pixels. However, according to such a configuration, when the size of the rectangular area to be extracted is not clear or when a plurality of subject images exist in one image, an unsuitable rectangular area may be extracted.
本発明は、上記課題を解決するためになされたものであり、その目的は、抽出された輪郭矩形の確からしさをユーザに提示可能な画像処理装置及びコンピュータプログラムを提供することにある。 SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus and a computer program capable of presenting to a user the likelihood of an extracted outline rectangle.
本発明に係わる画像処理装置は、画像から縦方向と横方向の線分を検出する線分検出手段と、前記線分検出手段により検出された縦方向と横方向の線分から矩形領域を構成する縦方向と横方向の対辺候補を作成する対辺候補作成手段と、前記対辺候補作成手段により作成された縦方向の対辺候補と横方向の対辺候補の組み合わせを複数作成し、各組み合わせについて縦方向の対辺候補と横方向の対辺候補の交点を頂点とする矩形領域を矩形候補として作成する矩形候補作成手段と、前記矩形候補作成手段により作成された矩形候補の外周の長さに対する矩形候補の外周上に位置する対辺候補の長さの割合に基づいて各矩形候補の確からしさを算出する採点手段と、を備える。 An image processing apparatus according to the present invention comprises a line segment detection means for detecting vertical and horizontal line segments from an image, and a rectangular area from the vertical and horizontal line segments detected by the line segment detection means. A plurality of combinations of the opposite-side candidate creation unit that creates the opposite-side candidate in the vertical direction and the lateral direction, and the opposite-side candidate and the opposite-side candidate created in the opposite-side candidate creation unit. Rectangle candidate creation means for creating, as a rectangle candidate, a rectangular area whose vertex is the intersection of the opposite-side candidate and the lateral opposite-side candidate ; Scoring means for calculating the probability of each rectangular candidate based on the ratio of the lengths of the opposite side candidates located at .
本発明に係わるコンピュータプログラムは、画像から縦方向と横方向の線分を検出する線分検出処理と、前記線分検出処理により検出された縦方向と横方向の線分から矩形領域を構成する縦方向と横方向の対辺候補を作成する対辺候補作成処理と、前記対辺候補作成処理により作成された縦方向の対辺候補と横方向の対辺候補の組み合わせを複数作成し、各組み合わせについて縦方向の対辺候補と横方向の対辺候補の交点を頂点とする矩形領域を矩形候補として作成する矩形候補作成処理と、前記矩形候補作成処理により作成された矩形候補の外周の長さに対する矩形候補の外周上に位置する対辺候補の長さの割合に基づいて各矩形候補の確からしさを算出する採点処理とをコンピュータに実行させる。 A computer program according to the present invention includes a line segment detection process that detects vertical and horizontal line segments from an image, and a vertical area that forms a rectangular area from the vertical and horizontal line segments detected by the line segment detection process. A plurality of combinations of the opposite-side candidate creation process for creating the opposite-side candidate in the horizontal direction and the opposite-side candidate and the opposite-side candidate created by the opposite-side candidate creation process, and the vertical opposite side for each combination A rectangular candidate creation process that creates a rectangular area having a vertex at the intersection of the candidate and the opposite side candidate as a rectangle candidate , and on the outer circumference of the rectangular candidate with respect to the outer circumference of the rectangular candidate created by the rectangular candidate creation process The computer executes a scoring process for calculating the probability of each rectangular candidate based on the ratio of the length of the opposite side candidate located .
本発明に係る画像処理装置及びコンピュータプログラムによれば、抽出された輪郭矩形の確からしさをユーザに提示することができる。 According to the image processing apparatus and the computer program according to the present invention, it is possible to present the probability of the extracted outline rectangle to the user.
以下、本発明の一実施形態となるデジタルスチルカメラの構成について詳しく説明する。 Hereinafter, the configuration of a digital still camera according to an embodiment of the present invention will be described in detail.
〔全体構成〕
始めに、図1(a),(b)を参照して、本発明の一実施形態となるデジタルスチルカメラ1の全体構成について説明する。
〔overall structure〕
First, an overall configuration of a digital still camera 1 according to an embodiment of the present invention will be described with reference to FIGS. 1 (a) and 1 (b).
本発明の一実施形態となるデジタルスチルカメラ1は、図1(a)に示すように、略矩形形状の薄板状本体(以下、本体と略記)2の前面に撮影レンズ3,セルフタイマランプ4,ファインダ窓5,ストロボ発光部6,及びマイクロホン部7を備える。本体2上面の(ユーザにとって)右端側には電源キー8及びシャッタキー9が設けられている。撮影レンズ3は、焦点距離を無段階に変化させるズーム機能及びAF(AutoFocus)機能を有し、電源オフ時及び再生モード時は本体2内部に沈胴する。電源キー8は電源のオン/オフ毎に操作するキーであり、シャッタキー9は撮影モード時に撮影タイミングを指示する。 As shown in FIG. 1A, a digital still camera 1 according to an embodiment of the present invention includes a photographing lens 3 and a self-timer lamp 4 on the front surface of a substantially rectangular thin plate body (hereinafter abbreviated as a body). , Finder window 5, strobe light emitting unit 6, and microphone unit 7. A power key 8 and a shutter key 9 are provided on the right end side (for the user) of the upper surface of the main body 2. The taking lens 3 has a zoom function and an AF (AutoFocus) function for steplessly changing the focal length, and retracts inside the main body 2 when the power is off and in the reproduction mode. The power key 8 is a key that is operated every time the power is turned on / off, and the shutter key 9 instructs the photographing timing in the photographing mode.
本体2の背面には、図1(b)に示すように、撮影モード(R)キー10,再生モード(P)キー11,電子ビューファインダ(EVF)12,スピーカ部13,マクロキー14,ストロボキー15,メニュー(MENU)キー16,リングキー17,セット(SET)キー18,及び液晶表示部19が設けられている。撮影モードキー10は、電源オフの状態から操作することで自動的に電源オンとして静止画の撮影モードに移行する一方、電源オンの状態から繰返し操作することで静止画と動画の撮影モードを循環的に設定する。本実施形態では、静止画の撮影モードには、所定の露光時間で通常の撮影動作を行う一枚撮影モードと、一枚撮影モードよりも短い露光時間で被写体を連続的に撮影し、複数の画像フレームを合成して一枚の画像を生成する連写撮影モードとが含まれる。 As shown in FIG. 1B, on the back of the main body 2, a shooting mode (R) key 10, a playback mode (P) key 11, an electronic viewfinder (EVF) 12, a speaker unit 13, a macro key 14, a strobe A key 15, a menu (MENU) key 16, a ring key 17, a set (SET) key 18, and a liquid crystal display unit 19 are provided. The shooting mode key 10 is automatically turned on by operating from a power-off state to shift to a still image shooting mode, while being repeatedly operated from the power-on state to circulate through still image and moving image shooting modes. To set. In this embodiment, the still image shooting mode includes a single shooting mode in which a normal shooting operation is performed with a predetermined exposure time, and a subject is continuously shot with an exposure time shorter than that in the single shooting mode. A continuous shooting mode in which image frames are combined to generate a single image.
再生モードキー11は、電源オフの状態から操作することで自動的に電源オンとして再生モードに移行する。EVF12は、液晶画面を使用した接眼型のファインダであり、撮影モード時にはスルー画像を液晶画面に表示する一方、再生モード時には選択された画像等を再生表示する。マクロキー14は、静止画の撮影モードで通常撮影とマクロ撮影とを切換える際に操作する。ストロボキー15は、ストロボ発光部6の発光モードを切り換える際に操作する。メニューキー16は、各種メニュー項目等を選択する際に操作する。リングキー17は、上下左右各方向への項目選択用のキーが一体に形成されたものであり、このリングキー17の中央に位置するセットキー18は、その時点で選択されている項目を設定する際に操作する。 When the playback mode key 11 is operated from the power-off state, the playback mode key 11 is automatically turned on to enter the playback mode. The EVF 12 is an eyepiece type finder that uses a liquid crystal screen, and displays a through image on the liquid crystal screen in the photographing mode, and reproduces and displays a selected image and the like in the reproduction mode. The macro key 14 is operated when switching between normal shooting and macro shooting in the still image shooting mode. The strobe key 15 is operated when switching the light emission mode of the strobe light emitting unit 6. The menu key 16 is operated when selecting various menu items. The ring key 17 is integrally formed with item selection keys in the up, down, left, and right directions, and the set key 18 located in the center of the ring key 17 sets the item selected at that time. To operate.
液晶表示部19は、バックライト付きのカラー液晶パネルで構成されるもので、撮影モード時にはスルー画像のモニタ表示を行う一方、再生モード時には選択した画像等を再生表示する。図示しないが、デジタルスチルカメラ1の底面には、記録媒体として用いられるメモリカードを着脱するためのメモリカードスロットや、外部のパーソナルコンピュータ等と接続するためのシリアルインタフェースコネクタとしてUSB(Universal Serial Bus)コネクタ等が設けられている。 The liquid crystal display unit 19 is composed of a color liquid crystal panel with a backlight, and displays a through image on the monitor in the photographing mode, and reproduces and displays the selected image and the like in the reproduction mode. Although not shown, a USB (Universal Serial Bus) is provided on the bottom surface of the digital still camera 1 as a memory card slot for attaching / detaching a memory card used as a recording medium or a serial interface connector for connecting to an external personal computer or the like. Connectors etc. are provided.
〔撮像系及び制御系の構成〕
次に、図2,図3を参照して、本発明の一実施形態となるデジタルスチルカメラ1の撮像系及び制御系の構成について説明する。
[Configuration of imaging system and control system]
Next, with reference to FIGS. 2 and 3, the configuration of the imaging system and the control system of the digital still camera 1 according to an embodiment of the present invention will be described.
本発明の一実施形態となるデジタルスチルカメラ1では、撮影モードの際、モータ(M)31の駆動により合焦位置や絞り位置が移動される、撮影レンズ3を構成するレンズ光学系32の撮影光軸後方に配置された撮像素子であるCCD33が、タイミング発生器(TG)34と垂直ドライバ35によって走査駆動され、一定周期毎に結像した光像に対応する光電変換出力を1画面分出力する。この光電変換出力は、アナログ形態の信号の状態でRGBの各原色成分毎に適宜ゲイン調整された後にサンプルホールド回路(S/H)36でサンプルホールドされ、A/D変換器37でデジタルデータに変換され、カラープロセス回路38で画素補間処理及びγ補正処理を含むカラープロセス処理が行なわれてデジタル値の輝度信号Y及び色差信号Cb,Crが生成され、DMA(Direct Memory Access)コントローラ39に出力される。 In the digital still camera 1 according to an embodiment of the present invention, the photographing of the lens optical system 32 constituting the photographing lens 3 whose focus position and aperture position are moved by driving the motor (M) 31 in the photographing mode. A CCD 33, which is an image sensor disposed behind the optical axis, is scanned and driven by a timing generator (TG) 34 and a vertical driver 35, and outputs a photoelectric conversion output corresponding to an optical image formed at fixed intervals for one screen. To do. This photoelectric conversion output is appropriately gain-adjusted for each primary color component of RGB in the state of an analog signal and then sampled and held by a sample hold circuit (S / H) 36 and converted into digital data by an A / D converter 37. After being converted, the color process circuit 38 performs color process processing including pixel interpolation processing and γ correction processing to generate digital luminance signals Y and color difference signals Cb and Cr, which are output to a DMA (Direct Memory Access) controller 39. Is done.
DMAコントローラ39は、カラープロセス回路38が出力する輝度信号Y及び色差信号Cb,Crを、同じくカラープロセス回路38からの複合同期信号,メモリ書込みイネーブル信号,及びクロック信号を用いて一度DMAコントローラ39内部のバッファに書込み、DRAMインタフェース(I/F)40を介してバッファメモリとして使用されるDRAM41にDMA転送する。制御部42は、CPU,CPUで実行されるコンピュータプログラムを固定的に記憶したROM,及びワークメモリとして使用されるRAM等により構成され、デジタルスチルカメラ1全体の動作を制御する。 The DMA controller 39 once uses the luminance signal Y and the color difference signals Cb, Cr output from the color process circuit 38 by using the composite synchronization signal, memory write enable signal, and clock signal from the color process circuit 38 once. Is transferred to the DRAM 41 and used as a buffer memory via the DRAM interface (I / F) 40. The control unit 42 is configured by a CPU, a ROM in which a computer program executed by the CPU is fixedly stored, a RAM used as a work memory, and the like, and controls the operation of the entire digital still camera 1.
制御部42は、DRAM41への輝度及び色差信号のDMA転送終了後に、この輝度及び色差信号をDRAMインタフェース40を介してDRAM41より読出し、VRAMコントローラ43を介してVRAM44に書込む。デジタルビデオエンコーダ45は、上記輝度及び色差信号をVRAMコントローラ43を介してVRAM44より定期的に読出し、これらのデータを元にビデオ信号を発生してEVF12と液晶表示部19に出力する。EVF12と液晶表示部19は、デジタルビデオエンコーダ45からのビデオ信号に基づいた表示を行なうことで、その時点でVRAMコントローラ43から取込んでいる画像情報に基づく画像をリアルタイムに表示する。 After the DMA transfer of the luminance and color difference signals to the DRAM 41 is completed, the control unit 42 reads the luminance and color difference signals from the DRAM 41 via the DRAM interface 40 and writes them into the VRAM 44 via the VRAM controller 43. The digital video encoder 45 periodically reads the luminance and color difference signals from the VRAM 44 via the VRAM controller 43, generates a video signal based on these data, and outputs the video signal to the EVF 12 and the liquid crystal display unit 19. The EVF 12 and the liquid crystal display unit 19 display based on the video signal from the digital video encoder 45, thereby displaying an image based on the image information fetched from the VRAM controller 43 at that time in real time.
このようにEVF12と液晶表示部19にはその時点での画像がモニタ画像としてリアルタイムに表示される、所謂スルー画像の表示状態で、静止画撮影を行ないたいタイミングでシャッタキー9を操作するとトリガ信号を発生する。制御部42は、このトリガ信号に応じてその時点でCCD33から取込んでいる1画面分の輝度及び色差信号のDRAM41へのDMA転送を取り止め、改めて適正な露出条件に従った絞り値及びシャッタ速度でCCD33を駆動して1画面分の輝度及び色差信号を得てDRAM41へ転送し、その後にこの経路を停止し、記録保存の状態に遷移する。 As described above, the EVF 12 and the liquid crystal display unit 19 display the image at that time in real time as a monitor image. In the so-called through image display state, when the shutter key 9 is operated at the timing at which still image shooting is desired, the trigger signal is displayed. Is generated. In response to this trigger signal, the control unit 42 cancels the DMA transfer of the luminance and color difference signals for one screen currently taken in from the CCD 33 to the DRAM 41, and again determines the aperture value and shutter speed according to the appropriate exposure conditions. Then, the CCD 33 is driven to obtain the luminance and color difference signals for one screen and transfer them to the DRAM 41. Thereafter, this path is stopped, and the recording and storage state is entered.
この記録保存の状態では、制御部42がDRAM41に書込まれている輝度及び色差信号をDRAMインタフェース40を介してY,Cb,Crの各コンポーネント毎に読出して画像処理部47に書込み、この画像処理部47でADCT(Adaptive Discrete Cosine Transform:適応離散コサイン変換),エントロピ符号化方式であるハフマン符号化等の処理によりデータ圧縮する。そして、得た符号データを画像処理部47から読出し、デジタルスチルカメラ1の記録媒体として着脱自在に装着されるメモリカード48又はデジタルスチルカメラ1に固定的に内蔵される内蔵メモリ(図示せず)のいずれか一方に書込む。そして、輝度及び色差信号の圧縮処理及びメモリカード48又は内蔵メモリへの全圧縮データの書込み終了に伴なって、制御部42はCCD33からDRAM41への経路を再び起動する。 In this recording and storage state, the control unit 42 reads out the luminance and color difference signals written in the DRAM 41 for each of the Y, Cb, and Cr components via the DRAM interface 40 and writes them in the image processing unit 47. The processing unit 47 compresses data by processing such as ADCT (Adaptive Discrete Cosine Transform) and Huffman coding which is an entropy coding method. Then, the obtained code data is read from the image processing unit 47, and a memory card 48 that is detachably mounted as a recording medium of the digital still camera 1 or a built-in memory that is fixedly built in the digital still camera 1 (not shown). Write on either Then, along with the compression processing of the luminance and color difference signals and the completion of writing all the compressed data to the memory card 48 or the built-in memory, the control unit 42 activates the path from the CCD 33 to the DRAM 41 again.
制御部42には、キー入力部49,音声処理部50、及びストロボ駆動部51が接続される。キー入力部49は、上述した電源キー8,シャッタキー9,撮影モードキー10,再生モードキー11,マクロキー14,ストロボキー15,メニューキー16,リングキー17,セットキー18等から構成され、それらのキー操作に伴なう信号は直接制御部42へ送出される。音声処理部50は、PCM音源等の音源回路を備え、音声の録音時にはマイクロホン部7より入力された音声信号をデジタル化し、所定のデータファイル形式、例えばMP3(MPEG-1 audio layer 3)規格にしたがってデータ圧縮して音声データファイルを作成してメモリカード48又は内蔵メモリへ送出する一方、音声の再生時にはメモリカード48又は内蔵メモリから送られてきた音声データファイルの圧縮を解いてアナログ化し、スピーカ部(SP)13を駆動して、拡声放音させる。ストロボ駆動部51は、静止画像撮影時に図示しないストロボ用の大容量コンデンサを充電した上で、制御部42からの制御に基づいてストロボ発光部6を閃光駆動する。 A key input unit 49, a sound processing unit 50, and a strobe driving unit 51 are connected to the control unit 42. The key input unit 49 includes the power key 8, shutter key 9, shooting mode key 10, playback mode key 11, macro key 14, strobe key 15, menu key 16, ring key 17, set key 18 and the like described above. Signals accompanying these key operations are sent directly to the control unit 42. The audio processing unit 50 includes a sound source circuit such as a PCM sound source, and digitizes the audio signal input from the microphone unit 7 at the time of audio recording, and uses a predetermined data file format, for example, MP3 (MPEG-1 audio layer 3) standard. Therefore, the audio data file is created by compressing the data and sent to the memory card 48 or the built-in memory, while the audio data file sent from the memory card 48 or the built-in memory is uncompressed and converted into an analog signal when reproducing the sound. The unit (SP) 13 is driven to emit loud sounds. The strobe driving unit 51 charges a strobe capacitor (not shown) during still image shooting, and then drives the strobe light emitting unit 6 to flash based on the control from the control unit 42.
〔輪郭矩形抽出処理〕
このような構成を有するデジタルスチルカメラ1は、以下に示す輪郭矩形抽出処理を実行することにより、被写体の輪郭を含む矩形領域を抽出する。以下、図3に示すフローチャートを参照して、この輪郭矩形抽出処理を実行する際のデジタルスチルカメラ1の動作について説明する。
[Outline rectangle extraction processing]
The digital still camera 1 having such a configuration extracts a rectangular region including the contour of the subject by executing a contour rectangle extraction process described below. Hereinafter, the operation of the digital still camera 1 when executing the contour rectangle extraction process will be described with reference to the flowchart shown in FIG.
ユーザが、リングキー17及びセットキー18を操作することにより、シーン別撮影モードの中から「名刺や書類を写します」「ホワイトボードなどを写します」といったモードを選択し、撮影を行う。これらのモードは被写体の正面化補正を行うものであり、このようなモードで撮影された画像が画像処理部47に取り込まれ、輪郭矩形抽出処理の実行が可能となったタイミングで図3に示すフローチャートが開始となり、輪郭矩形抽出処理はステップS1の処理に進む。なお以下に示すデジタルスチルカメラ1の動作は、制御部42内のCPUがROMに記憶されているコンピュータプログラムをRAMにロードし、RAMにロードされたコンピュータプログラムを実行することにより実現される。 The user operates the ring key 17 and the set key 18 to select a mode such as “photograph a business card or document” or “photograph a whiteboard” from the scene-specific shooting modes, and perform shooting. These modes perform frontal correction of the subject, and an image photographed in such a mode is taken into the image processing unit 47 and is shown in FIG. 3 at the timing when the outline rectangle extraction process can be executed. The flowchart starts, and the outline rectangle extraction process proceeds to step S1. The following operation of the digital still camera 1 is realized by the CPU in the control unit 42 loading a computer program stored in the ROM into the RAM and executing the computer program loaded in the RAM.
ステップS1の処理では、画像処理部47が、入力された撮影画像に対し歪曲収差の補正処理を実行することにより、レンズ光学系32のレンズ特性により歪曲した撮影画像を補正する。これにより、ステップS1の処理は完了し、輪郭矩形抽出処理はステップS2の処理に進む。 In the process of step S1, the image processing unit 47 corrects the captured image distorted by the lens characteristics of the lens optical system 32 by executing a distortion aberration correction process on the input captured image. Thereby, the process of step S1 is completed and the outline rectangle extraction process proceeds to the process of step S2.
ステップS2の処理では、画像処理部47が、歪曲収差が補正された後の撮影画像の大きさ(画像サイズ)を所定の大きさに縮小する。具体的には、画像処理部47は、歪曲収差が補正された後の撮影画像の大きさを算出し、算出された大きさに基づいて撮影画像の大きさが(縦)×(横):320×240(画素)の大きさになるように撮影画像の縦方向及び横方向の長さを縮小する。これにより、ステップS2の処理は完了し、輪郭矩形抽出処理はステップS3の処理に進む。 In the process of step S2, the image processing unit 47 reduces the size (image size) of the captured image after correcting the distortion aberration to a predetermined size. Specifically, the image processing unit 47 calculates the size of the captured image after the distortion is corrected, and the size of the captured image is (vertical) × (horizontal) based on the calculated size: The vertical and horizontal lengths of the captured image are reduced so as to have a size of 320 × 240 (pixels). Thereby, the process of step S2 is completed, and the outline rectangle extraction process proceeds to the process of step S3.
ステップS3の処理では、画像処理部47が、撮影画像の色情報の表示形式をビットマップ形式からYUV(Y:輝度信号,U:輝度信号と青色成分の差,V:輝度信号と赤色成分の差)形式に変換する。これにより、ステップS3の処理は完了し、輪郭矩形抽出処理はステップS4の処理に進む。 In the processing of step S3, the image processing unit 47 changes the display format of the color information of the captured image from the bitmap format to YUV (Y: luminance signal, U: difference between luminance signal and blue component, V: luminance signal and red component). Convert to difference format. Thereby, the process of step S3 is completed, and the outline rectangle extraction process proceeds to the process of step S4.
ステップS4の処理では、画像処理部47が、撮影画像の画像データをメディアン(中央値,Median)フィルタにかけることにより撮影画像の画像データからノイズ成分を除去する。本実施形態におけるメディアンフィルタとは、3×3(画素)の局所領域における画素値を小さい順に並べ、中央に位置する画素値を領域中央の画素の画素値とするものである。これにより、ステップS4の処理は完了し、輪郭矩形抽出処理はステップS5の処理に進む。 In the process of step S4, the image processing unit 47 removes noise components from the image data of the captured image by applying the image data of the captured image to a median (median) filter. The median filter in this embodiment is a pixel value in a 3 × 3 (pixel) local region arranged in ascending order, and a pixel value located in the center is used as a pixel value of a pixel in the center of the region. Thereby, the process of step S4 is completed, and the outline rectangle extraction process proceeds to the process of step S5.
ステップS5の処理では、画像処理部47が、図4(a)〜(c)に示すように、ノイズ成分が除去された画像データから縦(垂直,x)方向及び横(水平,y)方向それぞれのエッジ画像を抽出する。本実施形態では、画像処理部47は、図5に示すような空間1次微分を計算して輪郭を検出するソーベル(Sobel)フィルタを用いて縦(垂直)方向及び横(水平)方向それぞれのエッジ画像を抽出する。これにより、ステップS5の処理は完了し、輪郭矩形抽出処理はステップS6の処理に進む。 In the process of step S5, as shown in FIGS. 4A to 4C, the image processing unit 47 performs vertical (vertical, x) direction and horizontal (horizontal, y) direction from the image data from which noise components have been removed. Each edge image is extracted. In the present embodiment, the image processing unit 47 calculates a spatial first derivative as shown in FIG. 5 and uses a Sobel filter that detects a contour to detect each of the vertical (vertical) direction and the horizontal (horizontal) direction. Edge image is extracted. Thereby, the process of step S5 is completed, and the outline rectangle extraction process proceeds to the process of step S6.
ステップS6の処理では、画像処理部47が、図6(a),(b)に示すように、ステップS5の処理により抽出された縦方向及び横方向のエッジ画像それぞれに対し細線及び二値化処理を施す。具体的には、画像処理部47は、縦方向のエッジ画像を構成する画素のうち、条件{座標位置x−1の画素値<座標位置xの画素値≧座標位置x+1の画素値}を満たす座標位置xの画素を検出する。また同様に、画像処理部47は、横方向のエッジ画像を構成する画素のうち、条件{座標位置y−1の画素値<座標位置yの画素値≧座標位置y+1の画素値}を満たす座標位置yの画素を検出する。そして画像処理部47は、エッジ画像を構成する画素のうち、抽出された座標位置x,yの画素値を255、それ以外の座標位置の画素値を0に設定する。これにより、ステップS6の処理は完了し、輪郭矩形抽出処理はステップS7の処理に進む。 In the process of step S6, the image processing unit 47, as shown in FIGS. 6A and 6B, performs fine line and binarization on the vertical and horizontal edge images extracted by the process of step S5. Apply processing. Specifically, the image processing unit 47 satisfies the condition {pixel value at the coordinate position x−1 <pixel value at the coordinate position x ≧ pixel value at the coordinate position x + 1} among the pixels constituting the vertical edge image. A pixel at the coordinate position x is detected. Similarly, the image processing unit 47 sets the coordinates satisfying the condition {the pixel value at the coordinate position y−1 <the pixel value at the coordinate position y ≧ the pixel value at the coordinate position y + 1} among the pixels constituting the horizontal edge image. The pixel at position y is detected. The image processing unit 47 sets the pixel values of the extracted coordinate positions x and y to 255 and the pixel values of other coordinate positions to 0 among the pixels constituting the edge image. Thereby, the process of step S6 is completed, and the outline rectangle extraction process proceeds to the process of step S7.
ステップS7の処理では、画像処理部47が、縦方向及び横方向のエッジ画像それぞれに対してラベリング処理を行うことにより、図7(a),(b)に示すような被写体の輪郭を形成する縦方向及び横方向の線分情報を作成する。本実施形態では、画像処理部47は、横方向のエッジ画像に対しては、x=0の座標位置から、y方向に隣接する画素も参照しながら、x方向にスキャンすることによりエッジ画像を構成する画素を検出する。そして画素が検出された場合、画像処理部47は、検出された画素の画素値が255、且つ、他の画素と連結されているか否かを判別し、画素値が255、且つ、他の画素と連結されていない場合、検出された画素を含む線分のトレースをx方向に開始する。具体的には、画像処理部47は、トレース開始位置の座標(x,y)の右横に位置する3点(x+1,y−1),(x+1,y),(x+1,y+1)についてトレースを実行する。 In the processing of step S7, the image processing unit 47 performs labeling processing on each of the vertical and horizontal edge images, thereby forming the contour of the subject as shown in FIGS. 7 (a) and 7 (b). Create vertical and horizontal line segment information. In this embodiment, the image processing unit 47 scans the edge image in the x direction from the coordinate position of x = 0 while scanning in the x direction while referring to the pixels adjacent to the y direction. A pixel to be configured is detected. When a pixel is detected, the image processing unit 47 determines whether or not the pixel value of the detected pixel is 255 and is connected to another pixel, and the pixel value is 255 and the other pixel. If not connected, the trace of the line segment including the detected pixel is started in the x direction. Specifically, the image processing unit 47 traces the three points (x + 1, y−1), (x + 1, y), and (x + 1, y + 1) located on the right side of the coordinates (x, y) of the trace start position. Execute.
そして画像処理部47は、以下に示す3つの条件のうち、いずれか1つの条件が満足された場合、その線分に固有番号を付与(ラベリング)してトレースを終了し、トレースを継続する場合には検出された画素があったx座標位置を次のトレース開始位置に設定する。 Then, when any one of the following three conditions is satisfied, the image processing unit 47 assigns a unique number to the line segment (labeling), ends the trace, and continues the trace. The x coordinate position where the detected pixel is located is set as the next trace start position.
条件1:3点のうち、少なくとも1点が既にラベリングされている。 Condition 1: At least one of the three points is already labeled.
条件2:3点のうち、2点以上がエッジ画像を構成する画素である。 Condition 2: Two or more of the three points are pixels constituting the edge image.
条件3:トレース中にエッジ画像を構成する画素が3点の中に2回検出されなかった。 Condition 3: A pixel constituting an edge image was not detected twice in three points during tracing.
一方、縦方向のエッジ画像に対しては、画像処理部47は、y=0の座標位置からx方向にスキャンすることによりエッジ画像を構成する画素を検出し、縦方向のエッジ画像に対して行った処理と同様の処理を行う。そして画像処理部47は、トレースによりラベリングされた各線分の始点及び終点の座標,傾き(始点と終点から求められたもの),線分を構成する各点の線分の傾きに対する誤差(縦線であればx方向,横線であればy方向のずれ)の平均,及び誤差が最大になる座標位置とその値を線分情報として算出する。これにより、ステップS7の処理は完了し、輪郭矩形抽出処理はステップS8の処理に進む。 On the other hand, for the edge image in the vertical direction, the image processing unit 47 detects pixels constituting the edge image by scanning in the x direction from the coordinate position of y = 0, and for the edge image in the vertical direction. The same processing as that performed is performed. The image processing unit 47 then coordinates and inclination of the start point and end point of each line segment labeled by tracing (obtained from the start point and end point), and an error (vertical line) with respect to the line segment inclination of each point constituting the line segment. If so, the average of the deviation in the x direction and the y direction in the case of a horizontal line) and the coordinate position where the error is maximized and its value are calculated as line segment information. Thereby, the process of step S7 is completed, and the outline rectangle extraction process proceeds to the process of step S8.
ステップS8の処理では、画像処理部47が、ステップS7の処理により作成された線分情報を参照して、線分の傾きに対する誤差の最大値が所定値以上である点を含む線分があるか否かを判別し、誤差の最大値が所定値以上である点を含む線分がある場合、図8に示すようにその点(図8に示す例では点P)において線分を2つに分割する。なお分割点は、分割後に長さが短くなる線分の方に加えられる。また画像処理部47は、線分の長さが第1閾値以上である場合や分割後の線分の長さが第2閾値以下になる場合には線分を分割しない。そして画像処理部47は、分割された線分があった場合には線分情報を更新する。これにより、ステップS8の処理は完了し、輪郭矩形抽出処理はステップS9の処理に進む。 In the process of step S8, the image processing unit 47 refers to the line segment information created by the process of step S7, and there is a line segment including a point where the maximum error with respect to the slope of the line segment is a predetermined value or more. If there is a line segment including a point where the maximum error is equal to or greater than a predetermined value, two line segments are included at that point (point P in the example shown in FIG. 8) as shown in FIG. Divide into The dividing point is added to the line segment whose length becomes shorter after the division. The image processing unit 47 does not divide the line segment when the length of the line segment is equal to or greater than the first threshold or when the length of the segment after division is equal to or smaller than the second threshold. Then, when there is a divided line segment, the image processing unit 47 updates the line segment information. Thereby, the process of step S8 is completed, and the outline rectangle extraction process proceeds to the process of step S9.
ステップS9の処理では、画像処理部47が、ステップS8の処理により更新された線分情報を参照して、長さが所定値以上の線分を長い順に接続元線分として所定数抽出し、図9に示すように以下の3つの条件を満たす線分(接続先線分)に接続元線分を接続する。そして画像処理部47は、接続先線分と接続元線分を接続した後、接続先線分と接続元線分を接続することにより形成された線分の始点と終点の座標位置を最小二乗法により算出する。これにより、ステップS9の処理は完了し、輪郭矩形抽出処理はステップS10の処理に進む。 In the process of step S9, the image processing unit 47 refers to the line segment information updated by the process of step S8, extracts a predetermined number of line segments having a length equal to or greater than a predetermined value as connection source line segments in the longest order, As shown in FIG. 9, the connection source line segment is connected to a line segment (connection destination line segment) that satisfies the following three conditions. Then, the image processing unit 47 connects the connection destination line segment and the connection source line segment, and then connects the connection destination line segment and the connection source line segment to determine the coordinate position of the start point and the end point of the line segment that is at least two. Calculated by multiplication. Thereby, the process of step S9 is completed, and the outline rectangle extraction process proceeds to the process of step S10.
条件1:接続元線分と接続先線分が所定値以上離れていない。 Condition 1: The connection source line segment and the connection destination line segment are not separated by a predetermined value or more.
条件2:接続元線分が接続先線分に完全に含まれない。 Condition 2: The connection source line segment is not completely included in the connection destination line segment.
条件3:接続元線分の始点又は終点を接続先線分まで伸ばした際に伸ばした部分と接続元線分の始点及び終点の位置との誤差が所定値未満である。 Condition 3: The error between the portion extended when the start point or end point of the connection source line segment is extended to the connection destination line segment and the positions of the start point and end point of the connection source line segment is less than a predetermined value.
ステップS10の処理では、画像処理部47が、図10に示すように、ステップS8及びステップS9の分割処理及び接続処理が施された縦方向及び横方向それぞれの線分から矩形の対辺候補を作成する(図10に示す例では、横方向の対辺候補を線分H1と線分H2のペア,縦方向の対辺候補を線分V1と線分V2のペアとして示している)。具体的には、画像処理部47は、線分間の距離が所定値以上、且つ、一方の線分の長さに対する他方の線分の比率が所定の範囲内(例えば、1/3〜3倍)にある線分のペアを縦方向及び横方向それぞれについて対辺候補として複数作成する。これにより、ステップS10の処理は完了し、輪郭矩形抽出処理はステップS11の処理に進む。 In the process of step S10, as shown in FIG. 10, the image processing unit 47 creates a rectangular opposite-side candidate from the vertical and horizontal line segments subjected to the division process and the connection process of step S8 and step S9. (In the example shown in FIG. 10, the opposite side candidate in the horizontal direction is shown as a pair of line segment H1 and line segment H2, and the opposite side candidate in the vertical direction is shown as a pair of line segment V1 and line segment V2.) Specifically, the image processing unit 47 determines that the distance between line segments is not less than a predetermined value and the ratio of the other line segment to the length of one line segment is within a predetermined range (for example, 1/3 to 3 times). A plurality of pairs of line segments in the vertical direction and the horizontal direction are created as opposite side candidates. Thereby, the process of step S10 is completed, and the outline rectangle extraction process proceeds to the process of step S11.
ステップS11の処理では、画像処理部47が、図11に示すように、ステップS10の処理により作成された縦方向及び横方向それぞれの対辺候補の組み合わせを作成する。そして画像処理部47は、各組み合わせについて、対辺候補の4つの交点を算出する。この際、画像処理部47は、線分の傾き情報だけを用い、線分の延長上に交点があればよいとする。つまり検出された交点上で実際には線分が交叉していない場合も含まれる。そして画像処理部47は、算出された4つの交点を頂点とする図12に示すような矩形候補Sを複数作成する。これにより、ステップS11の処理は完了し、輪郭矩形抽出処理はステップS12の処理に進む。 In the process of step S11, as shown in FIG. 11, the image processing unit 47 creates a combination of opposite side candidates in the vertical direction and the horizontal direction created by the process of step S10. Then, the image processing unit 47 calculates four intersections of the opposite side candidates for each combination. At this time, it is assumed that the image processing unit 47 uses only the slope information of the line segment and only needs to have an intersection on the extension of the line segment. That is, the case where the line segment does not actually cross over the detected intersection point is also included. Then, the image processing unit 47 creates a plurality of rectangular candidates S as shown in FIG. 12 having the calculated four intersections as vertices. Thereby, the process of step S11 is completed, and the outline rectangle extraction process proceeds to the process of step S12.
ステップS12の処理では、画像処理部47が、ステップS11の処理により作成された矩形候補Sの外周の長さ算出する。外周の長さは、矩形候補Sを構成する4つの頂点間の距離を足し合わせることにより算出することができる。また画像処理部47は、図13に示すように、矩形候補Sの外周上に位置する縦方向及び横方向の線分Lの長さを算出する。そして画像処理部47は、以下に示す数式1を用いて、矩形候補Sの外周の長さに対する矩形候補Sの外周上に位置する線分Lの長さの割合を各矩形候補Sの点数(矩形領域の確からしさ)として算出する(スコアリング処理)。数式1中、P係数は、矩形候補Sを構成する4つの頂点を超えた線分(例えば図13に示す領域R1,R2,矩形候補Sの外周部を超えて延出している線分)がある場合に矩形候補Sの点数を減点するためのペナルティ係数を意味し、例えば線分が4つの頂点を超えた箇所が0箇所であれば1.0、1箇所であれば0.8、2箇所であれば0.64等のように設定される。なおペナルティ係数は、上記例に限定されることはなく、例えば被写体が定型であり、縦と横の比率が予め判っている場合は、その比率から外れている程、ペナルティ係数の値を重く(1以下にする)したり、被写体の外周の長さが判っている場合は、その外周との誤差が大きくなる程、ペナルティ係数の値を重く(1以下にする)したりする等、種々の応用が可能である。これにより、ステップS12の処理は完了し、輪郭矩形抽出処理はステップS13の処理に進む。
ステップS13の処理では、画像処理部47が、図14(a)〜(d)に示すように、ステップS12の処理により算出された点数が高い順、すなわち確からしさが高い順に矩形候補S1〜S4を撮影画像に重ね合わせて液晶表示部19に表示する。具体的には、画像処理部47は、図15に示すように、ユーザがリングキー17を操作するのに合わせて確からしさが高い順に矩形候補S1〜S4を巡回的に液晶表示部19に表示する。なお図15に示す例では、確からしさが高い順に矩形候補を液晶表示部19に表示したが、点数に応じて矩形候補を色分けして液晶表示部19に同時に表示するようにしてもよい。 In the process of step S13, as shown in FIGS. 14A to 14D, the image processing unit 47 performs rectangular candidates S1 to S4 in descending order of the points calculated by the process of step S12, that is, in descending order of probability. Is superimposed on the captured image and displayed on the liquid crystal display unit 19. Specifically, as shown in FIG. 15, the image processing unit 47 cyclically displays the rectangular candidates S <b> 1 to S <b> 4 on the liquid crystal display unit 19 in descending order of probability as the user operates the ring key 17. To do. In the example shown in FIG. 15, the rectangle candidates are displayed on the liquid crystal display unit 19 in descending order of probability. However, the rectangle candidates may be color-coded according to the number of points and simultaneously displayed on the liquid crystal display unit 19.
また撮影画像内の複数の被写体がある場合、複数の矩形候補についての選択を行うかどうかをユーザが選択できるようにしておくとよい。複数補正モードがOFFの場合、画像処理部47は、例えば図16に示すように、ユーザがリングキー17を操作するのに合わせて確からしさが高い順に矩形候補を巡回的に液晶表示部19に表示し、ユーザにより選択された矩形候補に基づいて座標変換等の画像処理を行った後に、輪郭矩形抽出処理を完了する。複数補正モードがONの場合、画像処理部47は、例えば図17に示すように、ユーザがリングキー17を操作するのに合わせて確からしさが高い順に矩形候補を巡回的に液晶表示部19に表示し、ユーザにより選択された矩形候補に基づいて座標変換等の画像処理を行った後、ユーザにより選択されなかった矩形候補を選択可能にしてさらなる画像処理を行えるようにする。これにより、ユーザは複数の被写体に対して順次正しい矩形光をを選択して画像補整をすることが可能となる。以上でステップS13の処理は完了し、一連の輪郭矩形抽出処理は終了する。 When there are a plurality of subjects in the captured image, it is preferable that the user can select whether or not to select a plurality of rectangle candidates. When the multiple correction mode is OFF, the image processing unit 47 cyclically displays the rectangular candidates on the liquid crystal display unit 19 in descending order of probability as the user operates the ring key 17, as shown in FIG. After performing the image processing such as coordinate conversion based on the rectangle candidate displayed and selected by the user, the contour rectangle extraction processing is completed. When the multiple correction mode is ON, the image processing unit 47 cyclically displays the rectangular candidates on the liquid crystal display unit 19 in descending order of probability as the user operates the ring key 17 as shown in FIG. After displaying and performing image processing such as coordinate conversion based on the rectangle candidate selected by the user, the rectangle candidate that has not been selected by the user can be selected so that further image processing can be performed. As a result, the user can correct the image by sequentially selecting the correct rectangular light for a plurality of subjects. Thus, the process of step S13 is completed, and the series of outline rectangle extraction processes ends.
以上の説明から明らかなように、本発明の実施形態となる輪郭矩形抽出処理によれば、画像処理部47が、撮影画像から縦方向と横方向の線分情報を検出し、検出された縦方向と横方向の線分情報から矩形領域を構成する縦方向と横方向の対辺候補を作成する。また画像処理部47は、縦方向の対辺候補と横方向の対辺候補の組み合わせを複数作成し、各組み合わせについて縦方向の対辺候補と横方向の対辺候補の交点を頂点とする矩形領域を矩形候補Sとして作成する。そして画像処理部47は、矩形候補Sの外周の長さに対する矩形候補Sの外周上に位置する線分Lの長さの割合を各矩形候補Sの点数として算出し、算出結果に従って撮影画像と共に矩形候補Sを表示する。従って、このような輪郭矩形抽出処理によれば、抽出された矩形候補Sの確からしさをユーザに提示することができる。 As is apparent from the above description, according to the outline rectangle extraction process according to the embodiment of the present invention, the image processing unit 47 detects the vertical and horizontal line segment information from the captured image, and the detected vertical The candidates for opposite sides in the vertical direction and the horizontal direction constituting the rectangular area are created from the line segment information in the direction and the horizontal direction. Further, the image processing unit 47 creates a plurality of combinations of the vertical opposite-side candidates and the horizontal opposite-side candidates, and for each combination, a rectangular area whose vertex is the intersection of the vertical opposite-side candidate and the horizontal opposite-side candidate is a rectangular candidate. Create as S. Then, the image processing unit 47 calculates the ratio of the length of the line segment L located on the outer periphery of the rectangle candidate S to the length of the outer periphery of the rectangle candidate S as the score of each rectangle candidate S, and along with the captured image according to the calculation result. A rectangle candidate S is displayed. Therefore, according to such a contour rectangle extraction process, the probability of the extracted rectangle candidate S can be presented to the user.
以上、本発明の有用な実施形態としてカメラに搭載した形態を説明したが、撮像部分を持たない画像処理装置に本発明を適用することも可能である。即ち、外部の撮像装置で撮像された画像をメモリカード、USBケーブルなどによって取り込み、上記実施形態に示した一連の輪郭矩形抽出処理を行うようにしても良い。また、上記実施形態では矩形候補を採点の高い順に提示し、ユーザに選ばせた後に座標変換による補正を行ったが、矩形候補を採点の高いものから座標変換により補正していき、その補正結果を順次提示して、最も好ましいものをユーザに選択するようにしても良い。 As mentioned above, although the form mounted in the camera was demonstrated as useful embodiment of this invention, it is also possible to apply this invention to the image processing apparatus which does not have an imaging part. That is, an image captured by an external imaging device may be captured by a memory card, a USB cable, or the like, and the series of outline rectangle extraction processes described in the above embodiment may be performed. Further, in the above embodiment, the rectangle candidates are presented in descending order of scoring, and correction is performed by coordinate conversion after letting the user select. However, the rectangle candidates are corrected by coordinate conversion from those having high scoring, and the correction result May be presented sequentially to select the most preferable one for the user.
以上、本発明者によってなされた発明を適用した実施の形態について説明したが、この実施の形態による本発明の開示の一部をなす論述及び図面により本発明は限定されることはない。すなわち、上記実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれることは勿論であることを付け加えておく。 As mentioned above, although the embodiment to which the invention made by the present inventor is applied has been described, the present invention is not limited by the description and the drawings that form part of the disclosure of the present invention according to this embodiment. That is, it should be added that other embodiments, examples, operation techniques, and the like made by those skilled in the art based on the above embodiments are all included in the scope of the present invention.
本発明は、被写体の輪郭を含む矩形領域を抽出する撮像装置に適用することができる。 The present invention can be applied to an imaging apparatus that extracts a rectangular region including the contour of a subject.
1:デジタルスチルカメラ
2:本体
42:制御部
47:画像処理部
1: Digital still camera 2: Main body 42: Control unit 47: Image processing unit
Claims (7)
前記線分検出手段により検出された縦方向と横方向の線分から矩形領域を構成する縦方向と横方向の対辺候補を作成する対辺候補作成手段と、
前記対辺候補作成手段により作成された縦方向の対辺候補と横方向の対辺候補の組み合わせを複数作成し、各組み合わせについて縦方向の対辺候補と横方向の対辺候補の交点を頂点とする矩形領域を矩形候補として作成する矩形候補作成手段と、
前記矩形候補作成手段により作成された矩形候補の外周の長さに対する矩形候補の外周上に位置する対辺候補の長さの割合に基づいて各矩形候補の確からしさを算出する採点手段と、
を備えることを特徴とする画像処理装置。 Line segment detection means for detecting vertical and horizontal line segments from the image;
Opposite side candidate creation means for creating vertical and horizontal opposite side candidates constituting a rectangular region from the vertical and horizontal line segments detected by the line segment detection unit;
A plurality of combinations of the vertical opposite side candidate and the horizontal opposite side candidate created by the opposite side candidate creating means are created, and a rectangular region having a vertex at the intersection of the vertical opposite side candidate and the horizontal opposite side candidate for each combination Rectangle candidate creating means for creating a rectangle candidate;
Scoring means for calculating the probability of each rectangular candidate based on the ratio of the length of the opposite side candidate located on the outer periphery of the rectangular candidate to the outer peripheral length of the rectangular candidate created by the rectangular candidate creating means;
An image processing apparatus comprising:
前記採点手段は、対辺候補を構成する線分が矩形候補の外周部を超えて延出している場合、算出された値を所定数減点することを特徴とする画像処理装置。 The image processing apparatus according to claim 1 .
The scoring means deducts a predetermined number of calculated values when a line segment constituting the opposite side candidate extends beyond the outer periphery of the rectangular candidate.
前記採点手段の算出結果に従って撮影画像と共に矩形候補を表示する表示制御手段を更に備えることを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2 ,
An image processing apparatus, further comprising display control means for displaying a rectangular candidate together with the photographed image according to the calculation result of the scoring means.
前記表示制御手段は、前記採点手段により算出された確からしさが高い順に前記矩形候補を表示することを特徴とする画像処理装置。 The image processing apparatus according to claim 3 .
The image processing apparatus, wherein the display control means displays the rectangle candidates in descending order of the probability calculated by the scoring means.
前記表示制御手段は、前記採点手段により算出された確からしさに基づいて複数の矩形候補を色分けして表示することを特徴とする画像処理装置。 The image processing apparatus according to claim 3 .
The image processing apparatus, wherein the display control means displays a plurality of rectangle candidates in different colors based on the probability calculated by the scoring means.
撮像手段を更に備え、
前記画像は前記撮像手段により撮像された画像であることを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 5 ,
Further comprising an imaging means,
The image processing apparatus according to claim 1, wherein the image is an image captured by the imaging unit.
前記線分検出処理により検出された縦方向と横方向の線分から矩形領域を構成する縦方向と横方向の対辺候補を作成する対辺候補作成処理と、
前記対辺候補作成処理により作成された縦方向の対辺候補と横方向の対辺候補の組み合わせを複数作成し、各組み合わせについて縦方向の対辺候補と横方向の対辺候補の交点を頂点とする矩形領域を矩形候補として作成する矩形候補作成処理と、
前記矩形候補作成処理により作成された矩形候補の外周の長さに対する矩形候補の外周上に位置する対辺候補の長さの割合に基づいて各矩形候補の確からしさを算出する採点処理と
をコンピュータに実行させることを特徴とするコンピュータプログラム。 Line segment detection processing for detecting vertical and horizontal line segments from the image;
Opposite side candidate creation processing for creating vertical and horizontal opposite side candidates constituting a rectangular region from the vertical and horizontal line segments detected by the line segment detection process;
A plurality of combinations of vertical opposite side candidates and horizontal opposite side candidates created by the opposite side candidate creation process are created, and for each combination, a rectangular area whose vertex is the intersection of the vertical opposite side candidate and the horizontal opposite side candidate Rectangle candidate creation processing to create as a rectangle candidate;
A scoring process for calculating the probability of each rectangular candidate based on the ratio of the length of the opposite side candidate located on the outer periphery of the rectangular candidate to the outer peripheral length of the rectangular candidate created by the rectangular candidate creation process. A computer program that is executed.
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008224709A JP4715888B2 (en) | 2008-09-02 | 2008-09-02 | Image processing apparatus and computer program |
| US12/542,897 US8125544B2 (en) | 2008-09-02 | 2009-08-18 | Image processing apparatus for extracting quadrangle area in image |
| CN2009101683029A CN101668116B (en) | 2008-09-02 | 2009-08-27 | image processing device |
| TW098129219A TWI408954B (en) | 2008-09-02 | 2009-08-31 | Image processing device and computer program |
| KR1020090082452A KR101032058B1 (en) | 2008-09-02 | 2009-09-02 | Image Processing Apparatus and Computer-readable Media |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008224709A JP4715888B2 (en) | 2008-09-02 | 2008-09-02 | Image processing apparatus and computer program |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010253329A Division JP4803315B2 (en) | 2010-11-12 | 2010-11-12 | Image processing apparatus and computer program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010062722A JP2010062722A (en) | 2010-03-18 |
| JP4715888B2 true JP4715888B2 (en) | 2011-07-06 |
Family
ID=41804544
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008224709A Expired - Fee Related JP4715888B2 (en) | 2008-09-02 | 2008-09-02 | Image processing apparatus and computer program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP4715888B2 (en) |
| CN (1) | CN101668116B (en) |
Families Citing this family (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9767354B2 (en) | 2009-02-10 | 2017-09-19 | Kofax, Inc. | Global geographic information retrieval, validation, and normalization |
| JP5724454B2 (en) * | 2011-02-25 | 2015-05-27 | 村田機械株式会社 | Image processing apparatus and image processing method |
| JP5742399B2 (en) | 2011-04-06 | 2015-07-01 | 富士ゼロックス株式会社 | Image processing apparatus and program |
| US10146795B2 (en) | 2012-01-12 | 2018-12-04 | Kofax, Inc. | Systems and methods for mobile image capture and processing |
| US9342742B2 (en) | 2012-01-12 | 2016-05-17 | Kofax, Inc. | Systems and methods for mobile image capture and processing |
| JP5362052B2 (en) * | 2012-01-24 | 2013-12-11 | Eizo株式会社 | Display device, image processing device, image region detection method, and computer program |
| US9208536B2 (en) | 2013-09-27 | 2015-12-08 | Kofax, Inc. | Systems and methods for three dimensional geometric reconstruction of captured image data |
| US9355312B2 (en) | 2013-03-13 | 2016-05-31 | Kofax, Inc. | Systems and methods for classifying objects in digital images captured using mobile devices |
| US20140316841A1 (en) | 2013-04-23 | 2014-10-23 | Kofax, Inc. | Location-based workflows and services |
| JP2016538783A (en) | 2013-11-15 | 2016-12-08 | コファックス, インコーポレイテッド | System and method for generating a composite image of a long document using mobile video data |
| CN104835184B (en) * | 2014-02-10 | 2018-03-20 | 成都理想境界科技有限公司 | The extracting method of quadrilateral area in image |
| US9760788B2 (en) | 2014-10-30 | 2017-09-12 | Kofax, Inc. | Mobile document detection and orientation based on reference object characteristics |
| US10242285B2 (en) | 2015-07-20 | 2019-03-26 | Kofax, Inc. | Iterative recognition-guided thresholding and data extraction |
| US11062176B2 (en) | 2017-11-30 | 2021-07-13 | Kofax, Inc. | Object detection and image cropping using a multi-detector approach |
| WO2020208742A1 (en) * | 2019-04-10 | 2020-10-15 | 楽天株式会社 | Polygon detection device, polygon detection method, and polygon detection program |
| CN113706510B (en) * | 2021-08-31 | 2023-07-28 | 杭州师范大学钱江学院 | Weld joint detection positioning method based on gray value mutation point interpolation line segment fitting |
| CN117197073B (en) * | 2023-09-07 | 2024-03-05 | 石家庄铁道大学 | Rectangular object automatic counting method based on machine vision |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5717436A (en) * | 1993-07-01 | 1998-02-10 | Intel Corporation | Processing image signals with a single image support component |
| KR0172324B1 (en) * | 1995-05-25 | 1999-03-20 | 김광호 | Image correction method for camera shake correction |
| JP2005122323A (en) * | 2003-10-14 | 2005-05-12 | Casio Comput Co Ltd | Imaging apparatus, image processing apparatus, image processing method and program for imaging apparatus |
| EP1739622B1 (en) * | 2005-06-28 | 2013-08-14 | Canon Kabushiki Kaisha | Image feature identification with two cameras |
| JP4525519B2 (en) * | 2005-08-18 | 2010-08-18 | 日本電信電話株式会社 | Quadrilateral evaluation method, apparatus and program |
| JP4662258B2 (en) * | 2005-08-31 | 2011-03-30 | 株式会社リコー | Image processing method and apparatus, digital camera apparatus, and recording medium recording image processing program |
| JP4712487B2 (en) * | 2005-08-25 | 2011-06-29 | 株式会社リコー | Image processing method and apparatus, digital camera apparatus, and recording medium recording image processing program |
-
2008
- 2008-09-02 JP JP2008224709A patent/JP4715888B2/en not_active Expired - Fee Related
-
2009
- 2009-08-27 CN CN2009101683029A patent/CN101668116B/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010062722A (en) | 2010-03-18 |
| CN101668116B (en) | 2012-02-01 |
| CN101668116A (en) | 2010-03-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4715888B2 (en) | Image processing apparatus and computer program | |
| TWI408954B (en) | Image processing device and computer program | |
| CN101765862B (en) | Image processor, image processing method, digital camera and imaging device | |
| US8744170B2 (en) | Image processing apparatus detecting quadrilateral region from picked-up image | |
| JP4947136B2 (en) | Image processing apparatus, image processing method, and program | |
| JP4474885B2 (en) | Image classification device and image classification program | |
| WO2012163112A1 (en) | Frame-skipping scanning and recognizing device and method | |
| JP2010211255A (en) | Imaging apparatus, image processing method, and program | |
| US8478004B2 (en) | Method of controlling digital image processing apparatus for performing moving picture photographing mode, and digital image processing apparatus using the method | |
| JP2006339784A (en) | Imaging apparatus, image processing method, and program | |
| JP4835713B2 (en) | Image processing apparatus and computer program | |
| JP4803315B2 (en) | Image processing apparatus and computer program | |
| JP2011041041A (en) | Imaging apparatus, imaging method and program | |
| JP4905124B2 (en) | Image display device, image display method, and program | |
| JP5131399B2 (en) | Image processing apparatus, image processing method, and program | |
| JP2006186930A (en) | Imaging apparatus, image processing method, and program | |
| JP5136335B2 (en) | CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM | |
| JP4793049B2 (en) | Imaging device, captured image display method, captured image display program, captured image deletion method, and captured image deletion program | |
| JP2006191305A (en) | Mobile terminal device with camera | |
| JP4872564B2 (en) | Image processing apparatus, image processing method, and image processing program | |
| JP4720255B2 (en) | Camera device, photographing method and photographing program | |
| JP2011135437A (en) | Imaging apparatus, image combining method, and program | |
| JP2008124793A (en) | Imaging apparatus and imaging method | |
| JP2007228233A (en) | Imaging device | |
| JP2006005536A (en) | Digital imaging apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100813 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101021 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101026 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101112 |
|
| 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: 20110301 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110314 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4715888 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140408 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |