WO2017208367A1 - 画像処理装置、画像処理方法、および、プログラム - Google Patents

画像処理装置、画像処理方法、および、プログラム Download PDF

Info

Publication number
WO2017208367A1
WO2017208367A1 PCT/JP2016/066068 JP2016066068W WO2017208367A1 WO 2017208367 A1 WO2017208367 A1 WO 2017208367A1 JP 2016066068 W JP2016066068 W JP 2016066068W WO 2017208367 A1 WO2017208367 A1 WO 2017208367A1
Authority
WO
WIPO (PCT)
Prior art keywords
straight line
edge
correction amount
image processing
rectangle
Prior art date
Application number
PCT/JP2016/066068
Other languages
English (en)
French (fr)
Inventor
正義 林
清人 小坂
Original Assignee
株式会社Pfu
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 株式会社Pfu filed Critical 株式会社Pfu
Priority to PCT/JP2016/066068 priority Critical patent/WO2017208367A1/ja
Priority to JP2018520259A priority patent/JP6564136B2/ja
Publication of WO2017208367A1 publication Critical patent/WO2017208367A1/ja
Priority to US16/192,319 priority patent/US10810743B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0007Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3872Repositioning or masking
    • H04N1/3873Repositioning or masking defined only by a limited number of coordinate points or parameters, e.g. corners, centre; for trimming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/247Aligning, centring, orientation detection or correction of the image by affine transforms, e.g. correction due to perspective effects; Quadrilaterals, e.g. trapezoids

Definitions

  • the present invention relates to an image processing apparatus, an image processing method, and a program.
  • Patent Document 1 a technique for accurately detecting an object to be photographed in a complicated background is disclosed.
  • Patent Document 1 Patent Document 1
  • Patent Document 2 Patent Document 1
  • the conventional image processing apparatus has a problem that the outline of the object cannot be detected in the background of the same color without hardware information such as the focal length of the camera.
  • the present invention has been made in view of the above problems, and requires device-specific hardware information such as the focal length of the camera device and the image sensor size even if the form region and the background region are the same color or similar colors.
  • an object is to provide an image processing apparatus, an image processing method, and a program capable of improving the cropping accuracy of a form area from a photographed image based on the form layout.
  • an image processing apparatus includes a layout data storage unit that stores layout data of a form layout, and a captured image acquisition unit that acquires captured image data of a captured image including a form region.
  • An edge detection means for detecting an edge included in the photographed image, a straight line acquisition means for acquiring an edge straight line based on the edge, and a correction amount of the form area based on the layout based on the edge.
  • a correction amount calculation means for calculating, and the edge straight line that is the outermost of the edge straight lines constituting the rectangle is selected as a selection straight line, and the outline of the form region is configured based on the correction amount and the selected straight line.
  • Reference line acquisition means for acquiring a reference straight line
  • form specification means for specifying the form coordinates of the form area based on the reference straight line , Characterized by comprising a.
  • the image processing method includes a captured image acquisition step of acquiring captured image data of a captured image including a form area, an edge detection step of detecting an edge included in the captured image, and an edge based on the edge A straight line obtaining step for obtaining a straight line; a correction amount calculating step for calculating a correction amount for the form area based on the layout based on the edge and the layout data of the stored form layout; and a rectangle.
  • the program according to the present invention includes a captured image acquisition step for acquiring captured image data of a captured image including a form area, an edge detection step for detecting an edge included in the captured image, and an edge straight line based on the edge.
  • a rectangle is formed, a straight line acquisition step to be acquired, a correction amount calculation step of calculating a correction amount of the form area based on the layout based on the edge and the stored layout data of the form layout, and
  • a form specifying step for specifying the form coordinates of the form area based on a reference line; Characterized in that to the row.
  • an image of an object can be detected with high accuracy even in the background of the same color or similar color as the object.
  • FIG. 1 is a block diagram illustrating an example of the configuration of the image processing apparatus according to the present embodiment.
  • FIG. 2 is a flowchart illustrating an example of processing in the image processing apparatus according to the present embodiment.
  • FIG. 3 is a flowchart illustrating an example of processing in the image processing apparatus of the present embodiment.
  • FIG. 4 is a diagram showing an example of layout data in the present embodiment.
  • FIG. 5 is a diagram showing an example of a form area before projective transformation in the present embodiment.
  • FIG. 6 is a diagram showing the relationship of edges in the present embodiment.
  • FIG. 7 is a diagram showing edge relationships in the present embodiment.
  • FIG. 8 is a diagram illustrating an example of parallel straight lines in the present embodiment.
  • FIG. 9 is a diagram illustrating an example of selection candidate straight lines in the present embodiment.
  • FIG. 1 is a block diagram illustrating an example of the configuration of the image processing apparatus 100 according to the present embodiment.
  • the embodiment described below exemplifies the image processing apparatus 100 for embodying the technical idea of the present invention, and is not intended to specify the present invention to the image processing apparatus 100.
  • the present invention is equally applicable to the image processing apparatus 100 of other embodiments included in the scope of claims.
  • the form of function distribution in the image processing apparatus 100 exemplified in the present embodiment is not limited to the following, and may be configured to be functionally or physically distributed / integrated in arbitrary units within a range where similar effects and functions can be achieved. can do.
  • the image processing apparatus 100 is, for example, portable information such as a tablet terminal, a mobile phone, a smartphone, a PHS, a PDA, a notebook personal computer, or a wearable computer such as a glasses type or a watch type. It may be a processing device (mobile terminal).
  • the image processing apparatus 100 is generally configured to include a control unit 102, a storage unit 106, a photographing unit 110, an input / output unit 112, a sensor unit 114, and a communication unit 116. .
  • the image processing apparatus 100 is illustrated as a mobile terminal including a photographing unit 110 in a housing. However, the image processing apparatus 100 does not include the photographing unit 110 in a housing, and captures captured image data from an external photographing device. It may be configured to receive (for example, a desktop personal computer).
  • an input / output interface unit (not shown) for connecting the input / output unit 112 and the control unit 102 may be further provided.
  • Each unit of the image processing apparatus 100 is connected to be communicable via an arbitrary communication path.
  • the communication unit 116 is a network interface (NIC (Network Interface Controller), etc.), Bluetooth (registered trademark), infrared communication, etc. for transmitting and receiving IP data by wired communication and / or wireless communication (WiFi, etc.) May be an interface for performing wireless communication.
  • NIC Network Interface Controller
  • Bluetooth registered trademark
  • WiFi wireless communication
  • the image processing apparatus 100 may be communicably connected to an external apparatus via a network using the communication unit 116.
  • the sensor unit 114 detects a physical quantity and converts it into a signal (digital signal) of another medium.
  • the sensor unit 114 includes a proximity sensor, a direction sensor, a magnetic field sensor, a linear acceleration sensor, a luminance sensor, a gyro sensor, a pressure sensor, a gravity sensor, an acceleration sensor, an atmospheric pressure sensor, and / or a temperature sensor. Also good.
  • the input / output unit 112 performs data input / output (I / O).
  • the input / output unit 112 may be, for example, a key input unit, a touch panel, a control pad (for example, a touch pad and a game pad), a mouse, a keyboard, and / or a microphone.
  • the input / output unit 112 may be a display unit that displays a display screen of an application or the like (for example, a display, a monitor, a touch panel, or the like configured by liquid crystal or organic EL).
  • a display screen of an application or the like for example, a display, a monitor, a touch panel, or the like configured by liquid crystal or organic EL.
  • the input / output unit 112 may be an audio output unit (for example, a speaker or the like) that outputs audio information as audio.
  • the input / output unit (touch panel) 112 may include a sensor unit 114 that detects physical contact and converts it into a signal (digital signal).
  • the image capturing unit 110 acquires still image data by capturing a still image of a subject (for example, a form or the like).
  • the imaging unit 110 may acquire captured image data.
  • the photographing unit 110 may acquire continuous (moving image) image data (frames) by continuously capturing images (moving image capturing) of the subject.
  • the imaging unit 110 may acquire video data.
  • the imaging unit 110 may acquire ancillary data.
  • the frame may be non-compressed image data.
  • the frame may be high-resolution image data.
  • the high resolution may be full high vision, 4K resolution, super high vision (8K resolution), or the like.
  • the photographing unit 110 may shoot moving images at 24 fps or 30 fps.
  • the image capturing unit 110 may be a camera including an image sensor such as a CCD (Charge Coupled Device) and / or a CMOS (Complementary Metal Oxide Semiconductor).
  • the storage unit 106 is a storage means, and for example, a memory such as a RAM / ROM, a fixed disk device such as a hard disk, an SSD (Solid State Drive), and / or an optical disk can be used.
  • a memory such as a RAM / ROM, a fixed disk device such as a hard disk, an SSD (Solid State Drive), and / or an optical disk can be used.
  • the storage unit 106 stores various databases, tables, buffers, and / or files (such as the layout data file 106a and the image data file 106b).
  • the storage unit 106 may store a computer program or the like for giving a command to a CPU (Central Processing Unit) and performing various processes.
  • a CPU Central Processing Unit
  • the layout data file 106a stores layout data of the form layout.
  • the layout data may be position data related to the arrangement of ruled lines, characters, photographs, and / or figures in the form.
  • the form may be a prescribed form such as various licenses including a driver's license, various identification cards, or a health insurance card.
  • the image data file 106b stores image data (such as a frame).
  • the image data file 106b may store photographed image data and / or form image data.
  • the control unit 102 is a CPU, GPU (Graphics Processing Unit), DSP (Digital Signal Processor), LSI (Large Scale Integration / Integration Specified and ASIC), which controls the image processing apparatus 100 in an integrated manner.
  • it may be composed of a tangible controller including a FPGA (Field-Programming Gate Array) or a control circuit.
  • control unit 102 has an internal memory for storing a control program, a program defining various processing procedures, and necessary data, and performs information processing for executing various processes based on these programs. Do.
  • control unit 102 is functionally conceptually, the captured image acquisition unit 102a, the edge detection unit 102b, the straight line acquisition unit 102c, the rectangle detection unit 102d, the correction amount calculation unit 102e, the reference straight line acquisition unit 102f, and the form identification unit 102g. And a form image acquisition unit 102h.
  • the captured image acquisition unit 102a acquires captured image data of the captured image.
  • the captured image acquisition unit 102a may acquire captured image data of a captured image including a form area.
  • the form area may be an area before projective transformation.
  • the photographed image acquisition unit 102a may acquire photographed image data obtained by photographing by the photographing unit 110 or an external photographing device.
  • the captured image acquisition unit 102a may acquire still image data by controlling still image capturing by the capturing unit 110.
  • the captured image acquisition unit 102a may acquire the captured image data (frame) corresponding to one frame by controlling the continuous image capturing or the moving image capturing by the capturing unit 110.
  • the edge detection unit 102b detects an edge included in the captured image.
  • the edge detection unit 102b may detect an edge included in the photographed image using the Canny method.
  • the edge detection unit 102b smoothes the captured image with a Gaussian filter, calculates the edge strength and the gradient direction (quantized in four directions), performs thinning processing, and performs edge extraction by hysteresis threshold processing. Edges may be detected.
  • the edge detection unit 102b performs pyramid structuring of the captured image, performs edge extraction based on adjacent tone differences, performs noise removal (labeling and / or background removal, etc.), and performs edge correction (combination of missing parts, etc.). By doing so, the edge may be detected.
  • the straight line acquisition unit 102c acquires an edge straight line based on the edge.
  • the straight line acquisition unit 102c may acquire an edge straight line as a parallel straight line that is parallel to the side of the reading rectangle that is a rectangle formed by the edge straight line.
  • the straight line acquisition unit 102c may calculate straight line candidates by Hough transform on the edges, and may acquire the edge straight lines by correcting the straight line candidates by the least square method.
  • the straight line acquisition unit 102c calculates a straight line candidate by Hough transform for the edge, corrects the straight line candidate by the least square method, and obtains information on the edge straight line (for example, the start point, the end point, and the number of votes in the Hough transform). You may get it.
  • the rectangle detection unit 102d detects a reading rectangle which is a rectangle constituted by edge straight lines.
  • the rectangle detection unit 102d may calculate rectangle candidates formed by the acquired edge straight line group (horizontal direction and vertical direction), sort the rectangle candidates by size, and detect a read rectangle. .
  • the correction amount calculation unit 102e calculates the correction amount of the form area based on the form layout based on the edge.
  • the correction amount calculation unit 102e may calculate the correction amount of the form area based on the form layout based on the ratio of the edge lengths.
  • the reference straight line acquisition unit 102f selects the outermost edge straight line from among the edge straight lines constituting the rectangle as the selected straight line, and acquires the reference straight line that forms the outline of the form area based on the correction amount and the selected straight line.
  • the reference straight line acquisition unit 102f selects the outermost parallel straight line that satisfies the threshold value based on the layout data stored in the layout data file 106a and the read rectangle as the selected straight line, and places it inside the selected straight line in the captured image.
  • a reference straight line outside the selected straight line may be acquired according to the correction amount.
  • the reference straight line acquisition unit 102f selects the outermost parallel straight line that satisfies the threshold based on the layout data stored in the layout data file 106a and the read rectangle as a selected straight line, and places other lines on the inside of the selected straight line in the captured image.
  • the selected straight line that is the opposite side of the selected straight line in the captured image If there is an opposite-side inner straight line that is another edge straight line and the distance between the selected straight line that forms the opposite side and the opposite-side inner straight line is a distance based on the correction amount, the reference straight line outside the selected straight line is set according to the correction amount. You may get it.
  • the form specifying unit 102g specifies the form coordinates of the form area based on the reference straight line.
  • the form specifying unit 102g may specify the form coordinates of the form area by calculating the intersection coordinates of the reference line.
  • the form image acquisition unit 102h acquires form image data by cropping the form area from the photographed image based on the form coordinates.
  • the form image acquisition unit 102h may further store the acquired form image data in the image data file 106b.
  • FIG. 2 is a flowchart illustrating an example of processing in the image processing apparatus 100 according to the present embodiment.
  • the photographed image acquisition unit 102a obtains photographed image data of a photographed image including a form area before projective transformation photographed by the photographing unit 110 (step SA-1).
  • the edge detection unit 102b detects an edge included in the captured image (step SA-2).
  • the straight line acquisition unit 102c calculates a straight line candidate by Hough transform for the edge detected by the edge detection unit 102b, and acquires an edge straight line by correcting the straight line candidate by the least square method (step SA-3).
  • the rectangle detection unit 102d detects a reading rectangle which is a rectangle constituted by the edge straight lines acquired by the straight line acquisition unit 102c (step SA-4).
  • control unit 102 performs a rectangle correction process (step SA-5).
  • FIG. 3 is a flowchart illustrating an example of processing in the image processing apparatus 100 according to the present embodiment.
  • the correction amount calculation unit 102e first determines the layout of the form based on the ratio of the edge length detected by the edge detection unit 102b and the layout data stored in the layout data file 106a.
  • the correction amount of the form area with reference to is calculated (step SB-1).
  • FIG. 4 is a diagram showing an example of layout data in the present embodiment.
  • FIG. 5 is a diagram showing an example of a form area before projective transformation in the present embodiment.
  • 6 and 7 are diagrams showing the relationship of edges in the present embodiment.
  • the layout data file 106a may store the layout data of the driver's license.
  • the layout data of the driver's license may include the length of ruled lines, the length between ruled lines, and the like.
  • the reference correction amount is calculated from the layout data of the driver's license stored in the layout data file 106a in consideration of the projective transformation. Good.
  • FIGS. 6 and 7 based on the angle ⁇ in which the photographing unit 110 is inclined obliquely in consideration of reduction by the optical path length and reduction by the projection plane, FIG. Using the edge length (ln) of the form area before the projective transformation shown, “the ratio of the edge length (l1) serving as the upper base of the trapezoid and the edge length (l2) serving as the lower base” ⁇ The correction amount may be calculated as cos ⁇ .
  • the correction amount may be determined by capturing the feature of the detected edge.
  • the straight line acquisition unit 102c acquires (selects) an edge straight line parallel to the side of the read rectangle detected by the rectangular detection unit 102d (step SB-2).
  • the parallel straight line may include an edge straight line whose angle with the side of the reading rectangle is within ⁇ 1 degree.
  • FIG. 8 is a diagram illustrating an example of parallel straight lines in the present embodiment.
  • straight lines parallel to each side of the detected reading rectangle may be selected from the detected edge straight line group.
  • parallel straight lines may be selected from the detected edge straight line group based on the detected reading rectangle.
  • the reference straight line acquisition unit 102f selects the outermost parallel straight line that satisfies the threshold based on the layout data and the read rectangle stored in the layout data file 106a as the selected straight line, and selects the selected straight line according to the correction amount.
  • a reference straight line that forms the outline of the form area on the outside is acquired (step SB-3).
  • FIG. 9 is a diagram illustrating an example of selection candidate straight lines in the present embodiment.
  • selection candidate straight lines L ′ L′ 1 and L′ 2 constituting long sides
  • selection candidate straight lines S ′ S′1 and S′2
  • the selection candidate straight line L′ 1 and the selection candidate straight line L′ 2 are outside of a threshold value (for example, a length of 1 ⁇ 4 of the short side of the form based on the layout data). If there is a parallel straight line, the selected straight line L1 and the selected straight line L2 are selected by updating the values (changing the parallel straight line as the selection candidate straight line L ′).
  • the layout is determined based on the relationship of the selected straight line by determining whether the length is 1/2 or more and 3/2 or less.
  • the selected straight line L1 when the selected straight line L1 does not satisfy the determination, there is an opposite-side inner straight line that is another edge straight line on the inner side of the selected straight line L2 that is the opposite side, and the selected straight line L2 and the opposite side inside It is determined whether or not the distance from the straight line is a distance based on the correction amount.
  • the selected straight line L1 when the selected straight line L2 satisfies the determination, the selected straight line L1 may be determined to satisfy the determination, and may be shifted to subsequent processing.
  • the selected straight line S (S1 and S2) has an inner straight line that is another edge straight line inside, and the distance between the selected straight line S and the inner straight line is based on the correction amount. It is determined whether or not.
  • the layout may be determined based on the correction amount.
  • the form specifying unit 102g specifies the form coordinates of the form region by calculating the intersection coordinates of the reference line acquired by the reference line acquiring unit 102f (step SB-4), and ends the processing. .
  • the form specifying unit 102g may calculate four-point coordinates based on the reference straight line that is the layout determination result.
  • the form image acquisition unit 102h obtains the form image data by cropping the form area from the photographed image based on the form coordinates specified by the form specification unit 102g, and converts the form image data into the image.
  • the data is stored in the data file 106b (step SA-6), and the process is terminated.
  • image data of an object can be accurately cut out even in the same color background or similar color background in a mobile terminal equipped with a camera such as a smartphone or a digital camera.
  • the table on which the ID card is placed varies and may have the same color as the ID card.
  • camera parameters may differ depending on the model or may not be disclosed.
  • the identification card is a driver's license (1014 dots ⁇ 634 dots @ 300 dpi) regardless of the background and camera parameters, the contour of the driver's license can be accurately detected if it is about 10 degrees from an angle. can do.
  • a rectangle that is the outline of a document is detected by performing edge detection, straight line detection, and rectangle detection on a document (for example, a driver's license) that can be determined by ruled line layout. Yes.
  • the boundary between the background and the medium may be correctly recognized by detecting another edge inside the detected outline of the document.
  • the form area can be specified by determining the layout using the correction amount and the selected straight line group.
  • the image processing apparatus 100 may perform processing in a stand-alone form, performs processing in response to a request from a client terminal (which is a separate housing from the image processing apparatus 100), and the processing result is You may make it return to a client terminal.
  • a client terminal which is a separate housing from the image processing apparatus 100
  • all or a part of the processes described as being automatically performed can be manually performed, or all of the processes described as being manually performed can be performed.
  • a part can be automatically performed by a known method.
  • processing procedure, control procedure, specific name, information including parameters such as registration data or search conditions for each processing, screen examples, or database configuration shown in the description and drawings are specially noted. It can be changed arbitrarily except for.
  • the illustrated components are functionally conceptual, and need not be physically configured as illustrated.
  • each device of the image processing apparatus 100 particularly the processing functions performed by the control unit 102, are executed by the CPU and a program interpreted and executed by the CPU. You may implement
  • the program is recorded on a non-transitory computer-readable recording medium including a programmed instruction for causing a computer to execute the method according to the present invention, which will be described later, and an image processing apparatus as necessary.
  • 100 mechanically read. That is, in the storage unit 106 such as a ROM or an HDD, computer programs for performing various processes by giving instructions to the CPU in cooperation with an OS (Operating System) are recorded. This computer program is executed by being loaded into the RAM, and constitutes a control unit in cooperation with the CPU.
  • OS Operating System
  • the computer program may be stored in an application program server connected to the image processing apparatus 100 via an arbitrary network, and may be downloaded in whole or in part as necessary. is there.
  • the program according to the present invention may be stored in a computer-readable recording medium, or may be configured as a program product.
  • the “recording medium” includes a memory card, USB memory, SD card, flexible disk, magneto-optical disk, ROM, EPROM, EEPROM, CD-ROM, MO, DVD, and Blu-ray (registered trademark). It includes any “portable physical medium” such as Disc.
  • program is a data processing method described in an arbitrary language or description method, and may be in any form such as source code or binary code. Note that the “program” is not necessarily limited to a single configuration, and functions are achieved in cooperation with a separate configuration such as a plurality of modules and libraries or a separate program represented by the OS. Including things. In addition, a well-known structure and procedure can be used about the specific structure for reading a recording medium in each apparatus shown in embodiment, a reading procedure, or the installation procedure after reading.
  • Various databases and the like stored in the storage unit 106 are storage means such as a memory device such as a RAM or a ROM, a fixed disk device such as a hard disk, a flexible disk, and / or an optical disk.
  • Various programs, tables, databases, and / or web page files used may be stored.
  • the image processing apparatus 100 may be configured as an information processing apparatus such as a known personal computer, or may be configured by connecting an arbitrary peripheral device to the information processing apparatus.
  • the image processing apparatus 100 may be realized by installing software (including programs, data, and the like) that causes the information processing apparatus to realize the method of the present invention.
  • the specific form of distribution / integration of the devices is not limited to that shown in the figure, and all or a part of them may be functional or physical in arbitrary units according to various additions or according to functional loads. Can be distributed and integrated. That is, the above-described embodiments may be arbitrarily combined and may be selectively implemented.
  • the image processing apparatus, the image processing method, and the program can be implemented in many industrial fields, particularly in the image processing field that handles images read by a camera, and are extremely useful.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

帳票領域を含む撮影画像の撮影画像データを取得し、撮影画像に含まれるエッジを検出し、エッジに基づくエッジ直線を取得し、エッジに基づいて、レイアウトを基準とした帳票領域の補正量を算出し、矩形を構成するエッジ直線のうち最も外側にあるエッジ直線を選定直線として選定し、補正量および選定直線に基づいて、帳票領域の輪郭を構成する基準直線を取得し、基準直線に基づいて、帳票領域の帳票座標を特定する。

Description

画像処理装置、画像処理方法、および、プログラム
 本発明は、画像処理装置、画像処理方法、および、プログラムに関する。
 従来から、撮影対象物の画像を取得する技術が開示されている。
 ここで、複雑な背景において撮影対象物を精度良く検出する技術が開示されている(特許文献1を参照)。
 また、レンズの焦点距離と頂点位置とから射影パラメータを算出し、射影パラメータを用いて撮影対象物の画像の画像変換を行う技術が開示されている(特許文献2を参照)。
 また、背景色を白にして読み取るスキャナの場合に、全ブロックを包含する矩形の最上端かつ最左端位置を帳票の原点として書式データを作成することで、帳票の左上端を原点とすることはできないが、背景色が白でも同一書式の帳票の原点を一意に定めることができる技術が開示されている(特許文献3を参照)。
特開2013-106160号公報 特開2005-122320号公報 特開2002-203206号公報
 しかしながら、従来の画像処理装置(特許文献1等)においては、カメラの焦点距離等のハード情報がなければ、同一色の背景において対象物の輪郭を検出できないという問題点を有していた。
 本発明は、上記問題点に鑑みてなされたもので、帳票領域と背景領域とが同一色または類似色であっても、カメラデバイスの焦点距離およびイメージセンササイズ等のデバイス固有のハード情報を必要とせずに、帳票のレイアウトに基づいて、撮影画像から帳票領域のクロップ精度を向上させることができる画像処理装置、画像処理方法、および、プログラムを提供することを目的とする。
 このような目的を達成するため、本発明に係る画像処理装置は、帳票のレイアウトのレイアウトデータを記憶するレイアウトデータ記憶手段と、帳票領域を含む撮影画像の撮影画像データを取得する撮影画像取得手段と、前記撮影画像に含まれるエッジを検出するエッジ検出手段と、前記エッジに基づくエッジ直線を取得する直線取得手段と、前記エッジに基づいて、前記レイアウトを基準とした前記帳票領域の補正量を算出する補正量算出手段と、矩形を構成する前記エッジ直線のうち最も外側にある前記エッジ直線を選定直線として選定し、前記補正量および前記選定直線に基づいて、前記帳票領域の輪郭を構成する基準直線を取得する基準直線取得手段と、前記基準直線に基づいて、前記帳票領域の帳票座標を特定する帳票特定手段と、を備えたことを特徴とする。
 また、本発明に係る画像処理方法は、帳票領域を含む撮影画像の撮影画像データを取得する撮影画像取得ステップと、前記撮影画像に含まれるエッジを検出するエッジ検出ステップと、前記エッジに基づくエッジ直線を取得する直線取得ステップと、前記エッジ、および、記憶された帳票のレイアウトのレイアウトデータに基づいて、前記レイアウトを基準とした前記帳票領域の補正量を算出する補正量算出ステップと、矩形を構成する前記エッジ直線のうち最も外側にある前記エッジ直線を選定直線として選定し、前記補正量および前記選定直線に基づいて、前記帳票領域の輪郭を構成する基準直線を取得する基準直線取得ステップと、前記基準直線に基づいて、前記帳票領域の帳票座標を特定する帳票特定ステップと、を含むことを特徴とする。
 また、本発明に係るプログラムは、帳票領域を含む撮影画像の撮影画像データを取得する撮影画像取得ステップと、前記撮影画像に含まれるエッジを検出するエッジ検出ステップと、前記エッジに基づくエッジ直線を取得する直線取得ステップと、前記エッジ、および、記憶された帳票のレイアウトのレイアウトデータに基づいて、前記レイアウトを基準とした前記帳票領域の補正量を算出する補正量算出ステップと、矩形を構成する前記エッジ直線のうち最も外側にある前記エッジ直線を選定直線として選定し、前記補正量および前記選定直線に基づいて、前記帳票領域の輪郭を構成する基準直線を取得する基準直線取得ステップと、前記基準直線に基づいて、前記帳票領域の帳票座標を特定する帳票特定ステップと、をコンピュータに実行させることを特徴とする。
 この発明によれば、対象物と同一色または類似色の背景においても対象物の画像を精度良く検出することができる。
図1は、本実施形態に係る画像処理装置の構成の一例を示すブロック図である。 図2は、本実施形態の画像処理装置における処理の一例を示すフローチャートである。 図3は、本実施形態の画像処理装置における処理の一例を示すフローチャートである。 図4は、本実施形態におけるレイアウトデータの一例を示す図である。 図5は、本実施形態における射影変換前の帳票領域の一例を示す図である。 図6は、本実施形態におけるエッジの関係性を示す図である。 図7は、本実施形態におけるエッジの関係性を示す図である。 図8は、本実施形態における平行直線の一例を示す図である。 図9は、本実施形態における選定候補直線の一例を示す図である。
 以下に、本発明に係る画像処理装置、画像処理方法、および、プログラムの実施形態を図面に基づいて詳細に説明する。なお、この実施形態により本発明が限定されるものではない。
[本実施形態の構成]
 以下、本発明の実施形態に係る画像処理装置100の構成の一例について図1を参照して説明し、その後、本実施形態の処理等について詳細に説明する。図1は、本実施形態に係る画像処理装置100の構成の一例を示すブロック図である。
 但し、以下に示す実施形態は、本発明の技術思想を具体化するための画像処理装置100を例示するものであって、本発明をこの画像処理装置100に特定することを意図するものではなく、請求の範囲に含まれるその他の実施形態の画像処理装置100にも等しく適用し得るものである。
 また、本実施形態で例示する画像処理装置100における機能分散の形態は以下に限られず、同様の効果や機能を奏し得る範囲において、任意の単位で機能的または物理的に分散・統合して構成することができる。
 ここで、画像処理装置100は、例えば、タブレット端末、携帯電話、スマートフォン、PHS、PDA、ノート型のパーソナルコンピュータ、または、メガネ型もしくは時計型などのウェアラブルコンピュータ等の可搬性を有する携帯型の情報処理装置(モバイル端末)であってもよい。
 まず、図1に示すように、画像処理装置100は、概略的に、制御部102と記憶部106と撮影部110と入出力部112とセンサ部114と通信部116とを備えて構成される。
 なお、図1において、画像処理装置100は、筐体内に撮影部110を備えたモバイル端末として示しているが、筐体内に撮影部110を備えておらず、外部の撮影装置から撮影画像データを受信する構成(例えば、デスクトップ型のパーソナルコンピュータ等)であってもよい。
 ここで、図1では省略しているが、本実施形態において、更に、入出力部112と制御部102とを接続する入出力インターフェース部(図示せず)を備えていてもよい。これら画像処理装置100の各部は任意の通信路を介して通信可能に接続されている。
 ここで、通信部116は、有線通信および/または無線通信(WiFi等)によりIPデータを送受信するためのネットワークインターフェース(NIC(Network Interface Controller)等)、Bluetooth(登録商標)、または、赤外線通信等によって無線通信を行うインターフェースであってもよい。
 ここで、画像処理装置100は、通信部116を用いて、ネットワークを介して外部装置と通信可能に接続されていてもよい。
 また、センサ部114は、物理量を検出して別媒体の信号(デジタル信号)に変換する。ここで、センサ部114は、近接センサ、方角センサ、磁場センサ、直線加速センサ、輝度センサ、ジャイロセンサ、圧力センサ、重力センサ、加速度センサ、気圧センサ、および/または、温度センサ等を含んでいてもよい。
 また、入出力部112は、データの入出力(I/O)を行う。ここで、入出力部112は、例えば、キー入力部、タッチパネル、コントロールパッド(例えば、タッチパッド、および、ゲームパッド等)、マウス、キーボード、および/または、マイク等であってもよい。
 また、入出力部112は、アプリケーション等の表示画面を表示する表示部(例えば、液晶または有機EL等から構成されるディスプレイ、モニタ、または、タッチパネル等)であってもよい。
 また、入出力部112は、音声情報を音声として出力する音声出力部(例えば、スピーカ等)であってもよい。また、入出力部(タッチパネル)112は、物理的接触を検出し、信号(デジタル信号)に変換するセンサ部114を含んでいてもよい。
 また、撮影部110は、被写体(例えば、帳票等)を静止画撮影することで、静止画の画像データを取得する。例えば、撮影部110は、撮影画像データを取得してもよい。
 また、撮影部110は、被写体を連続画像撮影(動画撮影)することで、連続(動画)の画像データ(フレーム)を取得してもよい。例えば、撮影部110は、映像データを取得してもよい。また、撮影部110は、アンシラリデータを取得してもよい。
 ここで、フレームは、非圧縮の画像データであってもよい。また、フレームは、高解像度の画像データであってもよい。ここで、高解像度とは、フルハイビジョン、4K解像度、または、スーパーハイビジョン(8K解像度)等であってもよい。
 また、撮影部110は、24fpsまたは30fps等で動画撮影してもよい。ここで、撮影部110は、CCD(Charge Coupled Device)、および/または、CMOS(Complementary Metal Oxide Semiconductor)等の撮像素子を備えたカメラ等であってもよい。
 記憶部106は、ストレージ手段であり、例えばRAM・ROM等のメモリ、ハードディスクのような固定ディスク装置、SSD(Solid State Drive)、および/または、光ディスク等を用いることができる。
 また、記憶部106は、各種のデータベース、テーブル、バッファ、および/または、ファイル(レイアウトデータファイル106a、および、画像データファイル106b等)を格納する。ここで、記憶部106には、CPU(Central Processing Unit)に命令を与え各種処理を行うためのコンピュータプログラム等が記録されていてもよい。
 これら記憶部106の各構成要素のうち、レイアウトデータファイル106aは、帳票のレイアウトのレイアウトデータを記憶する。ここで、レイアウトデータは、帳票中の罫線、文字、写真および/または図形等の配置に関する位置データ等であってもよい。
 ここで、帳票は、運転免許証を含む各種免許証、各種身分証明書、または、健康保険証等の規定帳票であってもよい。
 また、画像データファイル106bは、画像データ(フレーム等)を記憶する。ここで、画像データファイル106bは、撮影画像データ、および/または、帳票画像データを記憶していてもよい。
 また、制御部102は、画像処理装置100を統括的に制御するCPU、GPU(Graphics Processing Unit)、DSP(Digital Signal Processor)、LSI(Large Scale Integration)、ASIC(Application Specific Integrated Circuit)、および/または、FPGA(Field-Programming Gate Array)等を含む有形のコントローラ、または、制御回路から構成されてもよい。
 また、制御部102は、制御プログラムと各種の処理手順等を規定したプログラムと所要データとを格納するための内部メモリを有し、これらプログラムに基づいて種々の処理を実行するための情報処理を行う。
 ここで、制御部102は、機能概念的に、撮影画像取得部102a、エッジ検出部102b、直線取得部102c、矩形検出部102d、補正量算出部102e、基準直線取得部102f、帳票特定部102g、および、帳票画像取得部102hを備える。
 撮影画像取得部102aは、撮影画像の撮影画像データを取得する。ここで、撮影画像取得部102aは、帳票領域を含む撮影画像の撮影画像データを取得してもよい。ここで、帳票領域は、射影変換前の領域であってもよい。
 また、撮影画像取得部102aは、撮影部110または外部の撮影装置の撮影による撮影画像データを取得してもよい。また、撮影画像取得部102aは、撮影部110による静止画撮影を制御して、撮影画像データを取得してもよい。
 また、撮影画像取得部102aは、撮影部110による連続画像撮影または動画撮影を制御して、1コマに相当する撮影画像データ(フレーム)を取得してもよい。
 エッジ検出部102bは、撮影画像に含まれるエッジを検出する。ここで、エッジ検出部102bは、キャニー法を用いて撮影画像に含まれるエッジを検出してもよい。
 例えば、エッジ検出部102bは、撮影画像をガウシアンフィルタで平滑化し、エッジ強度と勾配方向(4方向に量子化)とを計算し、細線化処理を行い、ヒステリシス閾処理によるエッジ抽出を行うことで、エッジを検出してもよい。
 また、エッジ検出部102bは、撮影画像のピラミッド構造化を行い、隣接階調差によるエッジ抽出を行い、ノイズ除去(ラベリングおよび/または背景除去等)を行い、エッジ補正(欠けの結合等)を行うことで、エッジを検出してもよい。
 直線取得部102cは、エッジに基づくエッジ直線を取得する。ここで、直線取得部102cは、エッジ直線により構成される矩形である読取矩形の辺と平行な、エッジ直線を平行直線として取得してもよい。
 また、直線取得部102cは、エッジに対するハフ変換により直線候補を算出し、最小二乗法による直線候補の補正によりエッジ直線を取得してもよい。
 例えば、直線取得部102cは、エッジに対するハフ変換による直線候補を算出し、最小二乗法による直線候補の補正を行い、エッジ直線の情報(例えば、始点、終点、および、ハフ変換における投票数)を取得してもよい。
 矩形検出部102dは、エッジ直線により構成される矩形である読取矩形を検出する。
 例えば、矩形検出部102dは、取得されたエッジ直線群(水平方向、および、垂直方向)が構成する矩形候補を算出し、矩形候補を大きさでソートして、読取矩形を検出してもよい。
 補正量算出部102eは、エッジに基づいて、帳票のレイアウトを基準とした帳票領域の補正量を算出する。ここで、補正量算出部102eは、エッジの長さの比率に基づいて、帳票のレイアウトを基準とした帳票領域の補正量を算出してもよい。
 基準直線取得部102fは、矩形を構成するエッジ直線のうち最も外側にあるエッジ直線を選定直線として選定し、補正量および選定直線に基づいて、帳票領域の輪郭を構成する基準直線を取得する。
 ここで、基準直線取得部102fは、レイアウトデータファイル106aに記憶されたレイアウトデータおよび読取矩形に基づく閾値を満たす、最も外側にある平行直線を選定直線として選定し、撮影画像において選定直線の内側に他のエッジ直線である内側直線があり、且つ、選定直線と内側直線との間が補正量に基づく距離となる場合、補正量に従って選定直線の外側にある基準直線を取得してもよい。
 また、基準直線取得部102fは、レイアウトデータファイル106aに記憶されたレイアウトデータおよび読取矩形に基づく閾値を満たす、最も外側にある平行直線を選定直線として選定し、撮影画像において選定直線の内側に他のエッジ直線である内側直線が無い場合、または、内側直線があるが、選定直線と内側直線との間が補正量に基づく距離とならない場合、撮影画像において当該選定直線の対辺をなす選定直線の内側に他のエッジ直線である対辺内側直線があり、且つ、対辺をなす選定直線と対辺内側直線との間が補正量に基づく距離となる場合、補正量に従って選定直線の外側にある基準直線を取得してもよい。
 帳票特定部102gは、基準直線に基づいて、帳票領域の帳票座標を特定する。ここで、帳票特定部102gは、基準直線の交点座標を算出することにより、帳票領域の帳票座標を特定してもよい。
 帳票画像取得部102hは、帳票座標に基づいて、撮影画像から帳票領域をクロップ処理することで、帳票画像データを取得する。ここで、帳票画像取得部102hは、更に、取得した帳票画像データを画像データファイル106bに格納してもよい。
[本実施形態の処理]
 上述した構成の画像処理装置100(モバイル端末)で実行される処理の一例について、図2から図9を参照して、本実施形態におけるクロップ処理の一例について説明する。図2は、本実施形態の画像処理装置100における処理の一例を示すフローチャートである。
 図2に示すように、まず、撮影画像取得部102aは、撮影部110により撮影された射影変換前の帳票領域を含む撮影画像の撮影画像データを取得する(ステップSA-1)。
 そして、エッジ検出部102bは、撮影画像に含まれるエッジを検出する(ステップSA-2)。
 そして、直線取得部102cは、エッジ検出部102bにより検出されたエッジに対するハフ変換により直線候補を算出し、最小二乗法による直線候補の補正によりエッジ直線を取得する(ステップSA-3)。
 そして、矩形検出部102dは、直線取得部102cにより取得されたエッジ直線により構成される矩形である読取矩形を検出する(ステップSA-4)。
 そして、制御部102は、矩形補正処理を行う(ステップSA-5)。
[矩形補正処理]
 ここで、図3から図9を参照して、本実施形態における矩形補正処理の一例について説明する。図3は、本実施形態の画像処理装置100における処理の一例を示すフローチャートである。
 図3に示すように、まず、補正量算出部102eは、エッジ検出部102bにより検出されたエッジの長さの比率、および、レイアウトデータファイル106aに記憶されたレイアウトデータに基づいて、帳票のレイアウトを基準とした帳票領域の補正量を算出する(ステップSB-1)。
 ここで、図4から図7を参照して、本実施形態における補正量算出処理の一例について説明する。図4は、本実施形態におけるレイアウトデータの一例を示す図である。図5は、本実施形態における射影変換前の帳票領域の一例を示す図である。図6および図7は、本実施形態におけるエッジの関係性を示す図である。
 図4に示すように、本実施形態において、レイアウトデータファイル106aには、運転免許証のレイアウトデータが記憶されていてもよい。ここで、運転免許証のレイアウトデータは、罫線の長さ、および、罫線間の長さ等を含んでいてもよい。
 例えば、運転免許証のレイアウトデータは、罫線間の長さ(dn)について、「d1=d3=d4=d5」および「d0:d1:d2=79.6:3:4」等のデータを含んでいてもよい。
 そして、図5から図7に示すように、本実施形態においては、レイアウトデータファイル106aに記憶された運転免許証のレイアウトデータから基準となる補正量を、射影変換を加味して算出してもよい。
 ここで、本実施形態においては、図6および図7に示すように、光路長による縮小および射影平面による縮小を考慮して、撮影部110を斜めに傾けた角度αに基づいて、図5に示す射影変換前の帳票領域のエッジの長さ(ln)を用いて、「台形の上底となるエッジの長さ(l1)と下底となるエッジの長さ(l2)との比」≒cosαとして補正量を算出してもよい。
 これにより、本実施形態においては、図5に示すd10≒(l1/l2)*d30と近似して求めてもよい。また、本実施形態においては、図5に示すl3≒l1と近似して求めてもよい。
 このように、本実施形態においては、検出したエッジの特徴を捉えて、補正量を決定してもよい。
 図3に戻り、直線取得部102cは、矩形検出部102dにより検出された読取矩形の辺と平行な、エッジ直線を平行直線として取得(選定)する(ステップSB-2)。ここで、平行直線は、読取矩形の辺との角度が±1度以内の角度となるエッジ直線を含んでいてもよい。
 ここで、図8を参照して、本実施形態における直線選定処理の一例について説明する。図8は、本実施形態における平行直線の一例を示す図である。
 図8に示すように、本実施形態においては、検出したエッジ直線群の中から、検出した読取矩形の各辺と平行な直線を選定してもよい。このように、本実施形態においては、検出した読取矩形に基づいて、検出したエッジ直線群から平行直線を選定してもよい。
 図3に戻り、基準直線取得部102fは、レイアウトデータファイル106aに記憶されたレイアウトデータおよび読取矩形に基づく閾値を満たす、最も外側にある平行直線を選定直線として選定し、補正量に従って選定直線の外側にある、帳票領域の輪郭を構成する基準直線を取得する(ステップSB-3)。
 ここで、図9を参照して、本実施形態におけるレイアウト判定処理の一例について説明する。図9は、本実施形態における選定候補直線の一例を示す図である。
 図9に示すように、本実施形態においては、まず、読取矩形を構成する四つの平行直線を選定直線の初期値(長辺を構成する選定候補直線L’(L’1およびL’2)、ならびに、短辺を構成する選定候補直線S’(S’1およびS’2))として取得する。
 そして、本実施形態においては、選定候補直線L’1および選定候補直線L’2に対して、閾値(例えば、レイアウトデータに基づく帳票の短辺の1/4の長さ等)以内の外側に平行直線があれば、値を更新(選定候補直線L’とする平行直線を変更)することで、選定直線L1および選定直線L2を選定する。
 そして、本実施形態においては、選定直線L1に対し、内側に他のエッジ直線である内側直線があり、且つ、選定直線L1と内側直線との間が補正量に基づく距離(例えば、実距離の1/2以上3/2以下の長さ等)となるか否かを判定することで、選定直線の関係性からレイアウトを判定する。
 そして、本実施形態においては、選定直線L1が判定を満たす場合に、後段処理に移行させる。
 一方で、本実施形態においては、選定直線L1が判定を満たさない場合、対辺である選定直線L2に対し、内側に他のエッジ直線である対辺内側直線があり、且つ、選定直線L2と対辺内側直線との間が補正量に基づく距離となるか否かを判定する。
 そして、本実施形態においては、選定直線L2が判定を満たす場合、選定直線L1について判定を満たすものとして、後段処理に移行させてもよい。
 そして、本実施形態においては、選定直線S(S1およびS2)に対し、内側に他のエッジ直線である内側直線があり、且つ、選定直線Sと内側直線との間が補正量に基づく距離となるか否かを判定する。
 そして、本実施形態においては、選定直線Sが判定を満たす場合、補正量に従って選定直線Lおよび選定直線Sの外側にある基準直線を取得する。このように、本実施形態においては、補正量を基にレイアウトを判定してもよい。
 図3に戻り、帳票特定部102gは、基準直線取得部102fにより取得された基準直線の交点座標を算出することにより、帳票領域の帳票座標を特定し(ステップSB-4)、処理を終了する。
 すなわち、帳票特定部102gは、レイアウト判定結果である基準直線を基に4点座標を算出してもよい。
 図2に戻り、帳票画像取得部102hは、帳票特定部102gにより特定された帳票座標に基づいて、撮影画像から帳票領域をクロップ処理することで、帳票画像データを取得し、帳票画像データを画像データファイル106bに格納し(ステップSA-6)、処理を終了する。
 このように、本実施形態においては、スマートフォンまたはデジタルカメラ等のカメラを備えたモバイル端末において、同一色背景または類似色背景においても精度良く対象物の画像データを切り出すことができる。
 また、本実施形態においては、窓口業務において、顧客から借用する身分証明証をモバイル端末でその場で撮影することで、顧客へ安心感を与えることができるため、窓口業務における個人認証に有用である。
 ここで、身分証明証を撮影する際、身分証明証が置かれるテーブルは多様であり、身分証明証と同一色である場合もある。また、使用するモバイル端末の種類も多様であり、カメラパラメータが機種によって異なる、または、公開されていない場合もある。
 しかしながら、本実施形態においては、背景およびカメラパラメータに関係なく、身分証明証が運転免許証(1014dot×634dot@300dpi)の場合、斜めから10度程度であれば精度良く運転免許証の輪郭を検出することができる。
 従来から、対象物の位置を検出する方法として、エッジ検出を用いた手法、および、レイアウトを用いた手法があった。
 しかしながら、従来は、エッジ検出を用いた手法においては、対象物と背景との間に階調差が少ない同一色背景または類似色背景にて、境界を見つけることができなかった。
 また、レイアウトを用いた手法においては、斜めからの撮影を考慮する場合、焦点距離およびイメージセンササイズ等のカメラデバイスの情報が必要であった。
 そこで、本実施形態においては、罫線によるレイアウト判別ができる原稿(例えば、運転免許証等)に対して、エッジ検出、直線検出および矩形検出を行うことで、原稿の輪郭となる矩形を検出している。
 この際に、本実施形態においては、検出した原稿の輪郭内側に他のエッジを検出することで、背景と媒体との境界を正しく認識してもよい。
 これにより、本実施形態においては、レイアウトを判別するための補正量を近似的に算出することで、従来必要であったカメラデバイスの情報を必要とせずに、原稿の輪郭を求めることができる。
 また、本実施形態においては、補正量と選定した直線群とを用いてレイアウトを判定することで、帳票領域を特定することができる。
[他の実施形態]
 さて、これまで本発明の実施形態について説明したが、本発明は、上述した実施形態以外にも、請求の範囲に記載した技術的思想の範囲内において種々の異なる実施形態にて実施されてよいものである。
 例えば、画像処理装置100は、スタンドアローンの形態で処理を行ってもよく、クライアント端末(画像処理装置100とは別筐体である)からの要求に応じて処理を行い、その処理結果を当該クライアント端末に返却するようにしてもよい。
 また、実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。
 このほか、明細書中および図面中で示した処理手順、制御手順、具体的名称、各処理の登録データもしくは検索条件等のパラメータを含む情報、画面例、または、データベース構成については、特記する場合を除いて任意に変更することができる。
 また、画像処理装置100に関して、図示の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。
 例えば、画像処理装置100の各装置が備える処理機能、特に制御部102にて行われる各処理機能については、その全部または任意の一部を、CPUおよび当該CPUにて解釈実行されるプログラムにて実現してもよく、また、ワイヤードロジックによるハードウェアとして実現してもよい。
 なお、プログラムは、後述する、コンピュータに本発明に係る方法を実行させるためのプログラム化された命令を含む、一時的でないコンピュータ読み取り可能な記録媒体に記録されており、必要に応じて画像処理装置100に機械的に読み取られる。すなわち、ROMまたはHDDなどの記憶部106などには、OS(Operating System)と協働してCPUに命令を与え、各種処理を行うためのコンピュータプログラムが記録されている。このコンピュータプログラムは、RAMにロードされることによって実行され、CPUと協働して制御部を構成する。
 また、このコンピュータプログラムは、画像処理装置100に対して任意のネットワークを介して接続されたアプリケーションプログラムサーバに記憶されていてもよく、必要に応じてその全部または一部をダウンロードすることも可能である。
 また、本発明に係るプログラムを、コンピュータに読み取り可能な記録媒体に格納してもよく、また、プログラム製品として構成することもできる。ここで、この「記録媒体」とは、メモリーカード、USBメモリ、SDカード、フレキシブルディスク、光磁気ディスク、ROM、EPROM、EEPROM、CD-ROM、MO、DVD、および、Blu-ray(登録商標)Disc等の任意の「可搬用の物理媒体」を含むものとする。
 また、「プログラム」とは、任意の言語や記述方法にて記述されたデータ処理方法であり、ソースコードやバイナリコード等の形式を問わない。なお、「プログラム」は必ずしも単一的に構成されるものに限られず、複数のモジュールやライブラリとして分散構成されるものや、OSに代表される別個のプログラムと協働してその機能を達成するものも含む。なお、実施形態に示した各装置において記録媒体を読み取るための具体的な構成、読み取り手順、あるいは、読み取り後のインストール手順等については、周知の構成や手順を用いることができる。
 記憶部106に格納される各種のデータベース等は、RAMもしくはROM等のメモリ装置、ハードディスク等の固定ディスク装置、フレキシブルディスク、および/または、光ディスク等のストレージ手段であり、各種処理やウェブサイト提供に用いる各種のプログラム、テーブル、データベース、および/または、ウェブページ用ファイル等を格納してもよい。
 また、画像処理装置100は、既知のパーソナルコンピュータ等の情報処理装置として構成してもよく、また、該情報処理装置に任意の周辺装置を接続して構成してもよい。また、画像処理装置100は、該情報処理装置に本発明の方法を実現させるソフトウェア(プログラム、データ等を含む)を実装することにより実現してもよい。
 更に、装置の分散・統合の具体的形態は図示するものに限られず、その全部または一部を、各種の付加等に応じて、または、機能負荷に応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。すなわち、上述した実施形態を任意に組み合わせて実施してもよく、実施形態を選択的に実施してもよい。
 以上のように、画像処理装置、画像処理方法、および、プログラムは、産業上の多くの分野、特にカメラで読み込んだ画像を扱う画像処理分野で実施することができ、極めて有用である。
 100 画像処理装置
 102 制御部
 102a 撮影画像取得部
 102b エッジ検出部
 102c 直線取得部
 102d 矩形検出部
 102e 補正量算出部
 102f 基準直線取得部
 102g 帳票特定部
 102h 帳票画像取得部
 106 記憶部
 106a レイアウトデータファイル
 106b 画像データファイル
 110 撮影部
 112 入出力部
 114 センサ部
 116 通信部

Claims (19)

  1.  帳票のレイアウトのレイアウトデータを記憶するレイアウトデータ記憶手段と、
     帳票領域を含む撮影画像の撮影画像データを取得する撮影画像取得手段と、
     前記撮影画像に含まれるエッジを検出するエッジ検出手段と、
     前記エッジに基づくエッジ直線を取得する直線取得手段と、
     前記エッジに基づいて、前記レイアウトを基準とした前記帳票領域の補正量を算出する補正量算出手段と、
     矩形を構成する前記エッジ直線のうち最も外側にある前記エッジ直線を選定直線として選定し、前記補正量および前記選定直線に基づいて、前記帳票領域の輪郭を構成する基準直線を取得する基準直線取得手段と、
     前記基準直線に基づいて、前記帳票領域の帳票座標を特定する帳票特定手段と、
     を備えたことを特徴とする、画像処理装置。
  2.  前記補正量算出手段は、
     前記エッジの長さの比率に基づいて、前記レイアウトを基準とした前記帳票領域の前記補正量を算出する、請求項1に記載の画像処理装置。
  3.  前記帳票領域は、
     射影変換前の領域である、請求項1または2に記載の画像処理装置。
  4.  前記エッジ直線により構成される矩形である読取矩形を検出する矩形検出手段、
     を更に備え、
     前記直線取得手段は、
     前記読取矩形の辺と平行な、前記エッジ直線を平行直線として取得する、請求項1から3のいずれか一つに記載の画像処理装置。
  5.  前記基準直線取得手段は、
     前記レイアウトデータおよび前記読取矩形に基づく閾値を満たす、最も外側にある前記平行直線を前記選定直線として選定し、前記撮影画像において前記選定直線の内側に他の前記エッジ直線である内側直線があり、且つ、前記選定直線と前記内側直線との間が前記補正量に基づく距離となる場合、前記補正量に従って前記選定直線の外側にある前記基準直線を取得する、請求項4に記載の画像処理装置。
  6.  前記基準直線取得手段は、
     前記レイアウトデータおよび前記読取矩形に基づく閾値を満たす、最も外側にある前記平行直線を前記選定直線として選定し、前記撮影画像において前記選定直線の内側に他の前記エッジ直線である内側直線が無い場合、または、前記内側直線があるが、前記選定直線と前記内側直線との間が前記補正量に基づく距離とならない場合、前記撮影画像において当該選定直線の対辺をなす前記選定直線の内側に他の前記エッジ直線である対辺内側直線があり、且つ、前記対辺をなす選定直線と前記対辺内側直線との間が前記補正量に基づく距離となる場合、前記補正量に従って前記選定直線の外側にある前記基準直線を取得する、請求項4に記載の画像処理装置。
  7.  前記帳票特定手段は、
     前記基準直線の交点座標を算出することにより、前記帳票領域の前記帳票座標を特定する、請求項1から6のいずれか一つに記載の画像処理装置。
  8.  前記帳票座標に基づいて、前記撮影画像から前記帳票領域をクロップ処理することで、帳票画像データを取得する帳票画像取得手段、
     を更に備えた、請求項1から7のいずれか一つに記載の画像処理装置。
  9.  前記直線取得手段は、
     前記エッジに対するハフ変換により直線候補を算出し、最小二乗法による前記直線候補の補正により前記エッジ直線を取得する、請求項1から8のいずれか一つに記載の画像処理装置。
  10.  帳票領域を含む撮影画像の撮影画像データを取得する撮影画像取得ステップと、
     前記撮影画像に含まれるエッジを検出するエッジ検出ステップと、
     前記エッジに基づくエッジ直線を取得する直線取得ステップと、
     前記エッジ、および、記憶された帳票のレイアウトのレイアウトデータに基づいて、前記レイアウトを基準とした前記帳票領域の補正量を算出する補正量算出ステップと、
     矩形を構成する前記エッジ直線のうち最も外側にある前記エッジ直線を選定直線として選定し、前記補正量および前記選定直線に基づいて、前記帳票領域の輪郭を構成する基準直線を取得する基準直線取得ステップと、
     前記基準直線に基づいて、前記帳票領域の帳票座標を特定する帳票特定ステップと、
     を含むことを特徴とする、画像処理方法。
  11.  前記補正量算出ステップにて、
     前記エッジの長さの比率に基づいて、前記レイアウトを基準とした前記帳票領域の前記補正量を算出する、請求項10に記載の画像処理方法。
  12.  前記帳票領域は、
     射影変換前の領域である、請求項10または11に記載の画像処理方法。
  13.  前記エッジ直線により構成される矩形である読取矩形を検出する矩形検出ステップ、
     を更に含む、
     前記直線取得ステップにて、
     前記読取矩形の辺と平行な、前記エッジ直線を平行直線として取得する、請求項10から12のいずれか一つに記載の画像処理方法。
  14.  前記基準直線取得ステップにて、
     前記レイアウトデータおよび前記読取矩形に基づく閾値を満たす、最も外側にある前記平行直線を前記選定直線として選定し、前記撮影画像において前記選定直線の内側に他の前記エッジ直線である内側直線があり、且つ、前記選定直線と前記内側直線との間が前記補正量に基づく距離となる場合、前記補正量に従って前記選定直線の外側にある前記基準直線を取得する、請求項13に記載の画像処理方法。
  15.  前記基準直線取得ステップにて、
     前記レイアウトデータおよび前記読取矩形に基づく閾値を満たす、最も外側にある前記平行直線を前記選定直線として選定し、前記撮影画像において前記選定直線の内側に他の前記エッジ直線である内側直線が無い場合、または、前記内側直線があるが、前記選定直線と前記内側直線との間が前記補正量に基づく距離とならない場合、前記撮影画像において当該選定直線の対辺をなす前記選定直線の内側に他の前記エッジ直線である対辺内側直線があり、且つ、前記対辺をなす選定直線と前記対辺内側直線との間が前記補正量に基づく距離となる場合、前記補正量に従って前記選定直線の外側にある前記基準直線を取得する、請求項13に記載の画像処理方法。
  16.  前記帳票特定ステップにて、
     前記基準直線の交点座標を算出することにより、前記帳票領域の前記帳票座標を特定する、請求項10から15のいずれか一つに記載の画像処理方法。
  17.  前記帳票座標に基づいて、前記撮影画像から前記帳票領域をクロップ処理することで、帳票画像データを取得する帳票画像取得ステップ、
     を更に含む、請求項10から16のいずれか一つに記載の画像処理方法。
  18.  前記直線取得ステップにて、
     前記エッジに対するハフ変換により直線候補を算出し、最小二乗法による前記直線候補の補正により前記エッジ直線を取得する、請求項10から17のいずれか一つに記載の画像処理方法。
  19.  帳票領域を含む撮影画像の撮影画像データを取得する撮影画像取得ステップと、
     前記撮影画像に含まれるエッジを検出するエッジ検出ステップと、
     前記エッジに基づくエッジ直線を取得する直線取得ステップと、
     前記エッジ、および、記憶された帳票のレイアウトのレイアウトデータに基づいて、前記レイアウトを基準とした前記帳票領域の補正量を算出する補正量算出ステップと、
     矩形を構成する前記エッジ直線のうち最も外側にある前記エッジ直線を選定直線として選定し、前記補正量および前記選定直線に基づいて、前記帳票領域の輪郭を構成する基準直線を取得する基準直線取得ステップと、
     前記基準直線に基づいて、前記帳票領域の帳票座標を特定する帳票特定ステップと、
     をコンピュータに実行させるためのプログラム。
PCT/JP2016/066068 2016-05-31 2016-05-31 画像処理装置、画像処理方法、および、プログラム WO2017208367A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2016/066068 WO2017208367A1 (ja) 2016-05-31 2016-05-31 画像処理装置、画像処理方法、および、プログラム
JP2018520259A JP6564136B2 (ja) 2016-05-31 2016-05-31 画像処理装置、画像処理方法、および、プログラム
US16/192,319 US10810743B2 (en) 2016-05-31 2018-11-15 Image processing device, image processing method, and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/066068 WO2017208367A1 (ja) 2016-05-31 2016-05-31 画像処理装置、画像処理方法、および、プログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/192,319 Continuation US10810743B2 (en) 2016-05-31 2018-11-15 Image processing device, image processing method, and computer program product

Publications (1)

Publication Number Publication Date
WO2017208367A1 true WO2017208367A1 (ja) 2017-12-07

Family

ID=60478146

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/066068 WO2017208367A1 (ja) 2016-05-31 2016-05-31 画像処理装置、画像処理方法、および、プログラム

Country Status (3)

Country Link
US (1) US10810743B2 (ja)
JP (1) JP6564136B2 (ja)
WO (1) WO2017208367A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020038658A (ja) * 2018-09-04 2020-03-12 株式会社ストラドビジョン エッジイメージを利用して物体を検出する学習方法及び学習装置、並びにそれを利用したテスト方法及びテスト装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7030442B2 (ja) * 2017-08-07 2022-03-07 キヤノン株式会社 画像処理装置、画像処理方法、及びプログラム
US11734830B2 (en) * 2020-05-31 2023-08-22 Sketchar , Vab Method of facade plane detection
US11436852B2 (en) * 2020-07-28 2022-09-06 Intuit Inc. Document information extraction for computer manipulation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003109007A (ja) * 2001-09-28 2003-04-11 Fuji Xerox Co Ltd 帳票様式分類装置、帳票様式分類方法、帳票様式分類プログラムおよび画像照合装置
JP2013106160A (ja) * 2011-11-11 2013-05-30 Pfu Ltd 画像処理装置、矩形検出方法及びコンピュータプログラム

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69033312D1 (de) * 1989-07-10 1999-11-11 Hitachi Ltd Dokumentdatenverarbeitungsgerät unter Anwendung von Bilddaten
US6226402B1 (en) * 1996-12-20 2001-05-01 Fujitsu Limited Ruled line extracting apparatus for extracting ruled line from normal document image and method thereof
JP3733310B2 (ja) 2000-10-31 2006-01-11 キヤノン株式会社 文書書式識別装置および識別方法
JP4363151B2 (ja) 2003-10-14 2009-11-11 カシオ計算機株式会社 撮影装置、その画像処理方法及びプログラム
GB201002260D0 (en) * 2010-02-10 2010-03-31 Rue De Int Ltd Security element for document of value
US10289924B2 (en) * 2011-10-17 2019-05-14 Sharp Laboratories Of America, Inc. System and method for scanned document correction
JP5844698B2 (ja) 2012-07-30 2016-01-20 富士通フロンテック株式会社 文字認識装置
JP5895828B2 (ja) * 2012-11-27 2016-03-30 富士ゼロックス株式会社 情報処理装置及びプログラム
JP6099457B2 (ja) * 2013-03-28 2017-03-22 株式会社Pfu 画像処理装置、領域決定方法及びコンピュータプログラム
JP5698396B1 (ja) * 2014-03-05 2015-04-08 株式会社Pfu 画像読取装置、画像読取方法、および、プログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003109007A (ja) * 2001-09-28 2003-04-11 Fuji Xerox Co Ltd 帳票様式分類装置、帳票様式分類方法、帳票様式分類プログラムおよび画像照合装置
JP2013106160A (ja) * 2011-11-11 2013-05-30 Pfu Ltd 画像処理装置、矩形検出方法及びコンピュータプログラム

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020038658A (ja) * 2018-09-04 2020-03-12 株式会社ストラドビジョン エッジイメージを利用して物体を検出する学習方法及び学習装置、並びにそれを利用したテスト方法及びテスト装置

Also Published As

Publication number Publication date
JP6564136B2 (ja) 2019-08-21
US20190087962A1 (en) 2019-03-21
JPWO2017208367A1 (ja) 2018-09-27
US10810743B2 (en) 2020-10-20

Similar Documents

Publication Publication Date Title
US11087407B2 (en) Systems and methods for mobile image capture and processing
US10810743B2 (en) Image processing device, image processing method, and computer program product
JP2017130794A (ja) 情報処理装置、評価用チャート、評価システム、および性能評価方法
JP6581288B2 (ja) モバイル端末、画像処理方法、および、プログラム
JP6600090B2 (ja) 画像処理装置、画像処理方法、および、プログラム
JP6777507B2 (ja) 画像処理装置および画像処理方法
JP6503478B2 (ja) モバイル端末、画像処理方法、および、プログラム
JP6613378B2 (ja) モバイル端末、画像処理方法、および、プログラム
JP6851337B2 (ja) 撮像装置、制御方法及び制御プログラム
JP6697829B2 (ja) モバイル端末、画像処理方法、および、プログラム
JP6785930B2 (ja) モバイル端末、画像処理方法、および、プログラム
WO2018003090A1 (ja) 画像処理装置、画像処理方法、および、プログラム
JP6596512B2 (ja) モバイル端末、画像処理方法、および、プログラム
JP4315025B2 (ja) 撮影装置、画像取得方法及びプログラム
US20160224854A1 (en) Information processing apparatus, information processing method, and storage medium
WO2017158814A1 (ja) モバイル端末、画像処理方法、および、プログラム

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018520259

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16903993

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16903993

Country of ref document: EP

Kind code of ref document: A1