WO2017033853A1 - 情報処理装置および情報処理方法 - Google Patents

情報処理装置および情報処理方法 Download PDF

Info

Publication number
WO2017033853A1
WO2017033853A1 PCT/JP2016/074207 JP2016074207W WO2017033853A1 WO 2017033853 A1 WO2017033853 A1 WO 2017033853A1 JP 2016074207 W JP2016074207 W JP 2016074207W WO 2017033853 A1 WO2017033853 A1 WO 2017033853A1
Authority
WO
WIPO (PCT)
Prior art keywords
distance
image
position information
acquisition unit
search range
Prior art date
Application number
PCT/JP2016/074207
Other languages
English (en)
French (fr)
Inventor
稲田 徹悟
寛史 岡本
Original Assignee
株式会社ソニー・インタラクティブエンタテインメント
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社ソニー・インタラクティブエンタテインメント filed Critical 株式会社ソニー・インタラクティブエンタテインメント
Priority to EP16839200.9A priority Critical patent/EP3343500B1/en
Priority to US15/740,639 priority patent/US10559089B2/en
Publication of WO2017033853A1 publication Critical patent/WO2017033853A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • G01C3/08Use of electric radiation detectors
    • G01C3/085Use of electric radiation detectors with electronic parallax measurement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • G01C3/08Use of electric radiation detectors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Definitions

  • the present invention relates to a technique for recognizing the position and movement of an object using a captured image.
  • stereo image method as a general method for obtaining the position of an object in a three-dimensional space.
  • corresponding points are detected from stereo images obtained by simultaneously capturing the same space with two cameras separated by a known distance on the left and right, and the distance from the imaging surface of the object is determined based on the parallax based on the principle of triangulation. This is a calculation method.
  • the present invention has been made in view of such problems, and an object of the present invention is to provide a technique capable of acquiring position information of an object in a three-dimensional space with high accuracy and high speed.
  • An aspect of the present invention relates to an information processing apparatus.
  • the information processing apparatus includes an image acquisition unit that acquires data of a stereo image obtained by photographing the same space with left and right cameras having a known interval, and a search block that is set for the reference block set for one of the stereo images.
  • a position information generating unit that detects a corresponding point by performing block matching to detect a region having a high degree of similarity, generates position information including a distance from the camera of the object based on the parallax, and outputs the position information.
  • the position information generation unit determines an estimated distance range from the camera of the target object, performs block matching after limiting the search range with a position and a length corresponding to the estimated distance range, and performing block matching .
  • This information processing method includes a step of acquiring data of a stereo image obtained by photographing the same space with left and right cameras having a known interval from an imaging device, and a search range set on the other side with respect to a reference block set on one side of the stereo image Detecting a corresponding point by performing block matching for detecting a region having a high similarity in the image, and generating and outputting position information including the distance from the camera of the target object based on the parallax, and The step of generating is to determine an estimated distance range from the camera of the target object, and to perform block matching after setting a limited search range with a position and length corresponding to the estimated distance range .
  • information processing based on the position and movement of an object in a captured image can be realized at high speed and with high accuracy.
  • the first position information acquisition unit detects an object at a predetermined position by setting a detection surface
  • the second position information acquisition unit describes the flow of processing when performing detailed stereo matching FIG.
  • FIG. 1 shows a configuration example of an information processing system to which this embodiment can be applied.
  • the information processing system 2 includes an imaging device 12 equipped with two cameras that photograph a subject such as the user 1, an information processing device 10 that performs information processing according to a user's request based on the captured image, and an information processing device 10 A display device 16 that outputs image data obtained as a result of the processing is included.
  • the information processing apparatus 10 may be connectable to a network such as the Internet.
  • the information processing apparatus 10, the imaging apparatus 12, and the display apparatus 16 may be connected by a wired cable, or may be wirelessly connected by a wireless LAN (Local Area Network) or the like. Any two or all of the imaging device 12, the information processing device 10, and the display device 16 may be combined and integrally provided. Further, the imaging device 12 is not necessarily installed on the display device 16. Further, the number and type of subjects are not limited.
  • the imaging device 12 has a configuration of a stereo camera in which two digital video cameras each provided with an imaging element such as a CCD (Charge-Coupled Device) or a CMOS (Complementary Metal-Oxide-Semiconductor) are arranged on the left and right sides at a known interval. Each of the two digital video cameras captures a subject existing in the same space at a predetermined frame rate from the left and right positions.
  • a pair of frames shot in this way is also referred to as a “stereo image”.
  • the information processing apparatus 10 detects the position of the subject in the three-dimensional space including the image plane and the depth direction from the camera. The detection result is used for subsequent processing using the position and movement of the subject as input information. For example, it is used to realize an AR (augmented reality) in which a virtual object that reacts to the movement of the hand or foot of the user 1 as a subject is drawn on a captured image. Alternatively, the movement of the user 1 may be tracked and reflected in a game image or converted into an information processing command input. As described above, the purpose of using the information related to the position of the subject obtained in the present embodiment is not particularly limited.
  • the display device 16 displays the result of the processing performed by the information processing device 10 as an image as necessary.
  • the display device 16 may be a television having a display for outputting an image and a speaker for outputting sound, such as a liquid crystal television, a plasma television, a PC display, or the like.
  • the content of the process finally executed by the information processing apparatus 10 and the image to be displayed are not particularly limited depending on the purpose of use, and hence the focus is on the subject position detection process performed by the information processing apparatus 10 thereafter. Will be explained.
  • FIG. 2 shows an internal circuit configuration of the information processing apparatus 10.
  • the information processing apparatus 10 includes a CPU (Central Processing Unit) 22, a GPU (Graphics Processing Unit) 24, and a main memory 26.
  • the main memory 26 is composed of RAM (Random Access Memory) and stores programs and data necessary for processing. These units are connected to each other via a bus 30.
  • An input / output interface 28 is further connected to the bus 30.
  • the input / output interface 28 includes a peripheral device interface such as USB or IEEE1394, a communication unit 32 including a wired or wireless LAN network interface, a storage unit 34 such as a hard disk drive or a nonvolatile memory, an output of the display device 16 or a speaker.
  • An output unit 36 for outputting data to the device an input unit 38 for inputting data from an input device such as a keyboard, a mouse, an imaging device 12 and a microphone, and a recording medium drive for driving a removable recording medium such as a magnetic disk, an optical disk or a semiconductor memory
  • the unit 40 is connected.
  • the CPU 22 performs information processing based on various programs read from the operating system and the removable recording medium stored in the storage unit 34 and loaded into the main memory 26 or downloaded via the communication unit 32. Execute. In addition, it controls processing and signal transmission in various circuits inside the information processing apparatus 10.
  • the GPU 24 has a function of a geometry engine and a function of a rendering processor, performs a drawing process according to a drawing command from the CPU 22, and stores display image data in a frame buffer (not shown). Then, the display image data is converted into a video signal and output to the output unit 36 or the like.
  • FIG. 3 shows a configuration of functional blocks of the imaging device 12 and the information processing device 10.
  • Each functional block shown in FIG. 3 can be realized in terms of hardware by the configuration of the CPU, GPU, memory such as RAM, and various circuits shown in FIG. 2, and in terms of software, it can be changed from a recording medium to the memory.
  • the loaded program is realized by a program that exhibits various functions such as a data input function, a data holding function, an image analysis function, and a drawing function. Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof, and is not limited to any one.
  • the imaging device 12 includes a first camera 13a and a second camera 13b. Each camera captures a subject at a predetermined frame rate from left and right positions having a known interval. A stereo image obtained by photographing is transmitted to the information processing apparatus 10 at any time by a general method according to a request from the information processing apparatus 10.
  • the information processing apparatus 10 includes an image acquisition unit 42 that acquires data such as a stereo image from the imaging device 12, an input information acquisition unit 44 that acquires an instruction input from a user, and position information that generates position information of a subject based on a captured image.
  • Generation unit 46, output information generation unit 50 that performs necessary processing based on the position of the subject and generates output information, stereo image data acquired from imaging device 12, intermediate data generated by position information generation unit 46, and the like are stored
  • An image data storage unit 48 is included.
  • the input information acquisition unit 44 receives an instruction input from a user other than the imaging device 12 such as a process start / end request, a menu selection, a user operation on a game being executed, and the like, and receives a process request signal corresponding thereto. Send to other functional blocks.
  • the input information acquisition unit 44 is realized by the cooperation of a general input device such as a button, a keyboard, a mouse, a trackball, and a touch panel, and the CPU 22 that interprets the operation content performed on the input device and generates a processing request signal. To do.
  • the image acquisition unit 42 acquires data such as a stereo image from the imaging device 12 in accordance with a request from the input information acquisition unit 44 and stores it in the image data storage unit 48.
  • the data to be acquired may vary depending on the content of information processing performed by the information processing apparatus 10. For example, only an image captured by the first camera 13a may be acquired at a frame rate at the time of capturing, and stereo images captured by the first camera 13a and the second camera 13b may be acquired at a lower rate, that is, a frequency. That is, the acquisition rate of the image captured by the first camera 13a and the image captured by the second camera 13b may be set independently.
  • the image acquisition unit 42 is realized by the cooperation of the input unit 38, the input / output interface 28, and the CPU 22 shown in FIG.
  • the position information generation unit 46 is realized by the CPU 22, the GPU 24, and the like shown in FIG. 2, and generates information on the position of the subject in the three-dimensional space based on the stereo image data stored in the image data storage unit 48.
  • the position information generation unit 46 includes a first position information acquisition unit 52 and a second position information acquisition unit 56.
  • the position information generation process is divided into two processes, ie, a first process performed by the first position information acquisition unit 52 and a second process performed by the second position information acquisition unit 56. Improve and speed up processing. At this time, there are a case where the first process is a pre-process of the second process and a case where the first process and the second process are performed in parallel.
  • the first position information acquisition unit 52 specifies the approximate position of the subject by a predetermined means, and the second position information acquisition unit 56 sets the approximate position. Based on the target, detailed position information is acquired.
  • the second position information acquisition unit 56 acquires position information by a stereo image method, but the means for the first position information acquisition unit 52 to specify an approximate position may be various.
  • the second position information acquisition unit 56 limits the search range of corresponding points in the stereo image based on the range in which the target of interest is estimated.
  • the first position information acquisition unit 52 and the second position information acquisition unit 56 acquire the position information while paying attention to the objects that they are responsible for.
  • both the first position information acquisition unit 52 and the second position information acquisition unit 56 acquire position information by the stereo image method. And both limit the search range of the corresponding point in a stereo image based on the range in which the presence of the target object is estimated.
  • the second position information acquisition unit 56 also integrates the position information generated by the first process and the position information generated by the second process, and performs a process of generating final position information. .
  • the output information generation unit 50 is realized by the CPU 22, the GPU 24, and the like shown in FIG. 2, and further performs drawing processing on the captured image read from the image data storage unit 48 based on the position information of the subject generated by the position information generation unit 46. Appropriate processing according to the purpose of use is performed. As described above, the processing performed here is not particularly limited, and may be switched as appropriate according to an instruction from the user received by the input information acquisition unit 44, a program to be executed, or the like. The image data obtained as a result of the processing is output and displayed on the display device 16. Or you may transmit to another apparatus via a network. The output information generation unit 50 may further generate audio data corresponding to the movement of the subject and output it from a speaker.
  • FIG. 4 is a diagram for explaining the relationship between the parallax in the stereo image and the position of the subject in the depth direction.
  • the first camera 13a and the second camera 13b are installed so as to have parallel optical axes separated by a distance L. For these cameras, it is assumed that the subject is located at the rightmost arrow separated by a distance Z in the depth direction.
  • the width ⁇ x in the real space represented by one pixel of the image captured by each camera is expressed in proportion to the distance Z as follows.
  • ⁇ x Z ⁇ w / W
  • W is the number of pixels in the lateral direction of the camera
  • w is the visual field range in the lateral direction of the real space when the distance Z is unit length, and is determined by the viewing angle.
  • C is a value determined by the camera and its setting, and can be regarded as a constant during operation.
  • FIG. 5 is a diagram for explaining a basic block matching technique.
  • a reference block 182 having a predetermined size is set in, for example, the right viewpoint image 180b among the left viewpoint image 180a and the right viewpoint image 180b constituting the stereo image.
  • the size of the reference block 182 is, for example, 4 ⁇ 4 pixels, 8 ⁇ 8 pixels, or the like. Since the parallax D is obtained in units of reference blocks, the resolution of the position information in the depth direction is 1/4 ⁇ 1/4 times the original image if it is 4 ⁇ 4 pixels, and 1/8 ⁇ if it is 8 ⁇ 8 pixels. 1/8 times.
  • a block 184 having a higher degree of similarity than the reference block 182 of the right viewpoint image 180b is specified.
  • a search range 186 having a predetermined length in the horizontal direction is set. Considering that the image in the left viewpoint image 180a is closer to the right than the image of the same subject in the right viewpoint image 180b due to the parallax, the search range 186 is on the right side with the horizontal position x1 of the reference block 182 as the starting point.
  • the block frame having the same size as the reference block 182 is shifted in the horizontal direction within the search range 186, and the similarity between the area surrounded by the block frame (hereinafter referred to as “target block”) and the reference block 182 is calculated. I will do it.
  • the block frame is shifted by one pixel or by a predetermined plurality of pixels.
  • the target block when the highest similarity is obtained is the block 184 corresponding to the reference block 182.
  • the difference between the horizontal position x1 of the reference block 182 in the right viewpoint image 180b and the horizontal position x2 of the corresponding block 184 in the left viewpoint image 180a is the parallax D.
  • the process of obtaining the parallax D in this manner and obtaining the distance Z in the depth direction by the above relational expression is repeated by using each area formed by mesh-dividing the image plane of the right viewpoint image 180b as a reference block, thereby obtaining the right viewpoint image 180b.
  • a distance Z is associated with the position coordinates of each reference block.
  • SSD Sud-of-Squared-Difference
  • SAD Sud-of-Absolute-Difference
  • NCC Normalized-Cross-Correlation
  • ZNCC Zero-mean-Normalized-Cross-Correlation
  • the higher the resolution of the stereo image the more detailed and highly accurate the change in the similarity to the position of the target block is obtained.
  • the acquisition accuracy of the direction distance Z is improved.
  • the matching processing load for one reference block increases or the number of reference blocks increases, and the time required to determine the position of the subject in the entire area of the image also increases.
  • the search range 186 is limited to an appropriate position as described above, and highly accurate position information is generated with a small processing load. Next, the influence on the position information when the search range is limited will be described.
  • FIG. 6 shows a depth image of the position information acquisition result when the set position of the limited search range is changed.
  • the depth image is an image representing the distance Z in the depth direction of the subject obtained by the stereo image method as a luminance distribution on the image plane. In the figure, the greater the distance Z, the lower the luminance.
  • the reference block 182 set in the right viewpoint image 180b and the corresponding left block image 180a are set in the same format as shown in FIG.
  • the search range 186 is illustrated. This example is based on a photographed image centered on a person in the room, and the ceiling and surrounding objects are included in the field of view.
  • the depth image (a) when the start point xa of the search range 186 is set to the same position x1 as the reference block, the depth image (b) is several tens of pixels from the start point xb of the search range 186 to the position x1 of the reference block. It is a depth image when it is separated by minutes. It is assumed that the length of the search range is the same for both.
  • the depth image (a) has more defects in the data than the depth image (b).
  • the depth image (a) accurately indicates that the brightness is smaller than the face area 190a, that is, the depth is behind the face.
  • the depth image (b) is erroneously recognized as having the same luminance as the face area 190b, that is, at the same position in the depth direction.
  • the parallax D is inversely proportional to the distance Z in the depth direction, the parallax D increases as the object is closer to the front, and the corresponding points tend to move away from the reference block 182.
  • the search range 186 when the search range 186 is brought close to the reference block 182 as in the depth image (a), accurate position information can be obtained for the subject in the back. On the other hand, as the search range 186 is moved away from the reference block 182 as in the image (b), more accurate information can be obtained with respect to the nearer subject.
  • the similarity is good within the limited search range even though there is a true corresponding point where the highest similarity can be obtained.
  • another line or pattern may be misrecognized as a corresponding portion, and an incorrect distance value may be calculated.
  • the first position information acquisition unit 52 separately acquires the approximate position of the subject, and based on that, the second position information acquisition unit 56 sets an appropriate search range. Perform block matching. By setting the search range so that the true corresponding portion is included, accurate position information can be acquired even if the search range itself is short.
  • the process performed by the second position information acquisition unit 56 is (1) uses a higher resolution image than the process performed by the first position information acquisition unit 52, and (2) uses an advanced algorithm for calculating similarity. Use (3) Implement at a high frequency (rate).
  • the process performed by the first position information acquisition unit 52 can be simplified by making the second position information acquisition unit 56 a high-quality process.
  • FIG. 7 shows the flow of processing when the first position information acquisition unit 52 performs simple stereo matching and face detection processing, and the second position information acquisition unit 56 performs detailed stereo matching.
  • processing for detecting a corresponding portion on a stereo image by block matching as described above and obtaining a distance in the depth direction based on the parallax is also referred to as stereo matching.
  • the user who is in front of the imaging device 12 in the room is a main target for acquiring position information, but this is not intended to limit the target object or the shooting environment.
  • the first position information acquisition unit 52 performs simple stereo matching using them (S10).
  • Simple stereo matching is basically a process of generating a depth image by performing stereo matching in the same procedure as described above.
  • block matching is performed with a stereo image having a lower resolution than the second position information acquisition unit 56 by generating a low-resolution image by reducing the stereo images 194 a and 194 b acquired from the imaging device 12.
  • the block size during block matching may be increased.
  • the first position information acquisition unit 52 may use the low-resolution stereo image generated by the imaging device 12 in this way.
  • the first position information acquisition unit 52 may use a similarity calculation method that is simpler than the method used by the second position information acquisition unit 56 such as SAD.
  • SAD is a simpler calculation method than other calculation methods in which the sum of the differences between the values of corresponding pixels in the reference block and the target block is used as the similarity.
  • the first position information acquisition unit 52 may perform stereo matching at a lower frequency than the second position information acquisition unit 56.
  • the 1st position information acquisition part 52 does not limit the search range at the time of block matching. That is, a range wider than the second position information acquisition unit 56 from the reference block to the end of the image in the direction in which parallax occurs is set as the search range.
  • a simple depth image 196 representing the distance in the depth direction for all subjects in the field of view regardless of the position is obtained.
  • the first position information acquisition unit 52 performs face detection processing on one of the stereo images 194a and 194b (S12).
  • the face detection processing performed here may use a general technique such as template matching for comparing a captured image with a template image representing an average face image or a registered face image.
  • the frequency of the simple stereo matching process may be reduced accordingly.
  • the image of the object can be detected by matching with a template image representing the shape and feature points of the object instead of detecting the face.
  • the first position information acquisition unit 52 acquires the approximate value of the distance in the depth direction of the user including the face by applying the face area 198 on the image acquired by the face detection process to the simple depth image 196.
  • the approximate value of the distance is, for example, the pixel value of the pixel located at the center of the face area 198, or the average value of the pixel values constituting the face area within the face area 198 that can be considered to be at the same position. .
  • the second position information acquisition unit 56 performs detailed stereo matching after limiting the search region based on the approximate value of the distance (S16).
  • stereo images 194a and 194b with higher resolution than the first position information acquisition unit 52 are used, or the block size at the time of block matching is reduced.
  • the calculation method of the similarity is made more advanced than the method used by the first position information acquisition unit 52 such as ZNCC, or the process is performed at a higher frequency than the first position information acquisition unit 52.
  • any one of the resolution of the stereo image, the complexity of the calculation method, and the frequency of processing may be varied, or two or more may be varied simultaneously. Good.
  • how to make a difference may be appropriately determined.
  • the second position information acquisition unit 56 generates a detailed and highly accurate depth image 200 for at least the user as the object, and outputs the depth image 200 to the output information generation unit 50.
  • the output information generation part 50 can generate
  • FIG. 8 is a diagram for explaining the search range set by the second position information acquisition unit 56.
  • an approximate value of the distance in the depth direction of the user acquired by the first position information acquisition unit 52 is set to Ze.
  • the second position information acquisition unit 56 determines an estimated distance range Ze ⁇ Zf ⁇ Z ⁇ Ze + ⁇ Zb including a predetermined range before and after the approximate value Ze in consideration of the error of the approximate value and the thickness of the body.
  • ⁇ Zf is a margin in the front direction on the axis of the distance Z
  • the search range 204 set in the left viewpoint image 194a with respect to the reference block 202 at the position x1 in the right viewpoint image 194b is a range from x1 + Dmin to x1 + Dmax as the movement amount of the target block.
  • the second position information acquisition unit 56 uses each region obtained by dividing the image plane of the right viewpoint image 194b as a reference block, and calculates the similarity while shifting the target block within the search range 204 set for each region. Then, the target block when the high similarity is obtained is detected as a block corresponding to the reference block.
  • the depth image 200 in which the distance in the depth direction is expressed in detail and with high accuracy is obtained for an object that exists at least in the range of Ze ⁇ Zf ⁇ Z ⁇ Ze + ⁇ Zb.
  • the second position information acquisition unit 56 may further limit the setting range of the reference block 202. That is, by setting the reference block 202 only for the image area of the object, the block matching process itself for surrounding objects is omitted. In this case, it is necessary to specify the range that the image of the object covers on the image.
  • the movable range such as the hand and the toe can be easily estimated from the position and size of the face region 198 based on the face region 198 detected in S12. Therefore, the maximum range covered by the user image is determined so as to cover it, and the reference block 202 is set within the maximum range.
  • the simple stereo matching in S10 among the simple depth images 196 obtained, pixels having pixel values within a predetermined range from the values of the pixels constituting the face area 198 and continuous with the face area are obtained.
  • the area may be estimated as a human body area, and the reference block 202 may be set limited to the area.
  • the maximum range covered by the user is specified based on the approximate value of the distance obtained by the first position information acquisition unit 52, and the reference block 202 is set limited to that range.
  • FIG. 9 shows another example of the flow of processing by the position information generation unit 46 when the first position information acquisition unit 52 performs simple stereo matching and histogram generation, and the second position information acquisition unit 56 performs detailed stereo matching. It is a figure for demonstrating the flow of a process.
  • symbol is attached
  • the first position information acquisition unit 52 after performing simple stereo matching (S10), the first position information acquisition unit 52 generates a histogram of distance values using the obtained simple depth image 196 (S18).
  • a histogram representing the frequency of appearance in the image of the distance Z in the depth direction represented by the pixel value of the simple depth image 196 is generated.
  • a certain number of pixel groups representing the surface of the object in the depth image 196 have similar pixel values.
  • the first position information acquisition unit 52 compares a threshold value Th set in advance with a histogram, and extracts a portion having an appearance frequency equal to or higher than the threshold value Th.
  • the threshold value Th is determined by, for example, obtaining the number of pixels appearing as a human image from an actual photographed image and taking into account errors. Since the size of the image also changes depending on the distance in the depth direction, the threshold Th may be changed depending on the position in the depth direction in the histogram.
  • the position or range of the peak selected by a predetermined rule is estimated as the user position or range.
  • the peak that is closest to the user, that is, the distance Z is selected is selected.
  • the selection rule is not limited to this, and may be changed as appropriate depending on the shooting environment, the number of users, and the like. For example, by acquiring a histogram based on an image obtained by photographing only the background before the start of the game, a peak due to the background can be excluded during operation. In this case, even when there are a plurality of users, it can be recognized that a plurality of peaks other than the excluded peaks represent the image of each user.
  • the second position information acquisition unit 56 performs detailed stereo matching after limiting the search range based on the estimated distance range including a predetermined range before and after, similarly to the case described in FIG. 7 (S16). . Also in this case, since the detailed and highly accurate depth image 200 can be generated for at least the user who is the object, the second position information acquisition unit 56 outputs the data to the output information generation unit 50.
  • FIG. 10 shows another example of the flow of processing performed by the position information generation unit 46, in which the first position information acquisition unit 52 acquires an approximate value of distance through dialogue with the user, and the second position information acquisition unit 56 performs detailed stereo. It is a figure for demonstrating the flow of a process in the case of performing matching.
  • symbol is attached
  • the first position information acquisition unit 52 prompts the user to stand at a predetermined position whose distance in the depth direction is known by an instruction such as “Please stand near 1 m from the camera”. Or it guides to move to the position naturally on the game. Then, when the user stands at the position, the distance in the depth direction is set as the “approximately distance value” in the above-described manner.
  • the user may be allowed to input the distance from the imaging device 12 while sitting. Since the required distance may be an approximate value, it may be selected from a plurality of candidate distances having a predetermined step size such as every 30 cm.
  • the first position information acquisition unit 52 requests the output information generation unit 50 to express a standing position instruction or a distance input instruction to the user by an image or sound. When the standing position is instructed, the time when the user moves to the position and stops is determined and notified to the second position information acquisition unit 56.
  • the first position information acquisition unit 52 acquires the input information from the input information acquisition unit 44 and notifies the second position information acquisition unit 56.
  • the second position information acquisition unit 56 includes a predetermined range before and after the approximate value of the specified or input distance using the stereo images 194a and 194b photographed at that time as in the previous embodiments. Detailed stereo matching is performed after limiting the search range based on the estimated distance range (S16). Also in this case, since the detailed and highly accurate depth image 200 can be generated for at least the user who is the object, the second position information acquisition unit 56 outputs the data to the output information generation unit 50.
  • the timing at which the first position information acquisition unit 52 acquires the approximate value of the distance is limited to when the game is started. Therefore, the second position information acquisition unit 56 once acquires the approximate value of the distance and performs the detailed stereo matching, and then uses the position information acquired by itself for the previous frame to determine the position information of the subsequent frame. May be obtained.
  • FIG. 11 shows another example of the flow of processing performed by the position information generation unit 46.
  • the first position information acquisition unit 52 detects an object at a predetermined position by setting a detection surface
  • the second position information acquisition unit 56 FIG. 6 is a diagram for explaining a flow of processing when detailed stereo matching is performed.
  • symbol is attached
  • a method for detecting the position of an object using a detection surface is disclosed in Japanese Patent Laid-Open No. 2013-242812.
  • the detection surface is a surface virtually set in real space.
  • An area obtained by projecting the detection surface onto the screen coordinates of the stereo image has a parallax corresponding to the distance from the imaging device 12 to the detection surface. If a person stands at a position that overlaps with the detection surface, the image of the person in the stereo image should appear at the same position in two regions obtained by projecting the detection surface onto the stereo image. Therefore, a region obtained by projecting the detection surface is cut out from one of the stereo images, and a corresponding region determined by taking the parallax into consideration is cut out from the other to match the two. When it is determined that there is an image at the same position in the two regions, it can be seen that the object exists at the position of the detection surface. Further explanation will be given later.
  • the first position information acquisition unit 52 virtually sets such a detection surface at a predetermined position in real space, and performs matching on a region formed by projecting the detection surface on a stereo image. As a result, when a predetermined number or more of pixels having a high matching evaluation value are detected, it is determined that the user is at the position of the detection surface.
  • the detection surface By setting the detection surface at a plurality of positions, for example, in parallel with the image pickup surface of the image pickup device 12 at predetermined intervals, and performing similar determination processing on each detection surface, an approximate value of the distance in the depth direction of the user as the object Can be determined.
  • the second position information acquisition unit 56 performs detailed stereo matching after limiting the search range based on the estimated distance range including a predetermined range before and after the approximate value, similarly to the mode described so far (S16). Also in this case, since the detailed and highly accurate depth image 200 can be generated for at least the user who is the object, the second position information acquisition unit 56 outputs the data to the output information generation unit 50.
  • FIG. 12 is a diagram for explaining a method of detecting an object at a predetermined position by setting a detection surface.
  • the upper part of the figure is a schematic diagram 72a as seen from above the photographing environment, and the lower part is a schematic diagram 72b as seen from the side.
  • a person 74 as a subject faces the first camera 13a and the second camera 13b.
  • the equiparallax surface is distributed as indicated by the dotted line.
  • the equal parallax plane is a plane having the same parallax at all points on the plane.
  • the detection surface 76 is defined on the equiparallax surface at the position to be detected.
  • the detection surface 76 is a virtual plane in which vertex coordinates are defined in a three-dimensional space defined by a camera coordinate system.
  • the contour shape of the detection surface is not particularly limited, and the inclination may be arbitrarily set.
  • FIG. 13 shows an example of a stereo image taken in the environment shown in FIG.
  • a region 82 is obtained by projecting the detection surface 76 shown in FIG. 12 onto the left viewpoint image 80a.
  • an area obtained by projecting a “detection plane” defined in a three-dimensional space onto an image plane is referred to as a “detection area”.
  • the process of projecting a model defined in a three-dimensional space onto a two-dimensional image plane can be realized as a general computer graphics process.
  • the upper left coordinate of the detection area 82 is assumed to be (x, y).
  • a region where the same region as the detection region 82 is translated leftward by the amount of parallax and the upper left coordinate is (xC / Z, y) is defined as a parallax correction region 84. That is, the parallax correction area 84 is obtained by moving the area at the same position as the detection area 82 in a direction in which the parallax in the stereo image is eliminated. Then, a feature point image, for example, an edge image, is extracted from the detection region 82 of the left viewpoint image 80a and the parallax correction region 84 of the right viewpoint image 80b, and matching processing is performed. And the matching image 86 showing the pixel from which the high evaluation value was obtained is produced
  • the entire contour of the left hand of the subject extracted as an edge is shown by a solid line and a dotted line, but only the solid line portion of the actual matching image remains.
  • it is an image. That is, information that a part of the fingertip and a part of the wrist are located on the detection surface shown in FIG. 12 is obtained.
  • the portion to be left as a matching image is determined by threshold value determination of the matching evaluation value. By adjusting this threshold value, the detection resolution for the position Z in the depth direction can be controlled.
  • the parallax changes in the vertical direction of the image plane, and accordingly, the parallax correction region is determined by changing the shift amount of the detection region in the vertical direction accordingly. Then, the subsequent processing is the same.
  • the first position information acquisition unit 52 determines that the target is at the position of the detection surface when the number of pixels represented by the matching image 86 as being high in the matching evaluation value is equal to or greater than a predetermined value. The position is notified to the second position information acquisition unit 56 as an approximate value of the distance.
  • the detection surface has a size for detecting the position of the hand.
  • the size of the detection surface is also changed depending on the size of the object such as the entire body of the user. Furthermore, as described above, if a plurality of detection surfaces are set so that detection can be performed on any of the detection surfaces, an approximate value of the distance can be obtained wherever the object is located.
  • the simple stereo matching performed by the first position information acquisition unit 52 is an outline of the distance necessary for the second position information acquisition unit 56 to appropriately set a limited search range. The purpose was to get the value.
  • the simple depth image obtained as a result may be included in the position information data output from the position information generation unit 46. Specifically, among the depth images acquired by the second position information acquisition unit 56, the region of the image of the object whose distance has been obtained in detail and the simple depth image acquired by the first position information acquisition unit 52 Of these, a region other than the image of the object is combined to obtain a final depth image.
  • a plurality of areas representing depth information with different levels of detail and accuracy are mixed.
  • depth information with higher accuracy can be obtained for the region other than the region of the object such as the user as compared with the case where the search range is limited.
  • the required position recognition accuracy differs between the interaction with the user and the interaction with surrounding objects. That is, since the human body such as the user's hand has a complicated shape and a complicated movement, detailed positional information is required to realize a realistic interaction.
  • FIG. 14 is a diagram for explaining the flow of processing by the position information generation unit 46 in a mode in which depth information having different levels of detail and accuracy is combined to generate one depth image.
  • symbol is attached
  • the first position information acquisition unit 52 performs simple stereo matching using the stereo images 194a and 194b (S10).
  • the first position information acquisition unit 52 performs face detection processing on either of the stereo images 194a and 194b (S12).
  • the second position information acquisition unit 56 performs detailed stereo matching after limiting the search area in the same manner as described with reference to FIG. 7 (S16).
  • the second position information acquisition unit 56 generates the depth image 200 representing the detailed and highly accurate position information about the user as the object, and the simple stereo matching in which the first position information acquisition unit 52 performs S10.
  • the simple depth image generated by the above is synthesized (S24).
  • the pixel value of the region of the image of the object in the simple depth image 196 is the pixel value of the region corresponding to the depth image 200 acquired in detail by the second position information acquisition unit 56 for the object.
  • the resolution image size
  • the former is enlarged and the latter Replace the pixel value after aligning the size.
  • the update frequency of the composite portion of the simple depth image 196 is the composite portion of the detailed depth image 200.
  • the update frequency may be lower.
  • the update frequency of the former may be about 1/10 of the latter.
  • the frequency of the processing of the first position information acquisition unit 52 may be lowered.
  • the first position information acquisition unit 52 detects the face area as in FIG. 7, but the approximate value of the distance may be detected by a histogram as described in FIG. Further, as described with reference to FIGS. 10 and 11, it may be combined with a mode in which an approximate value of distance is obtained by means other than stereo matching. In this case, the first position information acquisition unit 52 separately performs simple stereo matching to generate a simple depth image as a synthesis target.
  • FIG. 15 is a diagram for explaining a synthesis processing technique.
  • the depth image generated by the second position information acquisition unit 56 is data specialized for the distance range of the object, and objects in other positions are excluded from the distance calculation target in principle.
  • By limiting the search range as described above only the objects that are originally present in the distance range corresponding to the search range are detected by the high degree of similarity in the block matching. Similar objects such as lines and patterns that appear repeatedly may be detected erroneously.
  • the upper part (a) of FIG. 15 shows how the first position information acquisition unit 52 performs block matching without limiting the search range
  • the lower part (b) of FIG. 15 shows that the second position information acquisition unit 56 limits the search range. It shows how block matching is performed.
  • a search range 224 that reaches the left viewpoint image 220a to the right end of the image is set for the reference block 222 of the right viewpoint image 220b.
  • a limited search range 234 is set for the left viewpoint image 230a with respect to the reference block 232 of the right viewpoint image 230b.
  • the search range is limited as shown in (b)
  • the maximum similarity B within the range at another position is obtained even though there is a true corresponding portion outside the search range 234.
  • the target block 238 at that time is detected as a corresponding block.
  • a false parallax is acquired, and thus a false distance value may be calculated.
  • the detailed depth image generated by the second position information acquisition unit 56 may include incorrect position information.
  • the final depth image 210 in which the position information with less error is represented in the entire image is generated by accurately determining the replacement area as described above.
  • an area having a pixel value equivalent to (predetermined range) the pixel value in the face area and consisting of a group of pixels continuous from the face area is the image of the user who is the object. Is replaced with the pixel value of the depth image generated by the second position information acquisition unit 56.
  • a pixel group that continuously forms a region of a predetermined size When using a histogram as described in FIG. 9, for example, among pixel groups that form a peak when an approximate value of distance is obtained, a pixel group that continuously forms a region of a predetermined size. The pixel value of the depth image generated by the second position information acquisition unit 56 is replaced.
  • the similarity obtained when the first position information acquisition unit 52 generates a simple depth image is compared with the similarity obtained when the second position information acquisition unit 56 generates a detailed depth image. If the latter is higher, replacement of detailed depth images with data may be performed.
  • the first position information acquisition unit 52 associates the maximum similarity A obtained when the target block 228 is detected as a corresponding block with the position of the corresponding reference block 222 in the simple stereo matching process. A degree image is generated in advance.
  • the second position information acquisition unit 56 associates the maximum similarity B obtained when the target block 238 is detected as the corresponding block with the position of the corresponding reference block 232. A similarity image is generated.
  • the similarity images corresponding to the reference block at the same position in the similarity images of both are compared, and the data of the depth image having the higher similarity is obtained. The distance value is used.
  • the distance value acquired by the first position information acquisition unit 52 according to (a) is adopted.
  • the first position information acquisition unit 52 and the second position information acquisition unit 56 calculate the similarity by different methods, it is conceivable that the similarity scales are different and cannot be simply compared. If the relationship between the two values is known in advance, one of them is converted to the other scale accordingly and then compared.
  • FIGS. 15A and 15B when a part of the search ranges 224 and 234 overlaps, the similarity at the same position is compared to obtain a magnification, and the result is multiplied by one. You may arrange the scale with.
  • the first position information acquisition unit 52 sets a wide search range in a stereo image and performs stereo matching with coarse accuracy as one method for obtaining an approximate value of the distance of the object.
  • the first position information acquisition unit 52 also calculates a distance value for an object existing at a position different from the second position information acquisition unit 56 by limiting the search range. May be combined into a final depth image.
  • FIG. 16 is a diagram for explaining the flow of processing by the position information generation unit 46 in a mode in which the distance calculation target is shared in this way.
  • the first position information acquisition unit 52 obtains the distance with respect to the background such as furniture and walls behind the user, and the second position information acquisition unit 56 displays the foreground of the user or the like as in the previous examples. Find the distance to the subject.
  • the search range set by the first position information acquisition unit 52 during stereo matching and the search range set by the second position information acquisition unit 56 during stereo matching are: Set individually for each distance range.
  • the former sets the search range up to 63 pixels starting from the position of the reference block
  • the latter sets the search range up to 127 pixels starting from the 64th pixel.
  • the search range may be a fixed value in this way, and as in the previous embodiments, the first position information acquisition unit 52 first obtains an approximate value of the distance of an object such as a user and searches for both accordingly.
  • the range may be set adaptively.
  • the search range set by the first position information acquisition unit 52 is the first search range
  • the search range set by the second position information acquisition unit 56 is the second search range.
  • the first search range and the second search range set for one reference block may or may not have overlapping portions as in the above example.
  • the first position information acquisition unit 52 performs stereo matching by setting the first search range in the other image 194a, for example, corresponding to each reference block of the one image 194b among the stereo images (S30).
  • a depth image 280 representing an accurate distance with respect to an object in the background is obtained.
  • the second position information acquisition unit 56 performs stereo matching by setting the second search range in the other image 194a corresponding to each reference block of the one image 194b among the stereo images (S32).
  • a depth image 282 in which an accurate distance to the object in the foreground, that is, the user is represented is obtained.
  • the 2nd position information acquisition part 56 synthesize combines both depth images similarly to the aspect demonstrated in FIG. 14 (S34). Specifically, in the depth image 280 generated by the first position information acquisition unit 52, the foreground area is replaced with data of the depth image 282 generated by the second position information acquisition unit 56. As a result, a final depth image 284 in which an accurate distance is expressed as a pixel value for both the foreground and the background is generated.
  • FIG. 17 illustrates the state of block matching when the first position information acquisition unit 52 and the second position information acquisition unit 56 share the object for which the distance is acquired.
  • (A) in the upper part of the figure illustrates the search range set by the first position information acquisition unit 52 corresponding to the two reference blocks 242 and 262.
  • (b) in the lower row exemplifies a search range set by the second position information acquisition unit 56 corresponding to the same reference blocks 242 and 262 as (a).
  • the way of representing the figure is the same as in FIG. However, in the figure, the position of the reference block is indicated by a black rectangle in the same image as that for setting the search range.
  • the first position information acquisition unit 52 determines the background and the second position information acquisition unit 56 determines the distance of the foreground
  • the former search range is close to the reference block
  • the latter search range is The range is far from the reference block.
  • the first position information acquisition unit 52 sets a search range 244 close to the reference block 242 as in an image 240.
  • the second position information acquisition unit 56 sets a search range 254 at a position away from the reference block 242 by the predetermined number of pixels d as described above, as in the image 250.
  • the target block 248 when the maximum similarity A is obtained among the similarities 246 obtained by the first position information acquisition unit 52 for the search range 244 is detected as a corresponding block.
  • the target block 258 when the maximum similarity B is obtained among the similarities 256 obtained by the second position information acquisition unit 56 for the search range 254 is detected as a corresponding block.
  • the value calculated by the first position information acquisition unit 52 is adopted as the distance value with respect to the reference block 242 by comparing the maximum similarities A and B as described in FIG. .
  • the similarity 266 obtained by the first position information acquisition unit 52 with respect to the search range 264 does not include a block whose similarity protrudes to such an extent that it can be regarded as corresponding, so that no corresponding portion is detected.
  • the pixel value of the depth image is 0 or the like.
  • the target block 278 when the maximum similarity D is obtained among the similarities 276 obtained by the second position information acquisition unit 56 for the search range 274 is detected as a corresponding block.
  • the value calculated by the second position information acquisition unit 56 is employed as the distance value for the reference block 262 during the synthesis process.
  • the degree of detail and accuracy of both processes can be individually set in the same manner as described above. Can be set. That is, as described above, since the foreground is assumed to have a more complicated shape and more movement than the background, the second position information acquisition unit 56 for the foreground is compared with the first position information acquisition unit 52 for the background.
  • the first position information acquisition unit 52 uses at least one of the aspects such as using a high-resolution stereo image, adopting an advanced technique for calculating the similarity, and increasing the frequency of processing.
  • the processing is divided into a plurality of roles in the information processing apparatus that obtains the position of the subject in the three-dimensional space using the stereo image. Specifically, the entire image or the object for which the distance is to be obtained in detail is obtained, the approximate value of the distance in the depth direction is obtained, and then the block matching is performed by limiting to the search range corresponding to the approximate value. In addition, highly accurate position information is obtained. Thereby, while being able to simplify a process with respect to objects, such as a background other than a target object, exact positional information is obtained about a target object. As a result, it is possible to reduce both the processing load and improve the accuracy of position information necessary for the subsequent processing.
  • the depth in which areas with different levels of detail and accuracy are mixed Generate an image.
  • the position information corresponding to it can be represented by one depth image.
  • the object whose distance is calculated is assigned according to the approximate position of the object, and an appropriate search range is set for each of the objects, and processing is performed in parallel. Then, by combining the position information generated by each, a final depth image that covers the necessary distance range is generated. At this time, at least one of resolution, similarity calculation method, and processing frequency is made different depending on the characteristics of the target object, so that unnecessary processing is omitted as much as possible, and processing is concentrated on the required target. be able to. As a result, it is possible to appropriately output accurate position information necessary for subsequent processing with a small processing load and data amount.
  • Information processing system 10 Information processing device, 12 Imaging device, 16 Display device, 13a 1st camera, 13b 2nd camera, 22 CPU, 24 GPU, 26 Main memory, 42 Image acquisition unit, 44 Input information acquisition unit, 46 Position information generation unit, 48 image data storage unit, 50 output information generation unit, 52 first position information acquisition unit, 56 second position information acquisition unit.
  • the present invention can be used for a game machine, an image processing apparatus, an information processing apparatus, an object recognition apparatus, an image analysis apparatus, or a system including any one of them.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Electromagnetism (AREA)
  • Remote Sensing (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Measurement Of Optical Distance (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

情報処理装置10の画像取得部42は、撮像装置12を構成する第1カメラ13a、第2カメラ13bが撮影したステレオ画像を取得する。入力情報取得部44はユーザ操作を受け付ける。位置情報生成部46の第1位置情報取得部52は、所定の手段により被写体のおよその位置を特定する。第2位置情報取得部56は当該およその位置に基づき対象物の推定距離範囲を決定し、それに対応する探索範囲に限定してステレオ画像をブロックマッチングすることにより対応点を検出し、高精細かつ高精度に対象物の位置を求める。出力情報生成部50は、当該対象物の位置に基づき出力データを生成し出力する。

Description

情報処理装置および情報処理方法
 本発明は、撮影画像を利用して対象物の位置や動きを認識する技術に関する。
 近年、パーソナルコンピュータやゲーム機などにカメラを搭載し、ユーザの姿を撮像して様々な形で利用することが一般的に行われるようになってきた。例えばテレビ電話、ビデオチャットなど、ユーザの画像を、ネットワークを介してそのまま相手に伝送するものや、画像解析によってユーザの動きを認識してゲームや情報処理の入力情報とするものなどが実用化されている(例えば特許文献1参照)。近年ではさらに、奥行き方向を含む3次元空間における対象物の動きを精度よく検出することにより、より臨場感のあるゲームや画像表現を実現できるようになってきた。
 対象物の3次元空間での位置を求める一般的な手法としてステレオ画像法がある。ステレオ画像法は、左右に既知の間隔だけ離れた2つのカメラで同じ空間を同時に撮影したステレオ画像から対応点を検出し、その視差に基づき三角測量の原理で対象物の撮像面からの距離を算出する手法である。
WO 2007/050885 A2公報
 ステレオ画像法により対象物の位置情報を詳細かつ正確に取得するには、解像度の高いステレオ画像を用いたり、高度な計算手法で対応点を検出したりすることが考えられるが、このようにすることで自ずと処理の負荷が増大する。一方、対象物の動きに基づき情報処理を行いその結果を画像などで表現する態様においては、フレームレート程度の頻度で位置情報を更新していくことが求められる。そのため、位置情報の取得精度と取得速度の両立は常に大きな課題となっている。
 本発明はこのような課題に鑑みてなされたものであり、その目的は、3次元空間における対象物の位置情報取得を高精度かつ高速に行うことのできる技術を提供することにある。
 本発明のある態様は情報処理装置に関する。この情報処理装置は、既知の間隔を有する左右のカメラで同一空間を撮影したステレオ画像のデータを取得する画像取得部と、ステレオ画像の一方に設定した参照ブロックに対し他方に設定した探索範囲内で類似度の高い領域を検出するブロックマッチングを行うことにより対応点を検出し、その視差に基づき対象物のカメラからの距離を含む位置情報を生成し出力する位置情報生成部と、を備え、位置情報生成部は、対象物のカメラからの推定距離範囲を決定し、当該推定距離範囲に対応する位置および長さで探索範囲を限定して設定したうえでブロックマッチングを行うことを特徴とする。
 本発明の別の態様は情報処理方法に関する。この情報処理方法は、既知の間隔を有する左右のカメラで同一空間を撮影したステレオ画像のデータを撮像装置から取得するステップと、ステレオ画像の一方に設定した参照ブロックに対し他方に設定した探索範囲内で類似度の高い領域を検出するブロックマッチングを行うことにより対応点を検出し、その視差に基づき対象物のカメラからの距離を含む位置情報を生成し出力するステップと、を含み、位置情報を生成するステップは、対象物のカメラからの推定距離範囲を決定し、当該推定距離範囲に対応する位置および長さで探索範囲を限定して設定したうえでブロックマッチングを行うことを特徴とする。
 なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、コンピュータプログラム、コンピュータプログラムを記録した記録媒体などの間で変換したものもまた、本発明の態様として有効である。
 本発明によると、撮影画像中の対象物の位置や動きに基づく情報処理を高速かつ高精度に実現することができる。
本実施の形態を適用できる情報処理システムの構成例を示す図である。 本実施の形態における情報処理装置の内部回路構成を示す図である。 本実施の形態における撮像装置と情報処理装置の機能ブロックの構成を示す図である。 ステレオ画像における視差と被写体の奥行き方向の位置の関係を説明するための図である。 本実施の形態で用いる、基本的なブロックマッチングの手法を説明するための図である。 本実施の形態における限定された探索範囲の設定位置を異ならせたときの位置情報の取得結果を奥行き画像で表した図である。 本実施の形態において第1位置情報取得部が簡易ステレオマッチングと顔検出処理を行い、第2位置情報取得部が詳細ステレオマッチングを行う場合の処理の流れを示す図である。 本実施の形態において第2位置情報取得部が設定する探索範囲を説明するための図である 本実施の形態における第1位置情報取得部が簡易ステレオマッチングおよびヒストグラム生成を行い、第2位置情報取得部が詳細ステレオマッチングを行う場合の処理の流れを説明するための図である。 本実施の形態における第1位置情報取得部がユーザとの対話により距離の概略値を取得し、第2位置情報取得部が詳細ステレオマッチングを行う場合の処理の流れを説明するための図である。 本実施の形態における第1位置情報取得部が検知面を設定することにより所定位置の対象物を検知し、第2位置情報取得部が詳細ステレオマッチングを行う場合の処理の流れを説明するための図である。 本実施の形態において検知面を設定することにより所定位置の対象物を検知する手法を説明するための図である。 図12で示した環境で撮影されたステレオ画像の例を示す図である。 本実施の形態において詳細度、精度の異なる奥行き情報を合成して1つの奥行き画像を生成する態様における位置情報生成部による処理の流れを説明するための図である。 本実施の形態における合成処理の手法を説明するための図である。 本実施の形態における距離の算出対象を分担する態様における位置情報生成部による処理の流れを説明するための図である。 本実施の形態における第1位置情報取得部と第2位置情報取得部が、距離を取得する対象を分担したときのブロックマッチングの様子を例示している。
 図1は本実施の形態を適用できる情報処理システムの構成例を示す。情報処理システム2は、ユーザ1などの被写体を撮影する2つのカメラを搭載した撮像装置12、撮影した画像に基づき、ユーザの要求に応じた情報処理を行う情報処理装置10、情報処理装置10が処理した結果得られた画像データを出力する表示装置16を含む。情報処理装置10はインターネットなどのネットワークと接続可能としてもよい。
 情報処理装置10と、撮像装置12、表示装置16とは、有線ケーブルで接続されてよく、また無線LAN(Local Area Network)などにより無線接続されてもよい。撮像装置12、情報処理装置10、表示装置16のうちいずれか2つ、または全てが組み合わされて一体的に装備されていてもよい。また、撮像装置12は必ずしも表示装置16の上に設置されていなくてもよい。さらに被写体の数や種類は限定されない。
 撮像装置12は、それぞれがCCD(Charge Coupled Device)またはCMOS(Complementary Metal Oxide Semiconductor)等の撮像素子を備えた2つのデジタルビデオカメラを既知の間隔で左右に配置したステレオカメラの構成を有する。2つのデジタルビデオカメラはそれぞれ、同一空間に存在する被写体を左右の位置から所定のフレームレートで撮影する。以後、このように撮影されたフレームの対を「ステレオ画像」とも呼ぶ。
 情報処理装置10は、画像平面およびカメラからの奥行き方向を含む3次元空間における被写体の位置を検出する。検出結果は、被写体の位置や動きを入力情報として用いる後段の処理に利用する。例えば被写体であるユーザ1の手や足の動きに反応する仮想オブジェクトを撮影画像上に描画するようなAR(拡張現実)を実現するのに用いる。あるいはユーザ1の動きをトラッキングしてゲームの画像に反映させたり情報処理のコマンド入力に変換したりしてもよい。このように本実施の形態で得られる被写体の位置に係る情報の使用目的は特に限定されない。
 表示装置16は、情報処理装置10が行った処理の結果を、必要に応じて画像として表示する。表示装置16は、画像を出力するディスプレイおよび音声を出力するスピーカを有するテレビであってよく、例えば液晶テレビ、プラズマテレビ、PCディスプレイ等である。上述のとおり情報処理装置10が最終的に実行する処理内容や表示すべき画像はその使用目的によって特に限定されるものではないため、以後は情報処理装置10が行う、被写体の位置検出処理に主眼を置き説明する。
 図2は情報処理装置10の内部回路構成を示している。情報処理装置10は、CPU(Central Processing Unit)22、GPU(Graphics Processing Unit)24、メインメモリ26を含む。メインメモリ26はRAM(Random Access Memory)により構成され、処理に必要なプログラムやデータを記憶する。これらの各部は、バス30を介して相互に接続されている。バス30にはさらに入出力インターフェース28が接続されている。
 入出力インターフェース28には、USBやIEEE1394などの周辺機器インターフェースや、有線又は無線LANのネットワークインタフェースからなる通信部32、ハードディスクドライブや不揮発性メモリなどの記憶部34、表示装置16やスピーカなどの出力装置へデータを出力する出力部36、キーボード、マウス、撮像装置12、マイクロホンなどの入力装置からデータを入力する入力部38、磁気ディスク、光ディスクまたは半導体メモリなどのリムーバブル記録媒体を駆動する記録媒体駆動部40が接続される。
 CPU22は、記憶部34に記憶されているオペレーティングシステム、およびリムーバブル記録媒体から読み出されてメインメモリ26にロードされた、あるいは通信部32を介してダウンロードされた、各種プログラムに基づいて情報処理を実行する。また、情報処理装置10内部の各種回路における処理や信号伝送を制御する。GPU24は、ジオメトリエンジンの機能とレンダリングプロセッサの機能とを有し、CPU22からの描画命令に従って描画処理を行い、図示しないフレームバッファに表示画像のデータを格納する。そして当該表示画像のデータをビデオ信号に変換して出力部36などに出力する。
 図3は撮像装置12と情報処理装置10の機能ブロックの構成を示している。図3に示す各機能ブロックは、ハードウェア的には、図2に示したCPU、GPUや、RAMなどのメモリ、各種回路などの構成で実現でき、ソフトウェア的には、記録媒体などからメモリにロードされた、データ入力機能、データ保持機能、画像解析機能、描画機能などの諸機能を発揮するプログラムで実現される。したがって、これらの機能ブロックがハードウェアのみ、ソフトウェアのみ、またはそれらの組合せによっていろいろな形で実現できることは当業者には理解されるところであり、いずれかに限定されるものではない。
 撮像装置12は第1カメラ13a、第2カメラ13bを含む。各カメラはそれぞれ、既知の間隔を有する左右の位置から所定のフレームレートで被写体を撮影する。撮影して得られるステレオ画像は情報処理装置10からの要求により一般的な手法で随時、情報処理装置10へ送信される。
 情報処理装置10は、撮像装置12からステレオ画像等のデータを取得する画像取得部42、ユーザからの指示入力を取得する入力情報取得部44、撮影画像に基づき被写体の位置情報を生成する位置情報生成部46、被写体の位置に基づき必要な処理を行い出力情報を生成する出力情報生成部50、撮像装置12から取得したステレオ画像のデータや、位置情報生成部46が生成した中間データなどを記憶する画像データ記憶部48を含む。
 入力情報取得部44は、処理の開始や終了要求、メニューの選択、実行中のゲーム等に対するユーザ操作など、撮像装置12以外の手段によるユーザからの指示入力を受け付け、それに応じた処理要求信号をその他の機能ブロックに送信する。入力情報取得部44は、ボタン、キーボード、マウス、トラックボール、タッチパネルなど一般的な入力装置と、当該入力装置になされた操作内容を解釈して処理要求信号を生成するCPU22などの協働により実現する。
 画像取得部42は、入力情報取得部44からの要求に従い撮像装置12からステレオ画像等のデータを取得し、画像データ記憶部48に格納する。取得するデータは情報処理装置10が実施する情報処理の内容に応じて様々であってよい。例えば第1カメラ13aが撮影した画像のみを撮影時のフレームレートで取得し、それより低いレートすなわち頻度で第1カメラ13a、第2カメラ13bが撮影したステレオ画像を取得するなどでよい。つまり第1カメラ13aが撮影した画像と第2カメラ13bが撮影した画像の取得レートは独立に設定できるようにしてもよい。画像取得部42は、図2で示した入力部38、入出力インターフェース28、およびCPU22などの協働により実現する。
 位置情報生成部46は図2で示したCPU22、GPU24などにより実現し、画像データ記憶部48に格納されたステレオ画像のデータに基づき、被写体の3次元空間での位置の情報を生成する。位置情報生成部46は、第1位置情報取得部52、第2位置情報取得部56を含む。本実施の形態では位置情報生成処理を、第1位置情報取得部52が行う第1の処理と第2位置情報取得部56が行う第2の処理の2つに分けることで、位置情報の精度向上と処理の高速化を実現する。このとき、第1の処理を第2の処理の前処理とする場合と、第1の処理と第2の処理を並列に行う場合がある。
 第1の処理を第2の処理の前処理とする場合、第1位置情報取得部52は所定の手段により被写体のおよその位置を特定し、第2位置情報取得部56は当該およその位置に基づき対象を絞って詳細な位置情報を取得する。この場合、第2位置情報取得部56はステレオ画像法により位置情報を取得するが、第1位置情報取得部52がおよその位置を特定する手段は様々であってよい。第2位置情報取得部56はステレオ画像法による処理において、着目する対象の存在が推定される範囲に基づき、ステレオ画像における対応点の探索範囲を限定する。
 一方、第1の処理と第2の処理を並列に行う場合、第1位置情報取得部52および第2位置情報取得部56は、それぞれが担当する対象に着目して位置情報を取得する。この場合、第1位置情報取得部52および第2位置情報取得部56はどちらも、ステレオ画像法により位置情報を取得する。そして双方が、着目する対象の存在が推定される範囲に基づき、ステレオ画像における対応点の探索範囲を限定する。なお場合によっては、第2位置情報取得部56は、第1の処理により生成された位置情報と第2の処理により生成された位置情報を統合し、最終的な位置情報を生成する処理も行う。
 出力情報生成部50は、図2で示したCPU22、GPU24などにより実現し、位置情報生成部46が生成した被写体の位置情報に基づき、画像データ記憶部48から読み出した撮影画像にさらに描画処理を施すなど、使用目的に応じた処理を適宜行う。上述のとおりここで行う処理は特に限定されず、入力情報取得部44が受け付けたユーザからの指示や実行するプログラムなどに応じて適宜切り替えてよい。処理の結果得られた画像のデータは、表示装置16に出力され表示される。あるいはネットワークを介して別の装置へ送信してもよい。出力情報生成部50はさらに、被写体の動きに応じた音声データを生成し、スピーカから出力するようにしてもよい。
 次に、第2位置情報取得部56が行うステレオマッチングの基本的な手法について説明する。図4はステレオ画像における視差と被写体の奥行き方向の位置の関係を説明するための図である。第1カメラ13a、第2カメラ13bは距離Lを隔てた平行な光軸を有するように設置される。これらのカメラに対し、被写体は奥行き方向に距離Z離れた右端の矢印に位置するとする。
 各カメラが撮影した画像の1画素が表す実空間での幅Δxは、距離Zに比例して次のように表される。
 Δx=Z×w/W
ここでWはカメラの横方向の画素数、wは距離Zが単位長さのときの実空間の横方向の視野範囲であり視角によって定まる。距離Lだけ離れたカメラで撮影された同一の対象物は、その画像上でおよそ下記のような画素数上の視差Dを有する。
 D=L/Δx=L×(W/w)×(1/Z)=C/Z
ここでCはカメラおよびそのセッティングにより定まる値であり、運用時は定数とみなせる。
 ステレオ画像上に表れる同一の被写体の像のずれを視差Dとして求めれば、上記関係式により奥行き方向の距離Zが求められる。視差Dを求めるため、ステレオ画像に対しブロックマッチングを行い、両画像における被写体の像の位置関係を特定する。図5は基本的なブロックマッチングの手法を説明するための図である。まずステレオ画像を構成する左視点画像180a、右視点画像180bのうち、例えば右視点画像180bに、所定サイズの参照ブロック182を設定する。
 ここで参照ブロック182のサイズは、例えば4×4画素や8×8画素などとする。視差Dは参照ブロック単位で得られるため、奥行き方向の位置情報の解像度は、4×4画素であれば原画像の1/4×1/4倍、8×8画素であれば1/8×1/8倍となる。次に左視点画像180aのうち、右視点画像180bの参照ブロック182と比較し類似度の高いブロック184を特定する。
 画像の横方向をx軸、縦方向をy軸とすると、類似度の高いブロック184を特定するためにはまず左視点画像180aに対し、y軸方向で参照ブロック182と同じ位置y=y1に、横方向に所定の長さを有する探索範囲186を設定する。視差により、左視点画像180aにおける像は右視点画像180bの同一の被写体の像より右に寄っていることを考慮し、探索範囲186は、参照ブロック182の横方向の位置x1を始点として右側に設定する。
 そして参照ブロック182と同じサイズのブロック枠を当該探索範囲186内で横方向にずらしながら、ブロック枠で囲まれた領域(以後、「ターゲットブロック」と呼ぶ)と参照ブロック182との類似度を計算していく。ブロック枠は一画素ずつ、または所定の複数画素ずつずらす。結果として、探索範囲186の横方向の軸に対する類似度の変化が得られる。そのうち最も高い類似度が得られたときのターゲットブロックが、参照ブロック182に対応するブロック184ということになる。そして、右視点画像180bにおける参照ブロック182の横方向の位置x1と、左視点画像180aにおける対応するブロック184の横方向の位置x2との差が視差Dとなる。
 このようにして視差Dを求め、上記関係式により奥行き方向の距離Zを求める処理を、右視点画像180bの画像平面をメッシュ分割してなる各領域を参照ブロックとして繰り返すことにより、右視点画像180bの参照ブロック単位の位置座標に対し距離Zが対応づけられる。なお類似度の計算として、SSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)、NCC(Normalized Cross-Correlation)、ZNCC(Zero-mean Normalized Cross-Correlation)などいくつかの手法が提案されている。いずれの手法も、参照ブロックとターゲットブロックを、対応する画素の輝度値に基づき比較することを基本とする。
 このようにステレオ画像法により位置情報を取得する場合、ステレオ画像の解像度が高いほど、ターゲットブロックの位置に対する類似度の変化が詳細かつ高精度に得られ、結果として、対応点の取得、ひいては奥行き方向の距離Zの取得精度が向上する。一方で、1つの参照ブロックに対するマッチング処理の負荷が増えたり、参照ブロックの数が増えたりして、画像の全領域に対し被写体の位置を求めるのに要する時間も増大する。
 画像の解像度によらず探索範囲186の横方向の画素数を固定とした場合、解像度が高くなるほど画像上で探索範囲186が及ぶ領域が小さくなり、ターゲットブロックが真の対応箇所に至らないことも考えられる。そこで本実施の形態では着目対象を絞ることにより、上述のように探索範囲を適切な位置に限定して設定し、少ない処理の負荷で高精度な位置情報を生成する。次に、探索範囲を限定した際の位置情報への影響について説明する。
 図6は、限定された探索範囲の設定位置を異ならせたときの位置情報の取得結果を奥行き画像で表している。奥行き画像とは、ステレオ画像法により得られた被写体の奥行き方向の距離Zを、画像平面上に輝度分布として表した画像である。同図では距離Zが大きいほど小さい輝度で表している。各奥行き画像(a)、(b)の上段には、図5で示したのと同様の形式で、右視点画像180bに設定した参照ブロック182と、それに対応して左視点画像180aに設定する探索範囲186を例示している。この例は、室内にいる人物を中心とした撮影画像に基づくものであり、視野内には天井や周囲の物も含まれる。
 図示するように、奥行き画像(a)は探索範囲186の始点xaを参照ブロックと同位置x1とした場合、奥行き画像(b)は探索範囲186の始点xbを参照ブロックの位置x1より数十画素分、離した場合の奥行き画像である。両者で探索範囲の長さは等しいとする。画像中、略中心に写っている人の顔領域190a、190bに着目すると、奥行き画像(a)は奥行き画像(b)と比較しデータに欠損が多く見られる。
 一方、画像の奥方向に伸びている天井板の境界線192a、192bに着目すると、奥行き画像(a)では、顔領域190aより小さい輝度、すなわち顔より奥にあることが正確に示されている一方、奥行き画像(b)は顔領域190bと同じ輝度、すなわち奥行き方向に同じ位置にあると誤認識している。上述のように視差Dは奥行き方向の距離Zに反比例するため、手前にある物ほど視差Dが大きく、ひいては対応点が参照ブロック182から離れる傾向となる。
 したがって奥行き画像(a)のように、探索範囲186を参照ブロック182と近接させた場合は、奥にある被写体に対し正確な位置情報が得られる。一方、画像(b)のように探索範囲186を参照ブロック182から離すほど、より手前にある被写体に対し正確な情報が得られる。特に天井板の境界線のように画像上で繰り返し表れる線や模様などでは、本来、最高類似度が得られる真の対応箇所が別にあるにも関わらず、限定された探索範囲内で良好な類似度が得られてしまった結果、別の線や模様を対応箇所と誤認識し、誤った距離値を算出してしまうことがあり得る。
 奥行き画像(b)ではそのような現象が結果として表れている。これらのことを踏まえ、本実施の形態ではまず、第1位置情報取得部52により被写体のおよその位置を別途取得し、それに基づき第2位置情報取得部56が適切な探索範囲を設定したうえでブロックマッチングを行う。真の対応箇所が含まれるように探索範囲を設定することにより、探索範囲自体が短くても正確な位置情報を取得できる。
 探索範囲を限定する代わりに、それを用いたブロックマッチング自体は詳細かつ高精度に実施する。具体的には、第2位置情報取得部56が行う処理は第1位置情報取得部52が行う処理より、(1)高解像度の画像を用いる、(2)類似度の計算に高度なアルゴリズムを用いる、(3)高い頻度(レート)で実施する、の少なくともいずれかとする。このように第2位置情報取得部56を高品質な処理とすることで、第1位置情報取得部52が行う処理を簡略化できる、と捉えることもできる。
 次に第1位置情報取得部52が行う処理のバリエーションを含む、位置情報生成部46による位置情報生成処理の流れを説明する。図7は、第1位置情報取得部52が簡易ステレオマッチングと顔検出処理を行い、第2位置情報取得部56が詳細ステレオマッチングを行う場合の処理の流れを示している。以後、上述のようにブロックマッチングによりステレオ画像上で対応する箇所を検出し、その視差に基づき奥行き方向の距離を求める処理をステレオマッチングとも呼ぶ。また以後の説明では、室内で撮像装置12の前にいるユーザを位置情報取得の主たる対象とするが、対象物や撮影環境を限定する主旨ではない。
 まず画像取得部42が取得したステレオ画像194a、194bのデータを画像データ記憶部48から読み出すと、第1位置情報取得部52は、それらを用いて簡易ステレオマッチングを行う(S10)。簡易ステレオマッチングは基本的に、上述したのと同じ手順でステレオマッチングを行い奥行き画像を生成する処理である。ただし撮像装置12から取得したステレオ画像194a、194bを縮小するなどして低解像度画像を生成することにより、第2位置情報取得部56より低い解像度のステレオ画像でブロックマッチングを行う。
 あるいはブロックマッチング時のブロックサイズを大きくしてもよい。なお撮像装置12が、複数解像度のステレオ画像を出力する機能を有する場合は、第1位置情報取得部52は、そのようにして撮像装置12が生成した低解像度のステレオ画像を用いればよい。なお上述のように第1位置情報取得部52は、類似度の計算手法を、SADなど第2位置情報取得部56が用いる手法より簡易なものとしてもよい。ここで「簡易」とは、類似度を算出するまでの時間が短いこと、計算式が少ないこと、発生するパラメータの数が少ないこと、の少なくともいずれかを満たすものである。SADは参照ブロックとターゲットブロック内の対応する画素の値の差分の総和を類似度とする、他の計算手法より簡易な計算手法である。
 また第1位置情報取得部52は、第2位置情報取得部56より低い頻度でステレオマッチングを行ってもよい。一方で第1位置情報取得部52は、ブロックマッチング時の探索範囲を限定しない。すなわち、参照ブロックを始点として視差が生じる方向に画像の端までの、第2位置情報取得部56より広い範囲を探索範囲とする。これにより、位置によらず視野内にある全ての被写体について奥行き方向の距離を表した簡易的な奥行き画像196が得られる。これと並行して第1位置情報取得部52は、ステレオ画像194a、194bのどちらかに対し顔検出処理を施す(S12)。ここで行う顔検出処理は、平均顔画像や登録顔画像を表すテンプレート画像と撮影画像を比較するテンプレートマッチングなど、一般的な技術を用いてよい。
 なお簡易ステレオマッチングの処理の頻度を低下させる場合は、顔検出処理の頻度もそれに合わせて低下させてよい。また対象物を人としない場合は、顔検出に代えて当該対象物の形状や特徴点を表すテンプレート画像とのマッチングにより対象物の像を検出できる。そして第1位置情報取得部52は、顔検出処理によって取得された画像上での顔領域198を簡易的な奥行き画像196に当てはめることにより、顔を含むユーザの奥行き方向の距離の概略値を取得する。ここで距離の概略値とは、例えば顔領域198の中心に位置する画素の画素値、あるいは顔領域198内にあり同一位置にあると見なせる顔面の領域を構成する画素値の平均値などである。
 複数のユーザが存在する場合は複数の顔領域が検出されるため、ユーザごとに距離の概略値を取得する。次に第2位置情報取得部56は、当該距離の概略値に基づき探索領域を限定して設定したうえで詳細ステレオマッチングを行う(S16)。ここでは上述のように、第1位置情報取得部52より高い解像度のステレオ画像194a、194bを用いたり、ブロックマッチング時のブロックサイズを小さくしたりする。あるいは類似度の計算手法をZNCCなど、第1位置情報取得部52が使用した手法より高度なものとしたり、第1位置情報取得部52より高い頻度で処理を行ったりする。
 S10の簡易ステレオマッチングとS16の詳細ステレオマッチングは、ステレオ画像の解像度、計算手法の複雑さ、処理の頻度のうちいずれか一つを異ならせてもよいし、2つ以上を同時に異ならせてもよい。最終的に出力する位置情報の精度と総合的な処理の負荷との兼ね合いにより、どのように差をつけるかを適宜決定してよい。このようにして第2位置情報取得部56は、少なくとも対象物たるユーザについて詳細かつ高精度な奥行き画像200を生成して出力情報生成部50に出力する。これにより出力情報生成部50は、ユーザの位置や動きに応じた表示画像などの出力データを正確に生成できる。
 図8は、第2位置情報取得部56が設定する探索範囲を説明するための図である。まず第1位置情報取得部52が取得するユーザの奥行き方向の距離の概略値をZeとする。すると第2位置情報取得部56は、概略値の誤差や体の厚みなどを考慮し概略値Zeの前後に所定範囲を含めた推定距離範囲Ze-ΔZf≦Z≦Ze+ΔZbを決定する。ここでΔZfは距離Zの軸上で前方向の余裕分、ΔZbは後ろ方向の余裕分であり、例えばΔZf=ΔZb=30cmなどとする。
 この範囲のうち対象物が最も奥にある場合、すなわちZ=Ze+ΔZbの場合の視差が最も小さく表れ、上述した式からその視差Dminは、
 Dmin=C/(Ze+ΔZb)
となる。最も手前にある場合、すなわちZ=Ze-ΔZfの場合の視差が最も大きく表れ、上述した式からその視差Dmaxは、
 Dmax=C/(Ze-ΔZf)
となる。
 したがって図8に示したように、右視点画像194bにおける位置x1の参照ブロック202に対し左視点画像194aに設定する探索範囲204は、ターゲットブロックの移動量としてx1+Dminからx1+Dmaxまでの範囲となる。第2位置情報取得部56は、右視点画像194bの画像平面をメッシュ分割してなる各領域を参照ブロックとし、それぞれに対し設定した探索範囲204内でターゲットブロックをずらしながら類似度を計算する。そして高い類似度が得られたときのターゲットブロックを、当該参照ブロックに対応するブロックとして検出する。
 これにより、少なくともZe-ΔZf≦Z≦Ze+ΔZbの範囲に存在する対象物については、詳細かつ高精度に奥行き方向の距離が表された奥行き画像200が得られる。あるいは第2位置情報取得部56は、さらに参照ブロック202の設定範囲を限定してもよい。すなわち、対象物の像の領域に対してのみ参照ブロック202を設定することにより、周囲の物に対するブロックマッチング処理自体を省略する。この場合、対象物の像が画像上で及ぶ範囲を特定する必要がある。
 例えば対象物をユーザとした場合、S12で検出した顔領域198を基準とすると、手先や足先などの可動範囲は、顔領域198の位置や大きさから推定が容易である。したがってそれを網羅するようにユーザの像の及ぶ最大範囲を決定し、その範囲内で参照ブロック202を設定する。あるいはS10における簡易ステレオマッチングの結果、得られた簡易的な奥行き画像196のうち、顔領域198を構成する画素の値から所定範囲内に画素値を有し、顔領域と連続している画素の領域を人体の領域と推定し、その範囲に限定して参照ブロック202を設定してもよい。
 さらに、ゲームなどの初期設定として、手を広げるなど像の及ぶ範囲が最大となるポーズをとった状態のユーザを撮影し、そのときのユーザの奥行き方向の距離と、当該最大範囲との関係をユーザごとに取得しておいてもよい。この場合、第1位置情報取得部52が求めた距離の概略値に基づきユーザが及ぶ最大範囲を特定し、その範囲に限定して参照ブロック202を設定する。これらの手法により、指先などが詳細ステレオマッチング処理の対象から外れることなく、より効率的に対象物の位置情報を生成できる。なお参照ブロックの設定範囲を限定する手法は、以下に述べる態様においても採用できる。
 図9は位置情報生成部46による処理の流れの別の例として、第1位置情報取得部52が簡易ステレオマッチングおよびヒストグラム生成を行い、第2位置情報取得部56が詳細ステレオマッチングを行う場合の処理の流れを説明するための図である。なお図7と同じ処理には同じ符号を付し、説明を省略する。この例では、第1位置情報取得部52は、簡易ステレオマッチングを行ったあと(S10)、得られた簡易的な奥行き画像196を用いて、距離値のヒストグラムを生成する(S18)。
 すなわち簡易的な奥行き画像196の画素値が表す奥行き方向の距離Zの、画像中での出現度数を表したヒストグラムを生成する。物の表面はおよそ同じ位置にあることを考慮すると、奥行き画像196において物の表面を表すある程度まとまった数の画素群は、同程度の画素値を有することになる。この特性を利用すると、ヒストグラムにおいて高い出現度数となる画素値に対応する距離に物が存在すると推定できる。同図の例では出現度数に2つのピークが得られているため、それに対応する距離に物体が存在すると考えられる。
 第1位置情報取得部52は、あらかじめ設定したしきい値Thとヒストグラムを比較し、しきい値Th以上の出現度数を有する部分を抽出する。しきい値Thは例えば、人の像として表れる画素数を実際の撮影画像などから求め、それに誤差を考慮するなどして決定しておく。奥行き方向の距離によって像の大きさも変化することから、しきい値Thをヒストグラムにおける奥行き方向の位置によって変化させてもよい。
 そして抽出したピークから、所定の規則で選択したピークの位置、あるいはその範囲をユーザの位置あるいは範囲と推定する。例えばユーザが撮像装置12の目前に位置し、その背後に家具や壁がある、という一般的な状況においては、最も手前にある、すなわち距離Zが小さいピークを選択する。ただし選択規則はこれに限らず、撮影環境やユーザの人数などによって適宜変化させてよい。例えばゲームの開始前などに、背景のみを撮影した画像に基づきヒストグラムを取得しておくことで、運用時は当該背景によるピークを除外することができる。この場合、ユーザが複数存在する場合でも、除外したピーク以外の複数のピークが、各ユーザの像を表していると認識できる。
 そのようにしてユーザの像によるピークを推定したら、当該ピークを与える距離、あるいはしきい値Th以上の出現度数を与える距離の範囲の中心値などをユーザの奥行き方向の距離の概略値Zeとして決定する。これに基づき第2位置情報取得部56は、図7で説明した場合と同様に、前後に所定範囲を含めた推定距離範囲に基づき探索範囲を限定したうえで、詳細ステレオマッチングを行う(S16)。この場合も、少なくとも対象物たるユーザについて詳細かつ高精度な奥行き画像200を生成できるため、第2位置情報取得部56はそのデータを出力情報生成部50に出力する。
 図10は、位置情報生成部46による処理の流れの別の例として、第1位置情報取得部52がユーザとの対話により距離の概略値を取得し、第2位置情報取得部56が詳細ステレオマッチングを行う場合の処理の流れを説明するための図である。なお図7と同じ処理には同じ符号を付し、説明を省略する。この例では、第1位置情報取得部52は、「カメラから1m付近に立ってください」といった指示により、奥行き方向の距離が既知の所定位置に立つようにユーザに促す。あるいはゲーム上などで自然にその位置に移動するように誘導する。そしてユーザが当該位置に立った時点で、その奥行き方向の距離をこれまで述べた態様における「距離の概略値」とする。
 椅子に座って行うゲームなどの場合、座った状態での撮像装置12からの距離をユーザに入力させるようにしてもよい。ここで要求される距離は概略値でよいため、例えば30cmごとなど所定の刻み幅の複数の候補距離から選択させるようにしてもよい。第1位置情報取得部52は、ユーザに対する立ち位置の指示や距離の入力指示を、画像や音声で表すように出力情報生成部50に要求する。そして、立ち位置を指示した場合はユーザが当該位置に移動し静止した時点を判定し第2位置情報取得部56に通知する。
 ユーザに距離を入力させた場合、第1位置情報取得部52は入力された情報を入力情報取得部44から取得して第2位置情報取得部56に通知する。第2位置情報取得部56は、その時点で撮影されたステレオ画像194a、194bを用いて、これまでの態様と同様、指定した、または入力された距離の概略値の前後に所定範囲を含めた推定距離範囲に基づき探索範囲を限定したうえで、詳細ステレオマッチングを行う(S16)。この場合も、少なくとも対象物たるユーザについて詳細かつ高精度な奥行き画像200を生成できるため、第2位置情報取得部56はそのデータを出力情報生成部50に出力する。
 なおこの態様においては、第1位置情報取得部52が距離の概略値を取得するタイミングは、ゲームの開始時などに限定される。したがって第2位置情報取得部56は、一度、当該距離の概略値を取得して詳細ステレオマッチングを行ったあとは、前のフレームに対し自らが取得した位置情報を用いて後のフレームの位置情報を取得するようにしてもよい。
 図11は、位置情報生成部46による処理の流れの別の例として、第1位置情報取得部52が検知面を設定することにより所定位置の対象物を検知し、第2位置情報取得部56が詳細ステレオマッチングを行う場合の処理の流れを説明するための図である。なお図7と同じ処理には同じ符号を付し、説明を省略する。検知面によって対象物の位置を検出する手法は、特開2013-242812号公報に開示されている。
 この技術において検知面とは実空間に仮想的に設定する面である。検知面をステレオ画像のスクリーン座標に投影して得られる領域は、撮像装置12から検知面までの距離に応じた視差を有する。仮に検知面と重なる位置に人が立っていたとすると、ステレオ画像における当該人の像は、検知面をステレオ画像にそれぞれ投影してなる2つの領域内で同じ位置に表れるはずである。したがってステレオ画像の一方から、検知面を投影してなる領域を、他方から、それに視差を加味して決定した対応する領域を切り取り、両者のマッチングをとる。2つの領域において同じ位置に像があると判定された場合、その物は検知面の位置に存在することがわかる。さらなる説明については後述する。
 第1位置情報取得部52は実空間においてこのような検知面を所定の位置に仮想的に設定し、それをステレオ画像上に投影してなる領域についてマッチングを行う。その結果、マッチング評価値が高い画素が所定数以上検出されたら、当該検知面の位置にユーザがいると判定する。検知面を複数の位置、例えば撮像装置12の撮像面と平行に所定の間隔で設定し、各検知面に対し同様の判定処理を行うことにより、対象物たるユーザの奥行き方向の距離の概略値を決定できる。
 第2位置情報取得部56はこれまで述べた態様と同様、当該概略値の前後に所定範囲を含めた推定距離範囲に基づき探索範囲を限定したうえで詳細ステレオマッチングを行う(S16)。この場合も、少なくとも対象物たるユーザについて詳細かつ高精度な奥行き画像200を生成できるため、第2位置情報取得部56はそのデータを出力情報生成部50に出力する。
 図12は、検知面を設定することにより所定位置の対象物を検知する手法を説明するための図である。同図上段は撮影環境を上から見た模式図72a、下段は横から見た模式図72bである。図示するように第1カメラ13a、第2カメラ13bに被写体である人物74が対峙している。このとき等視差面は点線で示すように分布する。ここで等視差面とは、面上の全ての点において視差が等しい平面である。
 このような環境において、検出したい位置の等視差面上に検知面76を定義する。検知面76は、カメラ座標系による3次元空間においてその頂点座標を定義した仮想的な平面である。ただし検知面の輪郭形状は特に限定されず、傾きも任意に設定してよい。図13は図12で示した環境で撮影されたステレオ画像の例を示している。図12で示した検知面76を左視点画像80aに投影したものが領域82である。以後、3次元空間で定義する「検知面」に対し、それを画像平面に投影した領域を「検知領域」と呼ぶ。
 なお3次元空間において定義されたモデルを2次元の画像平面に投影させる処理は、一般的なコンピュータグラフィックス処理として実現できる。検知領域82の左上の座標を(x,y)とする。等視差面上に検知面を定義した場合、左視点画像80aと右視点画像80bの視差は全領域で同一である。すなわち奥行き方向の距離Zにある検知面上に存在する物は、左視点画像80aと右視点画像80bでは視差D=C/Zだけずれて写る。
 そこで右視点画像80bにおいて、検知領域82と同一の領域を視差分だけ左方向に平行移動させた、左上の座標が(x-C/Z,y)の領域を視差補正領域84とする。すなわち視差補正領域84は、検知領域82と同位置の領域を、ステレオ画像における視差を解消する方向に移動させたものである。そして左視点画像80aの検知領域82と、右視点画像80bの視差補正領域84の特徴点画像、例えばエッジ画像を切り出し、マッチング処理を行う。そして高い評価値が得られた画素を表したマッチング画像86を生成する。
 図13におけるマッチング画像86では、理解を容易にするため、エッジとして抽出された、被写体の左手の輪郭全体を実線および点線で示しているが、実際のマッチング画像はこのうち実線部分のみが残された画像であるとする。すなわち指先の一部および手首の一部が、図12で示した検知面上に位置している、という情報が得られる。マッチング画像として残す部分は、マッチング評価値のしきい値判定によって決定する。このしきい値を調整することによって、奥行き方向の位置Zに対する検出分解能を制御できる。
 なお等視差面に対し傾きを有するように検知面を設定した場合、画像平面の縦方向で視差が変化するため、それに応じて検知領域のずらし量を縦方向で変化させて視差補正領域を決定すれば、その後の処理は同様となる。第1位置情報取得部52は上述のとおり、マッチング画像86においてマッチング評価値が高いことが表された画素の数が所定値以上のとき、対象物が検知面の位置にいると判定し、その位置を距離の概略値として第2位置情報取得部56に通知する。
 なお図示する例では手の位置を検出するためのサイズを有する検知面であったが、ユーザの体全体など、対象物の大きさによって検知面のサイズも変化させる。さらに上述のように、検知面を複数、設定し、いずれかの検知面で検出できるようにすれば、対象物がどこにいてもその距離の概略値を取得することができる。
 図7および図8で説明した態様において、第1位置情報取得部52が行う簡易ステレオマッチングは、第2位置情報取得部56が限定的な探索範囲を適切に設定するために必要な距離の概略値を得ることを目的としていた。一方、その結果得られた簡易的な奥行き画像を、位置情報生成部46から出力する位置情報のデータに含めるようにしてもよい。具体的には、第2位置情報取得部56が取得した奥行き画像のうち、詳細に距離を求めた対象物の像の領域と、第1位置情報取得部52が取得した簡易的な奥行き画像のうち当該対象物の像以外の領域とを合成して最終的な奥行き画像とする。
 すなわち1つの奥行き画像において、詳細度および精度の異なる奥行き情報を表す複数の領域が混在した状態とする。このようにすると、ユーザなどの対象物の領域以外の領域についても、探索範囲を限定した場合より精度の高い奥行き情報が得られる。例えば撮影画像上に描画したオブジェクトモデルをユーザの動きに応じて動かすARを実現した場合、ユーザとのインタラクションと周囲の物とのインタラクションでは、求められる位置認識精度が異なる。すなわちユーザの手など人体は複雑な形状のうえ動きも複雑なため、臨場感のあるインタラクションを実現するには詳細な位置情報が要求される。
 一方、周囲の物は一般的に、形状が単純で動くことも少ないため、大まかな位置情報でも臨場感が大きく損なわれることはない。したがって上述のように1つの奥行き画像内で詳細度、精度に変化をつけることにより、必要な情報を確保しつつ処理の負荷を抑えることができる。図14は詳細度、精度の異なる奥行き情報を合成して1つの奥行き画像を生成する態様における位置情報生成部46による処理の流れを説明するための図である。なお図7と同じ処理には同じ符号を付し、説明を省略する。この場合、図7で説明したのと同様、第1位置情報取得部52は、ステレオ画像194a、194bを用いて簡易ステレオマッチングを行う(S10)。それとともに第1位置情報取得部52は、ステレオ画像194a、194bのどちらかに対し顔検出処理を施す(S12)。
 そして簡易ステレオマッチングで生成した簡易的な奥行き画像196に顔領域198を当てはめることにより、顔を含むユーザの奥行き方向の距離の概略値を取得する。第2位置情報取得部56は、当該距離の概略値に基づき、図7で説明したのと同様に探索領域を限定したうえで詳細ステレオマッチングを行う(S16)。次に第2位置情報取得部56は、そのようにして生成した、対象物たるユーザについて詳細かつ高精度な位置情報を表す奥行き画像200と、第1位置情報取得部52がS10の簡易ステレオマッチングによって生成した簡易的な奥行き画像とを合成する(S24)
 具体的には、簡易的な奥行き画像196のうち対象物の像の領域の画素値を、当該対象物について第2位置情報取得部56が詳細に取得した奥行き画像200の対応する領域の画素値に置き換える。第1位置情報取得部52が生成した簡易的な奥行き画像196と第2位置情報取得部56が生成した奥行き画像200で解像度(画像のサイズ)が異なる場合は、例えば前者を拡大して後者のサイズに揃えたうえで画素値を置き換える。
 これにより、第1位置情報取得部52が広い探索範囲で全体的に求めた奥行き画像のうち、対象物の像の領域については特に詳細かつ高精度に求めた奥行き情報が表された奥行き画像210が生成される。なお対象物以外の領域は家具や壁など単純な形状であったり動きがなかったりする可能性が高いため、簡易的な奥行き画像196の合成部分の更新頻度は、詳細な奥行き画像200の合成部分の更新頻度より低くてよい。例えば前者の更新頻度を後者の1/10程度としてもよい。このとき第1位置情報取得部52の処理自体の頻度を下げてもよい。
 また図示する例は、図7と同様、第1位置情報取得部52が顔領域を検出する態様であったが、図9で説明したようにヒストグラムによって距離の概略値を検出してもよい。さらに図10や図11で説明したように、ステレオマッチング以外の手段で距離の概略値を求める態様と組み合わせてもよい。この場合、第1位置情報取得部52は、別途、簡易ステレオマッチングを行い簡易的な奥行き画像を生成して合成対象とする。
 図15は合成処理の手法を説明するための図である。合成処理においては、簡易的な奥行き画像196のうち第2位置情報取得部56が生成した奥行き画像で置き換える領域を決定する必要がある。第2位置情報取得部56が生成した奥行き画像は、対象物の距離範囲に特化したデータであり、それ以外の位置にある物は原則的には距離算出対象から除外される。探索範囲を上述のように限定することにより、本来はそれに対応する距離範囲に存在する物のみが、ブロックマッチングにおける類似度の高さにより検出されるが、上述の天井板の境界線のように、繰り返しで出現する線や模様など、類似の物も誤って検出される可能性がある。
 図15の上段(a)は、第1位置情報取得部52が探索範囲を限定しないでブロックマッチングを行う様子を、下段(b)は、第2位置情報取得部56が探索範囲を限定してブロックマッチングを行う様子を示している。具体的には、(a)におけるステレオ画像220a、220bのうち、右視点画像220bの参照ブロック222に対し、左視点画像220aに画像の右端まで到達する探索範囲224が設定されている。一方、(b)におけるステレオ画像230a、230bのうち、右視点画像230bの参照ブロック232に対し、左視点画像230aに、限定された探索範囲234が設定されている。
 なお参照ブロック222と232は同じ位置にあるとする。各探索範囲224、234の下には、その範囲において算出された類似度226、236を例示している。ただし(b)において実際に類似度が算出されるのは実線の部分のみとなる。(a)のように広い探索範囲224を設定した場合、最大類似度Aが得られたときのターゲットブロック228が対応するブロックとして検出される。ただし横方向の別の位置に同様の線や模様が存在すると、図示するように類似度Bや類似度Cのような異なる極大点も得られる。
 このような撮影環境において(b)のように探索範囲を限定すると、当該探索範囲234の外に真の対応箇所があるにもかかわらず、別の位置で当該範囲内での最大類似度Bが得られてしまい、そのときのターゲットブロック238が対応するブロックとして検出されてしまう。結果として偽の視差が取得され、ひいては偽の距離値が算出されてしまう可能性がある。この(b)の例のように、第2位置情報取得部56が生成する詳細な奥行き画像には、誤った位置情報が含まれている可能性がある。
 したがって上述のように置き換える領域を正確に決定することにより、画像全体で誤差の少ない位置情報が表されている最終的な奥行き画像210を生成する。最も単純には、簡易的な奥行き画像のうち、顔領域における画素値と同等(所定範囲)の画素値を有し、かつ顔領域から連続した画素群からなる領域を、対象物たるユーザの像の領域として、第2位置情報取得部56が生成した奥行き画像の画素値に置き換える。
 図9で説明したようにヒストグラムを用いる場合は、例えば、距離の概略値を求めたときのピークを構成する画素群のうち、連続して所定の大きさの領域を形成している画素群について、第2位置情報取得部56が生成した奥行き画像の画素値に置き換える。あるいは、第1位置情報取得部52が簡易的な奥行き画像を生成する際に求めた類似度と、第2位置情報取得部56が詳細な奥行き画像を生成する際に求めた類似度を比較し、後者の方が高い場合に詳細な奥行き画像のデータへの置き換えを実施してもよい。
 すなわち第1位置情報取得部52は、簡易ステレオマッチングの処理において、対応するブロックとしてターゲットブロック228を検出した際に得られた最大類似度Aを、対応する参照ブロック222の位置に対応づけた類似度画像を生成しておく。第2位置情報取得部56も同様に、詳細ステレオマッチングの処理において、対応するブロックとしてターゲットブロック238を検出した際に得られた最大類似度Bを、対応する参照ブロック232の位置に対応づけた類似度画像を生成しておく。そして奥行き画像を合成する際は、両者の類似度画像のうち同じ位置の参照ブロックに対応づけられた類似度を比較して、より高い類似度が得られている方の奥行き画像のデータを真の距離値として採用する。
 図15の例ではA>Bのため、第1位置情報取得部52が(a)により取得した距離値を採用する。なお第1位置情報取得部52と第2位置情報取得部56が異なる手法で類似度を計算している場合、類似度のスケールが異なり単純に比較できないことが考えられる。あらかじめ両者の値の関係が判明していれば、それに応じて一方を他方のスケールに換算した後、比較する。あるいは、図15の(a)、(b)のように探索範囲224、234の一部が重複している場合、同じ位置における類似度を比較して倍率を求め、それを一方に乗算することでスケールを揃えてもよい。
 これまで述べた態様では、第1位置情報取得部52は、対象物の距離の概略値を求める手法の一つとして、ステレオ画像に広い探索範囲を設定し粗い精度でステレオマッチングを行った。その変形例として、第1位置情報取得部52も探索範囲を限定することで、第2位置情報取得部56とは別の位置に存在する物を対象として距離値を算出し、双方の位置情報を合成して最終的な奥行き画像としてもよい。図16はこのように距離の算出対象を分担する態様における位置情報生成部46による処理の流れを説明するための図である。
 この例では、第1位置情報取得部52はユーザの背後にある家具や壁などの背景を対象に距離を求め、第2位置情報取得部56はこれまでの例と同様、ユーザなどの前景を対象に距離を求める。背景と前景では当然、カメラからの距離の範囲が異なるため、第1位置情報取得部52がステレオマッチング時に設定する探索範囲と第2位置情報取得部56がステレオマッチング時に設定する探索範囲とを、それぞれの距離範囲に応じて個別に設定する。
 例えば前者は、参照ブロックの位置を始点として63画素までを探索範囲とし、後者は64画素目を始点として127画素までを探索範囲とする。なお探索範囲はこのように固定値としてもよいし、これまでの態様と同様、第1位置情報取得部52がまず、ユーザなどの対象物の距離の概略値を求め、それに応じて両者の探索範囲を適応的に設定してもよい。第1位置情報取得部52が設定する探索範囲を第1探索範囲、第2位置情報取得部56が設定する探索範囲を第2探索範囲とする。1つの参照ブロックに対し設定する第1探索範囲と第2探索範囲は、重複部分が上述の例のようになくてもよいしあってもよい。
 そして第1位置情報取得部52は、例えばステレオ画像のうち一方の画像194bの各参照ブロックに対応して、他方の画像194aに第1探索範囲を設定してステレオマッチングを行う(S30)。その結果、少なくとも背景にある物に対し正確な距離が表された奥行き画像280が得られる。一方、第2位置情報取得部56は例えば、ステレオ画像のうち一方の画像194bの各参照ブロックに対応して、他方の画像194aに第2探索範囲を設定してステレオマッチングを行う(S32)。その結果、前景にある物、すなわちユーザに対し正確な距離が表された奥行き画像282が得られる。
 そして第2位置情報取得部56は、図14で説明した態様と同様に、双方の奥行き画像を合成する(S34)。具体的には、第1位置情報取得部52が生成した奥行き画像280のうち、前景の領域を、第2位置情報取得部56が生成した奥行き画像282のデータで置き換える。その結果、前景、背景ともに、正確な距離が画素値として表された最終的な奥行き画像284が生成される。
 図17は、第1位置情報取得部52と第2位置情報取得部56が、距離を取得する対象を分担したときのブロックマッチングの様子を例示している。同図上段の(a)は、第1位置情報取得部52が、2つの参照ブロック242、262に対応して設定する探索範囲を例示している。一方、下段の(b)は、第2位置情報取得部56が、(a)と同じ参照ブロック242、262に対応して設定する探索範囲を例示している。図の表し方は図15と同様である。ただし同図では、参照ブロックの位置を、探索範囲を設定するのと同じ画像内に黒い矩形で示している。
 上述の例のように、第1位置情報取得部52は背景、第2位置情報取得部56は前景の距離を求めるとした場合、前者の探索範囲は参照ブロックに近い範囲、後者の探索範囲は参照ブロックから遠い範囲となる。例えば同図左側に示す参照ブロック242に対し、第1位置情報取得部52は画像240のように、参照ブロック242に近接させて探索範囲244を設定する。第2位置情報取得部56は画像250のように、参照ブロック242から前述のように所定画素数dだけ離れた位置に探索範囲254を設定する。同図右側に示す参照ブロック262に対する探索範囲264、274の設定も同様である。
 まず画像240のケースでは、第1位置情報取得部52が探索範囲244に対し求めた類似度246のうち、最大類似度Aが得られるときのターゲットブロック248が、対応するブロックとして検出される。これに対し画像250のケースでは、第2位置情報取得部56が探索範囲254に対し求めた類似度256のうち、最大類似度Bが得られるときのターゲットブロック258が、対応するブロックとして検出される。この場合、合成処理時には、図15で説明したのと同様に最大類似度AとBを比較するなどして、第1位置情報取得部52が算出した値を参照ブロック242に対する距離値として採用する。
 一方、画像260のケースでは、第1位置情報取得部52が探索範囲264に対し求めた類似度266には、対応すると見なせる程度に類似度が突出したブロックがないため対応箇所は検出されない。この場合、奥行き画像の画素値は0などとする。これに対し画像270のケースでは、第2位置情報取得部56が探索範囲274に対し求めた類似度276のうち、最大類似度Dが得られるときのターゲットブロック278が、対応するブロックとして検出される。この場合、合成処理時には、第2位置情報取得部56が算出した値を参照ブロック262に対する距離値として採用する。
 このようにして、第1位置情報取得部52および第2位置情報取得部56がそれぞれ生成した2つの奥行き画像が表す距離値のうち、採用する値を参照ブロックごとに適切に選択し、全画像平面に対し最終的な画素値を決定することにより奥行き画像を合成する。結果として、それぞれが設定した限定的な探索範囲を網羅した範囲で探索が行われたのと同等に、位置の異なる全ての対象物の距離を正確に求めることができる。
 ここで、第1位置情報取得部52と第2位置情報取得部56で距離値を求める対象を分担することにより、これまで述べた態様と同様に、両者の処理の詳細度や精度を個別に設定することができる。すなわち上述のように前景は背景より形状が複雑で動きが多いと想定されるため、背景を対象とする第1位置情報取得部52と比較し前景を対象とする第2位置情報取得部56は、第1位置情報取得部52より高解像度のステレオ画像を利用したり、類似度の計算に高度な手法を採用したり、処理の頻度を高くしたり、といった態様の少なくともいずれかを実施する。
 なお計算手法を異ならせる場合は、第1位置情報取得部52および第2位置情報取得部56の探索範囲の一部を重複させることにより、図15の場合と同様、同じ位置で類似度を比較することができ、両者のスケールを揃えられる。このように対象物の特性に応じて詳細度や解像度を変化させることにより、無駄な処理を省きつつ必要な位置情報を要求される精度で取得することができる。
 以上述べた本実施の形態によれば、ステレオ画像を用いて被写体の3次元空間での位置を求める情報処理装置において、処理を複数の役割に分割する。具体的には、画像全体あるいは距離を詳細に求めたい対象物に特化して、奥行き方向の距離の概略値を求めたうえ、当該概略値に対応する探索範囲に限定してブロックマッチングを行い詳細かつ高精度な位置情報を求める。これにより、対象物以外の背景などの物に対して処理を簡略化できるとともに、対象物については正確な位置情報が得られる。結果として処理負荷の軽減と後段の処理に必要な位置情報の精度の向上を両立させることができる。
 また、処理を2段階に分けたことによって生成される、全体的かつ簡易な位置情報と、対象を絞った詳細な位置情報とを合成することにより、詳細度や精度が異なる領域が混在した奥行き画像を生成する。これにより、対象物の特性の違いに起因して、要求される詳細度や精度が異なっても、それに見合った位置情報を1つの奥行き画像で表すことができる。結果として、少ない処理負荷およびデータ量で、後段の処理に必要な情報を適切に出力することができる。
 さらに、対象物のおよその位置によって距離を算出する対象を分担し、それぞれに適切な探索範囲を設定して並列に処理する。そしてそれぞれが生成した位置情報を合成することにより、必要な距離範囲を網羅した最終的な奥行き画像を生成する。このとき、対象物の特性によって解像度、類似度の計算手法、処理の頻度、の少なくともいずれかを異ならせることにより、余計な処理を可能な限り省いたうえで、必要な対象に処理を集約させることができる。結果として、少ない処理負荷およびデータ量で、後段の処理に必要かつ正確な位置情報を適切に出力することができる。
 以上、本発明を実施の形態をもとに説明した。上記実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。
 2 情報処理システム、 10 情報処理装置、 12 撮像装置、 16 表示装置、 13a 第1カメラ、 13b 第2カメラ、 22 CPU、 24 GPU、 26 メインメモリ、 42 画像取得部、 44 入力情報取得部、 46 位置情報生成部、 48 画像データ記憶部、 50 出力情報生成部、 52 第1位置情報取得部、 56 第2位置情報取得部。
 以上のように本発明は、ゲーム機、画像処理装置、情報処理装置、物体認識装置、画像解析装置や、それらのいずれかを含むシステムなどに利用可能である。

Claims (16)

  1.  既知の間隔を有する左右のカメラで同一空間を撮影したステレオ画像のデータを取得する画像取得部と、
     前記ステレオ画像の一方に設定した参照ブロックに対し他方に設定した探索範囲内で類似度の高い領域を検出するブロックマッチングを行うことにより対応点を検出し、その視差に基づき対象物のカメラからの距離を含む位置情報を生成し出力する位置情報生成部と、
     を備え、
     前記位置情報生成部は、対象物のカメラからの推定距離範囲を決定し、当該推定距離範囲に対応する位置および長さで探索範囲を限定して設定したうえでブロックマッチングを行うことを特徴とする情報処理装置。
  2.  前記位置情報生成部は、前記推定距離範囲を決定するために対象物の距離を見積もる距離概略値取得部を含むことを特徴とする請求項1に記載の情報処理装置。
  3.  前記距離概略値取得部は、前記位置情報生成部より広い探索範囲で前記ステレオ画像に対しブロックマッチングを行うことにより被写体のカメラからの距離を取得して、当該距離を画像平面に画素値として表した奥行き画像を生成し、前記ステレオ画像の一方から検出した対象物の像の領域を当てはめることにより、対象物の距離を見積もることを特徴とする請求項2に記載の情報処理装置。
  4.  前記距離概略値取得部は、前記位置情報生成部より広い探索範囲で前記ステレオ画像に対しブロックマッチングを行うことにより被写体のカメラからの距離を取得して、当該距離を画像平面に画素値として表した奥行き画像を生成したうえ、それに基づき距離値のヒストグラムを生成し、しきい値以上の画素数を有する距離に基づき対象物の距離を見積もることを特徴とする請求項2に記載の情報処理装置。
  5.  前記距離概略値取得部が行うブロックマッチングは、その結果を用いて探索範囲を限定して行うブロックマッチングと比較し、低解像度のステレオ画像を用いる、より簡易な類似度計算手法を用いる、低頻度で実施する、のうち少なくともいずれかであることを特徴とする請求項3または4に記載の情報処理装置。
  6.  前記位置情報生成部は、前記距離概略値取得部が行ったブロックマッチングにより生成した奥行き画像のうち、対象物の領域を、その結果を用いて探索範囲を限定して行ったブロックマッチングにより生成した奥行き画像のデータに置換することにより、最終的な位置情報を生成することを特徴とする請求項3から5のいずれかに記載の情報処理装置。
  7.  前記位置情報生成部は、前記距離概略値取得部が行ったブロックマッチング時に、対応するブロックを決定した根拠となった類似度と、探索範囲を限定して行ったブロックマッチング時に対応するブロックを決定した根拠となった類似度とを比較し、後者が大きければ奥行き画像のデータを置換することを特徴とする請求項6に記載の情報処理装置。
  8.  前記距離概略値取得部は、実空間に仮想的な検知面を設定し、それをステレオ画像の一方の画像に投影してなる検知領域と、他方の画像において前記検知領域に対応する領域を、前記検知面のカメラからの距離に対応する視差分だけ視差を解消する方向に平行移動させた視差補正領域とを設定し、ステレオ画像のうち前記検知領域と前記視差補正領域内の画像をマッチングすることで、前記検知面の位置に対象物が存在するか否かをマッチング評価値の高い画素の数に基づき判定し、その判定結果に基づき対象物の距離を見積もることを特徴とする請求項2に記載の情報処理装置。
  9.  前記距離概略値取得部は、カメラからの距離が既知の所定位置にユーザを移動させる指示を表示装置またはスピーカーから出力させ、当該所定位置にユーザが移動した時点を判定することにより、対象物の距離を見積もることを特徴とする請求項2に記載の情報処理装置。
  10.  前記位置情報生成部は、異なる複数の推定距離範囲に対し、それぞれに対応する位置および長さで探索範囲を限定してブロックマッチングを行うことにより、検出された対応点に基づきカメラからの距離を取得して、当該距離を画像平面に画素値として表した複数の奥行き画像を生成し、それらを合成することにより、最終的な位置情報を生成することを特徴とする請求項1に記載の情報処理装置。
  11.  前記複数の推定距離範囲は前景の存在範囲および背景の存在範囲に対応し、背景に対するブロックマッチングは、前景に対するブロックマッチングと比較し、低解像度のステレオ画像を用いる、より簡易な類似度計算手法を用いる、低頻度で実施する、のうち少なくともいずれかであることを特徴とする請求項10に記載の情報処理装置。
  12.  各推定距離範囲に対応するブロックマッチング時に対応するブロックを決定した根拠となった類似度を互いに比較し、類似度が大きい方のブロックマッチングにより生成された奥行き画像のデータを採用することにより奥行き画像を合成することを特徴とする請求項9または10に記載の情報処理装置。
  13.  前記位置情報に基づき所定の情報処理を行い出力データを生成する出力情報生成部をさらに備えたことを特徴とする請求項1から12のいずれかに記載の情報処理装置。
  14.  既知の間隔を有する左右のカメラで同一空間を撮影したステレオ画像のデータを撮像装置から取得するステップと、
     前記ステレオ画像の一方に設定した参照ブロックに対し他方に設定した探索範囲内で類似度の高い領域を検出するブロックマッチングを行うことにより対応点を検出し、その視差に基づき対象物のカメラからの距離を含む位置情報を生成し出力するステップと、
     を含み、
     前記位置情報を生成するステップは、対象物のカメラからの推定距離範囲を決定し、当該推定距離範囲に対応する位置および長さで探索範囲を限定して設定したうえでブロックマッチングを行うことを特徴とする情報処理装置による情報処理方法。
  15.  既知の間隔を有する左右のカメラで同一空間を撮影したステレオ画像のデータを取得する機能と、
     前記ステレオ画像の一方に設定した参照ブロックに対し他方に設定した探索範囲内で類似度の高い領域を検出するブロックマッチングを行うことにより対応点を検出し、その視差に基づき対象物のカメラからの距離を含む位置情報を生成し出力する機能と、
     をコンピュータに実現させ、
     前記位置情報を生成する機能は、対象物のカメラからの推定距離範囲を決定し、当該推定距離範囲に対応する位置および長さで探索範囲を限定して設定したうえでブロックマッチングを行うことを特徴とするコンピュータプログラム。
  16.  既知の間隔を有する左右のカメラで同一空間を撮影したステレオ画像のデータを取得する機能と、
     前記ステレオ画像の一方に設定した参照ブロックに対し他方に設定した探索範囲内で類似度の高い領域を検出するブロックマッチングを行うことにより対応点を検出し、その視差に基づき対象物のカメラからの距離を含む位置情報を生成し出力する機能と、
     をコンピュータに実現させ、
     前記位置情報を生成する機能は、対象物のカメラからの推定距離範囲を決定し、当該推定距離範囲に対応する位置および長さで探索範囲を限定して設定したうえでブロックマッチングを行うコンピュータプログラムを記録したことを特徴とするコンピュータにて読み取り可能な記録媒体。
PCT/JP2016/074207 2015-08-26 2016-08-19 情報処理装置および情報処理方法 WO2017033853A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP16839200.9A EP3343500B1 (en) 2015-08-26 2016-08-19 Image processing device and image processing method
US15/740,639 US10559089B2 (en) 2015-08-26 2016-08-19 Information processing apparatus and information processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015-167238 2015-08-26
JP2015167238A JP6548518B2 (ja) 2015-08-26 2015-08-26 情報処理装置および情報処理方法

Publications (1)

Publication Number Publication Date
WO2017033853A1 true WO2017033853A1 (ja) 2017-03-02

Family

ID=58100144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/074207 WO2017033853A1 (ja) 2015-08-26 2016-08-19 情報処理装置および情報処理方法

Country Status (4)

Country Link
US (1) US10559089B2 (ja)
EP (1) EP3343500B1 (ja)
JP (1) JP6548518B2 (ja)
WO (1) WO2017033853A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019082797A1 (ja) * 2017-10-23 2019-05-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 再構成方法および再構成装置

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9934591B2 (en) * 2016-04-08 2018-04-03 Orbital Insight, Inc. Remote determination of quantity stored in containers in geographical region
JP6899673B2 (ja) * 2017-03-15 2021-07-07 日立Astemo株式会社 物体距離検出装置
CN108230383B (zh) * 2017-03-29 2021-03-23 北京市商汤科技开发有限公司 手部三维数据确定方法、装置及电子设备
JP2018206063A (ja) * 2017-06-05 2018-12-27 株式会社東海理化電機製作所 画像認識装置及び画像認識方法
KR20190013224A (ko) * 2017-08-01 2019-02-11 엘지전자 주식회사 이동 단말기
JP6857147B2 (ja) * 2018-03-15 2021-04-14 株式会社日立製作所 三次元画像処理装置、及び三次元画像処理方法
JP7098365B2 (ja) * 2018-03-15 2022-07-11 キヤノン株式会社 画像処理装置、画像処理方法およびプログラム
JP7034781B2 (ja) * 2018-03-16 2022-03-14 キヤノン株式会社 画像処理装置、画像処理方法、及びプログラム
CN108629809B (zh) * 2018-04-26 2020-08-28 浙江大学 一种精确高效的立体匹配方法
WO2020047863A1 (zh) * 2018-09-07 2020-03-12 深圳配天智能技术研究院有限公司 一种测量距离的方法及装置
CN112602118B (zh) * 2019-03-14 2024-06-07 欧姆龙株式会社 图像处理装置和三维测量***
EP3832600A4 (en) * 2019-03-14 2022-03-09 OMRON Corporation IMAGE PROCESSING DEVICE AND THREE-DIMENSIONAL MEASUREMENT SYSTEM
JP7334051B2 (ja) * 2019-04-04 2023-08-28 東芝デベロップメントエンジニアリング株式会社 画像処理装置
JP7293100B2 (ja) * 2019-12-17 2023-06-19 日立Astemo株式会社 カメラシステム
CN113573039A (zh) * 2020-04-29 2021-10-29 思特威(上海)电子科技股份有限公司 目标深度值获取方法及双目***
CN111724421B (zh) * 2020-06-29 2024-01-09 深圳市慧鲤科技有限公司 图像处理方法及装置、电子设备及存储介质
WO2023136050A1 (ja) * 2022-01-14 2023-07-20 パナソニックIpマネジメント株式会社 画像処理装置および画像処理方法
JP2023166832A (ja) * 2022-05-10 2023-11-22 日立Astemo株式会社 画像処理装置及び画像処理方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008216126A (ja) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc 距離画像生成装置、距離画像生成方法及びプログラム
JP2012008584A (ja) * 2011-08-05 2012-01-12 Toshiba Corp 映像表示装置、通知方法、及び位置判定装置
JP2012212428A (ja) * 2011-03-23 2012-11-01 Sharp Corp 視差算出装置、距離算出装置及び視差算出方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG64486A1 (en) * 1997-03-27 1999-04-27 Sony Corp Method and apparatus for information processing computer readable medium and authoring system
JP4005679B2 (ja) * 1997-11-19 2007-11-07 富士重工業株式会社 自律走行車の周囲環境認識装置
JP2001346031A (ja) * 2000-06-05 2001-12-14 Fuji Photo Film Co Ltd 画像合成方法及び装置
EP2296079A3 (en) 2005-10-26 2011-04-13 Sony Computer Entertainment Inc. System and method for interfacing with a computer program
JP2008309637A (ja) 2007-06-14 2008-12-25 Konica Minolta Holdings Inc 障害物計測方法、障害物計測装置及び障害物計測システム
JP2012002683A (ja) * 2010-06-17 2012-01-05 Fuji Electric Co Ltd ステレオ画像処理方法およびステレオ画像処理装置
JP6186184B2 (ja) * 2013-06-21 2017-08-23 株式会社ソニー・インタラクティブエンタテインメント 画像処理装置、画像処理システム、および画像処理方法
WO2019082797A1 (ja) * 2017-10-23 2019-05-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 再構成方法および再構成装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008216126A (ja) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc 距離画像生成装置、距離画像生成方法及びプログラム
JP2012212428A (ja) * 2011-03-23 2012-11-01 Sharp Corp 視差算出装置、距離算出装置及び視差算出方法
JP2012008584A (ja) * 2011-08-05 2012-01-12 Toshiba Corp 映像表示装置、通知方法、及び位置判定装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3343500A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019082797A1 (ja) * 2017-10-23 2019-05-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 再構成方法および再構成装置
JPWO2019082797A1 (ja) * 2017-10-23 2020-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 再構成方法および再構成装置
JP7105246B2 (ja) 2017-10-23 2022-07-22 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 再構成方法および再構成装置

Also Published As

Publication number Publication date
JP2017045283A (ja) 2017-03-02
JP6548518B2 (ja) 2019-07-24
EP3343500A4 (en) 2019-12-04
EP3343500A1 (en) 2018-07-04
US10559089B2 (en) 2020-02-11
US20180189975A1 (en) 2018-07-05
EP3343500B1 (en) 2021-06-30

Similar Documents

Publication Publication Date Title
WO2017033853A1 (ja) 情報処理装置および情報処理方法
CN104380338B (zh) 信息处理器以及信息处理方法
WO2014083721A1 (ja) 情報処理装置および情報処理方法
US10293252B2 (en) Image processing device, system and method based on position detection
US9542755B2 (en) Image processor and image processing method
US9148637B2 (en) Face detection and tracking
US9767611B2 (en) Information processing apparatus and method for estimating depth values using an approximate plane
WO2015122079A1 (ja) 情報処理装置および情報処理方法
EP2590396A1 (en) Information processing system, information processing device, and information processing method
US20130335535A1 (en) Digital 3d camera using periodic illumination
US10063838B2 (en) Information processor, information processing method, and computer program
US9785854B2 (en) Information processor, information processing method, and computer program
CN110998659A (zh) 图像处理***、图像处理方法、及程序
KR101642402B1 (ko) 촬영 구도를 유도하는 디지털 영상 촬영 장치 및 방법
US11138743B2 (en) Method and apparatus for a synchronous motion of a human body model
JP6300560B2 (ja) 情報処理装置および情報処理方法
KR20120092960A (ko) 가상 캐릭터 제어 시스템 및 방법
JP7326965B2 (ja) 画像処理装置、画像処理プログラム、及び画像処理方法
JP6103942B2 (ja) 画像データ処理装置及び画像データ処理プログラム
JP6930011B2 (ja) 情報処理装置、情報処理システム、および画像処理方法
WO2016181672A1 (ja) 画像解析装置、画像解析方法、及び、画像解析プログラム
JP6165650B2 (ja) 情報処理装置および情報処理方法
JP2008090608A (ja) 画像処理装置、画像処理装置の制御方法、および画像処理装置の制御プログラム
KR20150129990A (ko) 효율적인 스테레오 매칭의 수행 장치 및 방법

Legal Events

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

Ref document number: 16839200

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE