WO2005029408A1 - 画像処理装置、及び、撮像装置 - Google Patents

画像処理装置、及び、撮像装置 Download PDF

Info

Publication number
WO2005029408A1
WO2005029408A1 PCT/JP2004/013516 JP2004013516W WO2005029408A1 WO 2005029408 A1 WO2005029408 A1 WO 2005029408A1 JP 2004013516 W JP2004013516 W JP 2004013516W WO 2005029408 A1 WO2005029408 A1 WO 2005029408A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target object
plane
unit
imaging
Prior art date
Application number
PCT/JP2004/013516
Other languages
English (en)
French (fr)
Inventor
Hiroaki Suzuki
Takeo Iwasaki
Original Assignee
Brother Kogyo Kabushiki Kaisha
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
Priority claimed from JP2003326614A external-priority patent/JP2005092629A/ja
Priority claimed from JP2003416343A external-priority patent/JP2005174184A/ja
Application filed by Brother Kogyo Kabushiki Kaisha filed Critical Brother Kogyo Kabushiki Kaisha
Publication of WO2005029408A1 publication Critical patent/WO2005029408A1/ja
Priority to US11/374,252 priority Critical patent/US7627196B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • 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
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters

Definitions

  • the present invention relates to an image processing apparatus that converts an input image into an image in which the viewpoint of a target object in the image is changed, and an imaging apparatus using the image processing apparatus.
  • the document When it is desired to simply record the contents written on a document without using a scanner or the like, the document may be imaged and recorded by a portable imaging device such as a digital camera.
  • a portable imaging device such as a digital camera.
  • the photographer may not be able to stand up, for example, during a meeting, and may image the document on the desk from an oblique direction.
  • Document 1 Japanese Patent Application Laid-Open No. 2002-334327 (hereinafter referred to as Document 1), a character such as a manuscript is obliquely captured in an oblique direction, so that characters are squashed or obliquely oblique, making it difficult to read.
  • An image processing apparatus is described in which an image is input and a viewpoint of a target object shown in the image is converted into an image having a viewpoint in which characters are easy to read.
  • the image processing apparatus described in Document 1 analyzes an image of a document and identifies a line bundle such as a character arrangement and a document edge. The amount of rotation of the original image is determined. Further, in this image processing apparatus, the document is rotated in a direction in which the character strings written on the document are arranged right beside in the output image (such a direction is called an upright direction), and the document is rotated from the front. It is converted into an image as seen. Disclosure of the invention
  • a vertical line bundle based on the left end point or the like of the character string in the rotation-converted image is determined.
  • the image written on the document is unclear and it is difficult to identify the character string, and the contrast between the background and the document is low and the outer edge of the document is not clear.
  • the line bundle in the image has low identification accuracy, and the accuracy of the image-converted direction is also low.
  • the present invention has been made in view of these problems, and it is an object of the present invention to convert an input image into an image in which the viewpoint of a target object in the image is changed with higher accuracy. It is an object of the present invention to provide an image processing device and an imaging device that can perform the image processing.
  • an image processing apparatus and a target object image in which a target object having a predetermined shape is captured, and a three-dimensional image of the target object.
  • Plane conversion means for inputting shape information relating to a shape, converting the target object image into a plane image in which the target object is viewed from a predetermined direction based on the shape information, and wherein the target object in the plane image is captured;
  • An in-plane position detecting unit that identifies a target object region as an area and obtains a position of the target object in the planar image.
  • the in-plane position of the target object is obtained based on the planar image obtained by using the three-dimensional shape of the target object.
  • the in-plane position of the target object can be obtained more accurately.
  • the image of the target object is corrected based on the in-plane position of the target object obtained by the in-plane position detection unit, the image can be accurately corrected.
  • an image processing apparatus comprising: a target object image in which a target object having a predetermined shape is captured; Shape conversion means for converting the target object image into a plane image in which the target object is viewed from a predetermined direction based on the shape information; and the target object in the plane image.
  • An in-plane angle detecting means for identifying a target object area, which is an area in which is captured, and calculating an angle between a predetermined side of the target object area and a predetermined direction in the plane image plane.
  • the in-plane angle of the target object is obtained based on the planar image obtained by using the three-dimensional shape of the target object.
  • the in-plane angle of the target object can be obtained more accurately at any time.
  • the image can be accurately corrected.
  • an imaging apparatus which includes a light projecting unit that projects pattern light, an image of a target object, and an image of the target object.
  • Imaging means for acquiring an image; and three-dimensional information for calculating shape information relating to a three-dimensional shape of the target object based on an image obtained by imaging the target object onto which the pattern light has been projected by the imaging means.
  • a shape conversion unit configured to convert the captured image into a plane image in which the target object is viewed from a predetermined direction, based on shape information calculated by the three-dimensional shape calculation unit.
  • the imaging device includes a display unit that displays the plane image converted by the plane conversion unit, and an input unit that inputs a display mode change parameter for changing a display mode of the plane image displayed on the display unit.
  • first changing means for changing the display mode of the planar image displayed on the display device based on the display mode change parameter input by the input device.
  • the display mode of the planar image displayed on the display unit is changed based on the display mode change parameter, and the display mode change parameter is changed by the user. Since the input means power is also input, the display mode of the planar image can be edited according to the user's intention. Further, even if the captured image is not converted into the planned plane image for some reason, the plane image can be corrected according to the user's intention.
  • FIG. 1 (a) is a perspective view of an entire imaging device according to a first embodiment
  • FIG. 1 (b) is a schematic sectional view of the imaging device.
  • FIG. 2 is a block diagram illustrating an entire configuration of the imaging device in FIG. 1.
  • FIG. 3 is a schematic cross-sectional view of the imaging device in FIG. 1, showing a configuration of a slit light projecting unit.
  • FIG. 4 is a view for explaining an image with slit light.
  • FIG. 5 is a flowchart showing an operation of a force when a release button is pressed in the imaging apparatus.
  • FIG. 6 shows data stored in the difference image storage unit
  • FIG. 6 (b) shows data stored in the triangulation calculation result storage unit.
  • FIGS. 7 (a), 7 (b) and 7 (c) are diagrams for explaining image data subjected to image processing by the imaging apparatus.
  • FIGS. 8 (a) and 8 (b) are diagrams for explaining a three-dimensional spatial position calculation method.
  • FIGS. 9 (a), 9 (b) and 9 (c) are diagrams for explaining a coordinate system in the document orientation calculation processing.
  • FIG. 10 is a flowchart showing a processing procedure of a plane conversion processing.
  • FIG. 11 is a flowchart showing a curvature calculation
  • FIG. 11 (b) is a flowchart showing a processing procedure of a tilt distance calculation.
  • FIG. 12 (a) is a flowchart showing a processing procedure of Z shift
  • FIG. 12 (b) is a flowchart showing a processing procedure of inverse triangulation.
  • FIG. 13 is a flowchart illustrating a processing procedure of in-plane displacement rotation recognition processing.
  • FIG. 14 is a diagram showing a histogram of a simple luminance image.
  • FIG. 15 is a flowchart showing a processing procedure of up / down / left / right displacement calculation.
  • FIG. 16 is a flowchart showing a processing procedure of a rotation angle calculation.
  • FIG. 17 is a diagram showing a histogram of a secondary differential image related to an image of a document.
  • FIG. 18 is a flowchart showing a processing procedure of a rectangular area cutting process.
  • FIG. 19 (a) is a perspective view of an imaging device according to a second embodiment
  • FIG. 19 (b) is a rear view of the imaging device according to the second embodiment
  • FIG. FIG. 9 is an enlarged view of an operation button of the imaging device according to the second embodiment.
  • FIG. 20 is a schematic sectional view of an imaging device according to a second embodiment.
  • FIG. 21 is a cross-sectional view illustrating a configuration of a slit light projecting unit of the imaging device according to the second embodiment.
  • FIG. 22 (a) and FIG. 22 (b) are diagrams for explaining the angular width of slit light.
  • FIG. 23 is a block diagram showing an electrical configuration of an imaging device according to a second embodiment.
  • FIG. 24 is a flowchart showing a process after pressing a relays button in the imaging device of the second embodiment.
  • FIG. 25 (a) and FIG. 25 (b) are views showing slit light image.
  • FIG. 26 is a flowchart showing three-dimensional measurement and plane conversion processing in the imaging device according to the second embodiment.
  • FIG. 27 (a) is a diagram showing data stored in a difference image storage unit
  • FIG. 27 (b) is a diagram showing data stored in a triangulation calculation result storage unit.
  • FIG. 28 (a), FIG. 28 (b), and FIG. 28 (c) are diagrams for describing image data subjected to image processing by the imaging device of the second embodiment.
  • FIG. 29 is a flowchart showing an editing process in the imaging device of the second embodiment.
  • FIGS. 30 (a) to 30 (h) are diagrams for explaining a method of operating the operation buttons.
  • FIGS. 31 (a) to 31 (d) are diagrams for explaining an operation method of an operation button, and show a state of an image edited by operation of the operation button.
  • FIG. 32 is a diagram showing three-dimensional coordinates set in the imaging device of the third embodiment.
  • FIG. 33 is a block diagram showing an electrical configuration of the imaging device according to the third embodiment.
  • FIG. 34 (a) to FIG. 34 (f) are diagrams showing an edit pattern of an image displayed on the LCD.
  • FIG. 35 is a diagram for explaining how to move and rotate the imaging device according to the third embodiment in order to edit an image.
  • FIG. 36 is a flowchart showing editing processing in the imaging device of the third embodiment.
  • FIG. 1A is a perspective view of the entire imaging device 1 according to the first embodiment.
  • FIG. 1B is a schematic cross-sectional view of the imaging device 1.
  • FIG. 2 is a block diagram illustrating a configuration of a control system of the imaging device 1.
  • the imaging apparatus 1 includes a rectangular box-shaped main body case 10, an imaging lens 31 provided on the front surface of the main body case 10, and a rear side of the imaging lens 31 (the imaging apparatus 1). And a slit light projecting unit 20 provided below the imaging lens 31.
  • the imaging device 1 further includes a processor 40 built in the main body case 10, It has a release button 52 provided on the upper part of the main body case 10, a mode switching switch 59, a card memory 55 built in the main body case 10, and a size input section 56 provided on the back of the main body case 10. These components in the imaging device 1 are connected by signal lines (see FIG. 2).
  • the imaging device 1 further includes an LCD (Liquid Crystal Display) 51 provided on the back of the main body case 10 and a finder 53 provided from the back to the front of the main body case 10.
  • the LCD 51 and the finder 53 are used when the user determines the imaging range of the imaging device 1.
  • the LCD 51 is a liquid crystal display or the like that displays an image, and receives an image signal from the processor 40 and displays an image. From the processor 40 to the LCD 51, a real-time image captured by the CCD image sensor 32, an image stored in the card memory 55, an image for displaying characters of the setting contents of the device, etc., depending on the situation. A signal is sent
  • the imaging device 1 when the release button 52 is pressed by the user, external light enters through the imaging lens 31 and is imaged on the CCD image sensor 32 as image data.
  • a mode functioning as a so-called digital camera is referred to as a “normal mode”.
  • the imaging device 1 has a “corrected imaging mode” function in addition to the imaging function in the normal mode.
  • the “corrected imaging mode” is an operation mode in which, when a document P as a subject is imaged from an oblique direction, image data corrected as if the image was captured with a frontal force is created and stored in the card memory 55.
  • FIG. 3 shows the configuration of the slit light projecting unit 20 in the imaging device 1 in detail.
  • the slit light projecting unit 20 includes a laser diode 21, a collimating lens 22, an aperture 23, a transparent flat plate 24, a cylindrical lens 25, a reflecting mirror 26, and a rod lens 27.
  • the laser diode 21 emits a red laser beam.
  • the collimating lens 22 focuses the laser beam from the laser diode 21 so that the laser beam is focused on a reference distance VP from the slit light projecting unit 20.
  • the aperture 23 is formed of a plate having a rectangular opening. The laser beam incident on the aperture 23 from the collimating lens 22 is shaped into a rectangle by transmitting through the opening, and is emitted from the aperture 23 as a laser beam 70.
  • the transparent flat plate 24 is made of a transparent flat plate made of a solid glass material or the like, and has an AR coat (anti-reflection coating) on the back surface.
  • the transparent flat plate 24 is disposed at a predetermined angle
  • the transparent plate 24 reflects a predetermined percentage (for example, 5%) of the laser beam 70 on the surface and transmits the rest.
  • the direction in which the laser light 70 is reflected by the transparent flat plate 24 is called a second direction.
  • the reflection mirror 26 is formed of a member such as a mirror that totally reflects the laser beam.
  • the reflection mirror 26 is disposed at an angle of 45 degrees on the front side of the main body case 10 downstream of the laser beam 70 transmitted through the transparent flat plate 24, and totally reflects the laser beam 70 transmitted through the transparent flat plate 24 to form an optical path. Turn 90 degrees.
  • the direction in which the laser light 70 is reflected by the reflection mirror 26 is referred to as a first direction.
  • the rod lens 27 is formed of a cylindrical lens having a short positive focal length.
  • the rod lens 27 is disposed downstream of the laser beam 70 reflected by the reflection mirror 26 so that the axial direction of the cylindrical shape is the erect direction. Since the focal length of the rod lens 27 is short, the laser light transmitted through the rod lens 27 immediately spreads beyond the focal position near the rod lens 27, and proceeds in the first direction as slit light having a predetermined spread angle.
  • the slit light emitted from the rod lens 27 is hereinafter referred to as first slit light 71.
  • the cylindrical lens 25 is a lens having a concave shape in one direction so as to have a negative focal length.
  • the cylindrical lens 25 is disposed downstream of the laser beam 70 reflected by the transparent flat plate 24 so that the lens surface is orthogonal to the second direction.
  • the cylindrical lens 25 emits the laser beam 70 reflected by the transparent flat plate 24 as slit light traveling in the second direction at a predetermined spread angle.
  • the slit light emitted from the cylindrical lens 25 is referred to as a second slit light 72.
  • a laser beam is emitted from the laser diode 21 in response to a command from the processor 40, and the first slit light 71 in the first direction and the second direction are emitted.
  • the second slit light 72 is below the imaging lens 31 of the main body case 10. The light is emitted from a window 29 provided in the camera.
  • FIG. 4 shows a state in which the first and second slit lights 71 and 72 are projected onto a document P which is a sheet-like member.
  • a locus 7 la of the first slit light and a locus 72 a of the second slit light are formed on the document P by the first and second slit lights 71 and 72.
  • the trajectory 71a of the first slit light and the trajectory 72a of the second slit light vary in length, inclination, and interval depending on the position and orientation of the document P as shown in FIG.
  • the imaging lens 31 includes a plurality of lenses.
  • the focal length is automatically adjusted by the imaging lens 31, and light of an external force is formed on the CCD image sensor 32.
  • the CCD image sensor 32 is configured by arranging photoelectric conversion elements such as CCD (Charge Coupled Device) elements in a matrix.
  • the CCD image sensor 32 converts a signal corresponding to the color and intensity of the light of the image formed on the surface into digital data and outputs the digital data to the processor 40.
  • the data for one photoelectric conversion element is pixel data of a pixel forming an image, and the image data is composed of pixel data of the number of photoelectric conversion elements.
  • the CCD image sensor 32 generates image data having a total number of pixels in the width direction of 1200 pixels and a total number of pixels in the height direction of 1600 pixels.
  • the width direction position ccdx and the height direction position ccdy which are the coordinates of the image data, are represented by the number of pixels. That is, the range of the width direction position ccdx is “0”-“1199”, and the range of the height direction position ccdy is “0”-“1599”.
  • the pixel interval of the CCD corresponds to a resolution of 100 dpi (dot per inch) in the document.
  • the pixel data includes pixel information represented by three colors of red (R), green (G), and blue (B), each having 256 levels of luminance, per pixel.
  • the release button 52 is constituted by a push-button switch, and is connected to the processor 40.
  • the processor 40 detects that the user presses down the release button 52.
  • the card memory 55 is constituted by a nonvolatile and rewritable memory, and is detachable from the main body case 10.
  • the mode switching switch 59 is configured by a slide switch or the like that can be switched between two positions, and is connected to the processor 40.
  • the processor 40 detects the position of the mode switching switch 59. Mode switch 59 , One position of the switch is detected by the processor 40 as “normal mode”, and the other position of the switch is detected as “corrected imaging mode”.
  • the processor 40 includes a CPU (Central Processing Unit) 41, a ROM (Read Only Memory) 42, and a RAM (Random Access Memory) 43.
  • the CPU 41 executes various processes based on the program stored in the ROM 42 while using the RAM 43.
  • the processing executed by the CPU 41 includes detection of the pressing operation of the release button 52, detection of the state of the mode switching switch 59, capture of image data from the CCD image sensor 32, writing of image data to the card memory 55, and slit light. Switching of emission of slit light by the light emitting unit 20 and the like are included.
  • the ROM 42 includes a camera control program 421, a difference extraction program 422, a triangulation calculation program 423, a document attitude calculation program 424, a plane conversion program 425, an in-plane displacement rotation recognition program 426, a rectangular area
  • the cutting program 427 is stored.
  • the camera control program 421 is a program relating to control of the entire imaging apparatus 1 including the processing of the flowchart shown in FIG. 5 (details will be described later).
  • the difference extraction program 422 is a program for generating image data in which the locus of the slit light is extracted from the image of the document P on which the slit light is projected.
  • the triangulation calculation program 423 is a program for calculating a three-dimensional spatial position of each trajectory of the slit light with respect to each pixel.
  • the document attitude calculation program 424 is a program for estimating and obtaining the position and the three-dimensional shape of the document P.
  • the plane conversion program 425 is a program for converting the image data stored in the slit light non-image storage section 432 into image data that also captures the frontal force of the document P.
  • the in-plane displacement rotation recognition program 426 is a program for detecting the displacement and rotation angle of the document P in the image data.
  • the rectangular area cutting program 427 is a program for converting the image data of the area where the document P is captured in the image data.
  • the RAM 43 includes, as storage areas, a slit light image storage unit 431, a slit light non-image storage unit 432, and a difference storage unit having a size for storing data in the form of image data from the CCD image sensor 32.
  • the image storage unit 433 is allocated.
  • the RAM 43 further stores a triangulation calculation result storage unit 434 having a size for storing the result of calculating the position of each point of the slit light image, and a plane conversion result image having a size for storing the result obtained by converting the image data.
  • Department 435 and an in-plane displacement rotation recognition result storage unit 436 for storing a result of an in-plane displacement rotation recognition process described later.
  • the RAM 43 has a rectangular area cutout result image storage unit 437 for storing the result of a rectangular area cutout processing described later, and a size used for temporarily storing data for calculation in the CPU 41.
  • the parking area 438 is assigned! /
  • the finder 53 is configured by an optical lens. When the user looks into the finder 53 from behind the imaging device 1, the user can see a range that substantially matches the range where the image is formed on the CCD image sensor 32 by the imaging lens 31.
  • the size input unit 56 is configured by a slide switch or the like that switches to a plurality of positions, and is connected to the processor 40.
  • the size of the document P to be imaged is determined by the processor 40 in accordance with the position of the switch of the size input unit 56 operated by the user. For example, in the processor 40, when the position of the switch of the size input section 56 is operated by the user, the leftmost position is "unspecified”, the next position is "A4 size”, and the rightmost position is "A3". Judge as "size”.
  • S 110 it is determined whether or not the position of the mode switching switch 59 is in the “corrected imaging mode”. If the result of determination is that the position is the “corrected imaging mode” (S110: YES), the process proceeds to S111. If the position is in the “normal mode” instead of the “corrected imaging mode” (S110: NO), the process proceeds to S120.
  • Sl 1 camera control processing for acquiring an image with slit light and an image without slit light is performed. Specifically, after the laser diode 21 is instructed to emit light to the slit light projecting unit 20 and the first slit light 71 and the second slit light 72 are emitted, the CCD image sensor 32 is used as an image with slit light. Thus, image data of the document P on which the first and second slit lights 71 and 72 are projected as shown in FIG. 4 is obtained. Then, the image data is stored in the slit light image storage unit 431 of the RAM 43.
  • the light emission of the laser diode 21 is stopped by the finger with respect to the slit light projecting unit 20.
  • image data is acquired from the CCD image sensor 32 as an image without slit light. This image data is stored in the slit light non-image storage section 432.
  • a difference extraction process is executed. That is, the difference between the image data of the slit light image storage unit 431 and the image data of the slit light non-image storage unit 432 (that is, the trajectory 71a of the first slit light projected on the document P) by the difference extraction program 422 Then, image data from which the locus 72a) of the second slit light is obtained is generated and stored in the difference image storage unit 433.
  • the lower half of the image data stored in the difference image storage unit 433 (the height direction position ccdy is between “800” and “1599”) Then, for every 20 pixels between the width direction positions ccdx of “0” and “1199”, the position where the luminance level in one column of pixels in the height direction is the maximum is obtained.
  • the index idx numbered in the order in which the positions were determined, the width position ccdx when the positions were determined, and the height position ccdy with the maximum luminance level are shown in Fig. 6 (a).
  • the maximum position of the luminance level is the position of the maximum value of the approximate curve connecting the luminance levels of the respective pixels in the height direction.
  • the locus 71a of the first slit light is determined to be absent, and is not stored as the slit light image position data 433a.
  • the maximum value of the index idx is set to the number N of extracted pixels, which is the total number of pixels extracted as position information of the locus 7 la of the first slit light.
  • the difference image storage unit is used as the position information of the second slit light trajectory 72a in the same format as the slit light image position data 433a.
  • the difference image storage unit 433 is determined. Is not remembered.
  • a document attitude calculation process is executed. That is, using the slit light three-dimensional position data 434a, the three-dimensional spatial position (0, 0, L), inclination ⁇ , and curvature ⁇ of the document P are obtained by the document posture calculation program 424 (details will be described later). ).
  • a plane conversion process is executed. That is, the processing shown in the flowchart of FIG. 10 is executed by the plane conversion program 425 (details will be described later), and the image stored in the slit light non-image storage section 432 is obtained by observing the document P from a substantially orthogonal direction.
  • the original image P is converted into a flat image (for example, an image in which the document P has a rectangular shape as shown in FIG. 7A), and is stored in the plane conversion result image storage unit 435.
  • in-plane displacement rotation recognition processing is executed. That is, the processing shown in the flowchart of FIG. 13 (details will be described later) is performed by the in-plane displacement rotation recognition program 426 on the plane image stored in the plane conversion result image storage unit 435.
  • the image area of the document P in the plane image is identified, and the displacement DH in the width direction of the center position of the image area of the document P with respect to the center position of the plane image, and The height direction displacement DV and the rotation angle DROT of a predetermined side of the image area of the original P in the planar image are obtained and stored in the in-plane displacement rotation recognition result storage unit 436.
  • a rectangular area cutout process is executed. That is, the processing shown in the flowchart of FIG. 18 (details will be described later) is performed by the rectangular area cutting program 427.
  • the slit light non-image stored in the slit light non-image storage section 432 is stored in a state in which the image area of the document P observed from a substantially orthogonal direction is upright as shown in FIG. 7C. Only the image area of the original P is converted to an image that is cut out.
  • the cut image is stored in the rectangular region cut result image storage unit 437.
  • the processing by the difference extraction program 422 in S112 is specifically the following processing. For each pixel, subtract the RGB value of the corresponding pixel of the image data of the image data of the slit lightless image storage unit 432 from the RGB value of the pixel of the image data of the image file with slit light 431. As a result, a multi-valued image in which only the trajectories 71a and 72a of the first and second slit lights are obtained is obtained.
  • the processing by the triangulation calculation program 423 in S113 is specifically the following processing.
  • the three-dimensional spatial position for each point determined by the slit light image position data 433a is obtained as follows.
  • a coordinate system for imaging a document P curved in the width direction as shown in FIG. 4 is defined as follows. That is, as shown in FIG. 8, the optical axis direction of the imaging lens 31 is defined as the Z axis, a position away from the imaging device 1 by the reference distance VP is defined as the origin position of the X, Y, and Z axes. The horizontal direction is the X axis, and the vertical direction is the Y axis.
  • the total number of pixels in the width direction of the CCD image sensor 32 is called ResX, and the total number of pixels in the height direction is called ResY. Furthermore, the upper end of the position where the CCD image sensor 32 is projected on the XY plane through the imaging lens 31 is called Yftop, the lower end is called Yfbottom, the left end is called Xfstart, and the right end is called Xfend. Further, D is the distance from the optical axis of the imaging lens 31 to the optical axis of the first slit light 71 emitted from the slit light projecting unit 20.
  • the position in the Y-axis direction where the first slit light 71 intersects the X-Y plane is lasl
  • the position in the Y-axis direction where the second slit light 72 intersects the XY plane is las2.
  • the three-dimensional spatial position (XI, Yl, Z1) corresponding to the coordinates (ccdxl, ccdyl) on the image of the point determined by the predetermined data of the slit light image position data 433a is stored in the CCD image sensor 32.
  • the following five simultaneous equations are established for a triangle formed by a point on the imaging plane of, an emission point of the first slit light 71 and the second slit light 72, and a point intersecting the XY plane. Derive from the solution.
  • the three-dimensional spatial position (X2, Y2, Z2) corresponding to the coordinates (ccdx2, ccdy2) on the image of the point determined by the position information of the locus 72a of the second slit light is represented by the following five It is derived from the solution of the simultaneous equations.
  • the processing by the document orientation calculation program 424 in SI 14 is specifically the following processing.
  • a regression curve for each point of the three-dimensional space position determined by the slit light three-dimensional position data 434a is obtained.
  • a straight line is assumed that connects a point where the position of the curve in the X-axis direction is “0” and a point determined by the position information of the locus 72a of the second slit light.
  • the point at which this line intersects the Z axis that is, the point at which the optical axis intersects the document P, is determined as the three-dimensional spatial position (0, 0, L) of the document P (hereinafter referred to as position L) (see FIG. 9 (a);;).
  • position L three-dimensional spatial position (0, 0, L) of the document P
  • FIG. 9 (a) an angle between the straight line and the XY plane is obtained as the inclination ⁇ of the document P.
  • the regression curve of the trajectory 71a of the first slit light is rotationally transformed in the reverse direction by the previously obtained inclination ⁇ . That is, consider a state in which the original P is parallel to the XY plane. Then, as shown in FIG. 9 (c), for the cross section of the document P in the X—Z plane, the displacement in the Z-axis direction is obtained at a plurality of points in the X-axis direction. Find the curvature ⁇ (X), which is a function of the tilt in the X-axis direction as a variable.
  • the processing by the plane conversion program 425 in S115 is, for example, the processing described in the flowchart of FIG. 10 and described below.
  • the working area of RAM43 43 A processing area for the process is allocated to 8, and an initial value of a variable j used for the process, such as a variable for a counter, is set (S121).
  • the slit light stored in the slit light non-image storage unit 432 is stored.
  • P is rectangular, and the entire image area has a trapezoidal shape. ;)) Is required.
  • a rectangular planar image region including this region is set (see FIG. 7A), and the number of pixels Qa included in this region is obtained (S122).
  • the pixels in the area of the plane image have a size that is the resolution (25 dpi) of 1Z4 of the resolution (100 dpi) of the image data without slit light stored in the non-slit light image storage section 432. Therefore, the number of pixels Qa is 1Z16 as compared with the case where the resolution is set for the image data without slit light.
  • the three-dimensional space position obtained in this manner is converted into coordinates (ccdx, (1)) on the image data by the CCD image sensor 32 using the above-described relational expression of the triangulation calculation processing (3128). If the force is within the range of the image data stored in the slit lightless image storage unit 432 (S129: YES), the pixel information force at the converted coordinates S
  • the slit light stored in the slit lightless image storage unit 432 Pixel information power of image data without image-It is obtained by the arrest neighbor method and stored in the plane conversion result image storage unit 435 (S130) .
  • the converted coordinates of the image data stored in the slit lightless image storage unit 432 If the value is not within the range (S129: NO), the value of "black" is stored as pixel information in the plane conversion result image storage unit 435 (S131). (S132, S123).
  • the nearest neighbor method is to calculate the luminance value of the nearest point from which luminance is to be obtained.
  • the curvature calculation in S125 is specifically performed as follows.
  • the points ( ⁇ ', ⁇ ', ⁇ ') at which the predetermined point (X, Y, Z) of the three-dimensional coordinates in the area of the plane image is displaced in the Z-axis direction based on the curvature ⁇ (X) are described below. It is obtained by the procedure shown in the flowchart of FIG.
  • Y ′ is left as it is (S1252).
  • the calculation process of the tilt distance in S126 is specifically performed as follows.
  • the points (X “, ⁇ ", ⁇ ") obtained by rotating the points ( ⁇ ', ⁇ ', ⁇ ') subjected to the curvature calculation by 0 around the X-axis are shown in the flowchart shown in Fig. 11 (b). Is required.
  • the shift in the Z direction in S127 is specifically performed as follows.
  • the point ( ⁇ "', ⁇ '", ⁇ '"), which is obtained by shifting the tilt-corrected point (X", Y ", Z") by the position L in the Z-axis direction, is shown in FIG. ) Is obtained by the procedure shown in the flowchart of FIG.
  • the processing by the in-plane displacement rotation recognition program 426 in the SI 16 is, for example, the processing described below shown in the flowchart of FIG.
  • the plane image data stored in the plane conversion result image storage unit 435 is converted into monochromatic luminance image data. That is, the plane image data is converted into image data obtained by adding the luminance values of the R, G, and B colors of each pixel (S161).
  • a histogram relating to the image luminance distribution of the entire monochromatic planar image data is calculated (for example, as shown in the graph of FIG. 14 in which the horizontal axis represents the luminance and the vertical axis represents the frequency, the region where the luminance is high and the luminance The frequency distribution is divided into a region having a low center of gravity), and the center of gravity value is obtained (S162).
  • pixel information of a portion having a luminance higher than the center of gravity of the histogram is “1” (that is, “white”)
  • pixel information of a portion having a luminance lower than the center of gravity of the histogram is “0” (that is,
  • the image is converted to binary image data (“black”) (S163).
  • black binary image data
  • the rotation angle DROT of the side in the width direction of the original (the area of the document P) with respect to the width direction of the binarized image is obtained by the procedure shown in the flowchart of FIG. After that, the process ends.
  • FIG. 15 is a flowchart showing the vertical / horizontal displacement calculation in S164.
  • the vertical / left / right displacement calculation will be described.
  • the position of the center of gravity of the area including the original P of the image based on the binary image data (that is, “white”) is obtained (S1641).
  • the displacement DH in the width direction and the displacement DV in the height direction are obtained as the displacement of the center of gravity of the “white” region with respect to the center position of the image (S1642).
  • the width direction displacement DH and the height direction displacement DV are stored in the in-plane displacement rotation recognition result storage unit 436 (S1643).
  • FIG. 16 is a flowchart showing the rotation angle calculation in S165. The rotation angle calculation will be described.
  • the binarized image data converted in S163 is read (S1651), and the parameter angle ⁇ and the DMAX value are initialized (S1652). Then, the image based on the binarized image data is rotated so as to have the parameter angle ⁇ (S1655). Next, an image obtained by performing a second derivative in the width direction of the image is generated (S1656). That is, an image in which the outline of the area of the original ⁇ remains is generated.
  • a histogram of the number of “white” pixels in the height direction with respect to the width direction of the quadratic differentiated image is calculated (S1657).
  • the horizontal axis is the position in the width direction of the image
  • the vertical axis is the frequency of the “white” portion in the height direction.
  • the value of the histogram increases, and the value at this point is obtained as the maximum value dmax (Y) of the histogram at the parameter angle ⁇ (S1658).
  • the value of the maximum value dmax ( ⁇ ) is compared with the maximum value DMAX of the histogram so far (S1659).
  • the rotation angle DROT is replaced with the parameter angle 0 (S1661). Then, the maximum value DMAX is replaced with the maximum value dmax (Y) at the parameter angle ⁇ (S1662). If the parameter angle ⁇ is not larger than the maximum value DMAX (S1659: NO), the rotation angle DROT and the maximum value DMAX are left as they are.
  • the angle at which the maximum value of the contour histogram becomes the largest when the image based on the binarized image data is rotated from the initial rotation angle ⁇ start to the final rotation angle ⁇ end Can be requested.
  • the left or right side of the outline of the document P is parallel to the height direction of the image, as shown by the dotted line in FIG. 17, the outline of the left and right sides is located in the width direction.
  • the angle at which the histogram value is maximized by rotating the area of the document P is obtained as the rotation angle DROT of the document P.
  • the processing by the rectangular area cutting program 427 in S117 is performed by, for example, the flow of FIG. This is the processing shown in the chart and described below.
  • a processing area for the processing is allocated to the working area 438 of the RAM 43, and an initial value of a variable j used for the processing, such as a variable for a counter, is set (S171).
  • the four corner points of the image without slit light are rotationally moved around the Y axis by a curved ⁇ (X), and rotated about the X axis by ⁇ , and the position L in the Z axis direction is DH and height displacement DV in the X-Y plane, and rotate about the Z axis by the rotation angle DROT.
  • the document P is positioned at the center of the area formed by the four converted points.
  • an area formed by the four points is cut out in the size input by the size input unit 56 (that is, the surface of the original P on which the characters and the like are written is observed from a substantially orthogonal direction, and the original P A rectangular image is rotated so that it is parallel to the width and height directions of the image, and an area of a cut image that is an image in which only the area of the document P is cut) is set, and pixels included in this area are set.
  • the number Qb is obtained (S172). It should be noted that the pixels in the region of the cut-out image are pixels having the same resolution (100 dpi) as the resolution of the image data without slit light stored in the image storage unit 432 without slit light.
  • the three-dimensional spatial position of each pixel included in the set cropped image area is rotated at a rotation angle DROT about the Z axis (S175), and the width direction displacement is applied to the coordinates of this pixel.
  • DH and height direction displacement DV are added (S176), displaced in the Z-axis direction based on the curvature ⁇ (X) (S177), and rotated around the X-axis with a slope ⁇ (S178), and Z-axis direction Is shifted by the position L (S179).
  • the obtained three-dimensional spatial position is converted into coordinates (ccdcx, (1)) on the CCD image captured by the ideal camera (3180) using the relational expression of triangulation (3180), and the imaging lens used.
  • the pixel information at the converted coordinates is obtained from the pixel information of the slit light non-image by the bilinear method. It is obtained and stored in the working area 438 of the RAM 43 as the pixel information of the area set in S172 (S182).
  • the above processing is repeatedly executed for each pixel position in the area obtained in S172 by the number of pixels Qb (S183, S173).
  • the processing area is released ( S1 74).
  • the bilinear method is a method of calculating a force corresponding to an area before a certain point after conversion and calculating an average value of colors of pixels in the area as a color of the point after conversion. .
  • pixel information exists at a point at an integer value position, and if the coordinates at which the position before conversion is calculated become (0.2, 0.8), four surrounding points (0, 0) ), (0, 1), (1, 0), (1, 1)
  • S177-S180 are the same processing jets as S125-S128.
  • the imaging apparatus 1 emits two rows of slit light, the first slit light 71 and the second slit light 72, and outputs the original P on which these slit lights are projected by the CCD image sensor 32. Take an image, and then take an image of the document P on which the slit light is not projected. Further, the imaging device 1 calculates the difference between the two image data, extracts the trajectory of the slit light of the image data, calculates the three-dimensional spatial position of each part of the trajectory of the slit light based on the principle of triangulation, and calculates the document P from these. Find the position L, inclination ⁇ , and curvature ⁇ (X) of.
  • the imaging device 1 projects the previously captured slit light, and The image is converted into image data as if the flat original P was viewed from the front in the upright direction, and only the original P was cut out, and recorded in the card memory 55.
  • the image stored in the card memory 55 can be displayed on the LCD 51 to check the captured content.
  • the image in the card memory 55 can be displayed on an external personal computer or printed. is there.
  • the user slides the mode switching switch 59 to the “corrected imaging mode” and sets the size input unit 56 to the size of the document P to be imaged.
  • the posture of the document P is obtained by analyzing only the positions of the first and second slit lights 71 and 72 in the image. Therefore, the posture of the document P with high detection accuracy can be easily obtained without performing complicated image analysis. Therefore, the image analysis processing by the processor 40 of the imaging device 1 can be executed in a short time. Thus, the effect that the processor 40 can be simplified can be obtained.
  • the color information that is good if the area of the document P can be identified has little relation to the processing content!
  • the amount of information used for processing can be reduced, the processing content can be simplified, and the processing speed can be increased.
  • each image has the same resolution as the largest image without slit light.
  • the images are converted to the same number of colors.
  • the camera control processing in S111 by the imaging lens 31, the CCD image sensor 32, the slit light projecting unit 20, and the processor 40 is positioned as an imaging unit.
  • a series of processing (S112-S114) from the difference extraction processing to the document attitude calculation processing is positioned as three-dimensional shape detection means.
  • the plane conversion processing (S115) in FIG. 5 is positioned as plane conversion means.
  • the in-plane displacement rotation recognition processing (S116) is positioned as in-plane position detection means and in-plane angle detection means.
  • the rectangular area cutout processing (S117) is positioned as the first and second correction conversion means.
  • the size input unit 56 is positioned as a range input unit.
  • both the in-plane displacement (in-plane position) and the in-plane rotation angle are detected and used for correction in S116 of FIG. 5, but in S116 There may be a configuration in which only one of the in-plane displacement and the in-plane rotation angle is detected and used for correction.
  • the slit light projecting unit 20 detects a three-dimensional shape by using two rows of the first slit light 71 and the second slit light 72. ing .
  • a three-dimensional shape may be detected by using three or more rows of slit light.
  • the three-dimensional shape may be detected by using a light beam having a specific radiation pattern instead of the slit light.
  • the image stored in the card memory 55 which is the final image data
  • the image data is cut out at the size of the original P specified by the size input unit 56
  • the method of specifying the cutout range is not limited to this.
  • the cutout range is determined based on the area of the original P (the “white” area) identified by the binary image data converted in the in-plane displacement rotation recognition processing of S 116. It may be set.
  • the area formed by converting the four corner points of the image without slit light in S172 of the rectangular area cutout processing in S117 is input by the size input unit 56 as the range to be the final image data.
  • the area is cut out by the size of the force, the area is not limited to this.
  • the area force set in S172 of the rectangular area cutout processing in S117 is not cut out in the size input in the size input unit 56, and the four corners of the slit lightless image are not cut out.
  • a rectangular range including an area formed by converting points may be used as final image data.
  • the range of the final image data may be a region where the rotation is not performed at the rotation angle DROT in S172 and the processing in S175 is not performed, or the width direction displacement DH and The vertical displacement and the vertical displacement are not converted by the DV in the height direction, and the processing in S176 is not performed as an area.
  • the four corner points of the image without slit light are converted into the area formed by the points converted by the curvature ⁇ (X), the inclination 0, and the position L, respectively.
  • the area that is deformed by the size input by the size input unit 56 may be limited, and the conversion may be performed for each pixel in this area. By doing so, the number of pixels as a planar image is reduced, so that the processing amount in the plane conversion processing can be reduced, and the processing amount of the in-plane displacement rotation recognition processing in S116 can also be reduced. Thus, the entire processing by the processor 40 can be performed at high speed.
  • the image data without slit light is converted into a single color and the resolution is 1Z4.
  • the resolution may be converted at the resolution of the image without slit light. It is also acceptable that the color information is processed as it is, instead of using a single color.
  • the resolution is lower than that of the image without slit light, and the plane image is converted to a plane image in which the number of colors is a single color.
  • the same solution as the slit light no image It is possible to reduce the processing amount in this processing and the processing amount in the in-plane displacement rotation recognition processing S116 using this planar image, as compared with an image having the same image number and the same color number.
  • the entire processing by the processor 40 can be shortened.
  • the target object to be imaged by the imaging apparatus 1 may be other than the object having a rectangular shape like the document P described in the above embodiment.
  • the processing of the rotation angle calculation (S165) in the in-plane displacement rotation recognition processing of S116 involves complicated shape determination processing such as searching for a matching shape by pattern matching on a plurality of shape data. Therefore, the above-described embodiment is simpler and better.
  • one image capturing device 1 performs the process from capturing an image to converting the image.
  • data is transferred to an image processing device such as a personal computer external to the image capturing device 1.
  • the processing of S112-S117 may be performed separately for each device so that the processing can be performed.
  • the image processing apparatus views the target object image from the predetermined direction based on the shape information and the position of the target object obtained by the in-plane position detecting means.
  • the image processing apparatus may further include a first correction conversion unit configured to convert the target image into a corrected image in which the target object is disposed at a substantially central position.
  • the image processing apparatus identifies a target object region in a plane image and obtains an angle of a predetermined side of the target object region with respect to a predetermined direction in the plane image plane.
  • An in-plane angle detecting means may be further provided.
  • the first correction conversion means includes shape information, the position of the target object obtained by the in-plane position detection means, and the in-plane angle detection means. Based on the angle, the target object image is corrected so that the target object can be viewed from a predetermined direction, the target object is arranged at a substantially central position, and a predetermined side of the target object is directed in a predetermined direction in the image. It may be configured to convert to an image.
  • the direction in which the predetermined side of the target object is turned in the corrected image is set to the direction in which the characters written on the original document as the target object are parallel to the width direction of the corrected image.
  • the first correction conversion means may be configured to convert the corrected image into a corrected image only for a region of the target object image where the target object is captured.
  • a portion other than the target object for example, the background
  • a corrected image including only the target object can be obtained. Therefore, the corrected image can be more easily viewed.
  • image data at unnecessary locations is deleted and the data amount of the entire image data can be reduced, it is possible to reduce the amount of image processing when deriving the data and when using the data. it can.
  • the first correction conversion unit may be configured to convert the image into a corrected image having the same number of colors as the number of pixels of the target object image.
  • the input color information of the target object image is effectively used, and the converted corrected image can be easily viewed.
  • the in-plane position detection means and the in-plane angle detection means detect the position and angle of the target object in the image. These parameters can be detected without using color information.
  • processing in order to reduce the amount of data to be processed, processing may be performed using an image in which the number of pixels is smaller than that of the target object image.
  • the image processing apparatus may further include an image clipping means for extracting an image in which a portion of the corrected image in which the target object is captured is cut in a predetermined shape. good.
  • the image processing device may further include a range input unit for inputting a range of the target object image to be converted by the plane conversion unit.
  • the plane conversion unit converts the range of the target object image input by the range input unit into a plane image.
  • the amount of image processing can be reduced by limiting the range of conversion processing. This makes it possible to shorten the time for image processing.
  • the target object has a rectangular shape when viewed from a direction orthogonal to a predetermined plane.
  • the shape of the target object is rectangular, the in-plane position detection means, the in-plane angle detection means, etc.
  • the target object region can be easily identified by utilizing the feature that the rectangular shape is composed of four orthogonal sides.
  • the plane conversion means may be configured to convert the image into a plane image having a lower resolution than the resolution of the target object image.
  • the resolution of the planar image affects the detection accuracy of the in-plane position detecting means and the in-plane angle detecting means. For this reason, it is preferable that the resolution of the planar image be as low as possible so that the influence on the detection accuracy is not increased.
  • the plane conversion means is configured to convert the image into a plane image having a single color pixel!
  • the amount of information held by the pixels of the planar image is reduced, and the amount of conversion into a planar image by the planar conversion unit and the amount of processing when processing using the planar image can be reduced.
  • the imaging device includes the above-described image processing device, a light projecting unit that projects pattern light, and an imaging unit that captures a target object and obtains a target object image. And a three-dimensional shape detecting means for calculating shape information on the three-dimensional shape of the target object based on an image obtained by imaging the target object on which the pattern light is projected by the imaging means.
  • the target object image obtained by the imaging means and the shape information calculated by the three-dimensional shape detection means are input to the image processing device.
  • the imaging device includes the above-described image processing device, a light projecting unit that emits pattern light, an image of a target object, obtains a target object image, and performs image processing. Based on imaging means input to the apparatus and an image obtained by imaging the target object on which the pattern light is projected by the imaging means, shape information on the three-dimensional shape of the target object is calculated and the shape information is calculated.
  • Three-dimensional shape detection means input to the image processing device, display means for displaying the corrected image obtained by the first correction conversion means, and display mode for changing the display mode of the corrected image displayed on the display means Enter the change parameters And means for changing the display mode of the corrected image displayed on the display means based on the display mode change parameter input by the input unit.
  • the imaging device includes the above-described image processing device, a light projecting unit that projects pattern light, an image of a target object, obtains a target object image, and performs image processing. Based on imaging means input to the apparatus and an image obtained by imaging the target object on which the pattern light is projected by the imaging means, shape information on the three-dimensional shape of the target object is calculated and the shape information is calculated.
  • Three-dimensional shape detection means input to the image processing device, display means for displaying a corrected image obtained by the second correction conversion means, and display mode for changing the display mode of the corrected image displayed on the display means
  • Input means for inputting change parameters
  • change means for changing the display mode of the corrected image displayed on the display means based on the display mode change parameter input by the input means, Also good,.
  • FIG. 19A is a perspective view illustrating an appearance of an imaging device 1B according to the second embodiment.
  • FIG. 19 (b) is a rear view of the imaging device 1B
  • FIG. 19 (c) is an enlarged view of the operation button 57.
  • FIG. 20 shows a schematic cross-sectional view of the imaging device 1B.
  • FIG. 20 shows a state where the document P is imaged by the imaging device 1B.
  • the imaging device 1B has a normal "normal mode” function and a "corrected imaging mode” function. Have. In the “normal mode”, the imaging device 1B functions as a normal so-called digital camera. In the “corrected imaging mode”, the imaging device 1B automatically generates an image as if the original image was captured from the front side of the original P even when the original P as the subject was also imaged in oblique directions. And a device that can further edit the corrected image according to the operator's intention.
  • the imaging device 1B includes a rectangular box-shaped main body case 10, an imaging lens 31 provided in front of the main body case 10, a window 29 provided below the imaging lens 31, A release button 52 and a mode switching switch 59 are provided on the upper part of the camera. Further, the imaging device 1B has an LCD (Liquid Crystal Display) 51, a size input section 56, an operation button 57, an edit parameter selection button 65 provided on the rear of the main body case 10, and a rear force of the main body case 10 also distributed through the front. A finder 53 is provided, and a confirmation button 58 provided on a side surface of the main body case.
  • LCD Liquid Crystal Display
  • the operation button 57 is a button for editing an image displayed on the LCD 51.
  • the operation button 57 is composed of eight independent buttons 57a-57h, and has a circular outer shape. That is, the operation button 57 includes a left rotation button 57a for rotating the image displayed on the LCD 51 to the left, an upward movement button 57b for moving the image upward, and a right rotation button 57c for rotating the image right. , A left button 57d for moving to the left, a right button 57e for moving to the right, a reduction button 57f for reducing, and a down button 5 for moving down. It consists of 7g and an enlargement button 57h for enlargement.
  • a CCD image sensor 32 is provided behind the imaging lens 31 (inside the imaging device 1B), and a slit light projecting unit 20 is provided below the imaging lens 31. Is set up. Further, the processor 40 and the memory card 55 are built in the main body case 10. In FIG. 20, the illustration of the finder 53 not connected to the processor 40 and the confirmation button 58 provided on the side surface of the main body case are omitted.
  • the imaging lens 31 includes a plurality of lenses.
  • the focal length and the aperture are automatically adjusted in the imaging lens 31 by the auto-focus function of the imaging device 1B, and light of an external force is formed on the CCD image sensor 32.
  • the CCD image sensor 32 has a configuration in which photoelectric conversion elements such as CCD (Charge Coupled Device) elements are arranged in a matrix.
  • the CCD image sensor 32 generates a signal corresponding to the color and intensity of the light of the image formed on the surface, converts the signal into digital data, and outputs the digital data to the processor 40.
  • the data for one CCD element is the pixel data of the pixels forming the image, and the image data is composed of the pixel data of the number of CCD elements.
  • the CCD image sensor 32 of the present embodiment generates image data having a total number of pixels in the width direction of 1200 pixels and a total number of pixels in the height direction of 1600 pixels.
  • the width direction position ccdx and the height direction position ccdy which are the coordinates of the image data, are represented by the number of pixels, and the first pixel is defined as a “0” position with the pixel at the upper left of the image as a base point. That is, the range of the width direction position ccdx is “0”-“1199”, and the range of the height direction position ccdy is “0”-“1599”.
  • the pixel interval of the CCD corresponds to a resolution of 100 dpi (dot per inch) in the original.
  • the pixel data has pixel information represented by three colors of red (R), green (G), and blue (B), each having 256 levels of luminance.
  • the release button 52 is configured by a push button type switch.
  • the release button 52 is connected to the processor 40, and the processor 40 detects a user's pressing operation of the release button 52.
  • the mode switching switch 59 is configured by a slide switch or the like that can be switched between two positions.
  • the switch positions are assigned by the processor 40 so that one switch position of the mode switching switch 59 is detected as "normal mode” and the other switch position is detected as "corrected imaging mode".
  • the ⁇ normal mode '' is a mode in which the image of the original P itself is taken as image data
  • the ⁇ corrected imaging mode '' is an image of the original P taken from the front when the original P is imaged from an oblique direction. In this mode, the image data is corrected.
  • the memory card 55 is composed of a nonvolatile and rewritable memory, and is detachable from the main body case 10.
  • the LCD 51 is configured by a liquid crystal display or the like that displays an image, and receives an image signal from the processor 40 and displays an image. From processor 40 to LCD51, In response, an image signal for displaying a real-time image received by the CCD image sensor 32, an image stored in the memory card 55, characters of the setting contents of the apparatus, and the like is transmitted.
  • the size input unit 56 is configured by a slide switch or the like that switches to a plurality of positions, and is connected to the processor 40.
  • the size of the document P to be imaged is determined by the processor 40 according to the position of the size input section 56 set by the user. For example, in the processor 40, the position of the switch of the size input section 56 is set by the user, and when the leftmost end is “unspecified”, the next position is “A4 size”, and the rightmost end is “A3 size”. ".
  • the edit parameter selection button 65 is a button for selecting a specific edit parameter from among the edit parameters stored in an edit parameter storage unit 439 described later.
  • the edit parameter selection button 65 is constituted by a push button type switch.
  • the editing parameter selection button 65 is connected to the processor 40, and the processor 40 detects a user's pressing operation of the editing parameter selection button 65. When a predetermined editing parameter is selected by the pressing operation of the editing parameter selection button 65, the image displayed on the LCD 51 is edited based on the selected editing parameter.
  • Each of the buttons 57a-57h of the operation button 57 is constituted by a push button type switch.
  • Each of the buttons 57a-57h is connected to the processor 40, and the processor 40 detects a pressing operation of each of the buttons 57a-57h by the user.
  • the amount of movement and enlargement / reduction of the image for each push-down operation of each button 57a-57h are set in advance, and the amount of movement or enlargement of the image according to the number of times each button 57a-57h is pressed down. The reduction ratio is controlled.
  • the finder 53 is configured by an optical lens.
  • the viewfinder 53 is configured so that when the user also looks into the viewfinder 53 with the rear side force of the imaging device 1B, a range almost coincident with the range where the imaging lens 31 forms an image on the CCD image sensor 32 can be seen. You.
  • the confirm button 58 is a button for determining whether or not to save the image displayed on the LCD 51.
  • the confirm button 58 is configured in the form of a push button.
  • the enter button 58 is connected to the inlet processor 40, and the processor 40 detects a pressing operation by the user. By pressing this confirm button 53 while an image is displayed on the LCD 51, the image is displayed on the LCD 51 and can be saved in a state where the image is displayed.
  • FIG. 21 is a diagram showing a configuration of the slit light projecting unit 20.
  • FIG. 22 (a) and FIG. 22 (b) are diagrams for explaining the angular width of the slit light.
  • the slit light projecting unit 20 includes a laser diode 21, a collimating lens 22, an aperture 23, a transparent flat plate 24, a cylindrical lens 25, a reflecting mirror 26, and a rod lens 27.
  • the laser diode 21 emits a red laser beam.
  • the emission and the stop of the laser beam in the laser diode 21 are switched.
  • the output of the laser diode 21 is adjusted so that a constant output (for example, lmW) can be obtained at the point passing through the aperture 23 in consideration of the individual dispersion of the spread angle of the laser beam with respect to the maximum output rating (for example, 5 mW).
  • the rated output has been adjusted.
  • the collimating lens 22 focuses the laser beam from the laser diode 21 so as to focus on a reference distance VP (for example, 330 mm) from the slit light projecting unit 20.
  • VP for example, 330 mm
  • the aperture 23 is formed of a plate having a rectangular opening.
  • the laser beam from the collimating lens 22 is shaped into a rectangle by passing through the opening of the aperture 23.
  • the transparent plate 24 is made of a transparent plate made of a solid glass material or the like, and has an AR coating on the back surface.
  • the transparent flat plate 24 is disposed at a predetermined angle
  • the transparent flat plate 24 reflects about 5% (about 50 ⁇ W) of the power of one laser beam incident from the aperture 23 on the surface and transmits about 95% (about 950 W).
  • a second direction the direction in which the laser beam is reflected by the transparent flat plate 24 (upward by 33 degrees with respect to the horizontal plane in front of the imaging device 1B) is referred to as a second direction.
  • the reflection of one beam of the laser beam entering the transparent plate 24 when exiting from the transparent plate 24 is reduced, and the one beam of the laser beam inside the transparent plate 24 is reduced.
  • the loss has been reduced.
  • the ratio of one laser beam reflected by the transparent plate 24 is set to a surface reflectance of 5% determined by the refractive index of the material of the transparent plate 24, the reflection surface required for realizing with a normal half mirror can be obtained.
  • the process of forming the metal deposition film can be omitted.
  • the reflection mirror 26 is composed of a member such as a mirror that totally reflects the laser beam. Reflection mira
  • the reference numeral 26 is disposed downstream of the laser beam transmitted through the transparent flat plate 24 at an angle of 45 degrees in front of the main body case 10, and totally reflects the laser beam to change the direction of the optical path by 90 degrees.
  • the direction in which the laser beam is reflected by the reflecting mirror 26 (the direction of 0 ° with respect to the horizontal plane in front of the imaging device 1B) is referred to as a first direction.
  • the rod lens 27 is formed of a cylindrical lens having a short positive focal length, and is disposed downstream of the laser beam reflected by the reflection mirror 26 so that the axial direction of the cylindrical shape is vertical. I have. Since the focal length of the rod lens 27 is short, one laser beam transmitted through the rod lens 27 spreads beyond the focal point near the red lens 27 and forms a slit light having a predetermined spread angle ⁇ (for example, 48 degrees). Go in the direction of 1.
  • the slit light emitted from the rod lens 27 is referred to as first slit light 71.
  • the cylindrical lens 25 is a lens having a concave shape in one direction so as to have a negative focal length, and is provided downstream of the laser beam reflected by the transparent flat plate 24 with respect to the second direction. They are arranged so that the planes are orthogonal.
  • the cylindrical lens 25 emits the laser beam incident from the transparent flat plate 24 as slit light that spreads at a spread angle ⁇ (see FIG. 22 (b)).
  • the slit light emitted from the cylindrical lens 25 is referred to as a second slit light 72.
  • the spread angle ⁇ of the second slit light 72 is given by the spread angle ⁇ of the first slit light 71 and the spread angle ⁇ of the second slit light 72 with respect to the power ratio when the laser beam is split by the transparent plate 24.
  • the angle is such that the ratio with the spread angle ⁇ becomes equal. That is, the spread angle ⁇ of the second slit light 72 is 5% (2.4 degrees) of the spread angle ⁇ .
  • the slit light projecting unit 20 emits a laser beam from the laser diode 21 in response to a command from the processor 40, and emits the first slit light 71 in the first direction and Then, the second slit light 72 is emitted from the window 29 provided below the imaging lens 31 of the main body case 10 in the second direction.
  • the power of the first slit light 71 divided by the transparent flat plate 24 is 95% of the power that is also output by the laser diode 21.
  • the power of the second slit light 72 is as small as about 5%.
  • the power of the first slit light 71 with a spread angle force of 8 degrees is about 20 WZ per unit angle
  • the second slit light with a spread angle of 2.4 degrees Light per unit angle of light 72
  • the power is also about 21 / z WZ, and the power of the two slit lights is almost the same.
  • the illuminance by the first slit light 71 and the second slit light 72 is about 1260 lux. Therefore, even in a place of 500-1000 lux, which is the general indoor brightness, there is a sufficient difference in luminance between the trajectory of the slit light and the document P. Can be extracted.
  • FIG. 23 is a block diagram showing an electrical configuration of the imaging device 1B.
  • the processor 40 mounted on the imaging device 1B includes a CPU 41, a ROM 42, and a RAM 43.
  • the CPU 41 executes various processes according to the program stored in the ROM 42 while using the RAM 43.
  • the processing executed by the CPU 41 includes detection of the pressing operation of the release button 52, capture of the image data from the CCD image sensor 32, writing of the image data to the memory card 55, detection of the state of the mode switch 59, detection of the slit light, and the like. This includes switching of the emission of slit light by the light emitting unit 20, detection of a pressing operation of the operation button 57 and the confirmation button 58, and the like.
  • the ROM 42 includes a camera control program 421, a difference extraction program 422, a triangulation calculation program 423, an original attitude calculation program 424, a plane conversion program 425, an in-plane displacement rotation recognition program 426, a rectangular area cutting program 427, and an editing program. 428 are stored.
  • the camera control program 421 processes the flowchart shown in FIG. 24 (details will be described later).
  • the difference extraction program 422 is a program for generating image data obtained by extracting the locus of the slit light from the image of the document P on which the slit light is projected.
  • the triangulation calculation program 423 is a program for calculating the three-dimensional spatial position of each locus of the slit light locus extracted by the difference extraction program 422 with respect to each pixel.
  • the document attitude calculation program 424 is a program for estimating and obtaining the three-dimensional shape of the document P from the three-dimensional spatial positions of the first slit light trajectory 71a and the second slit light trajectory 72a.
  • the plane conversion program 425 converts the image data stored in the slit light non-image storage section 432 into an image that also captures the frontal force of the document P based on the position and orientation of the document P. It is a program to do.
  • the in-plane displacement rotation recognition program 426 is a program for detecting the displacement and the rotation angle of the document P in the image data.
  • the rectangular area cutout program 427 is a program for cutting out image data of an area where the document P is captured in the image data.
  • the editing program 428 is a program that generates an edited image in response to the operation of the operation button 57.
  • a slit light image storage unit 431 a slit light non-image storage unit 432, a difference image storage unit 433, a triangulation calculation result storage unit 434, a plane conversion result storage unit 435, an in-plane displacement rotation
  • the recognition result storage section 436, the rectangular area cutout result image storage section 437, the working area 438, and the editing parameter storage section 439 are allocated as storage areas.
  • the image data of the image with slit light and the image data of the image without slit light from the CCD image sensor 32 are stored in the image storage unit with slit light 431 and the image storage unit with slit light 432, respectively.
  • the triangulation calculation result storage unit 434 stores the result of calculating the position of each point of the image with slit light.
  • the document orientation calculation result storage unit 435 stores the image data converted by the plane conversion program 425.
  • the in-plane displacement rotation recognition result storage unit 436 stores a result of an in-plane displacement rotation recognition process described later.
  • the result of the rectangular area cutting process described later is stored in the rectangular area cutting result image storage unit 437.
  • Working area 438 stores data temporarily used for calculation in CPU 41.
  • the editing parameter storage unit 439 regarding the edited image edited by the editing program 428, the operation status of each button 57a-57h operated by the user at the time of editing is stored as an editing parameter.
  • FIG. 24 is a flowchart showing a processing procedure in the processor 40 of the imaging device 1B.
  • FIG. 25 (a) shows a slit light image obtained by illuminating the original P with slit light and capturing the state of the slit light.
  • step S3011 the light emission command to the laser diode 21 of the slit light projecting unit 20 is stopped, and the image data is output from the CCD image sensor 32 in a state where the first slit light 71 and the second slit light 72 are not emitted. Is obtained, and the image data is stored in the card memory 55. After that, the process ends.
  • a camera control process for acquiring an image with slit light and an image without slit light is performed (S2102). Specifically, the light emission of the laser diode 21 is commanded to the slit light projecting unit 20, and the first slit light 71 and the second slit light 72 are emitted. As shown in a), a slit image including the document P on which the first and second slit lights 71 and 72 are projected is obtained. The acquired image data is stored in the slit light image storage unit 431 of the RAM 43.
  • the edited image edited by the editing process (S2107) is displayed on LCD 51 (S2108). If the user looks at the edited image and determines that the edited image is to be further edited, the confirm button 58 is not pressed down (S2105: No), and the processing from S2106 is repeated.
  • the image displayed on the user's LCD 51 is stored in the card memory 55. Is performed (S2109).
  • the resolution of the image is stored at a higher resolution than the resolution set before storage. Therefore, when outputting the stored image, a clear image can be output.
  • the plane image generated in the three-dimensional measurement and plane conversion processing (S2103) may be deleted. This is because by erasing the planar image, the memory can be used effectively.
  • the operation status of each button 57a-57d temporarily stored in the working area is related to the edited image stored in the memory card 55. It is stored in the edit parameter storage unit 439 as an edit parameter (S3010).
  • the editing parameters for example, when an image captured in the same state as the edited image edited this time is desired to be edited in the same manner as this time, the editing parameters stored in the editing parameter storage unit 439 are stored in the editing parameters. If editing based on this, it is possible to perform the same editing as this time without newly operating each of the buttons 57a-57h. Therefore, operability can be improved.
  • S3010 is completed, this process ends.
  • FIG. 26 is a flowchart showing three-dimensional measurement and plane conversion processing.
  • FIG. 27 (a) is a diagram schematically illustrating data stored in the difference image storage unit
  • FIG. 27 (b) is a diagram schematically illustrating data stored in the triangulation calculation result storage unit. It is.
  • FIG. 28 (a) -FIG. 28 (c) are diagrams showing image data subjected to image processing.
  • a difference extraction process is executed (S2801).
  • Difference extraction processing 23 the position information of the trajectory 71a of the first slit light and the trajectory 72a of the second slit light appearing in the image with slit light is obtained by the difference extraction program 422 shown in FIG.
  • the image data of the difference between the image with slit light and the image without slit light ie, the locus 71a of the first slit light and the locus 72a of the second slit light projected on the document P
  • the image data of the difference between the image with slit light and the image without slit light is Is generated.
  • the lower half of the generated image data (height position ccdy between “800” and “1599”), every 20 pixels between width direction ccdx between “0” and “1199”, The position where the luminance level is maximum for one row of pixels in the height direction is determined. As shown in Fig.
  • the slit light image position data 433a is stored in the difference image storage unit 433 shown in FIG.
  • the maximum position of the luminance level is the position of the maximum value of the approximate curve connecting the luminance levels of the pixels in the height direction. If the luminance level at the maximum position is not higher than the predetermined level, it is determined that there is no locus 71a of the first slit light, and is not stored as the slit light image position data 433a. Next, the maximum value of the index idx is set to the number N of extracted pixels, which is the total number of pixels extracted as the position information of the locus 71a of the first slit light.
  • the obtained position is stored in the difference image storage unit 433 in the same format as the slit light image position data 433a as position information of the second slit light locus 72a.
  • the position information of the locus 71a of the first slit light if the luminance level at the maximum position is not higher than a predetermined level, and the locus 72a of the second slit light is absent, it is determined that there is no locus 72a. Not stored in 433.
  • triangulation calculation processing is executed (S2802).
  • the triangulation calculation processing for each point determined by the slit light image position data 433a stored in the difference image storage unit 433, the three-dimensional space position for each index idx is determined by the triangulation calculation program 423 shown in FIG. Desired.
  • the calculation result is obtained by plotting the data of the X, Y, and Z values, which are the three-dimensional coordinate values for each index idx, as slit light three-dimensional position data 434a.
  • the result is stored in the triangulation calculation result storage unit 434 shown in FIG.
  • a document posture calculation process is executed (S2803).
  • the original posture calculation program 424 shown in FIG. 23 uses the slit light three-dimensional position data 434a stored in the triangulation calculation result storage unit 434, and the three-dimensional spatial position (0, 0, L), slope ⁇ and curvature ⁇ are required.
  • a plane conversion process is executed (S2804).
  • the plane light conversion program 425 shown in FIG. 23 converts the slit light non-image stored in the slit light non-image storage section 432 into a plane image in which the document P is observed from a substantially orthogonal direction (for example, FIG. 28).
  • the document P is converted into an image having a rectangular shape.
  • the obtained plane image is stored in the plane conversion result image storage unit 435 shown in FIG.
  • in-plane displacement rotation recognition processing is executed (S2805).
  • the in-plane displacement rotation recognition program 426 shown in FIG. 23 identifies the image area of the document P in the plane image, and as shown in FIG.
  • the width direction displacement DH and the height direction displacement DV of the center position of the image area of the document P with respect to the center position, and the rotation angle DROT of a predetermined side of the image area of the document P in the planar image are obtained.
  • the obtained result is stored in the in-plane displacement rotation recognition result storage unit 436 shown in FIG.
  • a rectangular area cutting process is executed (S2806).
  • the three-dimensional measurement and the plane conversion processing ends.
  • FIG. 29 is a flowchart showing the editing processing.
  • the operation button 57 each button It is determined whether or not the buttons 57a-57h) have been pressed (S3061). That is, in the process of S2106 in FIG. 24, it is determined whether or not the operation state of the operation button 57 is stored in the working area 438. As a result, when the operation button 57 is operated (S3061: Yes), the displacement amount, the rotation angle, and the magnification are measured based on the output of the operation button 57 (S3062).
  • the plane image displayed on the LCD 51 (the image stored in the rectangular area cutout image storage unit 437) is displaced by the measured displacement amount, rotated by the measured rotation angle, or measured by the magnification.
  • An edited image is generated (S3063). Thereafter, the processing in FIG. 29 ends.
  • the operation button 57 when the operation button 57 is not operated (S3061: No), it is determined whether or not the editing parameter selection button 65 is pressed (S3064). If the edit parameter selection button 65 is pressed (S3064: Yes), the plane image (rectangular) displayed on the LCD 51 is stored in the edit parameter storage unit 439 based on the latest edit parameter among the edit parameters. The edited image is generated by displacing, rotating, or setting the magnification to a predetermined magnification (the image stored in the area cutout result image storage unit 437) (S3065). As a result, the user can generate the same edited image as the previous one by a simple operation of pressing down the edit parameter selection button 65 without operating each of the buttons 57a-57h.
  • the latest editing parameter is changed to the immediately preceding editing parameter (S3066). That is, every time the edit parameter selection button 65 is depressed, a plane image displayed on the LCD 51 and edited based on the immediately preceding edit parameter is edited. Thereafter, the processing in FIG. 29 ends.
  • FIG. 30 (a) shows the force and FIG. 30 (h) is a diagram for explaining the operation method of the operation button 57.
  • the state of the original P before editing is indicated by a two-dot chain line, and the state after editing is indicated by a solid line.
  • the user presses the rightward movement button 57e until the original P indicated by the two-dot chain line moves to the position indicated by the solid line.
  • the user presses the reduction button 57f until the original P indicated by the two-dot chain line is reduced to the size indicated by the solid line.
  • the user presses down button 57g until document P indicated by the two-dot chain line moves to the position indicated by the solid line.
  • the user presses the enlargement button 57h until the original P indicated by the two-dot chain line is enlarged to the size indicated by the solid line.
  • FIGS. 31 (a) to 31 (d) are diagrams for explaining a method of operating the operation button 57 when only a specific portion (graph portion) of the document P is edited into an enlarged image. .
  • FIG. 31 (a) it is assumed that the document P is displayed on the LCD 51 in a state where the document P is rotating rightward.
  • the user presses the left rotation button 57a while checking the document P displayed on the LCD 51.
  • the displayed document P is rotated to the left according to the number of times the left rotation button 57a is pressed.
  • the user stops the operation of the left rotation button 57a when judging that the document P has turned to the front as shown in FIG. 31 (b).
  • the planar image displayed on the LCD 51 can be edited by operating the operation button 57.
  • an image intended by the user can be obtained.
  • the imaging apparatus 1B of the present embodiment even if the document P is placed at a position where the central force of the image is shifted due to erroneous recognition in the in-plane displacement rotation recognition processing (S2805 in FIG. 26). , The user It can be corrected.
  • the user slides the mode switching switch 59 to the "corrected imaging mode", sets the size input unit 56 according to the size of the original P to be imaged, and images the original P.
  • the curved document P is imaged obliquely, it is possible to obtain an image in which the flat document P can be viewed from the front in the erect direction and only the portion where the document P is photographed is cut out.
  • the posture of the document P is obtained by analyzing only the positions of the first and second slit lights 71 and 72 in the image. Therefore, the posture of the document P with high detection accuracy can be easily obtained without performing complicated image analysis. Therefore, the time required for the image analysis processing by the processor 40 of the imaging device 1B can be reduced, or the processor 40 can be simplified.
  • the imaging device 100 according to the third embodiment has the same configuration as the imaging device 1B according to the second embodiment except for the features described below.
  • characteristic portions of the imaging device 100 according to the third embodiment with respect to the imaging device 1B of the second embodiment will be sequentially described.
  • the imaging device 1B of the second embodiment described above is configured to edit the planar image displayed on the LCD 51 in response to the operation of the operation button 57 in the editing process (S2107) in FIG. .
  • the imaging device 100 of the third embodiment has a built-in detection means for detecting the amount of movement of the main body case 10 in a three-dimensional space, instead of the operation button 57.
  • the planar image displayed on the LCD 51 is edited according to the movement amount detected by the detection means.
  • the same components as those of the imaging device 1B of the second embodiment are denoted by the same reference numerals, and description thereof will be omitted.
  • FIG. 32 is a diagram showing three-dimensional coordinates set in the imaging device 100 according to the third embodiment.
  • the origin O is set at the center position inside the main body case 10 and the lateral direction of the imaging device 100 is Three-dimensional coordinates are set, with the X axis (positive in the right direction), the Y axis in the height direction (positive in the upward direction), and the Z axis in the thickness direction (positive in the front direction).
  • FIG. 33 is a block diagram showing an electrical configuration of an imaging device 100 according to the third embodiment.
  • the imaging device 100 of the third embodiment has an origin sensor 61, an X-axis sensor 62, a Y-axis sensor 63, and a Z-axis sensor 64, instead of the operation buttons 57 provided in the imaging device 1B of the second embodiment. V These sensors are connected to the CPU 41 via signal lines.
  • Each of the sensors 61-64 is an acceleration sensor that outputs a signal representing the magnitude of acceleration by changing a duty ratio in one cycle of a waveform.
  • the origin sensor 61 is a three-axis sensor that is installed at the coordinate origin O and is capable of detecting accelerations in the X-axis direction, the Y-axis direction, and the Z-axis direction.
  • the X-axis sensor 62 is a sensor for one-axis direction that is installed on the X-axis and can detect acceleration only in the X-axis direction.
  • the Y-axis sensor 63 is a one-axis sensor installed on the Y-axis and capable of detecting acceleration only in the Y-axis direction.
  • the Z-axis sensor 64 is a single-axis sensor that is installed on the Z-axis and can detect acceleration only in the Z-axis direction.
  • the displacement amount and the rotation angle with respect to each coordinate of the main body case are represented by a signal representing the magnitude of the acceleration output from each of the sensors 61-64 and, although illustration and detailed description are omitted, the signal is output. It is calculated on the basis of the count value of the clock signal counted at the timing of the execution. That is, the displacement and the rotation angle are even calculated by integrating the acceleration.
  • FIGS. 34 (a) to 34 (f) show a case where a document P indicated by a two-dot chain line is edited like a document P indicated by a solid line.
  • the user When the user wants to edit as shown in FIG. 34 (a), the user operates as shown by the arrow (a) in FIG. 35 until the original P indicated by the two-dot chain line is rotated to the position indicated by the solid line. Then, the imaging device 100 is rotated clockwise around the Y axis. Conversely, when the image capturing apparatus 100 is rotated counterclockwise about the Y axis by a predetermined angle, the document P indicated by the two-dot chain line is rotated counterclockwise by a predetermined angle.
  • FIG. 36 is a flowchart showing an editing process corresponding to the editing process (S2107) in FIG.
  • this process first, it is determined whether or not there is an output from the origin sensor 61 (S2291). That is, in the second embodiment, the operation status of each button 57a-57h in S2106 of FIG. 24 is temporarily stored in the working area 438. In the third embodiment, the operation status of each button 57a-57h is Instead, the moving state of the main body case is temporarily stored in the parking area 438, and the moving state of the main body case is stored in the working area 438, and it is determined whether or not the moving state of the main body case is stored.
  • the displacement amount and magnification of the imaging device 100 are measured based on the output of the origin sensor force (S2292). That is, the output from the origin sensor 61
  • the applied force means that the imaging device 100 has moved in at least one direction in the XYZ axis directions instead of the rotational movement. In this case, since the origin sensor 61 can detect the acceleration in each of the XYZ axis directions, if there is an output from the origin sensor 61, the output from the other sensors 62-64 is reserved. .
  • planar image stored in the rectangular area clipping result image storage section 437 is moved by the measured displacement amount or set to the measured magnification, thereby generating an edited image. (S2293). After that, the process ends.
  • S2296 it is determined whether or not the output from the Y-axis sensor 63 has been received. When there is an output from the Y-axis sensor 63 (S2296: Yes), the displacement amount in the Y direction is measured based on the output from the Y-axis sensor 63 (S2297). Next, the process proceeds to S2298. If there is no output from the Y-axis sensor 63 (S2296: No), the process proceeds by S2298.
  • the imaging device 100 when the imaging device 100 is rotated as shown by the arrow (a) in FIG. 35, the outputs from the origin sensor 61 and the Y-axis sensor 63 are different.
  • the acceleration force in the Z-axis direction is detected by the 3 ⁇ 4-axis sensor 64.
  • the displacement in the X-axis direction is measured by the output of the X-axis sensor 62
  • the displacement in the Z-axis direction is measured by the output of the Z-axis sensor 64.
  • the rotation angle about the Y axis is measured based on the displacement amount in the X axis direction and the displacement amount in the Z axis direction.
  • the imaging device 100 is set to the X axis, Z The same processing is performed when the object is rotated around the axis, and the rotation angle about the X axis and the rotation angle about the Y axis are measured.
  • the imaging device 100 of the second embodiment by moving and rotating the imaging device 100, the image displayed on the LCD 51 can be edited according to the operation. Even a user who is unfamiliar with button operations can generate an edited image intuitively. Further, unlike the imaging device 1B of the second embodiment, there is no need to provide an operation button 57 on the outer surface of the main body case 10, so that there is no need to secure a space for disposing the operation button 57. Restrictions can be reduced.
  • the original posture calculation process (S2803) in the flowchart of FIG. 26 is regarded as a three-dimensional shape calculation unit.
  • the plane conversion processing (S2804) of the flowchart in FIG. 26 is regarded as plane conversion means.
  • the editing process (S2107) in FIG. 24 is positioned as a first change unit.
  • the process of S1065 in FIG. 29 is positioned as the selection means.
  • the processing in S2805 in FIG. 26 is regarded as an in-plane position detection means.
  • the process of S2806 in FIG. 26 is regarded as a second changing unit.
  • the processing of S2805 in FIG. 26 is also positioned as in-plane angle detection means.
  • the editing process (S2107 in FIG. 24), as the image to be edited, an image in which only the portion of the document P is cut out by the rectangular region cutting process (S2806 in FIG. 26) is edited.
  • the image edited by the editing processing may be an image plane-converted by the plane conversion processing (S2804 in FIG. 26).
  • the in-plane displacement rotation recognition processing (S2805 in FIG. 26) and the rectangular area cutting processing (S2806 in FIG. 26) can be omitted, and the processing load for performing such processing can be reduced.
  • the operation button 57 is used to input the rotation direction of the document P, and the two buttons are the left rotation button 57a and the right rotation button 57c.
  • the case where the button is provided has been described.
  • the buttons for inputting the rotation direction of the document P while applying force are not limited to the two powerful buttons.
  • a button that rotates around the Y axis and a button that rotates around the X axis are provided. Is also good. In the case where the image is dark, the number of editable patterns increases, and an edited image intended by the user can be generated.
  • the original P is moved in the same direction as the moved or rotated direction. It was configured to move and rotate.
  • the imaging device may be configured to move and rotate the document P in a direction opposite to the moving direction and the rotating direction of the main body case 10 while applying force.
  • the slit light projecting unit 20 is configured to emit two rows of slit light, the first slit light 71 and the second slit light 72.
  • the slit light to be emitted is not limited to the two rows of the slit light emitted by the imaging device, and the imaging device may be configured so that three or more rows are emitted.
  • the third slit light similar to the second slit light 72
  • the slit light projecting unit 20 may be configured to project the slit light above the second slit light 72 on the document P.
  • the position of each point on the locus of the slit light It is also possible to estimate the vertical curved shape, whereby the image without slits can be corrected and an image that is easier to see can be obtained.
  • a laser diode 21 that emits a red laser beam is used as a light source.
  • a light source various types of light sources that output a light beam, including a surface emitting laser, an LED, and an EL element, can be used.
  • a transparent flat plate formed on one surface with a diffraction grating for diffracting a predetermined ratio of the power of the incident laser beam in a predetermined direction may be used.
  • the first-order laser beam diffracted by the diffraction grating can be used as the second slit light 72, and the zero-order laser beam transmitted as it is can be used as the first slit light 71.
  • the pattern light emitted from the slit light projecting unit 20 can be of various types, such as a striped light pattern with a certain width, in addition to a fine line sharply narrowed in a direction perpendicular to the longitudinal direction. It can be light.
  • the positional relationship between the first slit light 71 and the second slit light 72 may be reversed in the first direction, that is, the second slit light 72 is formed on the lower side when viewed from the imaging device 1B.
  • Each optical element in the slit light projecting unit may be provided so that the first slit is formed in the direction of the arrow.
  • the imaging device is configured to capture an image with slit light and an image without slit light using the imaging lens 31 and the CCD image sensor 32.
  • an imaging lens for capturing an image with slit light and a CCD image sensor may be separately added to the imaging device.
  • the input means is constituted by an operation element capable of inputting at least one of the moving amount and the magnification of the plane image displayed on the display means as a display mode change parameter. Good.
  • the input unit displays at least one of the moving amount and the magnification of the planar image. Since it is composed of operators that can be input as the mode change parameters, the user can easily input the display mode change parameters by operating the operators as the operation of inputting the display mode parameters. be able to.
  • the input means may be constituted by a detecting means for detecting the amount of movement of the imaging device body in the three-dimensional space as a display mode change parameter.
  • the first changing unit associates the moving amount of the imaging device main body in the three-dimensional space detected by the detecting unit with at least one of the moving amount of the planar image displayed on the display unit and the magnification, Change the display mode of the plane image.
  • the input unit is configured by the detection unit that detects the amount of movement of the imaging device body in the three-dimensional space as the display mode change parameter, the user can set the display mode parameter.
  • the imaging device main body may be moved in a three-dimensional space. Therefore, the input of the display mode change parameter can be performed by a simple operation.
  • the input means is composed of an operation element
  • a space for providing the operation element on the outer surface of the imaging apparatus main body must be secured, which is a design restriction factor.
  • the plane conversion means may be configured to convert the plane image into an image having a lower resolution than the captured image.
  • the plane conversion unit converts the plane image into a lower resolution image than the captured image, the number of pixels of the plane image is reduced, and the conversion by the plane conversion unit and the use of the plane image are used. The amount of calculation in the processing can be reduced.
  • the imaging means may further include a storage means for storing the image changed by the first changing means.
  • the image stored in the storage means is stored at a higher resolution than the plane image.
  • the imaging device includes a display mode change parameter storage unit that stores a display mode change parameter used to change the display mode of the planar image displayed on the display unit.
  • the first changing unit changes the display mode of another planar image displayed on the display unit based on the display mode changing parameter selected by the selecting unit.
  • the display mode of the plane image displayed on the display unit is to be changed in the same manner as the previously changed plane image
  • the user is stored in the display mode storage unit.
  • the display mode parameter used to change the previously changed plane image is changed based on the selected display mode parameter. Can be changed.
  • the imaging apparatus before displaying the planar image on the display means, identifies a target object area where the target object is captured from the planar image, and sets the target in the planar image. Based on the in-plane position detecting means for obtaining the position of the object, the position obtained by the in-plane position detecting means, and the shape information, the plane image is arranged at the approximate center position of the target object viewed from a predetermined direction. And a second changing means for changing the image to the changed image. In this case, the plane image displayed on the display means is an image changed by the second changing means.
  • the planar image displayed on the display means is an image in which the target object viewed from a predetermined direction is arranged at a substantially central position of the planar image. It is possible to omit the process of editing so as to be arranged substantially at the center. In general, many users intend that the target object is located substantially at the center of the planar image, and by automatically generating the image intended by such many users, The versatility of the device can be improved. [0240] In one embodiment of the present invention, before displaying the plane image on the display means, the imaging unit identifies a target object region where the target object is captured from the plane image, and determines a predetermined object area within the plane image plane.
  • the second changing unit is configured to set the plane image based on the angle obtained by the in-plane angle detecting unit, the position obtained by the in-plane position detecting unit, and the shape information so that the target object viewed from the predetermined direction is substantially at the center position. And an image in which a predetermined side of the target object is oriented in a predetermined direction in the planar image.
  • the planar image displayed on the display means is such that the target object viewed from a predetermined direction is arranged at a substantially central position, and furthermore, a predetermined side of the target object is positioned at a predetermined position in the planar image.
  • the image is oriented in the direction of. Therefore, the above-mentioned effect that the versatility of the device can be improved can be further enhanced.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Input (AREA)

Abstract

 画像処理装置であって、所定形状の対象物体が写った対象物体画像、及び、該対象物体の3次元形状に関する形状情報が外部から入力され、該形状情報に基づき前記対象物体画像を前記対象物体が所定の方向から見られた平面画像に変換する平面変換手段と、前記平面画像における前記対象物体が写った領域である対象物体領域を識別して、前記平面画像における対象物体の位置を求める面内位置検出手段とを備える。

Description

明 細 書
画像処理装置、及び、撮像装置
技術分野
[0001] 本発明は、入力された画像を、この画像に写った対象物体に対する視点を変えた 画像に変換する画像処理装置及びこの画像処理装置を用 Vヽた撮像装置に関する。 背景技術
[0002] 原稿に書かれた内容を、スキャナなどを用いることなく簡易に記録したい時に、デジ タルカメラなど可搬型の撮像装置で原稿を撮像して記録する場合がある。このような 目的で原稿を撮像する場合には、書かれた文字がつぶれて写ることがないように、原 稿の正面力も撮像するのが理想的である。しかし、撮影者が、例えば会議中のため 起立することができず、机上の原稿を斜め方向から撮像する場合がある。
[0003] 特開 2002— 334327 (以下、文献 1と記す)には、原稿などの対象物体が斜め方向 力ゝら撮像されたために、文字がつぶれたり、斜めになつたりして読みにくくなつた画像 が入力され、この画像に写った対象物体に対する視点を、文字が読みやすくなるよう な視点とした画像に変換する画像処理装置が記載されている。
[0004] 文献 1に記載された画像処理装置は、原稿が撮像された画像を解析して、文字の 並びや、原稿の縁などのライン束を識別し、このライン束から画像全体の中での原稿 画像の回転量などを判別する。さらにこの画像処理装置において、原稿は、出力さ れる画像において原稿に書かれた文字列が真横に並ぶようになる方向(このような方 向を正立方向と呼ぶ。)に回転され、正面から見られたような画像に変換される。 発明の開示
[0005] ところで、上記のような従来の画像処理装置においては、撮像された原稿を正立方 向に回転し正面力も見られたような画像に変換するための画像解析として、次のよう な複雑な処理を行う。
(1)撮像された画像中のラインを識別する。
(2)識別されたラインから、原稿中の水平な文字列と考えられる水平ライン束を判別 する。 (3)撮像された画像を、水平ライン束全てが画像の水平方向に平行になるように回転 変換する。
(4)回転変換された画像中の文字列の左端点などによる垂直ライン束を判別する。
(5)垂直ライン束の傾きとカメラの焦点距離とから回転変換された画像を垂直変換す る。
[0006] このように、従来の画像処理装置では、撮像された画像に対して、文字列などによ る支配的なライン束の方向を識別して、画像を変換する必要がある。この場合、ライン 束識別のための画像解析などの処理が多量となるため、画像処理に長時間かかり、 画像処理装置として高い処理能力が要求される。
[0007] また、従来の画像処理装置では、原稿に書かれた内容が不鮮明で文字列を識別し にくい画像や、背景と原稿とのコントラストが低く原稿の外縁がはっきりしない画像な どに対しては、画像中のライン束の識別精度が低ぐ画像変換した向きの精度も低く なる。
[0008] 本発明は、こうした問題点に鑑みなされたものであり、入力される画像を、画像に写 つた対象物体に対する視点を変えた画像に変換することをいつそう高い精度で実行 することのできる画像処理装置および撮像装置を提供することを目的とする。
[0009] 上記目的を達成する為、本発明の一つの側面によって提供されるのは、画像処理 装置であって、所定形状の対象物体が写った対象物体画像、及び、該対象物体の 3 次元形状に関する形状情報が入力され、該形状情報に基づき前記対象物体画像を 前記対象物体が所定の方向から見られた平面画像に変換する平面変換手段と、前 記平面画像における前記対象物体が写った領域である対象物体領域を識別して、 前記平面画像における対象物体の位置を求める面内位置検出手段とを備える。
[0010] このような構成によれば、対象物体の 3次元形状を用いることによって得られる平面 画像に基づいて対象物体の面内位置が求められるので、例えば従来の画像処理装 置のように画像力 ライン束を検出することによって原稿の回転量を検出するような場 合に比較すれば、対象物体の面内位置をいつそう正確に求めることができる。その結 果、例えば、面内位置検出手段によって求められた対象物体の面内位置に基づい て対象物体の画像を補正する場合、画像の補正を正確に行うことができることになる [0011] 上記目的を達成する為、本発明の別の側面によって提供されるのは、画像処理装 置であって、所定形状の対象物体が写った対象物体画像、及び、該対象物体の 3次 元形状に関する形状情報が入力され、該形状情報に基づき、該対象物体画像を、 該対象物体が所定の方向から見られた平面画像に変換する平面変換手段と、前記 平面画像における前記対象物体が写った領域である対象物体領域を識別して、該 対象物体領域の所定の辺と、前記平面画像面内の所定の方向との間の角度を求め る面内角度検出手段とを備える。
[0012] このような構成によれば、対象物体の 3次元形状用いることによって得られる平面画 像に基づいて対象物体の面内角度が求められるので、例えば従来の画像処理装置 のように画像力 ライン束を検出することによって原稿の回転量を検出するような場合 に比較すれば、対象物体の面内角度をいつそう正確に求めることができる。その結果 、例えば、面内角度検出手段によって求められた対象物体の面内角度に基づいて 対象物体の画像を補正する場合、画像の補正を正確に行うことができることになる。
[0013] 上記目的を達成する為、本発明の別の側面によって提供されるのは、撮像装置で あって、パターン光を投光する投光手段と、対象物体を撮像し前記対象物体の撮像 画像を取得する撮像手段と、前記パターン光が投光された前記対象物体を前記撮 像手段によって撮像することによって得られる画像に基づき、前記対象物体の 3次元 形状に関する形状情報を算出する 3次元形状算出手段と、前記 3次元形状算出手 段で算出される形状情報に基づき、前記撮像画像を前記対象物体が所定の方向か ら見られた平面画像に変換する平面変換手段とを備える。さらに、撮像装置は、前記 平面変換手段によって変換される平面画像を表示する表示手段と、前記表示手段 に表示されている平面画像の表示態様を変更するための表示態様変更パラメータを 入力する入力手段と、前記入力手段によって入力される表示態様変更パラメータに 基づき、前記表示手段に表示されている平面画像の表示態様を変更する第 1変更 手段とを備える。
[0014] この構成によれば、表示手段に表示されている平面画像の表示態様は表示態様 変更パラメータに基づき変更され、その表示態様変更パラメータは、使用者によって 入力手段力も入力されるので、平面画像の表示態様を使用者の意図に応じて編集 することができる。また、何らかの原因によって撮像画像が予定されていた平面画像 に変換されな力つた場合であっても、その平面画像を使用者の意図によって補正す ることがでさる。
図面の簡単な説明
[図 1]図 1 (a)は、第 1実施形態による撮像装置全体の斜視図であり、図 1 (b)は、撮 像装置の概略断面図である。
[図 2]図 1の撮像装置の全体構成を表すブロック図である。
[図 3]図 1の撮像装置の概略の断面図であり、スリット光投光ユニットの構成を表して いる。
[図 4]スリット光有画像を説明するための図である。
[図 5]撮像装置におけるレリーズボタンが押下されて力 の動作を表すフローチャート である。
[図 6]図 6 (a)は差分画像格納部に格納されるデータを示し、図 6 (b)は三角測量演 算結果格納部に格納されるデータを示して 、る。
[図 7]図 7 (a)、図 7 (b)および図 7 (c)は、撮像装置によって画像処理される画像デー タを説明する為の図である。
[図 8]図 8 (a)および図 8 (b)は、 3次元空間位置算出方法を説明するための図である
[図 9]図 9 (a)、図 9 (b)および図 9 (c)は、原稿姿勢演算処理の際の座標系を説明す るための図である。
[図 10]図 10は、平面変換処理の処理手順を表すフローチャートである。
[図 11]図 11 (a)は湾曲計算を表すフローチャートであり、図 11 (b)は傾き距離計算の 処理手順を表すフローチャートである。
[図 12]図 12 (a)は Zシフトの処理手順を表すフローチャートであり、図 12 (b)は逆三 角測量の処理手順を表すフローチャートである。
[図 13]図 13は面内変位回転認識処理の処理手順を表すフローチャートである。
[図 14]図 14は単純輝度画像のヒストグラムを表す図である。 [図 15]図 15は上下左右変位演算の処理手順を表すフローチャートである。
[図 16]図 16は回転角度演算の処理手順を表すフローチャートである。
[図 17]図 17は、原稿が写った画像に関する 2次微分画像のヒストグラムを表す図であ る。
[図 18]図 18は矩形領域切り取り処理の処理手順を表すフローチャートである。
[図 19]図 19 (a)は第 2実施形態による撮像装置の斜視図であり、図 19 (b)は第 2実 施形態による撮像装置の背面図であり、図 19 (c)は第 2実施形態による撮像装置の 操作ボタンの拡大図である。
[図 20]第 2実施形態の撮像装置の概略断面図である。
[図 21]第 2実施形態の撮像装置のスリット光投光ユニットの構成を示す断面図である
[図 22]図 22 (a)および図 22 (b)はスリット光の角度幅を説明するための図である。
[図 23]図 23は第 2実施形態の撮像装置の電気的構成を示したブロック図である。
[図 24]第 2実施形態の撮像装置におけるリレーズボタンを押下してからの処理を示す フローチャートである。
[図 25]図 25 (a)および図 25 (b)はスリット光有画像を示す図である。
[図 26]図 26は、第 2実施形態の撮像装置における 3次元測定と平面変換処理を示す フローチャートである。
[図 27]図 27 (a)は差分画像格納部に格納されるデータを示す図であり、図 27 (b)は 三角測量演算結果格納部に格納されるデータを示す図である。
[図 28]図 28 (a)、図 28 (b)および図 28 (c)は、第 2実施形態の撮像装置によって画 像処理される画像データを説明する為の図である。
[図 29]図 29は、第 2実施形態の撮像装置における編集処理を示すフローチャートで める。
[図 30]図 30 (a)から図 30 (h)は、操作ボタンの操作方法を説明するための図である。
[図 31]図 31 (a)から図 31 (d)は、操作ボタンの操作方法を説明するための図であり、 操作ボタンの操作によって編集される画像の状態を示している。
[図 32]図 32は第 3実施形態の撮像装置に設定さている 3次元座標を示す図である。 [図 33]図 33は第 3実施形態の撮像装置における電気的構成を示したブロック図であ る。
[図 34]図 34 (a)から図 34 (f)は LCDに表示されて 、る画像の編集パターンを示す図 である。
[図 35]図 35は画像の編集を行う為に第 3実施形態の撮像装置をどのように移動、回 転させるかを説明する為の図である。
[図 36]図 36は第 3実施形態の撮像装置における編集処理を示すフローチャートであ る。
符号の説明
10 本体ケース
20 スリット光投光ユニット
21 レーザーダイオード
22 コリメートレンズ
23 アパーチャ
24 透明平板
25 シリンドリカノレレンズ
26 反射ミラー
27 ロッドレンズ
29 窓
31 結像レンズ
32 CCD画像センサ
40 プロセッサ
52 レリーズボタン
53 ファインダ
55 カードメモリ
56 サイズ入力部
59 モード切替スィッチ 70 レーザー光
71 第 1スリット光
72 第 2スリット光
421 カメラ制御プログラム
422 差分抽出プログラム
423 三角測量演算プログラム
424 原稿姿勢演算プログラム
425 平面変換プログラム
426 面内変位回転認識プログラム
427 矩形領域切り取りプログラム
431 スリット光有画像格納部
432 スリット光無画像格納部
433 差分画像格納部
434 三角測量演算結果格納部
435 平面変換結果画像格納部
436 面内変位回転認識結果格納部
437 矩形領域切り取り結果画像格納部
438 ワーキングエリア
発明を実施するための最良の形態
[0017] 以下に本発明の実施形態を図面と共に説明する。
[0018] 第 1実施形態
図 1 (a)は、第 1実施形態による撮像装置 1全体の斜視図である。図 1 (b)は、撮像 装置 1の概略断面図である。図 2は、撮像装置 1の制御系の構成を表すブロック図で める。
[0019] 図 1に示す様に、撮像装置 1は、方形箱形の本体ケース 10と、本体ケース 10の正 面に設けられた結像レンズ 31と、結像レンズ 31の後方 (撮像装置 1の内部側)に設け られた CCD画像センサ 32と、結像レンズ 31の下方に設けられたスリット光投光ュ- ット 20とを有する。撮像装置 1は、更に、本体ケース 10に内蔵されたプロセッサ 40と、 本体ケース 10の上部に設けられたレリーズボタン 52と、モード切替スィッチ 59と、本 体ケース 10に内蔵されるカードメモリ 55と、本体ケース 10の背面に設けられたサイズ 入力部 56とを有する。撮像装置 1におけるこれらの構成品は、それぞれ信号線により 接続される(図 2参照)。
[0020] 撮像装置 1には、更に、本体ケース 10の背面に設けられた LCD (Liquid Crystal Display) 51と、本体ケース 10の背面から前面を通して配設されるファインダ 53が装 備されている。 LCD51およびファインダ 53は、撮像装置 1による撮像範囲を使用者 が決定する際に用いられる。
[0021] LCD51は、画像を表示する液晶ディスプレイなどであり、プロセッサ 40からの画像 信号を受けて画像を表示する。プロセッサ 40から LCD51に対しては、状況に応じて CCD画像センサ 32により撮像されるリアルタイムの画像や、カードメモリ 55に記憶さ れた画像や、装置の設定内容の文字等を表示するための画像信号が送られて来る
[0022] 撮像装置 1において、使用者によりレリーズボタン 52が押されると、外部光が結像レ ンズ 31を通して入射して CCD画像センサ 32上に結像した画像力 画像データとして 取り込みカードメモリ 55に書き込まれる。このような、いわゆるデジタルカメラとして機 能するモードを、「ノーマルモード」とする。撮像装置 1には、ノーマルモードでの撮像 機能に加え、「補正撮像モード」の機能を有する。「補正撮像モード」では、被写体と しての原稿 Pが斜め方向から撮像された場合に、画像を正面力 撮像したように補正 した画像データを作りカードメモリ 55に記憶する動作モードである。
[0023] 図 3は、撮像装置 1におけるスリット光投光ユニット 20の構成を詳細に表している。
スリット光投光ユニット 20は、レーザーダイオード 21と、コリメートレンズ 22と、ァパー チヤ 23と、透明平板 24と、シリンドリカルレンズ 25と、反射ミラー 26と、ロッドレンズ 27 とを有する。
[0024] レーザーダイオード 21は、赤色レーザー光線を放射する。プロセッサ 40からの指 令に応じて、レーザーダイオード 21におけるレーザー光線の放射及び停止が切り換 えられる。コリメートレンズ 22は、レーザーダイオード 21からのレーザー光線を、スリツ ト光投光ユニット 20からの基準距離 VPに焦点が結ばれるよう集光する。 [0025] アパーチャ 23は、矩形に開口された開口部を有する板で構成される。コリメートレン ズ 22からアパーチャ 23に入射したレーザー光線は、開口部を透過することによって 矩形に整形され、レーザー光 70としてアパーチャ 23から出射する。透明平板 24は、 無垢のガラス材料などの透明な平板で構成され、裏面に ARコート (無反射コーティ ング)が施されている。透明平板 24は、レーザー光 70の光軸に直交する面に対して 、本体ケース 10の正面側に所定角度 |8 (例えば 33度)傾斜して配設される。透明平 板 24は、レーザー光 70の所定割合 (例えば 5%)を表面で反射して、残りを透過させ る。透明平板 24によってレーザー光 70が反射される方向を第 2の方向と呼ぶ。
[0026] 反射ミラー 26は、鏡など、レーザー光線を全反射する部材で構成される。反射ミラ 一 26は、透明平板 24を透過したレーザー光 70の下流に、本体ケース 10の正面側 に 45度傾斜して配設され、透明平板 24を透過したレーザー光 70を全反射して光路 の向きを 90度変える。反射ミラー 26によりレーザー光 70が反射される方向を第 1の 方向と呼ぶ。
[0027] ロッドレンズ 27は、正の焦点距離が短い円筒形状のレンズで構成される。ロッドレン ズ 27は、反射ミラー 26で反射されるレーザー光 70の下流に、円筒形状の軸方向が 正立方向になるように配設されている。ロッドレンズ 27の焦点距離は短い為、ロッドレ ンズ 27を透過したレーザー光はロッドレンズ 27近傍の焦点位置を越えて直ちに広が り、所定の広がり角度のスリット光として第 1の方向に進む。ロッドレンズ 27から出射さ れるスリット光を以下では第 1スリット光 71と呼ぶ。
[0028] シリンドリカルレンズ 25は、負の焦点距離となるように一方向が凹形状となったレン ズである。シリンドリカルレンズ 25は、透明平板 24で反射されたレーザー光 70の下 流に、第 2の方向に対してレンズ面が直交するように配設さている。シリンドリカルレン ズ 25は、透明平板 24で反射されたレーザー光 70を、所定の広がり角度で、第 2の方 向に進むスリット光として出射する。シリンドリカルレンズ 25から出射されるスリット光を 第 2スリット光 72と呼ぶ。
[0029] 以上の構成により、スリット光投光ユニット 20において、プロセッサ 40からの指令に 応じてレーザーダイオード 21からレーザー光線が放射され、第 1の方向へ第 1スリット 光 71が、及び第 2の方向へ第 2スリット光 72が本体ケース 10の結像レンズ 31の下方 に設けられた窓 29から出射される。
[0030] 図 4は、第 1,第 2スリット光 71, 72がシート状の部材である原稿 Pに投光された状 態を示している。第 1,第 2スリット光 71, 72により原稿 P上には第 1スリット光の軌跡 7 la及び第 2スリット光の軌跡 72aが形成される。第 1スリット光の軌跡 71a及び第 2スリ ット光の軌跡 72aは、図 4に示すように、原稿 Pの位置及び姿勢によって、その長さや 、傾きや、間隔が変わる。
[0031] 結像レンズ 31は、複数枚のレンズで構成される。結像レンズ 31により自動で焦点 距離が調整され外部力もの光が CCD画像センサ 32上に結像される。 CCD画像セン サ 32は、 CCD (Charge Coupled Device)素子などの光電変換素子がマトリクス 状に配列されて構成される。 CCD画像センサ 32は、表面に結像される画像の光の 色及び強さに応じた信号を、デジタルデータに変換してプロセッサ 40へ出力する。 光電変換素子一つ分のデータが画像を形成する画素の画素データであり、画像デ ータは光電変換素子の数の画素データで構成される。
[0032] CCD画像センサ 32は、幅方向の総画素数が 1200画素、高さ方向の総画素数が 1 600画素の画像データを生成する。画像データの座標である幅方向位置 ccdx及び 高さ方向位置 ccdyは、画素の個数であらわされ、画像の一番左上の画素を基点とし て、 1個目力「0」位置である。つまり、幅方向位置 ccdxの範囲は「0」一「1199」で、 高さ方向位置 ccdyの範囲は「0」一「1599」となる。
[0033] CCDの画素間隔は、原稿における 100dpi (ドットパーインチ)の解像度に相当する 。画素データは、 1画素あたり、赤 (R)、緑 (G)、青 (B)の 3色、各 256階調の輝度で 表される画素情報をもって 、る。
[0034] レリーズボタン 52は、押しボタン式のスィッチで構成され、プロセッサ 40に接続され ている。プロセッサ 40にて使用者によるレリーズボタン 52の押し下げ操作が検知され る。
[0035] カードメモリ 55は、不揮発性で書き換え可能なメモリで構成され、本体ケース 10に 着脱可能である。モード切替スィッチ 59は、 2つの位置に切換え可能なスライドスイツ チなどで構成され、プロセッサ 40に接続されている。プロセッサ 40にてモード切替ス イッチ 59のスィッチがいずれの位置にあるかが検知される。モード切替スィッチ 59は 、スィッチの一方の位置が「ノーマルモード」として、スィッチのもう一方の位置が「補 正撮像モード」としてプロセッサ 40に検知される。
[0036] プロセッサ 40は、 CPU (Central Processing Unit) 41、 ROM(Read Only Memory)4 2、 RAM(Random Access Memory)43で構成される。 CPU41は、 ROM42に記憶さ れたプログラムに基づき、 RAM43を利用しつつ様々な処理を実行する。 CPU41に よって実行される処理には、レリーズボタン 52の押し下げ操作の検知、モード切替ス イッチ 59の状態検出、 CCD画像センサ 32から画像データの取り込み、画像データ のカードメモリ 55への書き込み、スリット光投光ユニット 20によるスリット光の出射切り 換え等が含まれる。
[0037] ROM42には、カメラ制御プログラム 421と、差分抽出プログラム 422と、三角測量 演算プログラム 423と、原稿姿勢演算プログラム 424と、平面変換プログラム 425と、 面内変位回転認識プログラム 426と、矩形領域切り取りプログラム 427とが記憶され ている。カメラ制御プログラム 421は、図 5に示すフローチャートの処理 (詳細は後述 する。)を含む撮像装置 1全体の制御に関するプログラムである。差分抽出プログラム 422は、スリット光を投光した原稿 Pの画像から、スリット光の軌跡を抽出した画像デ ータを生成するためのプログラムである。三角測量演算プログラム 423は、スリット光 の軌跡の各画素に対する 3次元空間位置を演算するためのプログラムである。原稿 姿勢演算プログラム 424は、原稿 Pの位置及び 3次元形状を推定して求めるプロダラ ムである。平面変換プログラム 425は、スリット光無画像格納部 432に格納された画 像データを、原稿 Pの正面力も撮像したような画像データに変換するためのプロダラ ムである。面内変位回転認識プログラム 426は、画像データ中の原稿 Pの変位及び 回転角を検出するためのプログラムである。矩形領域切り取りプログラム 427は、画 像データ中の原稿 Pが写った領域の画像データを変換するためのプログラムである。
[0038] RAM43には、記憶領域として、 CCD画像センサ 32からの画像データの形式のデ ータを保存する大きさのスリット光有画像格納部 431、スリット光無画像格納部 432、 及び、差分画像格納部 433が割り当てられている。 RAM43には、さらに、スリット光 画像の各ポイントの位置を演算した結果を保存する大きさの三角測量演算結果格納 部 434と、画像データを変換した結果を保存する大きさの平面変換結果画像格納部 435と、後述する面内変位回転認識処理の結果を保存するための面内変位回転認 識結果格納部 436とが割り当てられている。さらに、 RAM43には、後述する矩形領 域切り取り処理の結果を保存するための矩形領域切り取り結果画像格納部 437と、 C PU41での演算のために一時的にデータを記憶させるのに使用する大きさのヮーキ ングエリア 438とが割り当てられて!/、る。
[0039] ファインダ 53は、光学レンズで構成される。使用者が撮像装置 1の後ろ側からフアイ ンダ 53をのぞき込んだ時に、使用者は、結像レンズ 31によって CCD画像センサ 32 上に結像される範囲とほぼ一致する範囲を見ることができる。
[0040] サイズ入力部 56は、複数の位置に切り替わるスライドスィッチなどで構成され、プロ セッサ 40に接続されている。使用者により操作されたサイズ入力部 56のスィッチの位 置に応じて、撮像する原稿 Pの大きさがプロセッサ 40にて判別される。例えば、プロ セッサ 40は、サイズ入力部 56のスィッチの位置が使用者により操作されて、一番左 端の時「指定無し」、その隣の時「A4サイズ」、一番右端の時「A3サイズ」として判別 する。
[0041] 次に、対象物体を原稿 Pとして、使用者によりレリーズボタン 52が押されてからの撮 像装置 1の動作を、撮像装置 1のプロセッサ 40の処理手順を表す図 5のフローチヤ ートを用いて説明する。
[0042] はじめに、 S 110において、モード切替スィッチ 59の位置が「補正撮像モード」の位 置であるか否かが判別される。判別の結果、「補正撮像モード」の位置の場合は(S1 10: YES)、処理は S 111へ移行する。「補正撮像モード」ではなく「ノーマルモード」 の位置の場合は(S 110: NO)、処理は S 120へ移行する。
[0043] Sl l 1では、スリット光有画像とスリット光無画像を取得するカメラ制御処理が行われ る。詳細には、スリット光投光ユニット 20に対してレーザーダイオード 21の発光が指 令され、第 1スリット光 71及び第 2スリット光 72が出射されてから、スリット光有画像とし て CCD画像センサ 32から図 4に示すような第 1、第 2スリット光 71, 72が投光された 原稿 Pが写った画像データを取得がされる。それから、この画像データが RAM43の スリット光有画像格納部 431へ記憶される。
[0044] 続いて、スリット光投光ユニット 20に対してレーザーダイオード 21の発光停止が指 令され、第 1スリット光 71及び第 2スリット光 72が出射されなくなつてから、スリット光無 画像として CCD画像センサ 32から画像データを取得される。この画像データがスリツ ト光無画像格納部 432へ記憶される。
[0045] 次に、 S 112では、差分抽出処理が実行される。すなわち、差分抽出プログラム 42 2により、スリット光有画像格納部 431の画像データに対する、スリット光無画像格納 部 432の画像データの差分 (即ち、原稿 Pに投光された第 1スリット光の軌跡 71a及 び第 2スリット光の軌跡 72a)を求めた画像データが生成され、差分画像格納部 433 へ記憶される。
[0046] 第 1スリット光の軌跡 71aの画像に関する位置情報として、差分画像格納部 433に 記憶した画像データの下半分(高さ方向位置 ccdyが「800」一「1599」の間)にお ヽ て、幅方向位置 ccdxが「0」一「1199」の間の 20画素毎に、高さ方向の画素 1列分で の輝度レベルが最大の位置が求められる。その位置を求めた順番に番号が割り当て られた索引 idxと、その位置を求めた際の幅方向位置 ccdxと、輝度レベルが最大の 高さ方向位置 ccdyとは、図 6 (a)に示すようにスリット光画像位置データ 433aとして 差分画像格納部 433に記憶される。尚、輝度レベルの最大の位置は、高さ方向の各 画素の輝度レベルを結んだ近似曲線の最大値の位置である。また、この最大の位置 の輝度レベルが所定のレベル以上で無 ヽ場合は、第 1スリット光の軌跡 71aが無 、と 判断され、スリット光画像位置データ 433aとして記憶されない。第 1スリット光の軌跡 7 laの位置情報として抽出された画素の総数である抽出画素数 Nに、索引 idxの最大 値が設定される。
[0047] 続いて、第 2スリット光の軌跡 72aの画像に関する位置情報として、画像データの上 半分(高さ方向位置 ccdyが「0」一「799」)の、幅方向位置 ccdxの中央位置(ccdx = 599)にて、高さ方向の輝度レベルが最大になる位置が求められ、第 2スリット光の軌 跡 72aの位置情報として、スリット光画像位置データ 433aと同様の形式で差分画像 格納部 433に記憶される。また、第 1スリット光の軌跡 71aの位置情報と同様、最大の 位置の輝度レベルが所定のレベル以上で無 、場合は、第 2スリット光の軌跡 72aが 無 ヽと判断され差分画像格納部 433へは記憶されな ヽ。
[0048] 次に、 S 113では、三角測量演算処理が実行される。すなわち、差分画像格納部 4 33に記憶されたスリット光画像位置データ 433aにより定まる各点に対して、三角測 量演算プログラム 423により、索引 idx毎の 3次元空間位置を求められる(詳細は後 述する)。それから、図 6 (b)に示すように、索引 idx毎の 3次元座標値である X値, Y 値, Z値のデータは、スリット光 3次元位置データ 434aとして三角測量演算結果格納 部 434へ記憶される。
[0049] 次に、 S 114では、原稿姿勢演算処理が実行される。すなわち、スリット光 3次元位 置データ 434aを用いて、原稿姿勢演算プログラム 424により、原稿 Pの 3次元空間位 置 (0, 0, L)、傾き Θ及び湾曲 φが求められる(詳細は後述する)。
[0050] 次に、 S 115では、平面変換処理が実行される。すなわち、平面変換プログラム 42 5により図 10のフローチャートに示す処理 (詳細は、後述する)が実行され、スリット光 無画像格納部 432に記憶された画像が、原稿 Pを略直交方向から観察した状態の平 面画像 (例えば、図 7 (a)のように、原稿 Pが矩形形状になる画像)に変換され、平面 変換結果画像格納部 435に記憶される。
[0051] 次に、 S 116では、面内変位回転認識処理が実行される。すなわち、平面変換結 果画像格納部 435に記憶された平面画像に対して、面内変位回転認識プログラム 4 26により図 13のフローチャートに示す処理 (詳細は、後述する。)が行われる。それ によって、図 7 (b)に示すように平面画像内に写った原稿 Pの画像領域が識別され、 平面画像の中央位置に対する原稿 Pの画像領域の中央位置の幅方向変位 DH、及 び、高さ方向変位 DVと、平面画像における原稿 Pの画像領域の所定の辺の回転角 度 DROTとが求められ、面内変位回転認識結果格納部 436に記憶される。
[0052] 次に、 S117では、矩形領域切り取り処理が実行される。すなわち、矩形領域切り取 りプログラム 427により図 18のフローチャートに示す処理 (詳細は、後述する。)が行 われる。スリット光無画像格納部 432に記憶されたスリット光無画像は、図 7 (c)に示 すように原稿 Pが略直交方向から観察された原稿 Pの画像領域が正立した状態で、こ の原稿 Pの画像領域だけが切り取られた画像に変換される。切り取られた画像は、矩 形領域切り取り結果画像格納部 437に記憶される。ステップ S117の後、本処理は終 了する。
[0053] 一方、 S 120では、「ノーマルモード」での画像データの取得が行われる。すなわち 、スリット光投光ユニット 20のレーザーダイオード 21への発光指令が停止され、第 1ス リット光 71及び第 2スリット光 72が出射されていない状態で、 CCD画像センサ 32から 画像データが取得される。それから、この画像データはカードメモリ 55に記憶される。 その後、本処理を終了する。
[0054] S112での差分抽出プログラム 422による処理は具体的には次のような処理である 。スリット光有画像格納部 431の画像データの画素の RGB値から、スリット光無画像 格納部 432の画像データの対応の画素の RGB値を差し引くことを、画素毎に行う。こ れにより、第 1,第 2スリット光の軌跡 71a, 72aのみが抽出された多値画像が得られる
[0055] S 113での三角測量演算プログラム 423による処理にっ 、て具体的には次のような 処理である。例えば、スリット光画像位置データ 433aにより定まる各点に対する 3次 元空間位置を次のようにして求める。
[0056] はじめに、図 4に示すように幅方向に湾曲した原稿 Pを撮像する際の座標系を次の ように定義する。すなわち、図 8に示すように、結像レンズ 31の光軸方向を Z軸として 、撮像装置 1から基準距離 VP離れた位置を X, Y, Z軸の原点位置とし、撮像装置 1 に対して水平方向を X軸、垂直方向を Y軸とする。
[0057] CCD画像センサ 32の幅方向の総画素数を ResX、高さ方向の総画素数を ResYと 呼ぶ。さらに、 X— Y平面に、結像レンズ 31を通して CCD画像センサ 32を投影した位 置の上端を Yftop、下端を Yfbottom、左端を Xfstart、右端を Xfendと呼ぶ。また、 結像レンズ 31の光軸から、スリット光投光ユニット 20から出射される第 1スリット光 71 の光軸までの距離を Dとする。第 1スリット光 71が X-Y平面に交差する Y軸方向の位 置を lasl、第 2スリット光 72が X— Y平面に交差する Y軸方向の位置を las2とする。
[0058] このとき、スリット光画像位置データ 433aの所定のデータにより定まる点の画像上 の座標(ccdxl, ccdyl)に対応する 3次元空間位置 (XI, Yl, Z1)を、 CCD画像セ ンサ 32の結像面上の点と、第 1スリット光 71及び第 2スリット光 72の出射点と、 X— Y 平面に交差する点とで形成される三角形について立てた次に示す 5つの連立方程 式の解から導き出す。
(l)Yl =-( (lasl +D) /VP) Zl +lasl ( 2) Y 1 =— (Ytarget/VP) Z1 + Ytarget
(3) XI = - (Xtarget/ VP) Z 1 + Xtarget
(4) Xtarget = Xf start + (ccdxl/ResX) X (Xf end— Xf start)
(5)
Figure imgf000018_0001
X (Yftop— Yfbottom)
尚、本実施形態では、第 1スリット光 71が Z軸に対して平行のため lasl =— Dであり 、 Yl =— Dである。
[0059] 同様に、第 2スリット光の軌跡 72aの位置情報で定まる点の画像上の座標(ccdx2, ccdy2)に対応する 3次元空間位置 (X2, Y2, Z2)を、次に示す 5つの連立方程式 の解から導き出す。
(1) Y2=- ( (las2 + D) /VP) Z2 + las2
(2) Y2=- (Ytarget/VP) Z2 + Ytarget
(3) X2=- (Xtarget/VP) Z2+ Xtarget
(4) Xtarget = Xf start + (ccdx2/ResX) X (Xf end— Xf start)
(5)
Figure imgf000018_0002
X (Yftop— Yfbottom)
[0060] SI 14での原稿姿勢演算プログラム 424による処理は具体的には次のような処理で ある。例えば、スリット光 3次元位置データ 434aにより定まる 3次元空間位置の各点 に対する回帰曲線を求める。次に、この曲線の X軸方向の位置が「0」における点と、 第 2スリット光の軌跡 72aの位置情報により定まる点とを結ぶ直線を想定する。この直 線が Z軸と交わる点、つまり、光軸が原稿 Pと交差する点を、原稿 Pの 3次元空間位置 (0, 0, L) (以降、位置 Lと呼ぶ。)として求める(図 9 (a)参照。;)。そして、この直線が X— Y平面となす角を原稿 Pの傾き Θとして求める。
[0061] 次に、図 9 (b)に示すように、第 1スリット光の軌跡 71aの回帰曲線を、先に求めた傾 き Θ分だけ逆方向に回転変換する。つまり、原稿 Pを X— Y平面に対して平行にした 状態を考える。そして、図 9 (c)に示すように、 X— Z平面における原稿 Pの断面につい て、 Z軸方向変位を複数の X軸方向の点で求めてその変位度から、 X軸方向の位置 を変数とした X軸方向への傾きの関数である湾曲 φ (X)を求める。
[0062] S115での平面変換プログラム 425による処理は、例えば、図 10のフローチャート に示される次に説明するような処理である。はじめに、 RAM43のワーキングエリア 43 8に当該処理の処理領域が割り当てられ、カウンタのための変数など当該処理に用 いる変数 jの初期値が設定される(S121)。
[0063] 次に、原稿姿勢演算プログラム 424での演算結果による原稿 Pの位置 Lと、傾き Θ と、湾曲 φ (X)とに基づき、スリット光無画像格納部 432に格納されたスリット光無画 像の 4隅の点を、それぞれ、湾曲 φ (X)で Y軸まわりに回転移動し、 X軸まわりに傾き Θだけ回転し、 Z軸方向に位置 Lだけ移動した点で形成される領域 (つまり、原稿 Pの 文字等が書かれた面が略直交方向から観察されたような画像となる領域 (通常、原稿
Pは矩形となり、画像全体の領域は台形形状となる。;))が求められる。この領域を含 む矩形形状の平面画像の領域が設定され (図 7 (a)参照)、この領域内に含まれる画 素数 Qaが求められる(S122)。尚、この平面画像の領域の画素は、スリット光無画像 格納部 432に記憶されたスリット光無し画像データの解像度(100dpi)の 1Z4の解 像度(25dpi)となる大きさとする。よって、画素数 Qaは、スリット光無し画像データの 解像度で設定する場合に比べて 1Z16の数となる。
[0064] 次に、設定された平面画像の領域を構成する各画素が対応する、スリット光無画像 上の座標が求められ、この座標周辺の画素情報から、平面画像の各画素の画素情 報が設定される。つまり、平面画像の領域を構成する画素の位置を、湾曲 φ (X)に 基づいて Z軸方向に変位させ(S 125)、傾き Θで X軸まわりに回転移動し (S 126)、 Z 軸方向に位置 Lだけシフトする(S127)。このように求められた 3次元空間位置を、先 の三角測量演算処理の関係式により CCD画像センサ 32による画像データ上の座標 (ccdx, (1 )に変換する(3128)。この変換された座標力 スリット光無画像格納部 432に格納された画像データの範囲内であれば (S 129 : YES)、変換された座標に おける画素情報力 Sスリット光無画像格納部 432に格納されたスリット光無し画像デー タの画素情報力 -アレストネイバ一法で求められ、平面変換結果画像格納部 435 に格納される(S130)。変換された座標がスリット光無画像格納部 432に格納された 画像データの範囲内でなければ (S 129 : NO)、画素情報として「黒」の値が平面変 換結果画像格納部 435に格納される(S131)。以上の処理が変数 jが画素数 Qaにな るまで繰り返される(S132, S123)。
[0065] 尚、ユアレストネイバ一法とは、輝度を求めるべき最近傍の点の輝度値を、求めよう とする点の輝度値とする方法である。例えば、画素情報が、座標の(0, 0)、 (0, 1)、 (1, 0)、 (1, 1)といった整数値の点に存在し、変換された座標が(0. 2, 0. 8)となつ た場合に、一番近い点 (0, 1)の画素情報を、変換された座標の画素情報とする。
[0066] S125での湾曲計算は具体的には次のように行われる。平面画像の領域における 3 次元座標の所定の点 (X, Y, Z)を、湾曲 φ (X)に基づく Z軸方向へ変位した点 (Χ', Υ', Ζ')は、次に説明する図 11 (a)のフローチャートに示す手順で求められる。
[0067] まず、 X'が、関係式 X' = cos (i) XX+ (— sin ci X Zから求められる(S1251)。次に 、 Y 'は、 Yの値そのままとされる(S 1252)。 Z'は、関係式 Z' = sin (i) XX+cos X Z 力 求められる(S1253)。
[0068] S126での傾き距離の計算処理は具体的には次のように行われる。湾曲計算処理 した点 (Χ', Υ', Ζ')を、 X軸を中心に 0回転した点 (X", Υ", Ζ")は、図 11 (b)のフ ローチャートに示す手順で求められる。
[0069] まず、 X"は、 X'の値そのままとされ(S1261)、 Υ"は、関係式 Y" = cos 0 XY' + ( — sin 0 ) X Z'で求められる(S1262)。 Ζ"は、関係式 Z" = sin 6 XY' + cos 0 X Z'で 求められる(S1263)。
[0070] S127での Z方向へのシフトについて具体的には次のように行われる。傾き補正した 点 (X", Y", Z")を、 Z軸方向に位置 Lだけシフトした点 (Χ"', Υ'", Ζ'")は、次に説 明する図 12 (a)のフローチャートに示すような手順で求められる。
[0071] X" 'は、 X"の値そのままとされ(S1271)、 Υ'"も、 Υ"の値そのままとされる(S1272 ) ο Ζ'"は、 Ζ"の値に位置 Lを加えたものとされる(S1273)。
[0072] S128での、 Z軸方向に位置 Lだけシフトした点(Χ"', Υ'", Ζ'")を、 CCD画像上の 座標(ccdx, ccdy)への変換した点は、図 12 (b)のフローチャートに示す手順で求め られる。
[0073] 原稿 P上の X軸方向位置 Xtargetは、関係式 Xtarget=X"'Z (1— (Z"'ZL)で求 められる(S1281)。原稿 Pの Y軸方向位置 Ytargetは、関係式 Ytarget=Y"'Z(l (Z"'ZL)で求められる(S1282)。
[0074] CCD画像上の幅方向位置 ccdxは、関係式 ccdx = (ResX) X (Xtarget— Xfstart )Z(Xf end— Xfstart)で求められる(S1283)。 CCD画像上の高さ方向位置 ccdyは 、関係式 ccdy= (— ResY) X (Ytarget— Yfstart) Z (Yfend— Yfstart)で求められ る(S1284)。
[0075] SI 16での面内変位回転認識プログラム 426による処理は、例えば、図 13のフロー チャートに示される次に説明するような処理である。
[0076] はじめに、平面変換結果画像格納部 435に記憶された平面画像データ力 単色の 輝度画像データにされる。つまり、平面画像データは、各画素の R、 G、 B3色の輝度 値を加算した画像データにされる(S161)。次に、単色となった平面画像データ全体 の画像輝度分布に関するヒストグラムが演算され (例えば、横軸が輝度で縦軸が度数 である図 14に示すグラフのように、輝度が高い領域と、輝度が低い領域とに度数分 布が分かれたものとなる)、その重心値が求められる(S162)。平面画像データは、ヒ ストグラムの重心値より輝度が高い箇所の画素情報を「1」(つまり、「白」)、ヒストグラ ムの重心値より輝度が低い箇所の画素情報を「0」(つまり、「黒」)とした 2値化画像デ ータにされる(S163)。これにより、 2値ィ匕画像は、背景に対して明るい原稿 Pの写つ た箇所が「白」となり、それ以外の箇所が「黒」となる。
[0077] 次に、上下左右変位演算が行われる(S164)。すなわち、 2値ィ匕画像の中心位置 に対する、 2値ィ匕画像における「白」の領域 (つまり、原稿 Pの領域)の中心位置の幅 方向変位 DH、及び、高さ方向変位 DVが、図 15のフローチャートに示す手順により 求められる(S164)。
[0078] 次に、回転角演算が行われる(S165)。すなわち、 2値ィ匕画像における「白」の領域
(つまり、原稿 Pの領域)の幅方向の辺の 2値化画像の幅方向に対する回転角度 DR OTが、図 16のフローチャートに示す手順により求められる(S165)。その後、本処理 を終了する。
[0079] 図 15は、 S 164における上下左右変位演算を表すフローチャートである。上下左右 変位演算について説明する。はじめに、 2値化画像データによる画像の原稿 Pが含ま れる側(つまり、「白」)の領域の重心位置が求められる(S 1641)。次に、画像の中心 位置に対する「白」の領域の重心位置の変位として、幅方向変位 DH、高さ方向変位 DVが求められる(S1642)。この幅方向変位 DH、高さ方向変位 DVは、面内変位回 転認識結果格納部 436に記憶される(S1643)。その後、本処理を終了する。 [0080] 図 16は、 S165における回転角演算を表すフローチャートである。回転角演算につ いて説明する。はじめに、 S163にて変換された 2値化画像データが読み込まれ (S1 651)、パラメータ角度 γ及び DMAX値が初期化される(S1652)。その後、この 2値 化画像データによる画像が、パラメータ角度 γの角度となるように回転される(S165 5)。次に、この画像の幅方向の 2次微分を行った画像が生成される(S 1656)。つま り、原稿 Ρの領域の輪郭が残った画像が生成される。
[0081] 次に、この 2次微分した画像の幅方向に対する高さ方向の「白」の画素数のヒストグ ラムが算出される(S1657)。すると、図 17に示す横軸が画像の幅方向の位置で、縦 軸が高さ方向の「白」の箇所の度数のグラフのように、原稿 Pの高さ方向の辺がある部 分のヒストグラムの値が高くなり、この箇所の値がパラメータ角度 γにおけるヒストグラ ムの最大値 dmax ( Y )として求められる(S1658)。この最大値 dmax( γ )の値は、ヒ ストグラムのこれまでの最大値 DMAXと比較される(S1659)。最大値 dmax( γ )の 値が最大値 DMAXより大きい場合(S1659 :YES)、回転角度 DROTはパラメータ 角度 0で置き換えられる(S1661)。それから、最大値 DMAXは、パラメータ角度 γ での最大値 dmax ( Y )で置き換えられる(S 1662)。パラメータ角度 γ力 最大値 D MAXより大きく無い場合(S1659 :NO)、回転角度 DROT、及び、最大値 DMAX は、そのままとされる。
[0082] これを、パラメータ角度 γが、初期回転角度 γ start (例えば- 45度)から最終回転 角度 γ end (例えば 45度)までの範囲で、増分 add (例えば 5度)毎に行う(S1653, S1660)。
[0083] これらの処理により、 2値化画像データによる画像を初期回転角度 γ startカゝら最終 回転角度 Ύ endまで回転させた時の、輪郭線のヒストグラムの最大値が一番大きくな る角度を求めることができる。つまり、原稿 Pによる矩形形状の輪郭線は、その左又は 右の辺が、図 17の点線で示すように、画像の高さ方向に平行になると、左右の辺の 輪郭線がある幅方向位置でのヒストグラム値が最大となる。これを利用して、原稿 Pの 領域を回転してヒストグラム値が最大となる角度を、原稿 Pの回転角度 DROTとして 求めている。
[0084] S117での矩形領域切り取りプログラム 427による処理は、例えば、図 18のフロー チャートに示される次に説明するような処理である。はじめに、 RAM43のワーキング エリア 438に当該処理の処理領域が割り当てられ、カウンタのための変数など当該処 理に用いる変数 jの初期値が設定される(S171)。
[0085] 次に、スリット光無画像の 4隅の点を、それぞれ、湾曲 φ (X)で Y軸まわりに回転移 動し、 X軸まわりに傾き Θだけ回転し、 Z軸方向に位置 Lだけ移動して、幅方向変位 D H,高さ方向変位 DVだけ X— Y平面を移動して、 Z軸を中心に回転角度 DROTだけ 回転する。これによつて、原稿 Pは、変換された 4つの点で形成される領域の中心位 置に位置付けられる。それから、その 4つの点で形成される領域をサイズ入力部 56で 入力された大きさで切り取った領域 (つまり、原稿 Pの文字等が書かれた面が略直交 方向から観察され、原稿 Pの矩形形状が画像の幅方向及び高さ方向に平行になるよ う回転され、原稿 Pの領域だけが切り取られたような画像となる切り取り画像の領域) を設定し、この領域内に含まれる画素数 Qbを求める(S172)。尚、この切り取り画像 の領域の画素は、スリット光無画像格納部 432に記憶されたスリット光無し画像デー タの解像度と同じ解像度(100dpi)となる大きさの画素とする。
[0086] 次に、設定された切り取り画像の領域に含まれる各画素の 3次元空間位置を、 Z軸 を中心に回転角度 DROTで回転して(S 175)、この画素の座標に幅方向変位 DH 及び高さ方向変位 DVを加算して(S176)、湾曲 φ (X)に基づいて Z軸方向に変位 させ (S177)、傾き Θで X軸まわりに回転移動し (S178)、 Z軸方向に位置 Lだけシフ トさせる(S179)。求められた 3次元空間位置は、先の三角測量の関係式により理想 カメラで写された CCD画像上の座標(ccdcx, (1じ )に変換され(3180)、使用して いる結像レンズ 31の収差特性を基に、 CCD画像センサ 32による画像上の座標 (ccd X, ccdy)に変換される(S181)。変換された座標における画素情報がスリット光無画 像の画素情報からバイリニア法で求められ、 S172にて設定された領域の画素情報と して RAM43のワーキングエリア 438に格納される(S 182)。
[0087] 以上の処理は S172で求めた領域内の各画素位置に対して画素数 Qbだけ繰り返 し実行され (S183, S173)、画像データが生成されると、処理領域が解放される(S1 74)。尚、バイリニア法とは、ある変換後の点が変換前のどの領域に相当する力を計 算し、その領域内にあるピクセルの色の平均値を変換後の点の色とする方法である。 例えば、画素の情報は整数値の位置の点に存在し、変換前の位置を計算した座標 が(0. 2, 0. 8)となった場合に、その周囲の 4つの点(0, 0)、 (0, 1)、 (1, 0)、 (1, 1
)の距離に応じた各点の画素情報の平均値を求めて、変換後の点の画素情報とする
[0088] また、 S177— S180は、 S125— S128と同じ処理手 j噴である。
以上のように、撮像装置 1は、第 1スリット光 71及び第 2スリット光 72の 2列のスリット 光を出射し、これらのスリット光が投光された原稿 Pを、 CCD画像センサ 32にて撮像 し、続けて、スリット光が投光されていない原稿 Pの画像を撮像する。さらに撮像装置 1は、これら 2つの画像データの差分をとり、画像データ力 スリット光の軌跡を抽出し て、三角測量原理によりスリット光の軌跡各部の 3次元空間位置を演算し、これらから 原稿 Pの位置 L、傾き Θ及び湾曲 φ (X)を求める。それから、撮像装置 1は、第 1スリツ ト光の軌跡 71aの形状を原稿 P全体の横断面形状として類推した結果を基に、先に 撮像したスリット光が投光されて 、な 、原稿 Pの画像を、平らな原稿 Pが正立方向に て正面から見られ、原稿 Pだけ切り抜かれたかのような画像データに変換して、カード メモリ 55に記録する。
[0089] 尚、カードメモリ 55に記憶された画像を LCD51に表示して撮像内容を確認するこ とができる。或いは、カードメモリ 55を撮像装置 1から取り外して外部のパーソナルコ ンピュータなどに装着することにより、カードメモリ 55内の画像を外部のパーソナルコ ンピュータ上で表示したり、印刷したりすることも可能である。
[0090] このように、本実施形態の撮像装置 1によれば、使用者は、モード切替スィッチ 59 をスライドさせて「補正撮像モード」とし、サイズ入力部 56を撮像する原稿 Pの大きさ に合わせて原稿 Pを撮像することにより、湾曲した原稿 Pを斜めから撮像しても、平ら な原稿 Pが正立方向にて正面力 見られ、原稿 Pが写った部分だけ切り抜かれた画 像を得ることができる。
[0091] さらに、本実施形態によれば、画像に写った第 1,第 2スリット光 71, 72の箇所だけ を解析することにより、原稿 Pの姿勢が求められている。したがって、複雑な画像解析 を行うことなぐ容易に検出精度が良い原稿 Pの姿勢を求めることができる。このため 、撮像装置 1のプロセッサ 40による画像解析の処理を短時間に実行することができる 、プロセッサ 40を簡易なものにすることができるなどの効果が得られる。
[0092] 面内変位回転認識処理 S 116での処理は、原稿 Pの領域が識別できれば良ぐ色 の情報は処理内容には関係が少な!、ため、平面画像データを 2値画像データとする ことにより、処理に用いる情報量を少なくして、処理内容を簡易にし、高速化すること ができる。
[0093] 但し、 S117での矩形領域切り取り処理では、解像度が高ぐ色数が多いほど、変 換した画像が見やすくなるため、それぞれが一番大きくなるスリット光無画像と同じ解 像度で、同じ色数の画像に変換している。
[0094] 本実施形態において、結像レンズ 31、 CCD画像センサ 32、スリット光投光ユニット 20、及び、プロセッサ 40による、 S111でのカメラ制御処理は、撮像手段に位置付け られる。図 5に差分抽出処理から原稿姿勢演算処理に至る一連の処理 (S112— S1 14)処理が、 3次元形状検出手段と位置付けられる。図 5の平面変換処理 (S115)が 、平面変換手段と位置付けられる。面内変位回転認識処理 (S116)が、面内位置検 出手段、及び、面内角度検出手段と位置付けられる。矩形領域切り取り処理 (S117 )が、第 1、第 2補正変換手段と位置付けられる。サイズ入力部 56が、範囲入力手段 と位置付けられる。
[0095] 以上、本発明の第 1実施形態について説明したが、本発明は上記の具体的な実施 形態に限定されず、このほかにも様々な形態で実施することができる。
[0096] 例えば、上述の実施形態では図 5の S116において面内変位(面内位置)および面 内回転角度の両方が検出されて補正のために用いられて 、るが、 S116にお ヽて面 内変位と面内回転角度のいずれか一方のみが検出され補正のために用いられる構 成もあり得る。
[0097] 例えば、上述の実施形態では、スリット光投光ユニット 20にて、第 1スリット光 71、及 び、第 2スリット光 72の 2列のスリット光を用いることにより 3次元形状が検出されている 。このような構成に代えて、 3列以上のスリット光を用いることにより 3次元形状が検出 されても良い。或いは、スリット光に代えて、特定の輻射パターンの光束を用いること によって、 3次元形状が検出されても良い。
[0098] また、本実施形態では、最終的な画像データであるカードメモリ 55に記憶される画 像データは、サイズ入力部 56にて指定された原稿 Pの大きさで切り抜かれているが、 切り抜き範囲の指定方法は、これに限られない。例えば、サイズ入力部 56が無ぐ S 116の面内変位回転認識処理にて変換された 2値ィ匕画像データにて識別した原稿 P の領域(「白」の領域)を基に切り抜き範囲が設定されても良 、。
[0099] また、最終的な画像データとする範囲は、 S117の矩形領域切り取り処理の S172 にてスリット光無画像の 4隅の点を変換して形成される領域を、サイズ入力部 56で入 力された大きさで切り取った領域としているが、これに限らなくてもよい。例えば、サイ ズ入力部 56を装備せずに、 S117の矩形領域切り取り処理の S172にて設定する領 域力 サイズ入力部 56で入力された大きさで切り取らず、スリット光無画像の 4隅の点 を変換して形成される領域を含む矩形範囲を最終的な画像データとしたものであつ ても良い。また、最終的な画像データとする範囲は、 S172にて回転角度 DROTで回 転変換しない領域として、 S 175での処理を行わないものであっても良いし、 S172に て幅方向変位 DH及び高さ方向変位 DVによる上下変位及び左右変位の変換を行 わな 、領域として、 S 176での処理を行わな!/、ものであっても良!、。
[0100] また、 S115での平面変換処理においても、スリット光無画像の 4隅の点を、それぞ れ、湾曲 φ (X)、傾き 0、位置 Lで変換した点で形成される領域を、サイズ入力部 56 により入力された大きさで変形する領域を限定して、この領域内の各画素に対して変 換するものであっても良い。このようにすれば、平面画像としての画素数が減るため、 平面変換処理における処理量を減らすことができ、 S116での面内変位回転認識処 理の処理量も減らすことができる。これにより、プロセッサ 40による処理全体を高速ィ匕 することができる。
[0101] また、 S 115での平面変換処理は、スリット光無し画像データを単色にし、 1Z4の解 像度としているが、解像度は、スリット光無画像の解像度で変換処理するものであつ ても良いし、色数も単色とせず、 3色の色情報をそのままで処理するものであっても良 い。
[0102] 但し、上述の実施形態のように、 S 115での平面変換処理にて、スリット光無画像よ りも解像度を落とし、色数も単色とした平面画像に変換したものによれば、スリット光 無画像と同じ解像度及び色数で行う際の処理量に比べて、スリット光無画像と同じ解 像度、及び、同じ色数の画像としたものより当該処理での処理量、及び、この平面画 像を用いた面内変位回転認識処理 S 116での処理量を少なくすることができる。これ により、プロセッサ 40による処理全体を短時間にすることができる。
[0103] 撮像装置 1にて撮像する対象物体は、上述の実施形態にて説明した原稿 Pのよう に矩形形状となっているもの以外であっても良い。但し、この場合、 S116の面内変 位回転認識処理における回転角演算(S165)の処理は、例えば、複数の形状デー タに対するパターンマッチングで合致する形状を検索するなど形状の判定処置が複 雑なものとなるため、上述の実施形態の方が簡易で良い。
[0104] 上述の実施形態では、画像を撮像して、変換するまでを撮像装置 1の 1台にて行つ ているが、撮像装置 1の外部のパーソナルコンピュータなどの画像処理装置にデー タを受け渡しできるようにして、 S 112— S117の処理をそれぞれの装置で分けて行う 構成であっても良い。
[0105] 本発明の第 1実施形態に関しては、以下のような変形例を構成することができる。
すなわち、本発明の一つの実施形態において、画像処理装置は、形状情報及び 該面内位置検出手段にて求められた対象物体の位置に基づき、対象物体画像を、 対象物体が所定の方向から見られ且つ対象物体が略中央位置に配された補正画像 に変換する第 1補正変換手段を更に備えていても良い。
[0106] 本発明の一つの実施形態において、画像処理装置は、平面画像における対象物 体領域を識別して、平面画像面内の所定の方向に対する該対象物体領域の所定の 辺の角度を求める面内角度検出手段を更に備えていても良い。
[0107] 本発明の一つの実施形態において、第 1補正変換手段は、形状情報、面内位置検 出手段にて求められた対象物体の位置、及び、面内角度検出手段にて求められた 角度に基づき、対象物体画像を、対象物体が所定の方向から見られると共に対象物 体が略中央位置に配され、且つ対象物体の所定の辺が当該画像内の所定の方向 に向けられた補正画像に変換するよう構成されていても良い。
[0108] この構成によれば、例えば、補正画像にて対象物体の所定の辺が向けられる向き を、対象物体である原稿に書かれた文字が、補正画像の幅方向に平行になる方向 にすれば、文字が読みやすくなるなど、より見やすい補正画像とすることができる。 [0109] 第 1補正変換手段は、補正画像への変換を、対象物体画像の対象物体が写る領 域に対してだけ行うよう構成されて 、ても良 、。
[0110] この構成によれば、対象物体以外の箇所 (例えば、背景)が変換されず、対象物体 だけが写った補正画像とすることができるため、補正画像をより見やすくできる。また 、不要な箇所の画像データが削除されて画像データ全体のデータ量を少なくするこ とができるため、当該データを導出の際、及び、当該データを用いる際の画像処理量 を少なくすることができる。
[0111] 対象物体画像が多色画像である場合には、第 1補正変換手段は、対象物体画像 の画素の色数と同じ色数の補正画像に変換するよう構成されていても良い。
[0112] この構成によれば、入力された対象物体画像の色情報が有効に用いられ、変換さ れた補正画像を、見やすいものにすることができる。尚、面内位置検出手段や、面内 角度検出手段は、画像中の対象物体の位置や角度を検出するものであり、これらの 各パラメータは、色情報を用いることなく検出できることから、これら各検出手段につ いては、処理するデータの量を減らすために、対象物体画像より画素の色数を減らし た画像で処理するようにしても良 ヽ。
[0113] 本発明の一つの実施形態において、画像処理装置は、補正画像内における対象 物体が写った部分を所定の形状で切り取った状態の画像を抽出する画像切取り手 段を更に備えていても良い。
[0114] 本発明の一つの実施形態において、画像処理装置は、平面変換手段にて変換さ れる対象物体画像の範囲を入力するための範囲入力手段を更に備えていても良い
。この場合、平面変換手段は、範囲入力手段により入力された対象物体画像の範囲 を平面画像に変換する。
[0115] この構成によれば、変換処理する範囲を限定することにより、画像処理の量を少な くすることができる。これにより、画像処理の時間を短くすることが可能となる。或いは
、簡易な画像処理装置とすることも可能となる。
[0116] 本発明の一つの実施形態において、対象物体は、所定の面を直交する方向から 見られた形状が矩形である。
[0117] 対象物体の形状を矩形なので、面内位置検出手段や、面内角度検出手段などで の対象物体領域の識別処理を、矩形形状が直交する 4つの辺で構成されるという特 徴を利用して簡易に識別することができる。
[0118] 本発明の一つの実施形態において、平面変換手段は、対象物体画像の解像度に 比べて低解像度の平面画像に変換するよう構成されて 、ても良 、。
[0119] この構成によれば、平面画像の画素の数が少なくなり、平面変換手段による変換、 及び、平面画像を用いた処理の際の演算量を少なくすることができる。尚、平面画像 の解像度は、面内位置検出手段、及び、面内角度検出手段の検出精度に影響を及 ぼす。このため、平面画像の解像度は、この検出精度への影響が大きくならない程 度に、できるだけ低解像度にするのが好ましい。
[0120] 対象物体画像が多色画像である場合には、平面変換手段は、画素の色数が単色 の平面画像に変換するよう構成されて!、ても良 、。
[0121] この構成によれば、平面画像の画素が持つ情報量が少なくなり、平面変換手段に よる平面画像への変換、及び、平面画像を用いた処理の際の処理量を減らすことが できる。
[0122] 本発明の一つの実施形態において、撮像装置は、上記のような画像処理装置と、 パターン光を投光する投光手段と、対象物体を撮像し対象物体画像を取得する撮像 手段と、パターン光が投光された対象物体を撮像手段によって撮像することによって 得られる画像に基づき、対象物体の 3次元形状に関する形状情報を算出する 3次元 形状検出手段とを備えていても良い。この場合、撮像手段によって得られる対象物 体画像と、 3次元形状検出手段によって算出される形状情報とが画像処理装置に入 力される。
[0123] 本発明の一つの実施形態において、撮像装置は、上記のような画像処理装置と、 パターン光を投光する投光手段と、対象物体を撮像し対象物体画像を取得し画像処 理装置に入力する撮像手段と、パターン光が投光された対象物体を撮像手段によつ て撮像することによって得られる画像に基づき、対象物体の 3次元形状に関する形状 情報を算出し該形状情報を画像処理装置に入力する 3次元形状検出手段と、第 1補 正変換手段によって得られる補正画像を表示する表示手段と、表示手段に表示され ている補正画像の表示態様を変更するための表示態様変更パラメータを入力する入 力手段と、入力手段によって入力される表示態様変更パラメータに基づき、表示手 段に表示されて!ヽる補正画像の表示態様を変更する変更手段とを備えて!/ヽても良 ヽ
[0124] 本発明の一つの実施形態において、撮像装置は、上記のような画像処理装置と、 パターン光を投光する投光手段と、対象物体を撮像し対象物体画像を取得し画像処 理装置に入力する撮像手段と、パターン光が投光された対象物体を撮像手段によつ て撮像することによって得られる画像に基づき、対象物体の 3次元形状に関する形状 情報を算出し該形状情報を画像処理装置に入力する 3次元形状検出手段と、第 2補 正変換手段によって得られる補正画像を表示する表示手段と、表示手段に表示され ている補正画像の表示態様を変更するための表示態様変更パラメータを入力する入 力手段と、入力手段によって入力される表示態様変更パラメータに基づき表示手段 に表示されて ヽる補正画像の表示態様を変更する変更手段とを備えて 、ても良 、。
[0125] 第 2実施形態
以下、本発明の第 2実施形態について説明する。従来の画像変換技術 (特開 200 2— 334327に記載の画像変換技術)では、予め設定されたプログラムに基づいて画 像を変換するため、たとえ変換後の画像を、プログラムの予定する通りの画像に変換 できたとしても、例えば、操作者によっては、原稿中の特定の部位だけを拡大して抽 出したい等、操作者の要求に応じて画像を編集することができなカゝつた。第 2実施形 態は、このような問題点についても解決できるよう構成されている。以下で述べる第 2 実施形態によって、対象物体が斜め方向から撮像された画像を、自動的に正面から 見られたような画像に変換した後に、更に、その画像を操作者の意図する画像に編 集することができる撮像装置が実現される。
[0126] 以下で説明する第 2実施形態に関する図面において、第 1実施形態と同等の構成 要素には同じ符号を用いている。図 19 (a)は第 2の実施形態による撮像装置 1Bの外 観を表す斜視図である。図 19 (b)は撮像装置 1Bの背面図であり、図 19 (c)は操作 ボタン 57の拡大図である。図 20は、撮像装置 1Bの概略断面図を示している。また、 図 20には、撮像装置 1Bによって原稿 Pが撮像される状況が示されている。
[0127] 撮像装置 1Bは、通常の「ノーマルモード」の機能と、「補正撮像モード」の機能とを 有する。「ノーマルモード」では、撮像装置 1Bは、通常の所謂デジタルカメラとして機 能する。「補正撮像モード」では、撮像装置 1Bは、被写体としての原稿 Pを斜め方向 力も撮像した場合でも、その撮像画像を原稿 Pに対して正面力ゝら撮像したような画像 を自動的に生成することができると共に、更に、その補正した画像を操作者の意図に 応じて編集することができる装置である。
[0128] 撮像装置 1Bは、方形箱形の本体ケース 10と、本体ケース 10の正面に設けられた 結像レンズ 31と、その結像レンズ 31の下方に設けられた窓 29と、本体ケース 10の上 部に設けられたレリーズボタン 52、モード切替スィッチ 59とを有する。さらに、撮像装 置 1Bは、本体ケース 10の背面に設けられた LCD (Liquid Crystal Display) 51、 サイズ入力部 56、操作ボタン 57、編集パラメータ選択ボタン 65と、本体ケース 10の 背面力も前面を通して配設されるファインダ 53と、本体ケースの側面に設けられた確 定ボタン 58とを有する。
[0129] 操作ボタン 57は、 LCD51に表示されている画像を編集するためのボタンである。
操作ボタン 57は、図 19 (c)に示すように、独立した 8つのボタン 57a— 57hからなり、 外形が円形状になるよう構成されている。すなわち、操作ボタン 57は、 LCD51に表 示されている画像を左回転させるための左回転用ボタン 57a,上方向に移動させる ための上移動用ボタン 57b,右回転させるための右回転用ボタン 57c,左方向に移 動させるための左移動用ボタン 57d,右方向に移動させるための右移動用ボタン 57 e,縮小させるための縮小用ボタン 57f,下方向に移動させるための下移動用ボタン 5 7g,拡大させるための拡大用ボタン 57hで構成されている。
[0130] 図 20に示されるように、結像レンズ 31の後方 (撮像装置 1Bの内部側)には、 CCD 画像センサ 32が設けられ、結像レンズ 31の下方にはスリット光投光ユニット 20が設 けられている。更に、本体ケース 10にはプロセッサ 40、メモリカード 55が内蔵されて いる。尚、図 20においては、プロセッサ 40に接続されていないファインダ 53と、本体 ケースの側面に設けられた確定ボタン 58の図示は省略されている。
[0131] 結像レンズ 31は、複数枚のレンズで構成されている。撮像装置 1Bによるオートフォ 一カス機能により、結像レンズ 31において自動で焦点距離及び絞りが調整され外部 力もの光が CCD画像センサ 32上に結像される。 [0132] CCD画像センサ 32は、 CCD (Charge Coupled Device)素子などの光電変換 素子がマトリクス状に配列されてなる構成を有する。 CCD画像センサ 32は、表面に 結像される画像の光の色及び強さに応じた信号を生成し、これをデジタルデータに 変換してプロセッサ 40へ出力する。尚、 CCD素子一つ分のデータが画像を形成す る画素の画素データであり、画像データは CCD素子の数の画素データで構成される
[0133] 本実施形態の CCD画像センサ 32は、幅方向の総画素数が 1200画素、高さ方向 の総画素数が 1600画素の画像データを生成する。画像データの座標である幅方向 位置 ccdx及び高さ方向位置 ccdyは、画素の個数であらわされ、画像の一番左上の 画素を基点として、 1個目を「0」位置とする。つまり、幅方向位置 ccdxの範囲は「0」 一「1199」で、高さ方向位置 ccdyの範囲は「0」一「1599」となる。また、 CCDの画素 間隔は、原稿における 100dpi (ドットパーインチ)の解像度に相当する。画素データ は、 1画素あたり、赤 (R)、緑 (G)、青 (B)の 3色、各 256階調の輝度で表される画素 情報をもっている。
[0134] レリーズボタン 52は、押しボタン式のスィッチで構成されている。レリーズボタン 52 は、プロセッサ 40に接続されおり、プロセッサ 40にて使用者によるレリーズボタン 52 の押下げ操作が検知される。
[0135] モード切替スィッチ 59は、 2つの位置に切換え可能なスライドスィッチなどで構成さ れる。モード切替スィッチ 59の一方のスィッチ位置は「ノーマルモード」として、他方 のスィッチ位置は「補正撮像モード」として検知されるように、スィッチ位置がプロセッ サ 40によって割り当てられている。「ノーマルモード」は、撮像した原稿 Pそのものを 画像データとするモードであり、「補正撮像モード」は、原稿 Pを斜め方向から撮像し た場合に、その画像データを原稿 Pを正面から撮像したような補正された画像データ とするモードである。
[0136] メモリカード 55は、不揮発性で書き換え可能なメモリで構成され、本体ケース 10に 着脱可能である。
[0137] LCD51は、画像を表示する液晶ディスプレイなどで構成され、プロセッサ 40からの 画像信号を受けて画像を表示する。プロセッサ 40から LCD51に対しては、状況に 応じて CCD画像センサ 32で受光されたリアルタイムの画像や、メモリカード 55に記 憶された画像や、装置の設定内容の文字等を表示するための画像信号が送られる。
[0138] サイズ入力部 56は、複数の位置に切り替わるスライドスィッチなどで構成され、プロ セッサ 40に接続されている。使用者により設定されたサイズ入力部 56の位置に応じ て、撮像する原稿 Pの大きさがプロセッサ 40にて判別される。例えば、プロセッサ 40 は、サイズ入力部 56のスィッチの位置が使用者により設定されて、一番左端の時「指 定無し」、その隣の時「A4サイズ」、一番右端の時「A3サイズ」として判別する。
[0139] 編集パラメータ選択ボタン 65は、後述する編集パラメータ格納部 439に格納されて いる編集パラメータの内から特定の編集パラメータを選択するためのボタンである。 編集パラメータ選択ボタン 65は、押しボタン式のスィッチで構成される。編集パラメ一 タ選択ボタン 65はプロセッサ 40に接続されおり、プロセッサ 40にて使用者による編 集パラメータ選択ボタン 65の押下げ操作が検知される。この編集パラメータ選択ボタ ン 65の押下げ操作によって所定の編集パラメータが選択されると、その選択された 編集パラメータに基づ 、て、 LCD51に表示される画像が編集される。
[0140] 操作ボタン 57の各ボタン 57a— 57hは、押しボタン式のスィッチで構成されている。
各ボタン 57a— 57hはプロセッサ 40に接続されおり、プロセッサ 40にて使用者による 各ボタン 57a— 57hの押下げ操作が検知される。また、各ボタン 57a— 57hの 1回の 押下げ操作毎の画像の移動量や拡大縮小率は予め設定されており、各ボタン 57a 一 57hの押下げ回数に応じて、画像の移動量や拡大縮小率が制御される。
[0141] ファインダ 53は、光学レンズで構成される。ファインダ 53は、使用者が撮像装置 1B の後ろ側力もファインダ 53をのぞき込んだ時に、結像レンズ 31が CCD画像センサ 3 2上に結像する範囲とほぼ一致する範囲が見えるように構成されて 、る。
[0142] 確定ボタン 58は、 LCD51に表示されている画像を保存する力否かを決定するボタ ンである。確定ボタン 58は、押しボタン形式で構成されている。確定ボタン 58は、プ 口セッサ 40に接続されおり、プロセッサ 40にて使用者による押下げ操作が検知され る。 LCD51に画像が表示されている状態で、この確定ボタン 53を押すことにより、 L CD51に表示されて 、る状態で画像を保存することができる。
[0143] スリット光投光ユニット 20について、図 21、図 22 (a)および図 22 (c)を参照して説 明する。図 21は、スリット光投光ユニット 20の構成を示す図である。図 22 (a)および 図 22 (b)は、スリット光の角度幅を説明するための図である。スリット光投光ユニット 2 0は、レーザーダイオード 21と、コリメートレンズ 22と、アパーチャ 23と、透明平板 24 と、シリンドリカノレレンズ 25と、反射ミラー 26と、ロッドレンズ 27とを有する。
[0144] レーザーダイオード 21は、赤色レーザー光線を放射する。プロセッサ 40からの指 令に応じて、レーザーダイオード 21におけるレーザー光線の放射及び停止が切り換 えられる。レーザーダイオード 21の出力は、最大出力定格 (例えば 5mW)に対して、 レーザービームの広がり角の個体ばらつきを考慮して、アパーチャ 23を通った箇所 で一定の出力(例えば lmW)を得られるように定格出力が調整されている。
[0145] コリメートレンズ 22は、レーザーダイオード 21からのレーザー光線を、スリット光投光 ユニット 20からの基準距離 VP (例えば 330mm)に焦点を結ぶように集光する。
[0146] アパーチャ 23は、矩形に開口された開口部を有する板で構成される。コリメートレン ズ 22からのレーザー光線はアパーチャ 23の開口部を通過することにより矩形に整形 される。
[0147] 透明平板 24は、無垢のガラス材料などの透明な平板で構成され、裏面に ARコート
(無反射コーティング)が施されている。透明平板 24は、アパーチャ 23からのレーザ 一光線の光軸に直交する面に対して、本体ケース 10の正面側に所定角度 |8 (例え ば 33度)傾斜して配設されている。透明平板 24は、アパーチャ 23から入射するレー ザ一光線のパワーの約 5% (約 50 μ W)を表面で反射して、約 95% (約 950 W)を 透過させる。尚、透明平板 24によりレーザー光線が反射される方向(撮像装置 1Bの 前方へ水平面に対して 33度上向き)を第 2の方向と呼ぶ。
[0148] 透明平板 24の裏面に ARコートを施すことにより、透明平板 24内に入射したレーザ 一光線の透明平板 24から出射する際の反射が少なくなり、透明平板 24内でのレー ザ一光線の損失が少なくなるようになつている。また、透明平板 24で反射するレーザ 一光線の割合を、透明平板 24の材質の屈折率より決まる表面反射率 5%として設定 することにより、通常のハーフミラーで実現する場合に必要な反射面に金属蒸着膜を 形成するプロセスを省略することができる。
[0149] 反射ミラー 26は、鏡など、レーザー光線を全反射する部材で構成される。反射ミラ 一 26は、透明平板 24を透過したレーザー光線の下流に、本体ケース 10の正面側に 45度傾斜して配設され、レーザー光線を全反射して光路の向きを 90度変える。反射 ミラー 26によりレーザー光線が反射される方向(撮像装置 1Bの前方へ水平面に対し て 0度の向き)を第 1の方向と呼ぶ。
[0150] ロッドレンズ 27は、正の焦点距離が短い円筒形状のレンズで構成され、反射ミラー 26で反射されるレーザー光線の下流に、円筒形状の軸方向が垂直方向になるように 配設されている。ロッドレンズ 27の焦点距離は短い為、ロッドレンズ 27を透過したレ 一ザ一光線は、レッドレンズ 27近傍の焦点を越えて広がり、所定の広がり角度 ε (例 えば 48度)のスリット光として第 1の方向へ進む。尚、ロッドレンズ 27から出射されるス リット光を第 1スリット光 71と呼ぶ。
[0151] シリンドリカルレンズ 25は、負の焦点距離となるように一方向が凹形状となったレン ズであり、透明平板 24で反射されたレーザー光線の下流に、第 2の方向に対してレ ンズ面が直交するように配設さている。シリンドリカルレンズ 25は、透明平板 24から入 射されるレーザー光線を、広がり角度 κで広がるスリット光として出射する(図 22 (b) 参照)。シリンドリカルレンズ 25から出射されるスリット光を第 2スリット光 72と呼ぶ。詳 細には、第 2スリット光 72の広がり角度 κは、透明平板 24でレーザー光線が分割さ れる際のパワーの比に対して、第 1スリット光 71の広がり角度 εと第 2スリット光 72の 広がり角度 κとの比が同等になるような角度になっている。つまり、第 2スリット光 72の 広がり角度 κは、広がり角度 εの 5% (2. 4度)である。
[0152] 以上述べた構成により、スリット光投光ユニット 20は、プロセッサ 40からの指令に応 じて、レーザーダイオード 21からレーザー光線を放射して、第 1の方向へ第 1スリット 光 71を、及び、第 2の方向へ第 2スリット光 72を、本体ケース 10の結像レンズ 31の下 方に設けられた窓 29から出射する。
[0153] 上述したように構成されるスリット光投光ユニット 20によれば、レーザダイオード 21 力も出力されるパワーのうち、透明平板 24で分割される第 1スリット光 71のパワーは 9 5%であるのに対し、第 2スリット光 72のパワーは約 5%と少ない。し力しながら、角度 幅あたりのパワーで見ると、広がり角力 8度の第 1スリット光 71の単位角度あたりのパ ヮ一が約 20 WZ度で、広がり角が 2. 4度の第 2スリット光 72の単位角度あたりのパ ヮーも約 21 /z WZ度であり、 2つのスリット光のパワーはほぼ同じである。原稿 Pが基 準距離 VPである 330mmの位置にある白色の用紙の場合、第 1スリット光 71及び第 2スリット光 72による照度は約 1260ルクスとなる。したがって、一般的な室内の明るさ である 500— 1000ルクスの場所でも、スリット光の軌跡と原稿 Pとの輝度差が十分あ り、後述する差分抽出プログラム 422にてスリット光の軌跡画像を確実に抽出すること ができる。
[0154] 図 23は、撮像装置 1Bの電気的構成を示したブロック図である。撮像装置 1Bに搭 載されたプロセッサ 40は、 CPU41、 ROM42、 RAM43を備えている。
[0155] CPU41は、 ROM42に記憶されたプログラムにしたがって RAM43を利用しつつ 各種の処理を実行する。 CPU41が実行する処理には、レリーズボタン 52の押下げ 操作の検知、 CCD画像センサ 32から画像データの取り込み、画像データのメモリ力 ード 55への書き込み、モード切替スィッチ 59の状態検出、スリット光投光ユニット 20 によるスリット光の出射切り換え、操作ボタン 57や確定ボタン 58の押下げ操作の検知 等が含まれる。
[0156] ROM42には、カメラ制御プログラム 421、差分抽出プログラム 422、三角測量演算 プログラム 423、原稿姿勢演算プログラム 424、平面変換プログラム 425、面内変位 回転認識プログラム 426、矩形領域切取りプログラム 427、編集プログラム 428が記 憶されている。
[0157] カメラ制御プログラム 421は、図 24に示すフローチャートの処理 (詳細は後述する。
)を含む撮像装置 1B全体の制御に関するプログラムである。差分抽出プログラム 42 2は、スリット光を投光した原稿 Pの画像から、スリット光の軌跡を抽出した画像データ を生成するためプログラムである。三角測量演算プログラム 423は、差分抽出プログ ラム 422で抽出されたスリット光の軌跡の各画素に対する 3次元空間位置を演算する プログラムである。
[0158] 原稿姿勢演算プログラム 424は、第 1スリット光の軌跡 71a及び第 2スリット光の軌跡 72aの 3次元空間位置から、原稿 Pの 3次元形状を推定して求めるプログラムである。 平面変換プログラム 425は、原稿 Pの位置及び姿勢に基づいて、スリット光無画像格 納部 432に格納された画像データを、原稿 Pの正面力も撮像したような画像に変換 するためのプログラムである。面内変位回転認識プログラム 426は、画像データ中の 原稿 Pの変位及び回転角を検出するためのプログラムである。矩形領域切取りプログ ラム 427は、画像データ中の原稿 Pが写った領域の画像データを切取るためのプロ グラムである。編集プログラム 428は、操作ボタン 57の操作に応じて、編集された画 像を生成するプログラムである。
[0159] RAM43には、スリット光有画像格納部 431、スリット光無画像格納部 432、差分画 像格納部 433、三角測量演算結果格納部 434、平面変換結果格納部 435、面内変 位回転認識結果格納部 436、矩形領域切取り結果画像格納部 437、ワーキングエリ ァ 438、および編集パラメータ格納部 439が記憶領域として割り当てられている。
[0160] スリット光有画像格納部 431とスリット光無画像格納部 432には、 CCD画像センサ 3 2からのスリット光有画像とスリット光無画像の画像データが各々格納される。三角測 量演算結果格納部 434は、スリット光有画像の各ポイントの位置を演算した結果が格 納される。原稿姿勢演算結果格納部 435には、平面変換プログラム 425により変換さ れた画像データが格納される。面内変位回転認識結果格納部 436には、後述する 面内変位回転認識処理の結果が格納される。矩形領域切取り結果画像格納部 437 には、後述する矩形領域切取り処理の結果が格納される。ワーキングエリア 438には 、 CPU41での演算のために一時的に使用されるデータが格納される。編集パラメ一 タ格納部 439には、編集プログラム 428により編集された編集画像に関し、その編集 をした際に使用者が操作した各ボタン 57a— 57hの操作状況が編集パラメータとして 格納される。
[0161] 次に、図 24及び図 25 (a)を参照して、上述したように構成された撮像装置 1Bに関 し、使用者によりレリーズボタン 52が押されて力もの動作について説明する。図 24は 、撮像装置 1Bのプロセッサ 40での処理手順を示すフローチャートである。図 25 (a) は、原稿 Pにスリット光が照射されて 、る状態を撮像したスリット光有画像を示して 、る
[0162] はじめに、モード切替スィッチ 59の位置が「補正撮像モード」の位置であるか否か が判別される(S2101)。判別の結果、「補正撮像モード」ではな力つた場合には(S2 101 :NO)、「ノーマルモード」での画像データが取得される(S3011)。具体的には 、 S3011では、スリット光投光ユニット 20のレーザーダイオード 21への発光指令が停 止され、第 1スリット光 71及び第 2スリット光 72が出射されていない状態で、 CCD画 像センサ 32から画像データを取得され、この画像データがカードメモリ 55に記憶され る。その後、本処理を終了する。
[0163] 一方、判別の結果が「補正撮像モード」の位置の場合は(S2101 : YES)、スリット 光有画像とスリット光無画像とを取得するカメラ制御処理が行われる(S2102)。具体 的には、スリット光投光ユニット 20に対してレーザーダイオード 21の発光が指令され 、第 1スリット光 71及び第 2スリット光 72が出射された状態で、 CCD画像センサ 32か ら図 25 (a)に示すような第 1、第 2スリット光 71, 72が投光された原稿 Pが写ったスリツ ト有画像が取得される。取得された画像データは RAM43のスリット光有画像格納部 431へ格納される。それから、スリット光投光ユニット 20に対してレーザーダイオード 2 1の発光停止が指令され、第 1、第 2スリット光 71, 72が出射されていない状態で、 C CD画像センサ 32から第 1、第 2スリット光 71, 72が投光されていない原稿 Pが写った スリット光無画像が取得される。取得された画像データはスリット光無画像格納部 432 へ格納される。
[0164] スリット光有画像とスリット光無画像との取得がなされると、次に、 3次元測定と平面 変換処理が行われる(S2103)。この処理では、取得したスリット光有画像とスリット光 無画像とにより、原稿 Pの形状情報としての位置 L、傾き 0、湾曲 φ (X)が求められる 。さらに、この形状情報に基づき、スリット光無画像を正立方向にて正面から見た状 態の原稿 Pだけが画像の中央に配置された平面画像に変換する。また、この処理で は、平面画像をスリット光無画像よりも低解像度の画像に変換する。そのため、平面 画像に変換する際の演算量を少なくし、変換するための処理を高速にすることができ る。平面画像が生成されると、その平面画像は LCD51に表示される(S2104)。
[0165] 使用者力LCD51に表示された平面画像を見て、この平面画像を編集したいと判 断した場合、即ち、操作者によって確定ボタン 58の押下げが為されない場合には(S 2105 : No)、使用者によって操作される各ボタン 57a— 57hの操作状況がヮーキン グエリア 438に一時的に格納される(S2106)。そして、その操作状況に応じて、編集 処理(S2107)を行う編集プログラム 428が実行され、それによつて使用者は LCD51 に表示された平面画像を編集することができる。
[0166] 編集処理(S2107)によって編集された編集画像は、 LCD51に表示される(S210 8)。使用者がその編集画像を見て、更に、この編集画像を編集したいと判断した場 合には、確定ボタン 58は押下げられず(S2105 :No)、 S2106からの処理が繰返さ れる。
[0167] 一方、使用者力LCD51に表示されている画像を保存したいと判断し、確定ボタン 5 8が押下げられると(S2105 :Yes)、 LCD51に表示されている画像はカードメモリ 55 に記憶される(S2109)。メモリカード 55に画像を記憶する場合には、その画像の解 像度は、記憶する前に設定されている解像度よりも高解像で格納される。よって、記 憶した画像を出力する場合には、鮮明な状態の画像を出力することができる。尚、編 集画像を記憶する場合、 3次元測定と平面変換処理 (S2103)において生成された 平面画像は、消去するようにしても良い。平面画像を消去することで、メモリを有効利 用することができるためである。
[0168] 平面画像や編集画像カ モリカード 55に記憶されると(S2109)、ワーキングエリア に一時的に格納された各ボタン 57a— 57dの操作状況は、メモリカード 55に格納し た編集画像に関する編集パラメータとして編集パラメータ格納部 439に格納される(S 3010)。編集パラメータを格納することで、例えば、今回編集した編集画像と同じ態 勢で撮像した画像を、今回と同様に編集したいような場合には、その編集パラメータ 格納部 439に格納された編集パラメータに基づいて編集すれば、新たに各ボタン 57 a— 57hの操作をすることなぐ今回と同様な編集をすることができる。したがって、操 作性を向上させることができる。 S3010が完了すると、本処理を終了する。
[0169] 次に、図 26、図 27 (a)、図 27 (b)、および図 28 (a)—図 28 (c)を参照して、上述し た 3次元測定と平面変換処理(図 24の S2103)について説明する。図 26は、 3次元 測定と平面変換処理を示すフローチャートである。図 27 (a)は、差分画像格納部に 格納されるデータを模式的に示した図であり、図 27 (b)は三角測量演算結果格納部 に格納されるデータを模式的に示した図である。図 28 (a)—図 28 (c)は、画像処理 した画像データを示す図である。
[0170] 図 26の処理では、はじめに、差分抽出処理が実行される(S2801)。差分抽出処 理では、図 23に示す差分抽出プログラム 422によりスリット光有画像に写る第 1スリツ ト光の軌跡 71a及び第 2スリット光の軌跡 72aの位置情報が求められる。
[0171] 具体的には、スリット光有画像とスリット光無画像との差分 (即ち、原稿 Pに投光され た第 1スリット光の軌跡 71a及び第 2スリット光の軌跡 72a)の画像データが生成される 。次に、生成された画像データの下半分(高さ方向位置 ccdyが「800」一「1599」の 間)において、幅方向位置 ccdxが「0」一「1199」の間の 20画素毎に、高さ方向の画 素 1列分での輝度レベルが最大の位置が求められる。この位置を求めた順番に番号 が割り当てられた索引 idxと、その位置を求めた際の幅方向位置 ccdxと、輝度レベル が最大の高さ方向位置 ccdyとが、図 27 (a)に示すようにスリット光画像位置データ 4 33aとして図 23に示す差分画像格納部 433に格納される。
[0172] 尚、輝度レベルの最大の位置は、高さ方向の各画素の輝度レベルを結んだ近似曲 線の最大値の位置である。また、この最大の位置の輝度レベルが所定のレベル以上 で無い場合は、第 1スリット光の軌跡 71aが無いと判断して、スリット光画像位置デー タ 433aとしは格納されない。次に、第 1スリット光の軌跡 71aの位置情報として抽出さ れた画素の総数である抽出画素数 Nに、索引 idxの最大値が設定される。
[0173] 一方、第 2スリット光の軌跡 72aに関する位置情報は、スリット光有画像とスリット光 無画像との差分から生成した画像データの上半分 (高さ方向位置 ccdyが「0」一「79 9」)における幅方向位置 ccdxの中央位置(ccdx= 599)において、高さ方向の輝度 レベルが最大になる位置を求めて得られる。この求められた位置は、第 2スリット光の 軌跡 72aの位置情報として、スリット光画像位置データ 433aと同様の形式で差分画 像格納部 433に格納される。尚、第 1スリット光の軌跡 71aの位置情報と同様、最大 の位置の輝度レベルが所定のレベル以上で無 、場合は、第 2スリット光の軌跡 72a が無 、と判断して差分画像格納部 433へは格納されな 、。
[0174] 次に、三角測量演算処理が実行される (S2802)。三角測量演算処理では、差分 画像格納部 433に格納されたスリット光画像位置データ 433aにより定まる各点に対 して、図 23に示す三角測量演算プログラム 423により、索引 idx毎の 3次元空間位置 が求められる。それから、その演算結果が、図 27 (b)に示すように、索引 idx毎の 3次 元座標値である X値, Y値, Z値のデータをスリット光 3次元位置データ 434aとして図 23に示す三角測量演算結果格納部 434へ格納される。
[0175] 次に、原稿姿勢演算処理が実行される (S2803)。原稿姿勢演算処理では、三角 測量演算結果格納部 434に格納されスリット光 3次元位置データ 434aを用いて、図 23に示す原稿姿勢演算プログラム 424により、原稿 Pの 3次元空間位置 (0, 0, L)、 傾き Θ及び湾曲 φが求められる。
[0176] 次に、平面変換処理が実行される(S2804)。平面変換処理では、図 23に示す平 面変換プログラム 425により、スリット光無画像格納部 432に格納されたスリット光無 画像が、原稿 Pが略直交方向から観察された平面画像 (例えば、図 28 (a)のように、 原稿 Pが矩形形状になる画像)に変換される。得られた平面画像は図 23に示す平面 変換結果画像格納部 435に格納される。
[0177] 次に、面内変位回転認識処理が実行される(S2805)。面内変位回転認識処理で は、図 23に示す面内変位回転認識プログラム 426により、平面画像内に写った原稿 Pの画像領域が識別され、図 28 (b)に示すように、平面画像の中央位置に対する原 稿 Pの画像領域の中央位置の幅方向変位 DH、及び、高さ方向変位 DVと、平面画 像における原稿 Pの画像領域の所定の辺の回転角度 DROTとが求められる。求めら れた結果は図 23に示す面内変位回転認識結果格納部 436に格納される。
[0178] 次に、矩形領域切取り処理が実行される(S2806)。矩形領域切取り処理では、図 23に示す矩形領域切取りプログラム 427により、スリット光無画像格納部 432に格納 されたスリット光無画像力 図 28 (c)に示すように、正立方向にて正面から見られた 原稿 Pだけが画像の中央に配置された平面画像に変換される。得られた画像は図 2 3に示す矩形領域切取り結果画像格納部 437に格納される。以上の処理の後、 3次 元測定と平面変換処理 (S2103)は終了する。
[0179] 尚、上述した三角測量演算処理 (S2802)、原稿姿勢演算処理 (S2803)、平面変 換処理 (S2804)、面内変位回転認識処理 (S2805)、矩形領域切取り処理 (S280 6)については、上述した第 1実施形態におけるそれぞれに対応する処理と同様であ るため、その詳細な説明については省略する。
[0180] 次に、図 29を参照して、編集処理(図 6の S2107)について説明する。図 29は、編 集処理を示すフローチャートである。この処理では、はじめに、操作ボタン 57 (各ボタ ン 57a— 57h)の押下があつたか否かが判断される(S3061)。即ち、図 24の S2106 の処理において、ワーキングエリア 438に操作ボタン 57の操作状況が格納されてい るカゝ否かが判断される。その結果、操作ボタン 57の操作があった場合には(S3061 : Yes)、操作ボタン 57の出力に基づき、変位量、回転角、倍率が計測される(S3062 )。次に、 LCD51に表示されている平面画像 (矩形領域切取り結果画像格納部 437 に格納されている画像)を、計測した変位量だけ変位させ、計測した回転角だけ回転 させ、又は、計測した倍率に設定することにより、編集画像が生成される(S3063)。 その後、図 29の処理を終了する。
[0181] 一方、操作ボタン 57の操作がない場合には(S3061 :No)、編集パラメータ選択ボ タン 65の押下があった力否かが判断される(S3064)。編集パラメータ選択ボタン 65 の押下があれば (S3064: Yes)、編集パラメータ格納部 439に格納されて 、る編集 パラメータの内、直近の編集パラメータに基づいて、 LCD51に表示されている平面 画像 (矩形領域切取り結果画像格納部 437に格納されている画像)を、変位させ、回 転させ、又は、所定の倍率に設定することにより、編集画像が生成される(S3065)。 これにより、使用者は、各ボタン 57a— 57hの操作をすることなぐ編集パラメータ選 択ボタン 65の押下げという簡単な操作で、前回と同様な編集画像を生成することが できる。
[0182] 編集画像が生成された後、直近の編集パラメータは一つ前の編集パラメータに変 更される(S3066)。即ち、編集パラメータ選択ボタン 65を押下げる毎に、一つ前の 編集パラメータに基づ 、て、 LCD51に表示されて 、る平面画像が編集されることに なる。その後、図 29の処理を終了する。
[0183] 図 30 (a)力も図 30 (h)は、操作ボタン 57の操作方法を説明するための図である。
尚、これらの図においては、編集前の原稿 Pの状態を 2点鎖線で示し、編集後の状態 を実線で示している。
[0184] つまり、図 30 (a)のように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが 実線で示す位置に回転するまで左回転用ボタン 57aを押下する。図 30 (b)のように 編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実線で示す位置に移動す るまで上移動用ボタン 57bを押下する。図 30 (c)のように編集したい場合には、使用 者は、 2点鎖線で示す原稿 Pが実線で示す位置に回転するまで右回転用ボタン 57c を押下する。図 30 (d)のように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実線で示す位置に移動するまで、左移動用ボタン 57dを押下する。
[0185] 図 30 (e)のように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実線で 示す位置に移動するまで右移動用ボタン 57eを押下する。図 30 (f)のように編集した い場合には、使用者は、 2点鎖線で示す原稿 Pが実線で示す大きさに縮小されるま で縮小用ボタン 57fを押下する。図 30 (g)のように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実線で示す位置に移動するまで下移動用ボタン 57gを押下 する。図 30 (h)のように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示す大きさに拡大されるまで拡大用ボタン 57hを押下する。
[0186] 図 31 (a)から図 31 (d)は、原稿 Pの特定の部分 (グラフ部分)だけを拡大した画像 に編集する場合の操作ボタン 57の操作方法を説明するための図である。
[0187] まず、図 31 (a)に示すように、原稿 Pが右方向に回転している状態で LCD51に表 示されたとする。この場合、使用者は、 LCD51に表示されている原稿 Pを確認しなが ら、左回転用ボタン 57aを押下する。すると、表示されている原稿 Pは、左回転用ボタ ン 57aを押下した数に応じて、左回転する。それから、使用者は、図 31 (b)に示すよ うに原稿 Pが正面を向 、たと判断した時点で左回転用ボタン 57aの操作を停止する。
[0188] 次に、原稿 Pのグラフ部分を拡大すべく拡大用ボタン 57hを押下し続けることにより 、図 31 (c)に示すように原稿 Pga適当なサイズになった時点で、使用者は拡大用ボタ ン 57hの操作を停止する。最後に、拡大されたグラフ部分が画像の中央部に位置す るように、上移動ボタン 57bを押下することによって図 31 (d)に示すように原稿 Pのグ ラフ部分が画像の中央部に移動したと判断した時点で、使用者は、上移動用ボタン 5 7bの操作を停止する。
[0189] このように、本実施形態の撮像装置 1Bによれば、編集処理(図 24の S2107)にお いて、 LCD51に表示された平面画像を操作ボタン 57の操作によって編集することが できるので、使用者の意図する画像を得ることができる。さらに、本実施形態の撮像 装置 1Bによれば、たとえ面内変位回転認識処理(図 26の S2805)における誤認識 によって、原稿 Pが画像の中央力 ずれた位置に配された場合であっても、使用者は それを補正することができる。
[0190] さらに、使用者は、モード切替スィッチ 59をスライドさせて「補正撮像モード」とし、サ ィズ入力部 56を撮像する原稿 Pの大きさに合わせて設定して、原稿 Pを撮像すること により、湾曲した原稿 Pを斜めから撮像しても、平らな原稿 Pが正立方向にて正面から 見られ、且つ、原稿 Pが写った部分だけ切り抜かれた画像を得ることができる。
[0191] また、本実施形態では、画像に写った第 1,第 2スリット光 71, 72の箇所だけを解析 することによって原稿 Pの姿勢が求められる。したがって、複雑な画像解析を行うこと なぐ容易に検出精度が良い原稿 Pの姿勢を求めることができる。このため、撮像装 置 1Bのプロセッサ 40による画像解析の処理に要する時間を短時間にすること、又は 、プロセッサ 40を簡易なものにすることが可能となる。
[0192] 第 3実施形態
次に、本発明の第 3実施形態による撮像装置 100について説明する。第 3実施形 態の撮像装置 100は、以下で述べる特徴部分を除いては第 2実施形態の撮像装置 1Bと同等の構成を有しているものとする。以下の説明では、第 2実施形態の撮像装 置 1Bに対する第 3実施形態による撮像装置 100の特徴部分が順次記載される。
[0193] 上述した第 2実施形態の撮像装置 1Bは、図 24の編集処理 (S2107)において、操 作ボタン 57の操作に応じて、 LCD51に表示された平面画像を編集するよう構成され ていた。第 3実施形態の撮像装置 100は、操作ボタン 57に代えて、その本体ケース 1 0の 3次元空間内における移動量を検出する検出手段を内蔵している。撮像装置 10 0では、図 24の編集処理 (S2107)に相当する編集処理において、その検出手段で 検出した移動量に応じて、 LCD51に表示された平面画像が編集される。尚、以下で 説明する第 3実施形態の撮像装置 100に関する図において、第 2実施形態の撮像 装置 1Bと同じ構成要素には同じ符号が付されており、その説明は省略する。
[0194] 図 32は、第 3実施形態の撮像装置 100に設定されている 3次元座標を示す図であ る。撮像装置 100には、リレーズボタン 52を上方に向け、 LCD51が手前になるように 本体ケース 10を配置した場合に、本体ケース 10の内部中心位置を原点 Oとして、撮 像装置 100の横方向を X軸 (右方向がプラス)、高さ方向を Y軸 (上方向がプラス)、 厚み方向を Z軸 (手前方向がプラス)とする 3次元座標が設定されている。 [0195] 図 33は、第 3実施形態の撮像装置 100の電気的構成を示すブロック図である。第 3 実施形態の撮像装置 100は、第 2実施形態の撮像装置 1Bに備えられた操作ボタン 57に代えて、原点センサ 61、 X軸センサ 62、 Y軸センサ 63、 Z軸センサ 64を有して V、る。これらのセンサは信号線を介して CPU41と接続されて 、る。
[0196] 各センサ 61— 64は、波形の 1周期のうちのデューティー比を変化させることによつ て加速度の大きさを表す信号を出力する加速度センサである。原点センサ 61は、座 標原点 Oに設置され、 X軸方向と、 Y軸方向と、 Z軸方向とのそれぞれの加速度を検 出可能な 3軸方向用センサである。 X軸センサ 62は、 X軸上に設置され、 X軸方向だ けの加速度を検出可能な 1軸方向用センサである。 Y軸センサ 63は、 Y軸上に設置 され、 Y軸方向だけの加速度を検出可能な 1軸方向用センサである。 Z軸センサ 64 は、 Z軸上に設置され、 Z軸方向だけの加速度を検出可能な 1軸方向用センサである
[0197] 尚、本体ケースの各座標に対する変位量、回転角は、各センサ 61— 64から出力さ れる加速度の大きさを表す信号と、図示および詳細な説明は省略するが、その信号 が出力されるタイミングでカウントされるクロック信号のカウント値とに基づいて算出さ れる。即ち、加速度を積分することによって変位量や回転角が算出さえている。
[0198] 次に、図 34 (a)力も図 34 (f)、及び図 35を参照して、 LCD51に表示された画像を 編集するために、撮像装置 100をどのように移動、回転させるかについて説明する。 尚、図 34 (a)から図 34 (f)は、 2点鎖線で示す原稿 Pを実線で示す原稿 Pのように編 集する場合を図示している。
[0199] 図 34 (a)に示すように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示す位置に回転するまで、図 35の矢印(a)に示すように、撮像装置 100を Y軸 を中心に時計回りに回転させる。尚、逆に、撮像装置 100を Y軸を中心に反時計回り に所定角度回転させると、それに伴って 2点鎖線で示す原稿 Pは、反時計回りに所定 角度だけ回転する。
[0200] 図 34 (b)に示すように編集した 、場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示す位置に移動するまで、図 35の矢印(b)に示すように、撮像装置 100を Y軸 のプラス方向に移動させる。尚、逆に、撮像装置 100を Y軸のマイナス方向に移動さ せると、それに伴って 2点鎖線で示す原稿 Pは、 LCD51の下方に移動する。
[0201] 図 34 (c)に示すように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示す位置に回転するまで、図 35の矢印(c)に示すように、撮像装置 100を Z軸 を中心に回りに回転させる。尚、逆に、撮像装置 100を Z軸を中心に時計回りに所定 角度回転させると、それに伴って 2点鎖線で示す原稿 Pは、時計回りに所定角度だけ 回転する。
[0202] 図 34 (d)に示すように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示すサイズに縮小するまで、図 35の矢印(d)に示すように、撮像装置 100を Z軸 のマイナス方向に移動させる。尚、逆に、撮像装置 100を Z軸のプラス方向に移動さ せると、それに伴って 2点鎖線で示す原稿 Pは拡大する。
[0203] 図 34 (e)に示すように編集したい場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示す位置に移動するまで、図 35の矢印(e)に示すように、撮像装置 100を X軸 を中心に手前側に回転させる。尚、逆に、撮像装置 100を X軸を中心に奥側に回転 させると、それに伴って 2点鎖線で示す原稿 Pは、奥方に回転する。
[0204] 図 34 (f)に示すように編集した 、場合には、使用者は、 2点鎖線で示す原稿 Pが実 線で示す位置に移動するまで、図 35の矢印(f)に示すように、撮像装置 100を X軸 のプラス方向に移動させる。尚、逆に、撮像装置 100を Z軸のマイナス方向に移動さ せると、それに伴って 2点鎖線で示す原稿 Pは、 LCD51中において左方向に移動す る。
[0205] 図 36は、図 24の編集処理(S2107)に相当する編集処理を示すフローチャートで ある。この処理では、はじめに、原点センサ 61からの出力があった力否かが判断され る(S2291)。即ち、第 2実施形態では、図 24の S2106において各ボタン 57a— 57h の操作状況がワーキングエリア 438に一時的に記憶されていた力 この第 3実施形 態では、各ボタン 57a— 57hの操作状況に代えて、本体ケースの移動状況がヮーキ ングエリア 438に一時的に記憶され、そのワーキングエリア 438に本体ケースの移動 状況が記憶されて 、るか否かが判断される。
[0206] 原点出力があった場合には(S2291 :Yes)、原点センサ力もの出力に基づき、撮 像装置 100の変位量、倍率が計測される(S2292)。即ち、原点センサ 61からの出 力があつたということは、撮像装置 100は、回転移動ではなぐ XYZ軸方向の少なくと も 1方向に移動した場合である。この場合、原点センサ 61は、 XYZ軸の各軸方向の 加速度を検出可能であるため、原点センサ 61からの出力があった場合には、他のセ ンサ 62— 64からの出力は留保される。
[0207] 次に、矩形領域切取り結果画像格納部 437に格納されて ヽる平面画像が、計測し た変位量だけ移動され、又は、計測した倍率に設定され、それにより編集画像が生 成される(S2293)。その後、当該処理を終了する。
[0208] 一方、原点センサ 61からの出力がな力つた場合 (S2291 :No)、即ち、撮像装置 1 00が回転移動した場合には、 X軸センサ 62からの出力があった力否かが判断される (S2294)。 X軸センサ 62からの出力がある場合(S2294 : Yes)、 X軸センサ 62から の出力に基づき、 X方向の変位量が計測される(S2295)。次に処理は S2296に進 む。 X軸センサ 62からの出力がなかった場合も(S2294 :No)、処理は S2296に進 む。
[0209] S2296では、 Y軸センサ 63からの出力があつたか否かが判断される。 Y軸センサ 6 3からの出力がある場合(S2296 :Yes)、 Y軸センサ 63からの出力に基づき、 Y方向 の変位量が計測される(S2297)。次に処理は S2298に進む。 Y軸センサ 63からの 出力がなかった場合も(S2296 :No)、処理は S2298〖こ進む。
[0210] S2298では、 Z軸センサ 64からの出力があつたか否かが判断される。 Z軸センサ 6 4からの出力があった場合(S2298 :Yes)、 Z軸センサ 64からの出力に基づき、 Z方 向の変位量が計測される (S2299) 0
[0211] 次【こ、各 S2295、 S2297、 S2299で計 ¾Jされた XYZ軸方向の変位量【こ基づさ、 回転角が計測される (S2300)。
[0212] 例えば、撮像装置 100が図 35の矢印(a)に示すように回転された場合には、原点 センサ 61と Y軸センサ 63とからの出力はなぐ X軸方向の加速度が X軸センサ 62に よって検出され、 Z軸方向の加速度力 ¾軸センサ 64によって検出される。そして、その X軸センサ 62の出力により X軸方向の変位量が計測され、 Z軸センサ 64の出力によ り Z軸方向の変位量が計測される。こうして、この X軸方向の変位量と、 Z軸方向の変 位量とに基づき、 Y軸を中心とした回転角が計測される。尚、撮像装置 100を X軸、 Z 軸を中心に回転移動させた場合にも、同様に処理され、 X軸を中心とした回転角、 Y 軸を中心として回転角が計測される。
[0213] こうして、 S2300において回転角が計測されると、矩形領域切取り結果画像格納部 437に格納されている画像は計測された回転角だけ回転され、編集画像が生成され る(S2301)。その後、図 36の処理を終了する。
[0214] 一方、 Z軸センサ 64からの出力がなかった場合(S2298 :No)、即ち、各センサ 61 一 64力らの出力力 Sな力つた場合には、図 29の S3064— S3066の処理と同様に、編 集パラメータ選択ボタン 65の押下があつたか否かが判断される(S2302)。編集パラ メータ選択ボタン 65の押下があった場合 (S2302 : Yes)、編集パラメータ格納部 43 9に格納されている編集パラメータの内、直近の編集パラメータに基づいて、 LCD51 に表示されている平面画像力 変位され、回転され、又は、所定の倍率に設定される ことにより、編集画像が生成される(S2303)。編集画像が生成された後は、直近の 編集パラメータは一つ前の編集パラメータに変更される(S2304)。その後、図 36の 処理を終了する。
[0215] このように、第 2実施形態の撮像装置 100によれば、撮像装置 100を移動、回転さ せることで、その動作に応じて LCD51に表示された画像を編集することができる。ボ タン操作等に不慣れな使用者であっても、感覚的に編集画像を生成することができ る。更に、第 2実施形態の撮像装置 1Bのように、操作ボタン 57のようなものを、本体 ケース 10の外面に設ける必要がないので、操作ボタン 57を配置するためのスペース 確保する必要がなぐ設計制約を軽減することができる。
[0216] 上記第 2実施形態および第 3実施形態において、図 26のフローチャートの原稿姿 勢演算処理 (S2803)は 3次元形状算出手段と位置付けられる。図 26のフローチヤ ートの平面変換処理 (S2804)は、平面変換手段と位置付けられる。図 24の編集処 理 (S2107)は第 1変更手段と位置付けられる。図 29の S1065の処理は、選択手段 と位置付けられる。図 26の S2805の処理は、面内位置検出手段と位置付けられる。 図 26の S2806の処理は、第 2変更手段と位置付けられる。図 26の S2805の処理は 、面内角度検出手段とも位置付けられる。
[0217] 以上第 2実施形態および第 3実施形態に基づき本発明を説明したが、本発明は上 記第 2実施形態および第 3実施形態に何ら限定されるものでなぐ本発明の主旨を逸 脱しな 、範囲内で種々の改良変形が可能であることは容易に推察できる。
[0218] 例えば、上述した実施形態では、編集処理(図 24の S2107)において、編集する 画像として、矩形領域切取り処理(図 26の S2806)によって原稿 Pの部分だけが切 取られた画像を編集する場合について説明した。しカゝしながら、編集処理(図 24の S 2107)によって編集される画像としては、平面変換処理(図 26の S2804)によって平 面変換された画像であっても良い。カゝかる場合には、面内変位回転認識処理(図 26 の S2805)や矩形領域切取り処理(図 26の S2806)を省略でき、かかる処理をする ための処理負担を軽減させることができる。
[0219] また、上述した第 2実施形態の撮像装置 1Bでは、操作ボタン 57にお 、て原稿 Pの 回転方向を入力するボタンとして、左回転用ボタン 57aと右回転用ボタン 57cとの 2つ のボタンを備えた場合について説明した。し力しながら、原稿 Pの回転方向を入力す るボタンとしては、力かる 2つのボタンに限定されるものではなぐ Y軸を中心に回転 するボタンや X軸を中心に回転するボタンを設けても良い。カゝかる場合には、編集可 能パターンが増え、使用者の意図する編集画像を生成することができる。
[0220] また、上述した第 3実施形態の撮像装置 100は、その本体ケース 10を移動させたり 、回転させたりする場合には、移動させた方向や回転させた方向と同じ方向に原稿 P を移動、回転させるよう構成されていた。し力しながら、本体ケース 10の移動方向や 回転方向とは逆の方向に原稿 Pを移動、回転させるように撮像装置が構成されて 、 ても良い。
[0221] 本実施形態の撮像装置では、スリット光投光ユニット 20が、第 1スリット光 71と、第 2 スリット光 72の 2列のスリット光を出射するように構成されている。しかしながら、出射 するスリット光は、撮像装置が出射するスリット光は 2列に限らず、 3列以上が出射され るよう撮像装置が構成されて 、ても良 、。
[0222] 例えば、図 25 (b)に示す原稿 Pのスリット光の軌跡画像のように、第 1スリット光 71及 び第 2スリット光 72に加えて、第 2スリット光 72と同様の第 3スリット光が、原稿 Pにて第 2スリット光 72の上方に投光されるようにスリット光投光ユニット 20が構成されて ヽても 良い。この場合、第 1一第 3スリット光のスリット光の軌跡の各点の位置から、原稿 Pの 縦方向の湾曲形状に対しても推定することができ、これによりスリット無し画像を補正 して、更に見やすい画像を得ることができる。
[0223] 本実施形態では光源に赤色レーザー光線を放射するレーザーダイオード 21が用 いられている。し力しながら光源としては、面発光レーザー、 LED, EL素子などを含 む、光ビームを出力する様々なタイプの光源を用いることができる。
[0224] 透明平板 24に代えて、入射するレーザー光線のパワーの所定の割合を所定方向 に回折する回折格子を 1面に形成した透明平板が用いられても良い。この場合、回 折格子で回折された 1次光のレーザー光線を第 2スリット光 72とし、そのまま透過する 0次光のレーザー光線を第 1スリット光 71とすることができる。スリット光投光ユニット 2 0から出射されるパターン光は、長手方向に直交する方向に急峻に絞り込まれた細 線の他に、一定の幅を備えたストライプ状の光パターンなど様々なタイプのパターン 光であって良い。
[0225] 第 1スリット光 71と、第 2スリット光 72の位置関係は逆転しても良ぐ第 1の方向つまり 撮像装置 1Bから見て下側に第 2スリット光 72が形成され、第 2の方向に第 1スリットが 形成されるよう、スリット光投光ユニット内の各光学素子が配設されていても良い。
[0226] 撮像装置は、スリット光有画像及びスリット光無画像を、結像レンズ 31及び CCD画 像センサ 32を用いて撮像するよう構成されている。これに対して、撮像装置に、結像 レンズ 31及び CCD画像センサ 32の他に、スリット光有画像を撮像するための結像レ ンズ及び CCD画像センサが別途追加されて ヽても良 、。このように構成することによ り、スリット光有画像とスリット光無画像とを撮像する間の時間経過(CCD画像センサ 32の画像データを転送する時間など)を無くすことができる。その結果、スリット光有 画像に対するスリット光無画像の撮像範囲のずれを無くし、検出する対象物体の 3次 元形状の精度を高めることができる。但し、本実施形態の撮像装置の方が、構成部 品が少なぐ小型で安価なものとすることができる。
[0227] 本発明の一つの実施形態において、入力手段は、表示手段に表示されている平 面画像の移動量と倍率との少なくとも一方を表示態様変更パラメータとして入力可能 な操作子で構成されて ヽても良 、。
[0228] この構成によれば、入力手段が平面画像の移動量と倍率との少なくとも一方を表示 態様変更パラメータとして入力可能な操作子で構成されているので、使用者は、表 示態様パラメータを入力する操作として操作子を操作すれば良ぐ表示態様変更パ ラメータの入力を簡易な操作で行うことができる。
[0229] 本発明の一つの実施形態において、入力手段は、撮像装置本体の 3次元空間内 における移動量を表示態様変更パラメータとして検出する検出手段で構成されてい ても良い。この場合、第 1変更手段は、検出手段で検出される撮像装置本体の 3次元 空間内における移動量を、表示手段に表示されている平面画像の移動量と倍率との 少なくとも一方に関連づけて、平面画像の表示態様を変更する。
[0230] この構成によれば、入力手段は撮像装置本体の 3次元空間内における移動量を表 示態様変更パラメータとして検出する検出手段で構成されているので、使用者は、表 示態様パラメータを入力する操作として、撮像装置本体を 3次元空間内において移 動させれば良い。したがって、表示態様変更パラメータの入力を簡易な操作で行うこ とがでさる。
[0231] また、入力手段を操作子で構成する場合には、撮像装置本体の外面に操作子を 設けるスペースを確保しなければならず、設計上の制約要因となるが、入力手段を検 出手段で構成すれば、検出手段を撮像装置本体の内部に内蔵させることができ、設 計上の制約要因を取り除くことができる。
[0232] 本発明の一つの実施形態において、平面変換手段は、平面画像を撮像画像より低 解像度の画像に変換するよう構成されて 、ても良 、。
[0233] この構成によれば、平面変換手段は、平面画像を撮像画像より低解像度の画像に 変換するので、平面画像の画素数が少なくなり、平面変換手段による変換や平面画 像を用いた処理の演算量を少なくすることができる。
[0234] 本発明の一つの実施形態において、撮像手段は、第 1変更手段で変更された画像 を格納する格納手段を更に備えていても良い。格納手段に格納される画像は、平面 画像より高解像度で格納される。
[0235] この構成によれば、第 1変更手段で変更された画像を格納する格納手段に格納さ れる画像は、平面画像より高解像度で格納されるので、第 1変更手段で変更された 画像を出力する場合には、その画像を鮮明な画像で出力させることができる。 [0236] 本発明の一つの実施形態において、撮像装置は、表示手段に表示される平面画 像の表示態様を変更するために用いた表示態様変更パラメータを記憶する表示態 様変更パラメータ記憶手段と、表示態様変更パラメータ記憶手段に記憶されている 表示態様変更パラメータの内から、表示手段に表示される別の平面画像の表示態様 を変更するために用いる表示態様パラメータを選択する選択手段とを更に備えてい ても良い。第 1変更手段は、選択手段によって選択された表示態様変更パラメータに 基づいて、表示手段に表示される別の平面画像の表示態様を変更する。
[0237] この構成によれば、表示手段に表示される平面画像の表示態様を、以前変更した 平面画像と同様に変更したい場合には、使用者は、表示態様記憶手段に記憶され て 、る以前変更した平面画像を変更するために用いた表示態様パラメータを選択手 段を用いて選択することによって、その選択した表示態様パラメータに基づいて、表 示手段に表示される平面画像の表示態様を変更することができる。表示手段に表示 される平面画像の表示態様を、以前変更した平面画像と同様な表示態様に変更した い場合には、入力手段により以前と同様な表示態様変更パラメータを入力する必要 がない。したがって、操作性が向上される。
[0238] 本発明の一つの実施形態において、撮像装置は、平面画像を表示手段に表示す る前に、平面画像から対象物体が写った対象物体領域を識別して、平面画像におけ る対象物体の位置を求める面内位置検出手段と、面内位置検出手段で求められる 位置と、形状情報とに基づき、平面画像を、所定方向から見られた対象物体が平面 画像の略中央位置に配された画像に変更する第 2変更手段とを更に備えていても良 い。この場合、表示手段に表示される平面画像は、第 2変更手段によって変更された 画像である。
[0239] この構成によれば、表示手段に表示される平面画像は、所定方向から見られた対 象物体が平面画像の略中央位置に配された画像であるので、対象物体を平面画像 の略中央に配するように編集する処理を省略することができる。一般的に、多くの使 用者は、対象物体が平面画像の略中央に配置されるように意図しており、このような 多くの使用者が意図する画像を自動的に生成することで、装置の汎用性を向上させ ることがでさる。 [0240] 本発明の一つの実施形態において、撮像手段は、平面画像を表示手段に表示す る前に、平面画像から対象物体が写った対象物体領域を識別して、平面画像面内 の所定の方向に対する対象物体領域の所定の辺の角度を求める面内角度検出手 段を備えていても良い。第 2変更手段は、面内角度検出手段で求められる角度と、面 内位置検出手段で求められる位置と、形状情報とに基づき、平面画像を、所定方向 から見られた対象物体が略中央位置に配され、且つ、対象物体の所定の辺が平面 画像内の所定の方向に向けられた画像に変更する。
[0241] この構成によれば、表示手段に表示される平面画像は、所定方向から見られた対 象物体が略中央位置に配され、更に、対象物体の所定の辺が平面画像内の所定の 方向に向けられた画像である。したがって、装置の汎用性を向上させることができると いう上述の効果を一層顕著なものにすることができる。

Claims

請求の範囲
[1] 所定形状の対象物体が写った対象物体画像、及び、該対象物体の 3次元形状に 関する形状情報が入力され、該形状情報に基づき前記対象物体画像を前記対象物 体が所定の方向から見られた平面画像に変換する平面変換手段と、
前記平面画像における前記対象物体が写った領域である対象物体領域を識別し て、前記平面画像における対象物体の位置を求める面内位置検出手段と、 を備えることを特徴とする画像処理装置。
[2] 前記形状情報、及び、該面内位置検出手段にて求められた前記対象物体の位置 に基づき、前記対象物体画像を、前記対象物体が所定の方向から見られ且つ前記 対象物体が略中央位置に配された補正画像に変換する第 1補正変換手段を更に備 えること、
を備えることを特徴とする請求項 1に記載の画像処理装置。
[3] 前記平面画像における前記対象物体領域を識別して、前記平面画像面内の所定 の方向に対する該対象物体領域の所定の辺の角度を求める面内角度検出手段を 更に備えること、を特徴とする請求項 2に記載の画像処理装置。
[4] 前記第 1補正変換手段は、前記形状情報、前記面内位置検出手段にて求められ た前記対象物体の位置、及び、前記面内角度検出手段にて求められた角度に基づ き、前記対象物体画像を、前記対象物体が所定の方向から見られると共に前記対象 物体が略中央位置に配され、且つ前記対象物体の所定の辺が当該画像内の所定 の方向に向けられた補正画像に変換すること、を特徴とする請求項 3に記載の画像
[5] 前記第 1補正変換手段は、
前記補正画像への変換を、前記対象物体画像の前記対象物体が写る領域に対し てだけ行うことを特徴とする請求項 2に記載の画像処理装置。
[6] 前記対象物体画像は、多色画像であり、
前記第 1補正変換手段は、前記対象物体画像の画素の色数と同じ色数の前記補 正画像に変換することを特徴とする請求項 2に記載の画像処理装置。
[7] 前記補正画像内における前記対象物体が写った部分を所定の形状で切り取った 状態の画像を抽出する画像切取り手段を更に備えることを特徴とする請求項 2に記 載の画像処理装置。
[8] 所定形状の対象物体が写った対象物体画像、及び、該対象物体の 3次元形状に 関する形状情報が入力され、該形状情報に基づき、該対象物体画像を、該対象物 体が所定の方向から見られた平面画像に変換する平面変換手段と、
前記平面画像における前記対象物体が写った領域である対象物体領域を識別し て、該対象物体領域の所定の辺と、前記平面画像面内の所定の方向との間の角度 を求める面内角度検出手段と、
を備えることを特徴とする画像処理装置。
[9] 前記形状情報、及び、該面内角度検出手段で求めた角度に基づき、前記対象物 体画像を、前記対象物体が所定の方向から見られ且つ前記対象物体の所定の辺が 当該画像内の所定の方向に向けられた補正画像に変換する第 2補正変換手段を更 に備えること、を特徴とする請求項 8に記載の画像処理装置。
[10] 前記第 2補正変換手段は、
前記補正画像への変換を、前記対象物体画像の前記対象物体が写る領域に対し てだけ行うことを特徴とする請求項 9に記載の画像処理装置。
[11] 前記対象物体画像は、多色画像であり、
前記第 2補正変換手段は、前記対象物体画像の画素の色数と同じ色数の前記補 正画像に変換することを特徴とする請求項 9に記載の画像処理装置。
[12] 前記補正画像内における前記対象物体が写った部分を所定の形状で切り取った 状態の画像を抽出する画像切取り手段を更に備えることを特徴とする請求項 9に記 載の画像処理装置。
[13] 前記平面変換手段にて変換される前記対象物体画像の範囲を入力するための範 囲入力手段を更に備え、
前記平面変換手段は、前記範囲入力手段により入力された前記対象物体画像の 範囲を前記平面画像に変換することを特徴とする請求項 1から請求項 12のいずれか 記載の画像処理装置。
[14] 前記対象物体は、所定の面を直交する方向から見られた形状が矩形であることを 特徴とする請求項 1から請求項 12のいずれか記載の画像処理装置。
[15] 前記平面変換手段は、
前記対象物体画像の解像度に比べて低解像度の前記平面画像に変換することを 特徴とする請求項 1から請求項 12のいずれか記載の画像処理装置。
[16] 前記対象物体画像は、多色画像であり、
前記平面変換手段は、画素の色数が単色の前記平面画像に変換することを特徴と する請求項 1から請求項 12のいずれか記載の画像処理装置。
[17] 請求項 1または請求項 8に記載の画像処理装置と、
パターン光を投光する投光手段と、
前記対象物体を撮像し前記対象物体画像を取得する撮像手段と、
前記パターン光が投光された前記対象物体を前記撮像手段によって撮像すること によって得られる画像に基づき、前記対象物体の 3次元形状に関する形状情報を算 出する 3次元形状検出手段とを備え、
前記撮像手段によって得られる前記対象物体画像と前記 3次元形状検出手段によ つて算出される形状情報とが前記画像処理装置に入力されること、を特徴とする撮像
[18] 請求項 2から請求項 7のいずれかに記載の画像処理装置と、
パターン光を投光する投光手段と、
前記対象物体を撮像し前記対象物体画像を取得し前記画像処理装置に入力する 撮像手段と、
前記パターン光が投光された前記対象物体を前記撮像手段によって撮像すること によって得られる画像に基づき、前記対象物体の 3次元形状に関する形状情報を算 出し該形状情報を前記画像処理装置に入力する 3次元形状検出手段と、 前記第 1補正変換手段によって得られる補正画像を表示する表示手段と、 前記表示手段に表示されている補正画像の表示態様を変更するための表示態様 変更パラメータを入力する入力手段と、
前記入力手段によって入力される表示態様変更パラメータに基づき、前記表示手 段に表示されている補正画像の表示態様を変更する変更手段と、 を備えることを特徴とする撮像装置。
[19] 請求項 9から請求項 12のいずれかに記載の画像処理装置と、
パターン光を投光する投光手段と、
前記対象物体を撮像し前記対象物体画像を取得し前記画像処理装置に入力する 撮像手段と、
前記パターン光が投光された前記対象物体を前記撮像手段によって撮像すること によって得られる画像に基づき、前記対象物体の 3次元形状に関する形状情報を算 出し該形状情報を前記画像処理装置に入力する 3次元形状検出手段と、 前記第 2補正変換手段によって得られる補正画像を表示する表示手段と、 前記表示手段に表示されている補正画像の表示態様を変更するための表示態様 変更パラメータを入力する入力手段と、
前記入力手段によって入力される表示態様変更パラメータに基づき、前記表示手 段に表示されている補正画像の表示態様を変更する変更手段と、
を備えることを特徴とする撮像装置。
[20] パターン光を投光する投光手段と、
対象物体を撮像し前記対象物体の撮像画像を取得する撮像手段と、
前記パターン光が投光された前記対象物体を前記撮像手段によって撮像すること によって得られる画像に基づき、前記対象物体の 3次元形状に関する形状情報を算 出する 3次元形状算出手段と、
前記 3次元形状算出手段で算出される形状情報に基づき、前記撮像画像を前記 対象物体が所定の方向から見られた平面画像に変換する平面変換手段と、 前記平面変換手段によって変換される平面画像を表示する表示手段と、 前記表示手段に表示されている平面画像の表示態様を変更するための表示態様 変更パラメータを入力する入力手段と、
前記入力手段によって入力される表示態様変更パラメータに基づき、前記表示手 段に表示されている平面画像の表示態様を変更する第 1変更手段と、
を備えることを特徴とする撮像装置。
[21] 前記入力手段は、前記表示手段に表示されている平面画像の移動量と倍率との少 なくとも一方を前記表示態様変更パラメータとして入力可能な操作子で構成されてい ることを特徴とする請求項 20に記載の撮像装置。
[22] 前記入力手段は、撮像装置本体の 3次元空間内における移動量を前記表示態様 変更パラメータとして検出する検出手段で構成され、
前記第 1変更手段は、前記検出手段で検出される撮像装置本体の 3次元空間内に おける移動量を、前記表示手段に表示されている平面画像の移動量と倍率との少な くとも一方に関連づけて、前記平面画像の表示態様を変更することを特徴とする請求 項 20に記載の撮像装置。
[23] 前記平面変換手段は、前記平面画像を前記撮像画像より低解像度の画像に変換 することを特徴とする請求項 20に記載の撮像装置。
[24] 前記第 1変更手段で変更された画像を格納する格納手段を更に備え、
前記格納手段に格納される画像は、前記平面画像より高解像度で格納されること を特徴とする請求項 20に記載の撮像装置。
[25] 前記表示手段に表示される平面画像の表示態様を変更するために用いた表示態 様変更パラメータを記憶する表示態様変更パラメータ記憶手段と、
前記表示態様変更パラメータ記憶手段に記憶されている表示態様変更パラメータ の内から、前記表示手段に表示される別の平面画像の表示態様を変更するために 用いる表示態様パラメータを選択する選択手段とを更に備え、
前記第 1変更手段は、前記選択手段によって選択された表示態様変更パラメータ に基づ!/、て、前記表示手段に表示される別の平面画像の表示態様を変更することを 特徴とする請求項 20に記載の撮像装置。
[26] 前記平面画像を前記表示手段に表示する前に、前記平面画像から前記対象物体 が写った対象物体領域を識別して、前記平面画像における対象物体の位置を求め る面内位置検出手段と、
前記面内位置検出手段で求められる位置と、前記形状情報とに基づき、前記平面 画像を、所定方向から見られた前記対象物体が前記平面画像の略中央位置に配さ れた画像に変更する第 2変更手段とを更に備え、
前記表示手段に表示される平面画像は、前記第 2変更手段によって変更された画 像であることを特徴とする請求項 20に記載の撮像装置。
[27] 前記平面画像を前記表示手段に表示する前に、前記平面画像から前記対象物体 が写った対象物体領域を識別して、前記平面画像面内の所定の方向に対する前記 対象物体領域の所定の辺の角度を求める面内角度検出手段を備え、
前記第 2変更手段は、前記面内角度検出手段で求められる角度と、前記面内位置 検出手段で求められる位置と、前記形状情報とに基づき、前記平面画像を、所定方 向から見られた前記対象物体が略中央位置に配され、且つ、前記対象物体の所定 の辺が前記平面画像内の所定の方向に向けられた画像に変更することを特徴とする 請求項 26に記載の撮像装置。
PCT/JP2004/013516 2003-09-18 2004-09-16 画像処理装置、及び、撮像装置 WO2005029408A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/374,252 US7627196B2 (en) 2003-09-18 2006-03-14 Image processing device and image capturing device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2003-326614 2003-09-18
JP2003326614A JP2005092629A (ja) 2003-09-18 2003-09-18 画像処理装置、及び、撮像装置
JP2003-416343 2003-12-15
JP2003416343A JP2005174184A (ja) 2003-12-15 2003-12-15 撮像装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US11/374,252 Continuation-In-Part US7627196B2 (en) 2003-09-18 2006-03-14 Image processing device and image capturing device

Publications (1)

Publication Number Publication Date
WO2005029408A1 true WO2005029408A1 (ja) 2005-03-31

Family

ID=34380326

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/013516 WO2005029408A1 (ja) 2003-09-18 2004-09-16 画像処理装置、及び、撮像装置

Country Status (2)

Country Link
US (1) US7627196B2 (ja)
WO (1) WO2005029408A1 (ja)

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8010898B2 (en) * 2006-11-30 2011-08-30 Oce-Technologies B.V. Process of specifying print time fold method, location, and orientation
JP5109803B2 (ja) * 2007-06-06 2012-12-26 ソニー株式会社 画像処理装置、画像処理方法及び画像処理プログラム
US8608321B2 (en) 2008-06-17 2013-12-17 The Invention Science Fund I, Llc Systems and methods for projecting in response to conformation
US8936367B2 (en) 2008-06-17 2015-01-20 The Invention Science Fund I, Llc Systems and methods associated with projecting in response to conformation
US8376558B2 (en) 2008-06-17 2013-02-19 The Invention Science Fund I, Llc Systems and methods for projecting in response to position change of a projection surface
US8384005B2 (en) 2008-06-17 2013-02-26 The Invention Science Fund I, Llc Systems and methods for selectively projecting information in response to at least one specified motion associated with pressure applied to at least one projection surface
US8267526B2 (en) 2008-06-17 2012-09-18 The Invention Science Fund I, Llc Methods associated with receiving and transmitting information related to projection
US8641203B2 (en) 2008-06-17 2014-02-04 The Invention Science Fund I, Llc Methods and systems for receiving and transmitting signals between server and projector apparatuses
US20090310038A1 (en) 2008-06-17 2009-12-17 Searete Llc, A Limited Liability Corporation Of The State Of Delaware Projection in response to position
US8733952B2 (en) 2008-06-17 2014-05-27 The Invention Science Fund I, Llc Methods and systems for coordinated use of two or more user responsive projectors
US8262236B2 (en) 2008-06-17 2012-09-11 The Invention Science Fund I, Llc Systems and methods for transmitting information associated with change of a projection surface
US8955984B2 (en) 2008-06-17 2015-02-17 The Invention Science Fund I, Llc Projection associated methods and systems
US20090309826A1 (en) 2008-06-17 2009-12-17 Searete Llc, A Limited Liability Corporation Of The State Of Delaware Systems and devices
US8308304B2 (en) * 2008-06-17 2012-11-13 The Invention Science Fund I, Llc Systems associated with receiving and transmitting information related to projection
US8944608B2 (en) 2008-06-17 2015-02-03 The Invention Science Fund I, Llc Systems and methods associated with projecting in response to conformation
US8723787B2 (en) 2008-06-17 2014-05-13 The Invention Science Fund I, Llc Methods and systems related to an image capture projection surface
US8400564B2 (en) * 2010-05-03 2013-03-19 Microsoft Corporation Image capture
JP5159986B2 (ja) * 2010-08-06 2013-03-13 パナソニック株式会社 撮像装置および撮像方法
JP5644461B2 (ja) * 2010-12-14 2014-12-24 富士ゼロックス株式会社 画像処理装置及びプログラム
US20150254043A1 (en) * 2014-03-04 2015-09-10 Sung Jae Hwang Display property determination
CN105791660A (zh) * 2014-12-22 2016-07-20 中兴通讯股份有限公司 一种纠正被摄物体拍摄倾斜的方法、装置及移动终端
KR101828376B1 (ko) * 2016-05-13 2018-02-13 (주)칼리온 휴대용 3차원 문서 스캐닝 장치 및 방법
US10325166B2 (en) * 2017-04-13 2019-06-18 Here Global B.V. Method, apparatus, and system for a parametric representation of signs
US10650631B2 (en) 2017-07-28 2020-05-12 Hand Held Products, Inc. Systems and methods for processing a distorted image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07245700A (ja) * 1994-03-04 1995-09-19 Minolta Co Ltd デジタル複写機
JPH09138869A (ja) * 1995-11-15 1997-05-27 Meidensha Corp 画像整形方法
JPH09289610A (ja) * 1996-04-23 1997-11-04 Minolta Co Ltd デジタルカメラ
JP2002165083A (ja) * 2000-11-24 2002-06-07 Hitachi Ltd 画像処理方法及び、それを用いた非接触画像入力装置
JP2003008841A (ja) * 2001-06-20 2003-01-10 Ricoh Co Ltd 画像入力装置
JP2003234890A (ja) * 2002-02-08 2003-08-22 Ricoh Co Ltd 画像補正装置、プログラム、記憶媒体及び画像補正方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6640004B2 (en) * 1995-07-28 2003-10-28 Canon Kabushiki Kaisha Image sensing and image processing apparatuses
US6449004B1 (en) * 1996-04-23 2002-09-10 Minolta Co., Ltd. Electronic camera with oblique view correction
GB0104664D0 (en) 2001-02-23 2001-04-11 Hewlett Packard Co Improvements relating to document capture
JP4480488B2 (ja) * 2003-08-28 2010-06-16 富士通株式会社 計測装置、コンピュータ数値制御装置及びプログラム
JP2005148813A (ja) * 2003-11-11 2005-06-09 Brother Ind Ltd 3次元形状検出装置、撮像装置、及び、3次元形状検出プログラム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07245700A (ja) * 1994-03-04 1995-09-19 Minolta Co Ltd デジタル複写機
JPH09138869A (ja) * 1995-11-15 1997-05-27 Meidensha Corp 画像整形方法
JPH09289610A (ja) * 1996-04-23 1997-11-04 Minolta Co Ltd デジタルカメラ
JP2002165083A (ja) * 2000-11-24 2002-06-07 Hitachi Ltd 画像処理方法及び、それを用いた非接触画像入力装置
JP2003008841A (ja) * 2001-06-20 2003-01-10 Ricoh Co Ltd 画像入力装置
JP2003234890A (ja) * 2002-02-08 2003-08-22 Ricoh Co Ltd 画像補正装置、プログラム、記憶媒体及び画像補正方法

Also Published As

Publication number Publication date
US20060164526A1 (en) 2006-07-27
US7627196B2 (en) 2009-12-01

Similar Documents

Publication Publication Date Title
WO2005029408A1 (ja) 画像処理装置、及び、撮像装置
US8123361B2 (en) Dual-projection projector and method for projecting images on a plurality of planes
CN102401646B (zh) 基于结构光测量的方法
JP6506507B2 (ja) 測定装置およびその制御方法
EP3468163B1 (en) Intelligent internet high-definition scanner with laser correction
JP2007271530A (ja) 3次元形状検出装置及び3次元形状検出方法
JPH1183459A (ja) 凹凸面情報検出装置
JP2006279546A (ja) 電子カメラ、画像処理プログラム、および画像処理方法
WO2006112297A1 (ja) 3次元形状測定装置
US20060192082A1 (en) Three-dimensional shape detecting device, image capturing device, and three-dimensional shape detecting program
US11016366B2 (en) Printer-equipped imaging apparatus, operation method of printer-equipped imaging apparatus, program, and recording medium
JP2008292570A (ja) 投射型映像表示装置
JPH09196632A (ja) 3次元計測のための分光装置
WO2007119396A1 (ja) 三次元情報測定装置
WO2005008174A1 (ja) 3次元形状検出装置、撮像装置、及び、3次元形状検出方法
JP2000004383A (ja) 多方向画像取込装置
JP4221808B2 (ja) 3次元データ入力方法及び装置
WO2021192706A1 (ja) 照明制御装置、撮像装置、照明制御方法及びプログラム
US7372580B2 (en) Three-dimensional shape detecting device, three-dimensional shape detecting system, and three-dimensional shape detecting program
JP2005092629A (ja) 画像処理装置、及び、撮像装置
JP2005092629A5 (ja)
JP4360145B2 (ja) 3次元形状検出装置、撮像装置、及び、3次元形状検出方法
WO2005080915A1 (ja) 3次元形状検出装置および撮像装置
JP2005148813A5 (ja)
JP2004132703A (ja) 測定システム、演算方法および演算プログラム

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BW BY BZ CA CH CN CO CR CU CZ DK DM DZ EC EE EG ES FI GB GD GE GM HR HU ID IL IN IS KE KG KP KR LC LK LR LS LT LU LV MA MD MG MN MW MX MZ NA NI NO NZ OM PG PL PT RO RU SC SD SE SG SK SL SY TM TN TR TT TZ UA UG US UZ VC YU ZA ZM

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SZ TZ UG ZM ZW AM AZ BY KG MD RU TJ TM AT BE BG CH CY DE DK EE ES FI FR GB GR HU IE IT MC NL PL PT RO SE SI SK TR BF CF CG CI CM GA GN GQ GW ML MR SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 11374252

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 11374252

Country of ref document: US

122 Ep: pct application non-entry in european phase