WO2021048917A1 - 画像処理装置、3次元計測システム、画像処理方法 - Google Patents
画像処理装置、3次元計測システム、画像処理方法 Download PDFInfo
- Publication number
- WO2021048917A1 WO2021048917A1 PCT/JP2019/035512 JP2019035512W WO2021048917A1 WO 2021048917 A1 WO2021048917 A1 WO 2021048917A1 JP 2019035512 W JP2019035512 W JP 2019035512W WO 2021048917 A1 WO2021048917 A1 WO 2021048917A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- map
- parallax
- unit
- image processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
- G06T7/593—Depth or shape recovery from multiple images from stereo images
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/22—Measuring arrangements characterised by the use of optical techniques for measuring depth
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/88—Lidar systems specially adapted for specific applications
- G01S17/89—Lidar systems specially adapted for specific applications for mapping or imaging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/521—Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/10—Processing, recording or transmission of stereoscopic or multi-view image signals
- H04N13/106—Processing image signals
- H04N13/128—Adjusting depth or disparity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/20—Image signal generators
- H04N13/204—Image signal generators using stereoscopic image cameras
- H04N13/207—Image signal generators using stereoscopic image cameras using a single 2D image sensor
- H04N13/218—Image signal generators using stereoscopic image cameras using a single 2D image sensor using spatial multiplexing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/20—Image signal generators
- H04N13/204—Image signal generators using stereoscopic image cameras
- H04N13/254—Image signal generators using stereoscopic image cameras in combination with electromagnetic radiation sources for illuminating objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/20—Image signal generators
- H04N13/282—Image signal generators for generating image signals corresponding to three or more geometrical viewpoints, e.g. multi-view systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/04—Indexing scheme for image data processing or generation, in general involving 3D image data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
- G06T2207/10021—Stereoscopic video; Stereoscopic image sequence
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10141—Special mode during image acquisition
- G06T2207/10152—Varying illumination
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N2013/0074—Stereoscopic image analysis
- H04N2013/0081—Depth or disparity estimation from stereoscopic image signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N2013/0074—Stereoscopic image analysis
- H04N2013/0092—Image segmentation from stereoscopic image signals
Definitions
- the present invention relates to an image processing apparatus, and particularly to a technique for obtaining highly accurate three-dimensional information from an image.
- One of the methods for acquiring three-dimensional information of an object using an image is a method called active measurement (see Non-Patent Document 1). Since active measurement projects pattern light onto the surface of an object, it has the advantage of being able to perform three-dimensional measurement with high accuracy even for objects with few image features (for example, objects with no texture on the surface), and is compared to passive measurement. Excellent in practicality.
- FIG. 18 schematically shows the deviation between the three-dimensional information (point cloud data) obtained by the active measurement and the edge (outer shape) of the actual object. It can be seen that there are places where the point cloud protrudes from the edge and where the point cloud is missing.
- a measurement error may cause a pick or place defect.
- the outer shape of an object is recognized by active measurement and the recognition result is used for grip control of a picking robot
- a measurement error may cause a pick or place defect.
- problems such as interference between the hand and the object when gripping the object are assumed.
- the present invention has been made in view of the above circumstances, and an object of the present invention is to provide a technique for eliminating or reducing a measurement error caused by a misidentification of a pattern at an edge portion of an object.
- One aspect of the present invention is a map generation means for generating a map, which is data in which information about a depth distance is associated with each pixel, using an image taken by projecting pattern light onto an object, and the object.
- the edge detecting means for detecting the edge of the object and the position where the depth distance is discontinuous match the position of the edge of the object by using the image taken without projecting the pattern light.
- an image processing apparatus comprising the correction means for modifying the map based on the detected edge.
- the map generated by the map generation means is a reconstruction of the depth distance from the image taken by projecting the pattern light on the object, in principle, it contains a measurement error due to a misidentification of the pattern. there is a possibility.
- the edge information generated by the edge detecting means is information obtained from an image taken without projecting the pattern light, it does not include an error due to a misidentification of the pattern. Therefore, by modifying the map with reference to the detected edge position, it is possible to eliminate or reduce the measurement error included in the map, and it is possible to obtain a map with higher accuracy than before.
- the map generation means may generate the map by stereo matching using a plurality of images taken from different viewpoints by projecting pattern light onto the object.
- Stereo matching is a method of calculating the depth distance based on the principle of triangular measurement based on the parallax between two images taken from different viewpoints. According to stereo matching, three-dimensional measurement with high spatial resolution can be performed with high accuracy.
- the map may be a parallax map, a depth map, or the like.
- the map generation means may generate the map by a spatial coding pattern method using an image taken by projecting pattern light onto the object.
- the spatial coding pattern method is a method of calculating the depth distance based on the principle of triangular measurement from the relationship between the pixels of the camera and the corresponding points of the coding pattern, and three-dimensional information can be obtained from one image. According to the spatial coding pattern method, three-dimensional measurement can be performed at high speed and with high accuracy.
- the map may be a depth map or the like.
- the map generation means uses a method different from stereo matching to obtain an image pair consisting of a first image and a second image taken from different viewpoints by projecting pattern light onto the object.
- a difference prediction means for predicting the difference between the first image and the second image, a setting means for setting a search range for corresponding points in stereo matching based on the predicted difference, and the first image and the second image. May have a stereo matching means for performing stereo matching limited to the set search range.
- the search range of the corresponding point is limited based on the predicted parallax. As a result, the search range can be remarkably narrowed, so that the time required for searching for the corresponding point can be significantly shortened.
- the parallax prediction means may predict the parallax based on the distance information obtained by the spatial coding pattern method. This is because the spatial coding pattern method can obtain distance information in a much shorter processing time than stereo matching when an image sensor having the same resolution as stereo matching is used. Although the spatial resolution of the distance measurement of the spatial coding pattern method is lower than that of the stereo matching method, it can be said that it is necessary and sufficient for the purpose of predicting parallax.
- the map generating means may further include a parallax map synthesizing means for generating a composite parallax map by synthesizing a plurality of parallax maps generated by the stereo matching means from each of the plurality of image pairs.
- the correction means may correct the composite parallax map or the depth map converted from the composite parallax map.
- the parallax prediction means may generate a plurality of predicted parallax, and the setting means may use a composite predicted parallax obtained by synthesizing the plurality of predicted parallax to set a search range of the plurality of image pairs. By generating (measuring) the predicted parallax a plurality of times in this way, the accuracy and robustness can be improved.
- the image taken without projecting the pattern light on the object may be an image taken by projecting uniform light on the object.
- a white uniform light source or the like may be used.
- a second aspect of the present invention is a first aspect in which processing is performed using a first light projecting unit that projects pattern light, a sensor unit having at least one or more cameras, and an image captured from the sensor unit.
- the present invention provides a three-dimensional measurement system characterized by having the image processing apparatus according to the above. According to this configuration, it is possible to obtain three-dimensional information in which measurement errors caused by misidentification of patterns at the edge portion of the object are eliminated or reduced.
- the present invention may be regarded as an image processing device or a three-dimensional measurement system having at least a part of the above means. Further, the present invention may be regarded as an image processing method including at least a part of the above processing, a three-dimensional measurement method, a distance measuring method, a control method of an image processing device, a control method of a three-dimensional measurement system, or the like. A program for realizing such a method or the program may be regarded as a recording medium for recording non-temporarily. It should be noted that each of the above means and treatments can be combined with each other as much as possible to form the present invention.
- the present invention it is possible to eliminate or reduce the measurement error caused by the misidentification of the pattern at the edge portion of the object.
- FIG. 1 is a diagram schematically showing a configuration example of a three-dimensional measurement system, which is one of the application examples of the present invention.
- FIG. 2 is a flowchart showing the flow of measurement processing of the three-dimensional measurement system.
- FIG. 3 is a diagram schematically showing an image and a map used in the measurement process.
- FIG. 4 is a flowchart of the map correction process executed by the image processing device.
- FIG. 5 is a diagram schematically showing an example of the map correction process.
- FIG. 6 is a functional block diagram of the three-dimensional measurement system according to the first embodiment of the present invention.
- FIG. 7 is a diagram showing a configuration example of the pattern floodlight unit.
- FIG. 8 is a functional block diagram of the three-dimensional measurement system according to the second embodiment of the present invention.
- FIG. 1 is a diagram schematically showing a configuration example of a three-dimensional measurement system, which is one of the application examples of the present invention.
- FIG. 2 is a flowchart showing the
- FIG. 9 is a flow chart showing the flow of the measurement process of the second embodiment.
- FIG. 10 is a flow chart showing the flow of post-processing of the second embodiment.
- FIG. 11 is a functional block diagram of the three-dimensional measurement system according to the third embodiment of the present invention.
- FIG. 12 is a flow chart showing the flow of the measurement process of the third embodiment.
- FIG. 13 is a functional block diagram of the three-dimensional measurement system according to the fourth embodiment of the present invention.
- FIG. 14 is a flow chart showing the flow of the measurement process of the fourth embodiment.
- FIG. 15 is a functional block diagram of the three-dimensional measurement system according to the fifth embodiment of the present invention.
- FIG. 16 is a flow chart showing the flow of the measurement process of the fifth embodiment.
- FIG. 17 is a timing chart of the measurement process of the fifth embodiment.
- FIG. 18 is a diagram schematically showing a deviation between the three-dimensional information (point cloud data) obtained by active measurement and the edge (outer shape) of an actual object
- FIG. 1 is a diagram schematically showing a configuration example of a three-dimensional measurement system, which is one of the application examples of the present invention.
- the three-dimensional measurement system 1 is a system for measuring the three-dimensional shape of the object 12 by image sensing, and is roughly composed of a sensor unit 10 and an image processing device 11.
- the sensor unit 10 includes, at least, a first light projecting unit that projects patterned light, a second light projecting unit that projects non-patterned light, and one or more cameras (also called an image sensor or an imaging device), which is necessary. Other sensors and lights may be provided depending on the situation.
- the output of the sensor unit 10 is taken into the image processing device 11.
- the image processing device 11 is a device that performs various processes using the data captured from the sensor unit 10.
- the processing of the image processing device 11 may include, for example, distance measurement (distance measurement), three-dimensional shape recognition, object recognition, scene recognition, and the like.
- the processing result of the image processing device 11 is output to an output device such as a display or transferred to the outside, and is used for inspection, control of other devices, and the like.
- Such a three-dimensional measurement system 1 is applied to a wide range of fields, including, for example, computer vision, robot vision, and machine vision.
- the three-dimensional measurement system 1 according to the present disclosure can obtain highly accurate three-dimensional information of the object 12, it is preferable for controlling various industrial robots that perform picking, positioning, assembling, inspection, and the like of an object. Can be applied.
- the configuration of FIG. 1 is just an example, and the hardware configuration may be appropriately designed according to the application of the three-dimensional measurement system 1.
- the sensor unit 10 and the image processing device 11 may be wirelessly connected, or the sensor unit 10 and the image processing device 11 may be configured as an integrated device.
- the sensor unit 10 and the image processing device 11 may be connected via a wide area network such as a LAN or the Internet.
- a plurality of sensor units 10 may be provided for one image processing device 11, or conversely, the output of one sensor unit 10 may be provided to the plurality of image processing devices 11.
- the viewpoint of the sensor unit 10 may be movable by attaching the sensor unit 10 to a robot or a moving body.
- FIG. 2 is a flowchart showing the flow of the measurement process of the three-dimensional measurement system 1
- FIG. 3 is a diagram schematically showing an image and a map used in the measurement process.
- step S200 the pattern light is projected from the sensor unit 10 (first light projecting unit) onto the object 12.
- the pattern of the pattern light may be a fixed pattern, a random pattern, or a striped pattern used in a phase shift method or the like.
- An appropriate pattern may be selected according to the three-dimensional information restoration algorithm.
- step S201 the sensor unit 10 (camera) photographs the object 12 on which the pattern light is projected.
- the obtained image 30 (hereinafter, also referred to as a "pattern image" in the sense of an image on which a pattern is projected) is taken into the image processing device 11.
- step S202 the image processing device 11 (map generation means) restores the three-dimensional information from the pattern image 30 captured in step S201, and maps 31 which is data in which information on the depth distance is associated with each pixel. Generate.
- the "information about the depth distance” may be the depth distance itself or information that can be converted into the depth distance (for example, parallax information).
- step S203 non-patterned light is projected from the sensor unit 10 (second light projecting unit) onto the object 12.
- the object 12 may be illuminated with white uniform light. In a sufficiently bright environment, it is not necessary to illuminate the object 12.
- step S204 the sensor unit 10 (camera) photographs the object 12.
- the obtained image 32 (hereinafter, also referred to as a “non-pattern image” in the sense of an image in which a pattern is not projected) is taken into the image processing device 11.
- step S205 the image processing device 11 (edge detecting means) detects the edge of the object 12 by using the non-pattern image 32 captured in step S204. Any method such as a differential filter or a Laplacian filter may be applied to edge detection.
- step S206 the image processing device 11 (correction means) modifies the map 31 obtained in step S202 based on the information of the edge 33 obtained in step S205.
- the position where the depth distance is discontinuous in the map 31 should coincide with the position of the edge 33 detected in step S205.
- the map 31 is modified so that the position where the depth distance is discontinuous matches the position of the edge.
- step S207 the image processing device 11 (three-dimensional information generation means) generates three-dimensional information (for example, point cloud data) for output based on the modified map 34. According to such processing, it is possible to eliminate or reduce the measurement error caused by the misidentification of the pattern, so that it is possible to generate highly accurate and highly reliable three-dimensional information.
- three-dimensional information for example, point cloud data
- FIG. 4 is a flowchart of the map correction process executed by the image processing device 11, and FIG. 5 is a diagram schematically showing an example of the map correction process.
- step S400 the image processing device 11 performs segmentation based on the depth distance on the map 50, and extracts the region 51 corresponding to the object 12.
- the segmentation method does not matter.
- the map 50 may be binarized or N-valued based on the depth distance, and then the labeling process may be performed, or regions having substantially the same or continuous depth distance and spatially continuous may be extracted. ..
- step S401 the image processing device 11 superimposes the edge 52 obtained by edge detection (step S205 in FIG. 2) on the region 51 extracted from the map 50. Then, the image processing device 11 divides the region 51 by the edge 52 (step S402), and calculates the area (number of pixels) S of each of the divided regions 53a to 53c (step S403).
- step S404 the image processing device 11 compares the area S of each of the divided regions 53a to 53c with the predetermined threshold value X, and determines that the divided regions 53a and 53c whose area S is smaller than the threshold value X is a measurement error.
- step S405 the image processing device 11 makes a modification to the map 50 to remove the divided regions 53a and 53c determined to be measurement errors, and outputs the modified map 54.
- the operation of removing the divided area may be, for example, an operation of replacing the value of the depth distance of the pixels in the divided area with the value of the depth distance of the background area, or when the map 50 is point cloud data (that is, the depth distance information). (In the case of a set of points having), the operation of deleting the point cloud in the divided area may be performed.
- the three-dimensional information of the object 12 is generated by the spatial coding pattern method.
- the sensor unit 10 includes a first camera 101, a pattern floodlight unit (first floodlight unit) 103, an illumination unit (second floodlight unit) 104, an image transfer unit 105, and a drive control unit 106.
- the first camera 101 is an imaging device that photographs an object 12 and acquires image data.
- a monochrome camera may be used, or a color camera may be used.
- the pattern light projecting unit 103 is a light projecting device for projecting the pattern light used in the distance measurement of the space coding pattern method onto the object 12, and is also called a projector. In the distance measurement of the space-coded pattern method, for example, a regular pattern (encoded pattern) for specifying the distance is used.
- FIG. 7 schematically shows a configuration example of the pattern floodlight unit 103.
- the pattern floodlight unit 103 includes, for example, a light source unit 180, a light guide lens 181, a pattern generation unit 182, a projection lens 183, and the like.
- As the light source unit 180 an LED, a laser, a VCSEL (Vertical cavity Surface-emitting Laser), or the like can be used.
- the light guide lens 181 is an optical element for guiding light from the light source unit 180 to the pattern generation unit 182, and a lens, a glass rod, or the like can be used.
- the pattern generation unit 182 is a member or device that generates a composite pattern, and is a photo mask, a diffractive optical element (for example, DOE (Diffractive Optical Element)), a light modulation element (for example, DLP (Digital Light Processing), LCD (Liquid Crystal)). Display), LCoS (Liquid Crystal on Silicon), MEMS (Micro Electro Mechanical Systems)) and the like can be used.
- the projection lens 183 is an optical element that magnifies and projects the generated pattern.
- the illumination unit 104 is uniform illumination used for capturing a general visible light image. For example, white LED lighting or the like is used. Alternatively, the illumination may be in the same wavelength band as the pattern floodlight unit 103.
- the image transfer unit 105 transfers the image data captured by the first camera 101 to the image processing device 11.
- the drive control unit 106 is a unit that controls the first camera 101, the pattern floodlight unit 103, and the illumination unit 104.
- the image transfer unit 105 and the drive control unit 106 may be provided on the image processing device 11 side instead of the sensor unit 10 side.
- the image processing device 11 includes an image acquisition unit 110, a pattern decoding unit (map generation means) 111, an edge detection unit (edge detection means) 112, and a map correction unit (correction means) 113.
- the image acquisition unit 110 has a function of capturing necessary image data from the sensor unit 10.
- the image acquisition unit 110 sends the image (pattern image) captured by projecting the pattern light to the pattern decoding unit 111, and the image (non-pattern image) captured by projecting the non-pattern light to the edge detection unit 112. send.
- the pattern decoding unit 111 acquires depth distance information (depth information) from the pattern image by the spatial coding pattern method.
- a depth map is output from the pattern decoding unit 111.
- the edge detection unit 112 detects the edge of the object 12 from the non-pattern image.
- the map correction unit 113 corrects the depth map based on the detected edge, and outputs the corrected depth map. This depth map is used, for example, for shape recognition and object recognition of the object 12.
- the image processing device 11 is composed of, for example, a computer including a CPU (processor), a RAM (memory), a non-volatile storage device (hard disk, SSD, etc.), an input device, an output device, and the like.
- the CPU expands the program stored in the non-volatile storage device into the RAM and executes the program to realize the various functions described above.
- the configuration of the image processing device 11 is not limited to this, and all or part of the above-mentioned functions may be realized by a dedicated circuit such as FPGA or ASIC, or realized by cloud computing or distributed computing. You may. The same applies to the subsequent embodiments.
- the spatial coding pattern method since the spatial coding pattern method is used, three-dimensional measurement can be performed at high speed and with high accuracy.
- the depth map is corrected based on the position of the edge detected from the non-pattern image, it is possible to eliminate or reduce the measurement error caused by the misidentification of the pattern, and the depth map with higher accuracy than before can be obtained. Obtainable.
- the sensor unit 10 includes a first camera 101, a second camera 102, a pattern floodlight unit (first floodlight unit) 103, an illumination unit (second floodlight unit) 104, an image transfer unit 105, and a drive control unit 106. ..
- the first camera 101 and the second camera 102 are a pair of cameras constituting a so-called stereo camera, and are arranged at a predetermined distance. By simultaneously shooting with the two cameras 101 and 102, an image pair shot from different viewpoints can be obtained (the image of the first camera 101 is called the first image, and the image of the second camera 102 is called the second image). ).
- the two cameras 101 and 102 may be arranged so that their optical axes intersect each other and the horizontal lines (or vertical lines) are on the same plane. By adopting such an arrangement, the epipolar line becomes parallel to the horizontal line (or vertical line) of the image, so that the corresponding point in stereo matching may be searched from within the horizontal line (or vertical line) at the same position. This is because the search process can be simplified.
- a monochrome camera or a color camera may be used as the cameras 101 and 102.
- the pattern light projecting unit 103 is a light projecting device for projecting pattern light used in so-called active stereo ranging onto the object 12, and is also called a projector.
- active stereo ranging for example, a regular pattern (encoded pattern) for specifying the distance may be used as in the first embodiment, or a non-regular pattern such as a random dot may be used. May be used.
- the illumination unit 104 is uniform illumination used for capturing a general visible light image. The specific configuration of the pattern floodlight unit 103 and the illumination unit 104 may be the same as in the first embodiment.
- the image transfer unit 105 transfers the data of the first image taken by the first camera 101 and the data of the second image taken by the second camera 102 to the image processing device 11.
- the image transfer unit 105 may transfer the first image and the second image as separate image data, or join the first image and the second image to generate a side-by-side image and transfer it as a single image data. You may.
- the drive control unit 106 is a unit that controls the first camera 101, the second camera 102, the pattern floodlight unit 103, and the illumination unit 104.
- the image transfer unit 105 and the drive control unit 106 may be provided on the image processing device 11 side instead of the sensor unit 10 side.
- the image processing device 11 includes an image acquisition unit 110, a preprocessing unit 800, a corresponding point search unit (map generation means) 801, an edge detection unit (edge detection means) 112, a map correction unit (correction means) 113, and parallax map post-processing. It has a unit 802 and a depth map generation unit 803.
- the image acquisition unit 110 sends a stereo image pair consisting of the first image and the second image captured by projecting the pattern light to the preprocessing unit 800, and the image captured by projecting the non-pattern light is an edge detection unit.
- the preprocessing unit 800 has a function of performing necessary preprocessing on the first image and the second image.
- the corresponding point search unit 801 has a function of searching for the corresponding points of the first image and the second image and generating a parallax map based on the search result.
- the edge detection unit 112 has a function of detecting the edge of the object 12 from the non-pattern image, and the map correction unit 113 corrects the parallax map based on the detected edge and outputs the corrected parallax map.
- the parallax map post-processing unit 802 has a function of performing necessary post-processing on the parallax map.
- the depth map generation unit 803 has a function of converting the parallax information of the parallax map into the distance information and generating the depth map.
- FIG. 9 is a flow chart showing details of steps S202, S205, and S206 of FIG.
- step S900 the image acquisition unit 110 acquires the first image and the second image from the sensor unit 10.
- the first image and the second image are images taken by the first camera 101 and the second camera 102, respectively, in a state where the pattern light is projected from the pattern projection unit 103 onto the object 12.
- the image acquisition unit 110 divides the side-by-side image into a first image and a second image.
- the image acquisition unit 110 sends the first image and the second image to the preprocessing unit 800.
- step S901 the preprocessing unit 800 performs parallelization processing (rectification) on the first image and the second image.
- the parallelization process is a process of geometrically transforming one or both images so that the corresponding points between the two images are on the same horizontal line (or vertical line) in the image. Since the epipolar line becomes parallel to the horizontal line (or vertical line) of the image by the parallelization process, the process of searching for the corresponding point in the subsequent stage becomes easy. If the parallelism of the image captured from the sensor unit 10 is sufficiently high, the parallelization process in step S901 may be omitted.
- step S902 the preprocessing unit 800 calculates the hash feature amount for each pixel of the parallelized first image and the second image, and replaces the value of each pixel with the hash feature amount.
- the hash feature amount represents the luminance feature of the local region centered on the pixel of interest, and here, the hash feature amount consisting of a bit string of eight elements is used.
- step S903 the corresponding point search unit 801 searches for the corresponding point between the first image and the second image, and obtains the parallax of each pixel.
- the corresponding point search unit 801 generates parallax data in which the parallax information is associated with the points (pixel coordinates) that have succeeded in detecting the corresponding points. This information is the parallax map.
- the image acquisition unit 110 acquires a non-pattern image from the sensor unit 10.
- the non-pattern image is an image taken by the first camera 101 or the second camera 102 in a state where non-pattern light (uniform illumination or the like) is projected from the illumination unit 104 onto the object 12.
- step S911 the edge detection unit 112 performs parallelization processing (rectification) on the non-pattern image. If the parallelism of the image is sufficiently high, the parallelization process may be omitted. In step S912, the edge detection unit 112 detects the edge of the object 12 from the non-pattern image.
- step S913 the map correction unit 113 corrects the parallax map generated in step S903 with reference to the edge detected in step S912.
- the details of the map correction process are as shown in FIG.
- FIG. 10 is a flow chart showing details of step S207 of FIG.
- step S1000 the parallax map post-processing unit 802 performs post-processing of the parallax map. Since the parallax map estimated by the corresponding point search includes erroneous measurement points and measurement omissions, the post-processing is to correct the erroneous measurement points and supplement the measurement omissions based on the parallax information of the surrounding pixels.
- step S1001 the depth map generation unit 803 converts the parallax information of each pixel of the parallax map into the depth distance information and generates the depth map.
- This depth map (point cloud data) is used, for example, for shape recognition and object recognition of the object 12.
- the parallax map is corrected based on the position of the edge detected from the non-pattern image, it is possible to eliminate or reduce the measurement error due to the misidentification of the pattern, and the parallax map with higher accuracy than before can be obtained. Obtainable.
- the map correction process is performed on the parallax map, but the conversion process from the parallax map to the depth map may be performed first, and the map correction process may be performed on the depth map.
- FIG. 1 A configuration example of the three-dimensional measurement system 1 according to the third embodiment of the present invention will be described with reference to FIG.
- stereo matching is performed on a plurality of image pairs, and parallax maps generated from each image pair are combined to improve measurement accuracy and robustness.
- configurations different from those of the second embodiment will be mainly described, and description of the same configurations as those of the second embodiment will be omitted.
- the sensor unit 10 includes a first camera 101, a second camera 102, a third camera 1100, a fourth camera 1101, a pattern projection unit (first projection unit) 103, an illumination unit (second projection unit) 104, and an image. It has a transfer unit 105 and a drive control unit 106.
- the sensor unit 10 of the present embodiment includes four cameras, and can simultaneously capture images of four viewpoints with one projection.
- the third camera 1100 and the fourth camera 1101 are a pair of cameras constituting a so-called stereo camera, and are arranged apart by a predetermined distance (the image of the third camera 1100 is the third image, and the image of the fourth camera 1101). Is called the 4th image).
- the two cameras 1100 and 1101 may be arranged so that their optical axes intersect each other and the horizontal lines (or vertical lines) are on the same plane. By adopting such an arrangement, the epipolar line becomes parallel to the horizontal line (or vertical line) of the image, so that the corresponding point in stereo matching may be searched from within the horizontal line (or vertical line) at the same position. This is because the search process can be simplified.
- a monochrome camera or a color camera may be used as the cameras 1100 and 1101.
- the image transfer unit 105 transfers the data of the first image to the fourth image taken by the first camera 101 to the fourth camera 1101 to the image processing device 11.
- the image transfer unit 105 may transfer the first image to the fourth image as separate image data, or join the first image to the fourth image to generate a side-by-side image and transfer it as a single image data. You may.
- the image processing device 11 includes an image acquisition unit 110, a preprocessing unit 800, a corresponding point search unit (map generation means) 801, a parallax map synthesis unit (parallax map synthesis means) 1103, an edge detection unit (edge detection means) 112, and a map. It has a correction unit (correction means) 113, a parallax map post-processing unit 802, and a depth map generation unit 803.
- the parallax map synthesizing unit 1103 has a function of generating a composite parallax map by synthesizing a plurality of parallax maps generated from each of a plurality of image pairs.
- FIG. 12 is a flow chart showing details of steps S202, S205, and S206 of FIG.
- step S1200 the image acquisition unit 110 acquires the first image to the fourth image from the sensor unit 10.
- the first image to the fourth image are taken by the first camera 101, the second camera 102, the third camera 1100, and the fourth camera 1101 in a state where the pattern light is projected from the pattern floodlight unit 103 onto the object 12. It is an image that has been made.
- the image acquisition unit 110 divides the side-by-side image into the first image to the fourth image.
- the first image and the second image are used as the first image pair
- the third image and the fourth image are used as the second image pair for stereo matching.
- step S1201 the preprocessing unit 800 performs parallelization processing (rectification) on the first to fourth images.
- step S1202 the preprocessing unit 800 calculates the hash feature amount for each pixel of the parallelized first image to the fourth image, and replaces the value of each pixel with the hash feature amount.
- step S1203 the corresponding point search unit 801 searches for the corresponding point between the first image and the second image, which are the first image pairs, and generates the parallax map 1. Subsequently, in step S1204, the corresponding point search unit 801 searches for the corresponding point between the third image and the fourth image, which are the second image pair, and generates the parallax map 2.
- the parallax map synthesizing unit 1103 synthesizes the parallax map 1 obtained from the first image pair and the parallax map 2 obtained from the second image pair to generate a composite parallax map.
- the composition method is not particularly limited, but for example, when parallax is obtained in both the parallax map 1 and the parallax map 2, the average value thereof is used as the composite parallax, and only one of the parallax map 1 and the parallax map 2 is used. When the parallax is obtained, the value may be used as it is as the composite parallax.
- the image acquisition unit 110 acquires a non-pattern image from the sensor unit 10.
- the non-pattern image is an image taken by the first camera 101 or the second camera 102 in a state where non-pattern light (uniform illumination or the like) is projected from the illumination unit 104 onto the object 12.
- step S1211 the edge detection unit 112 performs parallelization processing (rectification) on the non-pattern image. If the parallelism of the image is sufficiently high, the parallelization process may be omitted. In step S1212, the edge detection unit 112 detects the edge of the object 12 from the non-pattern image.
- step S1213 the map correction unit 113 corrects the composite parallax map generated in step S1205 with reference to the edge detected in step S1212.
- the details of the map correction process are as shown in FIG.
- the variation in measurement can be reduced by synthesizing the parallax maps obtained from a plurality of image pairs. Therefore, it is possible to stably obtain a map with higher accuracy and reliability than the configuration of the second embodiment.
- the map correction process is performed on the composite parallax map, but the conversion process from the composite parallax map to the depth map may be performed first, and the map correction process may be performed on the depth map.
- two sets of image pairs are used, but three or more sets of image pairs may be used.
- the same image may be used in two or more image pairs. For example, using three images of the first image to the third image, three sets of a pair of a first image and a second image, a pair of a first image and a third image, and a pair of a second image and a third image. Image pairs may be formed. Further, the shooting conditions may be different for each image pair.
- the exposure times of the first camera and the second camera different from the exposure times of the third camera and the fourth camera an effect similar to so-called high dynamic range (HDR) shooting can be obtained. It can be obtained and the robustness of measurement can be improved.
- a plurality of sets of image pairs may be acquired by performing a plurality of shootings with one set of stereo cameras. In this case as well, the robustness of the measurement can be improved by making the shooting conditions (exposure time, lighting time of the pattern light, etc.) different for each shooting time.
- non-pattern images are acquired by shooting with multiple cameras at the same time, and edge information detected from each non-pattern image is combined to achieve highly accurate edge information. It is also preferable to generate. By improving the accuracy of the edge information, the accuracy and reliability of the correction map can be further improved.
- the configuration of the sensor unit 10 may be the same as that of the second embodiment.
- the image processing device 11 includes an image acquisition unit 110, a pattern decoding unit 1300, a parallax prediction unit 1301, a preprocessing unit 800, a search range setting unit 1302, a corresponding point search unit 801 and an edge detection unit (edge detection means) 112, and map correction. It has a unit (correction means) 113, a disparity map post-processing unit 802, and a depth map generation unit 803.
- the pattern decoding unit 1300 has a function of acquiring distance information from the first image by a spatial coding pattern method.
- the parallax prediction unit 1301 has a function of predicting the parallax between the first image and the second image based on the distance information obtained by the pattern decoding unit 1300 and outputting a reference parallax map.
- the search range setting unit 1302 has a function of setting the search range of the corresponding point based on the predicted parallax. Since the other configurations are substantially the same as those of the second embodiment, the description thereof will be omitted.
- FIG. 14 is a flow chart showing details of steps S202, S205, and S206 of FIG.
- the same step numbers as those of the map generation process (FIG. 9) of the second embodiment are assigned the same step numbers, and detailed description thereof will be omitted.
- step S900 the image acquisition unit 110 acquires the first image and the second image from the sensor unit 10.
- step S901 the preprocessing unit 800 performs parallelization processing (rectification) on the first image and the second image.
- step S902 the preprocessing unit 800 calculates the hash feature amount for each pixel of the parallelized first image and the second image, and replaces the value of each pixel with the hash feature amount.
- step S1400 the pattern decoding unit 1300 analyzes the first image and decodes the pattern to acquire distance information in the depth direction at a plurality of points on the first image.
- step S1401 the same point as the two-dimensional coordinates when the disparity prediction unit 1301 projects each point onto the parallelized image coordinate system of the first image based on the distance information of each point obtained in step S1400. Is calculated with the two-dimensional coordinates when projected onto the image coordinate system of the parallelized second image, and the difference in coordinates between the two images is calculated. This difference is the predicted parallax.
- the parallax prediction unit 1301 obtains the predicted parallax for all the points for which the distance information has been obtained in step S1400, and outputs the data as a reference parallax map.
- the search range setting unit 1302 sets the search range of the corresponding points for the first image and the second image based on the predicted parallax.
- the size of the search range is determined in consideration of the prediction error. For example, when the prediction error is ⁇ 10 pixels, it is considered sufficient to set about ⁇ 20 pixels centered on the predicted parallax in the search range even if the margin is included. If the horizontal line has 640 pixels and the search range can be narrowed down to ⁇ 20 pixels (that is, 40 pixels), the search process can be simply reduced to 1/16 compared to searching the entire horizontal line. Can be done.
- the corresponding point search unit 801 searches for the corresponding point between the first image and the second image by limiting it to the set search range, and obtains the parallax of each pixel.
- the corresponding point search unit 801 generates parallax data in which the parallax information is associated with the points (pixel coordinates) that have succeeded in detecting the corresponding points. This information is the parallax map.
- the image acquisition unit 110 acquires a non-pattern image from the sensor unit 10.
- the non-pattern image is an image taken by the first camera 101 or the second camera 102 in a state where non-pattern light (uniform illumination or the like) is projected from the illumination unit 104 onto the object 12.
- step S1411 the edge detection unit 112 performs parallelization processing (rectification) on the non-pattern image. If the parallelism of the image is sufficiently high, the parallelization process may be omitted. In step S1412, the edge detection unit 112 detects the edge of the object 12 from the non-pattern image.
- step S1413 the map correction unit 113 corrects the parallax map generated in step S1403 with reference to the edge detected in step S1412.
- the details of the map correction process are as shown in FIG.
- the search range of the corresponding point is limited based on the predicted parallax.
- the search range can be remarkably narrowed, so that the time required for searching for the corresponding point can be significantly shortened.
- stereo matching that is, improvement in the success rate and accuracy of the corresponding point search can be expected. Therefore, according to the present embodiment, three-dimensional measurement having high spatial resolution can be performed at high speed and with high accuracy.
- distance measurement is performed by the spatial coding pattern method for predicting parallax, but if the method is capable of measuring distance or predicting parallax faster than stereo matching, the spatial coding pattern method is used.
- Distance measurement or parallax prediction may be performed by a method other than the above. For example, time-coded pattern projection method, moiretopography method (contour line method), illuminance difference stereo method (illumination direction / Photometric Stereo), illuminance difference method, laser confocal method, white confocal method, optical interference method, visual volume crossing.
- Optical time difference (TOF) measurement Examples include a method and an optical phase difference (TOF) measurement method.
- the map correction process is performed on the parallax map, but the conversion process from the parallax map to the depth map may be performed first, and the map correction process may be performed on the depth map.
- the configuration described in the third embodiment improvement of the accuracy of the parallax map by using a plurality of image pairs, improvement of the accuracy of edge information by using a plurality of non-pattern images, etc. is combined with the fourth embodiment. May be good.
- the fifth embodiment is a modified example of the method of the fourth embodiment (combination of the spatial coding pattern method and stereo matching), and by performing both the generation of the predicted parallax and the stereo matching (the generation of the parallax map) a plurality of times. , Further improve measurement accuracy and robustness.
- configurations different from those of the fourth embodiment will be mainly described, and description of the same configurations as those of the fourth embodiment will be omitted.
- the configuration of the sensor unit 10 may be the same as that of the fourth embodiment.
- the image processing device 11 includes an image acquisition unit 110, a pattern decoding unit 1300, a parallax prediction unit 1301, a preprocessing unit 800, a search range setting unit 1302, a corresponding point search unit 801, a parallax map synthesis unit 1103, and an edge detection unit (edge detection). Means) 112, a map correction unit (correction means) 113, a parallax map post-processing unit 802, and a depth map generation unit 803.
- the parallax map synthesizing unit 1103 has a function of generating a composite parallax map by synthesizing a plurality of parallax maps generated from each of a plurality of image pairs.
- FIG. 16 is a flow chart showing details of steps S202, S205, and S206 of FIG.
- FIG. 17 is a timing chart.
- the first measurement is performed using the start signal from the drive control unit 106 as a trigger.
- the pattern projection unit 103 lights up, and a predetermined pattern illumination is projected onto the object 12.
- the first camera 101 and the second camera 102 simultaneously perform imaging, and the image transfer unit 105 transfers the first image and the second image.
- the image acquisition unit 110 acquires a first image pair composed of a first image and a second image.
- the image acquisition unit 110 sends the first image to the pattern decoding unit 1300, and sends the first image and the second image to the preprocessing unit 800.
- the second measurement is performed using the start signal from the drive control unit 106 as a trigger.
- the pattern projection unit 103 lights up, and a predetermined pattern illumination is projected onto the object 12.
- the first camera 101 and the second camera 102 simultaneously perform imaging, and the image transfer unit 105 transfers the first image and the second image.
- the image acquisition unit 110 acquires a second image pair composed of the first image and the second image.
- the image acquisition unit 110 sends the second image to the pattern decoding unit 1300, and sends the first image and the second image to the preprocessing unit 800.
- step S1602 image processing for the first image pair obtained in the first measurement is started.
- step S1603 the preprocessing unit 800 performs parallelization processing (rectification) on the first image and the second image.
- step S1603 the preprocessing unit 800 calculates the hash feature amount for each pixel of the parallelized first image and the second image, and replaces the value of each pixel with the hash feature amount.
- step S1604 the pattern decoding unit 1300 analyzes the first image and decodes the pattern to acquire distance information in the depth direction at a plurality of points on the first image.
- step S1605 the parallax prediction unit 1301 obtains the predicted parallax based on the distance information of each point obtained in step S1604, and outputs the data as a reference parallax map.
- the process for the first image may be started when the transfer of the first image is completed.
- step S1612 the preprocessing unit 800 performs parallelization processing (rectification) on the first image and the second image.
- step S1613 the preprocessing unit 800 calculates the hash feature amount for each pixel of the parallelized first image and the second image, and replaces the value of each pixel with the hash feature amount.
- step S1614 the pattern decoding unit 1300 analyzes the second image and decodes the pattern to acquire the distance information based on the second image. Then, in step S1615, the parallax prediction unit 1301 calculates the predicted parallax based on the distance information.
- the predicted parallax obtained in the first time (step S1605) and the predicted parallax obtained in the second time (step S1615) should be the same, but in reality they are not exactly the same. This is because the first and second times use images taken by different cameras (viewpoints), so there is a difference in the appearance (that is, image information) of the images. Therefore, it is possible that there is a difference in the predicted parallax value between the first and second times, or that one succeeds in predicting the parallax but the other fails. Therefore, in step S1620, the parallax prediction unit 1301 synthesizes the first predicted parallax and the second predicted parallax to obtain the combined predicted parallax.
- the synthesis method is not particularly limited, but for example, when the predicted parallax is obtained in both the first time and the second time, the average value thereof is used as the composite predicted parallax, and the predicted parallax is obtained only in either the first time or the second time. If is obtained, the value may be used as it is as the composite predicted parallax.
- step S1621 the search range setting unit 1302 sets the search range of the corresponding points for each of the first image pair and the second image pair based on the composite predicted parallax.
- step S1622 the corresponding point search unit 801 searches for the corresponding point between the first image pairs, obtains the parallax of each pixel, and generates the parallax map 1. Similarly, in step S1623, the corresponding point search unit 801 searches for the corresponding point between the second image pairs and generates the parallax map 2.
- the parallax map synthesizing unit 1103 synthesizes the parallax map 1 obtained from the first image pair and the parallax map 2 obtained from the second image pair to generate a composite parallax map.
- the composition method is not particularly limited, but for example, when parallax is obtained in both the parallax map 1 and the parallax map 2, the average value thereof is used as the composite parallax, and only one of the parallax map 1 and the parallax map 2 is used. When the parallax is obtained, the value may be used as it is as the composite parallax.
- a non-pattern image is taken with the start signal from the drive control unit 106 as a trigger.
- the illumination unit 104 lights up, and uniform illumination is projected onto the object 12.
- the image is taken by the first camera 101 or the second camera 102, and the non-pattern image is transferred from the image transfer unit 105 (FIG. 17 shows a sequence when the non-pattern image is taken by the first camera). ing.).
- the image acquisition unit 110 acquires a non-pattern image.
- the image acquisition unit 110 sends a non-pattern image to the edge detection unit 112.
- step S1631 the edge detection unit 112 performs parallelization processing (rectification) on the non-pattern image. If the parallelism of the image is sufficiently high, the parallelization process may be omitted.
- step S1632 the edge detection unit 112 detects the edge of the object 12 from the non-pattern image.
- step S1633 the map correction unit 113 corrects the composite parallax map generated in step S1624 with reference to the edge detected in step S1632. Subsequent processing is the same as that of the above-described embodiment.
- the parallax maps obtained from a plurality of image pairs are combined, the variation in measurement can be reduced.
- a highly accurate predicted parallax can be obtained. Even if the information in one image is missing, it is highly possible that the parallax can be predicted using the other image. Therefore, the search range of the corresponding points can be set more appropriately, and the accuracy and robustness can be further improved.
- the above-described embodiment merely exemplifies a configuration example of the present invention.
- the present invention is not limited to the above-mentioned specific form, and various modifications can be made within the scope of its technical idea.
- the image for edge detection when the image for edge detection is taken, the object 12 is illuminated with non-patterned light, but in a sufficiently bright environment, such dedicated illumination is not performed ( That is, an image for edge detection may be taken (without irradiating with non-patterned light). That is, the image for edge detection may be an image taken in a state where the pattern for distance measurement is not projected, and it is not important whether or not to irradiate non-pattern light when the image for edge detection is taken. Absent.
- a spatial coding pattern method (first embodiment), stereo matching (second and third embodiments), and a hybrid of the spatial coding pattern method and stereo matching (fourth embodiment).
- the fifth embodiment three kinds of three methods were illustrated, but the present invention is also applicable to active measurement other than these.
- a random dot pattern, a gray pattern, a time-coded pattern, or the like may be used as the pattern light.
- the hash feature amount is used for stereo matching, but another method may be used for evaluating the similarity of the corresponding points.
- an evaluation index of similarity there is a similarity calculation method of pixels of left and right images by SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference), NC (Normalized Correlation) and the like.
- the camera image common to the parallax prediction and the stereo matching is used, but different camera images for three-dimensional measurement may be used.
- Map generation means (111,801) that generates a map that is data in which information about the depth distance is associated with each pixel using an image taken by projecting pattern light onto the object (12).
- a modification means (113) that modifies the map based on the detected edge so that the position where the depth distance is discontinuous matches the position of the edge of the object (12). (11).
- 3D measurement system 10 Sensor unit 11: Image processing device 12: Object
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Electromagnetism (AREA)
- Optics & Photonics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
画像処理装置が、対象物にパターン光を投影して撮影された画像を用いて、各画素に奥行距離に関する情報が関連付けられたデータであるマップを生成するマップ生成手段と、前記対象物にパターン光を投影せずに撮影された画像を用いて、前記対象物のエッジを検出するエッジ検出手段と、奥行距離が不連続となる位置が前記対象物のエッジの位置に合致するように、前記検出されたエッジに基づいて前記マップを修正する修正手段と、を有する。
Description
本発明は、画像処理装置に関し、特に画像から高精度な3次元情報を得るための技術に関する。
画像を用いて物体の3次元情報を取得する手法の一つに、アクティブ計測と呼ばれる手法がある(非特許文献1参照)。アクティブ計測は、物体表面にパターン光を投影するため、画像特徴が少ない物体(例えば、表面にテクスチャがない物体など)でも高精度に3次元計測が可能であるという利点をもち、パッシブ計測に比べて実用性に優れる。
P. Vuylsteke and A. Oosterlinck, Range Image Acquisition with a Single Binary-Encoded Light Pattern, IEEE PAMI 12(2), pp. 148-164, 1990.
しかしながら、アクティブ計測は、物体のエッジ近傍において計測精度が低下しやすいという固有の課題をもつ。エッジ部分では物体の高さが不連続となるため、投影されるパターンもエッジを挟んで不連続となる。そうすると、エッジの近傍でパターンの誤認識が発生しやすくなり、物体表面上の点を背景の点と誤認したり、逆に背景の点を物体表面上の点と誤認したりしてしまい、誤った高さ情報が出力されるのである。図18は、アクティブ計測で得られた3次元情報(点群データ)と実際の物体のエッジ(外形)とのズレを模式的に示している。エッジから点群がはみ出している箇所や、点群が欠けている箇所があることがわかる。
アクティブ計測の用途や目的によっては、このような3次元情報と実際の形状のあいだのわずかなズレ(以下単に「計測誤差」と呼ぶ)が無視できないケースも想定される。例えば、アクティブ計測によって物体の外形を認識し、その認識結果をピッキングロボットの把持制御に利用する場面においては、計測誤差がピック又はプレースの不具合を招く可能性がある。具体的には、物体の外形を過大認識した結果、当該物体とその周囲のあいだにハンドを挿入する隙間がないと誤判定し、ピック又はプレースの動作を中断してしまったり、逆に、物体の外形を過小認識した結果、当該物体を把持するときにハンドと物体の干渉が発生してしまうなどの不具合が想定される。また、アクティブ計測によって物体の位置や姿勢を認識しながら、部材の嵌合や組付けを行う場面においては、ミクロンオーダーの位置決めが必要となるため、上記のような計測誤差は致命的となる。また、表面に位置決め用のマーク(突起や溝など)が設けられている部材などでは、アクティブ計測で得られた3次元情報に現れている表面の凹凸が、位置決め用のマークなのか計測誤差による凹凸なのか判別がつかず、位置決め用のマークを認識できない可能性もある。
本発明は、上記実情に鑑みてなされたものであり、物体のエッジ部分におけるパターンの誤認に起因して生じる計測誤差を排除ないし低減するための技術を提供することを目的とする。
本発明の一側面は、対象物にパターン光を投影して撮影された画像を用いて、各画素に奥行距離に関する情報が関連付けられたデータであるマップを生成するマップ生成手段と、前記対象物にパターン光を投影せずに撮影された画像を用いて、前記対象物のエッジを検出するエッジ検出手段と、奥行距離が不連続となる位置が前記対象物のエッジの位置に合致するように、前記検出されたエッジに基づいて前記マップを修正する修正手段と、を有することを特徴とする画像処理装置を提供する。
マップ生成手段により生成されるマップは、対象物にパターン光を投影して撮影された画像から奥行距離を復元したものであるため、その原理上、パターンの誤認に起因する計測誤差を含んでいる可能性がある。一方、エッジ検出手段により生成されるエッジの情報は、パターン光を投影せずに撮影された画像から得られる情報であるため、パターンの誤認に起因する誤差は含まない。したがって、検出されたエッジの位置を基準にしてマップを修正することによって、マップに含まれる計測誤差を排除ないし低減することができ、従来よりも高精度なマップを得ることができる。
前記マップ生成手段が前記マップを生成する手法は問わない。例えば、前記マップ生成手段は、前記対象物にパターン光を投影し異なる視点から撮影された複数の画像を用いて、ステレオマッチングにより、前記マップを生成するものであってもよい。ステレオマッチングは、異なる視点から撮影された2枚の画像のあいだの視差に基づき三角計測の原理で奥行距離を算出する方法である。ステレオマッチングによれば、空間分解能の高い3次元計測を精度よく行うことができる。ステレオマッチングの場合、前記マップは、視差マップ、デプスマップなどであってもよい。
あるいは、前記マップ生成手段は、前記対象物にパターン光を投影して撮影された画像を用いて、空間符号化パターン方式により、前記マップを生成するものであってもよい。空間符号化パターン方式は、カメラの画素と符号化パターンの対応点の関係から三角計測の原理で奥行距離を算出する方法であり、1枚の画像から3次元情報を得ることができる。空間符号化パターン方式によれば、3次元計測を高速かつ精度よく行うことができる。空間符号化パターン方式の場合、前記マップは、デプスマップなどであってもよい。
あるいは、前記マップ生成手段は、前記対象物にパターン光を投影し異なる視点から撮影された第1画像と第2画像からなる画像ペアを取得する取得手段と、ステレオマッチングとは異なる方式により前記第1画像と前記第2画像の間の視差を予測する視差予測手段と、予測された視差に基づき、ステレオマッチングにおける対応点の探索範囲を設定する設定手段と、前記第1画像と前記第2画像を用い、前記設定された探索範囲に限定したステレオマッチングを行うステレオマッチング手段と、を有してもよい。一般的なステレオマッチングでは、比較画像の全体から対応点の探索を行うため、高解像度の画像を用いると不可避的に処理時間が長くなってしまう。これに対し、上記構成では、予測された視差に基づき対応点の探索範囲が限定される。これにより、探索範囲を格段に狭くできるため、対応点の探索に要する時間を大幅に短縮することができる。
前記視差予測手段は、空間符号化パターン方式により得られた距離情報に基づいて、視差を予測してもよい。空間符号化パターン方式は、ステレオマッチングと同じ解像度のイメージセンサを用いた場合、ステレオマッチングよりも格段に短い処理時間で距離情報を得ることができるからである。なお、空間符号化パターン方式の測距の空間分解能は、ステレオマッチング方式に比べて低いものの、視差の予測に用いる目的であれば必要十分といえる。
前記マップ生成手段は、複数の画像ペアのそれぞれから前記ステレオマッチング手段により生成された複数の視差マップを合成することにより、合成視差マップを生成する視差マップ合成手段をさらに有するとよい。この場合、前記修正手段は、前記合成視差マップ、または、前記合成視差マップから変換されたデプスマップを修正するとよい。複数の画像ペアから得られた視差マップを合成することで、計測のばらつきを低減することができ、高精度かつ信頼性の高いマップを安定して得ることができる。
前記視差予測手段は、複数の予測視差を生成し、前記設定手段は、前記複数の予測視差を合成した合成予測視差を、前記複数の画像ペアの探索範囲の設定に用いてもよい。このように予測視差の生成(計測)も複数回行うことによって、精度及びロバスト性を向上することができる。
前記対象物にパターン光を投影せずに撮影された画像は、前記対象物に均一光を投影して撮影された画像であってもよい。例えば、白色の均一光源などを用いてもよい。
本発明の第二側面は、パターン光を投影する第1投光部、および、1つ以上のカメラを少なくとも有するセンサユニットと、前記センサユニットから取り込まれる画像を用いて処理を行う、第一側面に係る画像処理装置と、を有することを特徴とする3次元計測システムを提供する。この構成によれば、対象物のエッジ部分におけるパターンの誤認に起因する計測誤差が排除ないし低減された、3次元情報を得ることができる。
本発明は、上記手段の少なくとも一部を有する画像処理装置又は3次元計測システムとして捉えてもよい。また、本発明は、上記処理の少なくとも一部を含む画像処理方法、3次元計測方法、測距方法、画像処理装置の制御方法、3次元計測システムの制御方法などとして捉えてもよく、または、かかる方法を実現するためのプログラムやそのプログラムを非一時的に記録した記録媒体として捉えてもよい。なお、上記手段および処理の各々は可能な限り互いに組み合わせて本発明を構成することができる。
本発明によれば、物体のエッジ部分におけるパターンの誤認に起因して生じる計測誤差を排除ないし低減することが可能である。
<適用例>
図1は、本発明の適用例の一つである3次元計測システムの構成例を模式的に示す図である。3次元計測システム1は、画像センシングによって対象物12の3次元形状を計測するためのシステムであり、概略、センサユニット10と画像処理装置11から構成される。センサユニット10は、少なくとも、パターン光を投影する第1投光部と非パターン光を投影する第2投光部と1つ以上のカメラ(イメージセンサや撮像装置とも呼ばれる)を備えており、必要に応じて他のセンサや照明を備える場合もある。センサユニット10の出力は画像処理装置11に取り込まれる。画像処理装置11は、センサユニット10から取り込まれたデータを用いて各種の処理を行うデバイスである。画像処理装置11の処理としては、例えば、距離計測(測距)、3次元形状認識、物体認識、シーン認識などが含まれてもよい。画像処理装置11の処理結果は、例えば、ディスプレイなどの出力装置に出力されたり、外部に転送されて、検査や他の装置の制御等に利用される。このような3次元計測システム1は、例えば、コンピュータビジョン、ロボットビジョン、マシンビジョンをはじめとして、幅広い分野に適用される。特に、本開示に係る3次元計測システム1では対象物12の高精度な3次元情報を得ることができるため、物体のピッキング、位置決め、組み立て、検査などを行う各種の産業用ロボットの制御に好ましく適用することができる。
図1は、本発明の適用例の一つである3次元計測システムの構成例を模式的に示す図である。3次元計測システム1は、画像センシングによって対象物12の3次元形状を計測するためのシステムであり、概略、センサユニット10と画像処理装置11から構成される。センサユニット10は、少なくとも、パターン光を投影する第1投光部と非パターン光を投影する第2投光部と1つ以上のカメラ(イメージセンサや撮像装置とも呼ばれる)を備えており、必要に応じて他のセンサや照明を備える場合もある。センサユニット10の出力は画像処理装置11に取り込まれる。画像処理装置11は、センサユニット10から取り込まれたデータを用いて各種の処理を行うデバイスである。画像処理装置11の処理としては、例えば、距離計測(測距)、3次元形状認識、物体認識、シーン認識などが含まれてもよい。画像処理装置11の処理結果は、例えば、ディスプレイなどの出力装置に出力されたり、外部に転送されて、検査や他の装置の制御等に利用される。このような3次元計測システム1は、例えば、コンピュータビジョン、ロボットビジョン、マシンビジョンをはじめとして、幅広い分野に適用される。特に、本開示に係る3次元計測システム1では対象物12の高精度な3次元情報を得ることができるため、物体のピッキング、位置決め、組み立て、検査などを行う各種の産業用ロボットの制御に好ましく適用することができる。
図1の構成はあくまで一例であり、3次元計測システム1の用途に応じてそのハードウェア構成は適宜設計すればよい。例えば、センサユニット10と画像処理装置11は無線で接続されてもよいし、センサユニット10と画像処理装置11が一体の装置で構成されていてもよい。また、センサユニット10と画像処理装置11をLAN又はインターネット等の広域ネットワークを介して接続してもよい。また、1つの画像処理装置11に対し複数のセンサユニット10を設けてもよいし、逆に、1つのセンサユニット10の出力を複数の画像処理装置11に提供してもよい。さらに、センサユニット10をロボットや移動体に取り付けるなどしてセンサユニット10の視点を移動可能にしてもよい。
<計測処理の流れ>
図2及び図3を参照して、3次元計測システム1による計測処理の大まかな流れを説明する。図2は3次元計測システム1の計測処理の流れを示すフローチャートであり、図3は計測処理で用いられる画像及びマップを模式的に示す図である。
図2及び図3を参照して、3次元計測システム1による計測処理の大まかな流れを説明する。図2は3次元計測システム1の計測処理の流れを示すフローチャートであり、図3は計測処理で用いられる画像及びマップを模式的に示す図である。
ステップS200において、センサユニット10(第1投光部)から対象物12にパターン光を投影する。パターン光のパターンは、固定のパターンでもよいし、ランダムパターンでもよいし、位相シフト法などで用いられる縞状のパターンでもよい。3次元情報の復元アルゴリズムに合わせて、適切なパターンを選べばよい。
ステップS201において、センサユニット10(カメラ)が、パターン光が投影された対象物12を撮影する。得られた画像30(以後、パターンが投影された画像という意味で「パターン画像」とも呼ぶ。)は画像処理装置11に取り込まれる。
ステップS202において、画像処理装置11(マップ生成手段)が、ステップS201で取り込まれたパターン画像30から3次元情報の復元を行い、各画素に奥行距離に関する情報が関連付けられたデータであるマップ31を生成する。「奥行距離に関する情報」は、奥行距離(デプス)そのものでもよいし、奥行距離に換算可能な情報(例えば視差情報)でもよい。
次に、ステップS203において、センサユニット10(第2投光部)から対象物12に非パターン光を投影する。例えば、白色の均一光で対象物12を照明してもよい。なお、十分に明るい環境の場合は、対象物12の照明を行わなくてもよい。
ステップS204において、センサユニット10(カメラ)が、対象物12を撮影する。得られた画像32(以後、パターンが投影されていない画像という意味で「非パターン画像」とも呼ぶ。)は画像処理装置11に取り込まれる。
ステップS205において、画像処理装置11(エッジ検出手段)が、ステップS204で取り込まれた非パターン画像32を用いて、対象物12のエッジを検出する。エッジ検出には、例えば微分フィルタやラプラシアンフィルタなど、どのような手法を適用してもよい。
ステップS206において、画像処理装置11(修正手段)が、ステップS205で得られたエッジ33の情報に基づいて、ステップS202で得られたマップ31を修正する。ステップS202の処理で3次元情報が正確に復元されている場合には、マップ31内の奥行距離が不連続となる位置は、ステップS205で検出されたエッジ33の位置と一致するはずである。しかしながら、対象物12のエッジ部分においてパターンを誤認し3次元情報の復元に誤差が生じると、マップ31中の奥行距離が不連続となる位置とエッジの位置にズレが発生する。そこでステップS206では、奥行距離が不連続となる位置がエッジの位置に合致するように、マップ31の修正を行う。
ステップS207において、画像処理装置11(3次元情報生成手段)は、修正後のマップ34をもとに出力用の3次元情報(例えば点群データ)を生成する。このような処理によれば、パターンの誤認に起因する計測誤差を排除ないし低減することができるため、高精度かつ高信頼の3次元情報を生成することが可能となる。
<マップの修正>
図4及び図5を参照して、ステップS206のマップ修正処理の一例を具体的に説明する。図4は画像処理装置11により実行されるマップ修正処理のフローチャートであり、図5はマップ修正処理の一例を模式的に示す図である。
図4及び図5を参照して、ステップS206のマップ修正処理の一例を具体的に説明する。図4は画像処理装置11により実行されるマップ修正処理のフローチャートであり、図5はマップ修正処理の一例を模式的に示す図である。
ステップS400において、画像処理装置11が、マップ50に対して奥行距離に基づくセグメンテーションを行い、対象物12に相当する領域51を抽出する。セグメンテーションの方法は問わない。例えば、奥行距離に基づきマップ50を二値化又はN値化したのちラベリング処理を行ってもよいし、奥行距離が略同一又は連続で且つ空間的に連続している領域を抽出してもよい。
ステップS401において、画像処理装置11が、マップ50から抽出された領域51に対し、エッジ検出(図2のステップS205)で得られたエッジ52を重ね合わせる。そして、画像処理装置11は、エッジ52によって領域51を分割し(ステップS402)、各分割領域53a~53cの面積(画素数)Sを計算する(ステップS403)。
ステップS404において、画像処理装置11は、各分割領域53a~53cの面積Sを所定の閾値Xと比較し、閾値Xよりも面積Sが小さい分割領域53a、53cは計測誤差と判定する。ステップS405において、画像処理装置11は、計測誤差と判定された分割領域53a、53cを除去する修正をマップ50に施し、修正後のマップ54を出力する。分割領域を除去する操作は、例えば、分割領域内の画素の奥行距離の値を背景領域の奥行距離の値に置き換える操作でもよいし、マップ50が点群データの場合(つまり、奥行距離の情報をもつ点の集合の場合)であれば分割領域内の点群を削除する操作でもよい。以上の処理によって、パターンの誤認に起因するマップの計測誤差を排除ないし低減することができる。
<第1実施形態>
図6を参照して、本発明の第1実施形態に係る3次元計測システム1の構成例について説明する。第1実施形態では、空間符号化パターン方式により対象物12の3次元情報が生成される。
図6を参照して、本発明の第1実施形態に係る3次元計測システム1の構成例について説明する。第1実施形態では、空間符号化パターン方式により対象物12の3次元情報が生成される。
(センサユニット)
センサユニット10は、第1カメラ101、パターン投光部(第1投光部)103、照明部(第2投光部)104、画像転送部105、駆動制御部106を有する。
センサユニット10は、第1カメラ101、パターン投光部(第1投光部)103、照明部(第2投光部)104、画像転送部105、駆動制御部106を有する。
第1カメラ101は、対象物12を撮影し画像データを取得する撮像装置である。第1カメラ101としては、モノクロのカメラを用いてもよいし、カラーのカメラを用いてもよい。
パターン投光部103は、空間符号化パターン方式の測距で用いるパターン光を対象物12に投影するための投光装置であり、プロジェクタとも呼ばれる。空間符号化パターン方式の測距では、例えば、距離を特定するための規則性のあるパターン(符号化されたパターン)が用いられる。図7にパターン投光部103の構成例を模式的に示す。パターン投光部103は、例えば、光源部180、導光レンズ181、パターン生成部182、投写レンズ183などから構成される。光源部180としては、LED、レーザー、VCSEL(Vertical cavity Surface-emitting Laser)などを用いることができる。導光レンズ181は光源部180からパターン生成部182に光を導くための光学素子であり、レンズ又はガラスロッドなどを用いることができる。パターン生成部182は、合成パターンを生成する部材ないし装置であり、フォトマスク、回折光学素子(例えばDOE(Diffractive Optical Element))、光変調素子(例えば、DLP(Digital Light Processing)、LCD(Liquid Crystal Display)、LCoS(Liquid Crystal on Silicon)、MEMS(Micro Electro Mechanical Systems))などを用いることができる。投写レンズ183は生成されたパターンを拡大し投写する光学素子である。
照明部104は、一般的な可視光画像を撮影するために用いられる均一照明である。例えば白色LED照明などが用いられる。もしくはパターン投光部103と同じ波長帯の照明でもよい。
画像転送部105は、第1カメラ101で撮影された画像データを画像処理装置11へ転送する。駆動制御部106は、第1カメラ101、パターン投光部103、及び、照明部104を制御するユニットである。なお、画像転送部105と駆動制御部106は、センサユニット10側ではなく、画像処理装置11側に設けてもよい。
(画像処理装置)
画像処理装置11は、画像取得部110、パターン復号部(マップ生成手段)111、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113を有する。
画像処理装置11は、画像取得部110、パターン復号部(マップ生成手段)111、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113を有する。
画像取得部110は、センサユニット10から必要な画像データを取り込む機能を有する。画像取得部110は、パターン光を投影して撮影された画像(パターン画像)はパターン復号部111へ送り、非パターン光を投影して撮影された画像(非パターン画像)はエッジ検出部112へ送る。パターン復号部111は、空間符号化パターン方式によって、パターン画像から奥行距離の情報(デプス情報)を取得する。パターン復号部111からはデプスマップが出力される。エッジ検出部112は、非パターン画像から対象物12のエッジを検出する。マップ修正部113は、検出されたエッジに基づいてデプスマップを修正し、修正後のデプスマップを出力する。このデプスマップは、例えば、対象物12の形状認識、物体認識などに利用される。
画像処理装置11は、例えば、CPU(プロセッサ)、RAM(メモリ)、不揮発性記憶装置(ハードディスク、SSDなど)、入力装置、出力装置などを備えるコンピュータにより構成される。この場合、CPUが、不揮発性記憶装置に格納されたプログラムをRAMに展開し、当該プログラムを実行することによって、上述した各種の機能が実現される。ただし、画像処理装置11の構成はこれに限られず、上述した機能のうちの全部又は一部を、FPGAやASICなどの専用回路で実現してもよいし、クラウドコンピューティングや分散コンピューティングにより実現してもよい。以後の実施形態でも同様である。
以上述べた本実施形態の構成によれば、空間符号化パターン方式を利用するので、3次元計測を高速かつ精度よく行うことができる。加えて、非パターン画像から検出されたエッジの位置を基準にしてデプスマップを修正するので、パターンの誤認に起因する計測誤差を排除ないし低減することができ、従来よりも高精度なデプスマップを得ることができる。
<第2実施形態>
図8を参照して、本発明の第2実施形態に係る3次元計測システム1の構成例について説明する。第2実施形態では、ステレオマッチングにより対象物12の3次元情報が生成される。
図8を参照して、本発明の第2実施形態に係る3次元計測システム1の構成例について説明する。第2実施形態では、ステレオマッチングにより対象物12の3次元情報が生成される。
(センサユニット)
センサユニット10は、第1カメラ101、第2カメラ102、パターン投光部(第1投光部)103、照明部(第2投光部)104、画像転送部105、駆動制御部106を有する。
センサユニット10は、第1カメラ101、第2カメラ102、パターン投光部(第1投光部)103、照明部(第2投光部)104、画像転送部105、駆動制御部106を有する。
第1カメラ101と第2カメラ102は、いわゆるステレオカメラを構成するカメラ対であり、所定の距離だけ離れて配置されている。2つのカメラ101、102で同時に撮影を行うことで、異なる視点から撮影した画像ペアを得ることができる(第1カメラ101の画像を第1画像、第2カメラ102の画像を第2画像と呼ぶ)。2つのカメラ101、102は、互いの光軸が交差し、且つ、水平ライン(又は垂直ライン)が同一平面上にくるように、配置されるとよい。このような配置をとることで、エピポーラ線が画像の水平ライン(又は垂直ライン)と平行になるため、ステレオマッチングにおける対応点を同じ位置の水平ライン(又は垂直ライン)内から探索すればよく、探索処理の簡易化が図れるからである。なお、カメラ101、102としては、モノクロのカメラを用いてもよいし、カラーのカメラを用いてもよい。
パターン投光部103は、いわゆるアクティブステレオ測距で用いるパターン光を対象物12に投影するための投光装置であり、プロジェクタとも呼ばれる。アクティブステレオ測距では、例えば、第1実施形態と同様に距離を特定するための規則性のあるパターン(符号化されたパターン)が用いられてもよいし、ランダムドットなどの規則性のないパターンが用いられてもよい。照明部104は、一般的な可視光画像を撮影するために用いられる均一照明である。パターン投光部103及び照明部104の具体的な構成は第1実施形態と同じでよい。
画像転送部105は、第1カメラ101で撮影された第1画像のデータ、及び、第2カメラ102で撮影された第2画像のデータを、画像処理装置11へ転送する。画像転送部105は、第1画像と第2画像を別々の画像データとして転送してもよいし、第1画像と第2画像を繋ぎ合わせてサイドバイサイド画像を生成し単一の画像データとして転送してもよい。駆動制御部106は、第1カメラ101、第2カメラ102、パターン投光部103、及び、照明部104を制御するユニットである。なお、画像転送部105と駆動制御部106は、センサユニット10側ではなく、画像処理装置11側に設けてもよい。
(画像処理装置)
画像処理装置11は、画像取得部110、前処理部800、対応点探索部(マップ生成手段)801、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113、視差マップ後処理部802、デプスマップ生成部803を有する。
画像処理装置11は、画像取得部110、前処理部800、対応点探索部(マップ生成手段)801、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113、視差マップ後処理部802、デプスマップ生成部803を有する。
画像取得部110は、パターン光を投影して撮影された第1画像と第2画像からなるステレオ画像ペアは前処理部800へ送り、非パターン光を投影して撮影された画像はエッジ検出部112へ送る。前処理部800は、第1画像と第2画像に対して、必要な前処理を行う機能を有する。対応点探索部801は、第1画像と第2画像の対応点を探索し、その探索結果に基づき視差マップを生成する機能を有する。エッジ検出部112は、非パターン画像から対象物12のエッジを検出する機能を有し、マップ修正部113は、検出されたエッジに基づいて視差マップを修正し、修正後の視差マップを出力する機能を有する。視差マップ後処理部802は、視差マップに対して必要な後処理を行う機能を有する。デプスマップ生成部803は、視差マップの視差情報を距離情報に変換し、デプスマップを生成する機能を有する。
(マップ生成)
図9を参照して、第2実施形態におけるマップ生成処理の流れを説明する。図9は、図2のステップS202、S205、S206の詳細を示すフロー図である。
図9を参照して、第2実施形態におけるマップ生成処理の流れを説明する。図9は、図2のステップS202、S205、S206の詳細を示すフロー図である。
ステップS900において、画像取得部110が、センサユニット10から第1画像と第2画像を取得する。第1画像及び第2画像はそれぞれ、パターン投光部103から対象物12にパターン光を投影した状態で、第1カメラ101及び第2カメラ102で撮影された画像である。なお、センサユニット10からサイドバイサイド画像形式のデータが取り込まれた場合は、画像取得部110がサイドバイサイド画像を第1画像と第2画像に分割する。画像取得部110は、前処理部800に第1画像と第2画像を送る。
ステップS901において、前処理部800が、第1画像及び第2画像に対し平行化処理(レクティフィケーション)を行う。平行化処理とは、2つの画像の間の対応点が画像中の同じ水平ライン(又は垂直ライン)上に存在するように、一方又は両方の画像を幾何変換する処理である。平行化処理によりエピポーラ線が画像の水平ライン(又は垂直ライン)と平行になるため、後段の対応点探索の処理が簡単になる。なお、センサユニット10から取り込まれる画像の平行度が十分高い場合には、ステップS901の平行化処理は省略してもよい。
ステップS902において、前処理部800が、平行化された第1画像及び第2画像の各画素についてハッシュ特徴量を計算し、各画素の値をハッシュ特徴量に置き換える。ハッシュ特徴量は、注目画素を中心とする局所領域の輝度特徴を表すものであり、ここでは、8要素のビット列からなるハッシュ特徴量を用いる。このように、各画像の輝度値をハッシュ特徴量に変換しておくことで、後段の対応点探索における局所的な輝度特徴の類似度計算が極めて効率化される。
ステップS903において、対応点探索部801が、第1画像と第2画像の間で対応点の探索を行い、各画素の視差を求める。対応点探索部801は、対応点の検出に成功した点(画素の座標)に視差情報を関連付けた視差データを生成する。この情報が視差マップである。
次にステップS910において、画像取得部110が、センサユニット10から非パターン画像を取得する。非パターン画像は、照明部104から対象物12に非パターン光(均一照明など)を投影した状態で、第1カメラ101又は第2カメラ102で撮影された画像である。
ステップS911において、エッジ検出部112は、非パターン画像に対し平行化処理(レクティフィケーション)を行う。なお、画像の平行度が十分高い場合には、平行化処理は省略してもよい。ステップS912において、エッジ検出部112は、非パターン画像から対象物12のエッジを検出する。
そして、ステップS913において、マップ修正部113が、ステップS912で検出されたエッジを基準として、ステップS903で生成された視差マップを修正する。マップ修正処理の詳細は図4で示したとおりである。
(後処理)
図10を参照して、第2実施形態における後処理の流れを説明する。図10は、図2のステップS207の詳細を示すフロー図である。
図10を参照して、第2実施形態における後処理の流れを説明する。図10は、図2のステップS207の詳細を示すフロー図である。
ステップS1000において、視差マップ後処理部802が、視差マップの後処理を行う。対応点探索によって推定された視差マップには誤計測点や計測抜けなどが含まれるため、後処理として、周囲の画素の視差情報に基づき誤計測点の修正や計測抜けの補完を行う。
ステップS1001において、デプスマップ生成部803が、視差マップの各画素の視差情報を奥行距離情報に変換し、デプスマップを生成する。このデプスマップ(点群データ)は、例えば、対象物12の形状認識、物体認識などに利用される。
以上述べた本実施形態の構成によれば、ステレオマッチングを利用するので、空間分解能の高い3次元計測を精度よく行うことができる。加えて、非パターン画像から検出されたエッジの位置を基準にして視差マップを修正するので、パターンの誤認に起因する計測誤差を排除ないし低減することができ、従来よりも高精度な視差マップを得ることができる。なお、本実施形態では、視差マップに対しマップ修正処理を施したが、視差マップからデプスマップへの変換処理を先に行い、デプスマップに対しマップ修正処理を施してもよい。
<第3実施形態>
図11を参照して、本発明の第3実施形態に係る3次元計測システム1の構成例について説明する。第3実施形態では、複数の画像ペアについてステレオマッチングを行い、各画像ペアから生成された視差マップを合成することにより、計測の精度及びロバスト性を向上する。以下の説明では、第2実施形態と異なる構成を主に説明し、第2実施形態と同様の構成については説明を省略する。
図11を参照して、本発明の第3実施形態に係る3次元計測システム1の構成例について説明する。第3実施形態では、複数の画像ペアについてステレオマッチングを行い、各画像ペアから生成された視差マップを合成することにより、計測の精度及びロバスト性を向上する。以下の説明では、第2実施形態と異なる構成を主に説明し、第2実施形態と同様の構成については説明を省略する。
(センサユニット)
センサユニット10は、第1カメラ101、第2カメラ102、第3カメラ1100、第4カメラ1101、パターン投光部(第1投光部)103、照明部(第2投光部)104、画像転送部105、駆動制御部106を有する。本実施形態のセンサユニット10は4つのカメラを備えており、1回の投影で4つの視点の画像を同時に撮影できる。
センサユニット10は、第1カメラ101、第2カメラ102、第3カメラ1100、第4カメラ1101、パターン投光部(第1投光部)103、照明部(第2投光部)104、画像転送部105、駆動制御部106を有する。本実施形態のセンサユニット10は4つのカメラを備えており、1回の投影で4つの視点の画像を同時に撮影できる。
第3カメラ1100と第4カメラ1101は、いわゆるステレオカメラを構成するカメラ対であり、所定の距離だけ離れて配置されている(第3カメラ1100の画像を第3画像、第4カメラ1101の画像を第4画像と呼ぶ)。2つのカメラ1100、1101は、互いの光軸が交差し、且つ、水平ライン(又は垂直ライン)が同一平面上にくるように、配置されるとよい。このような配置をとることで、エピポーラ線が画像の水平ライン(又は垂直ライン)と平行になるため、ステレオマッチングにおける対応点を同じ位置の水平ライン(又は垂直ライン)内から探索すればよく、探索処理の簡易化が図れるからである。なお、カメラ1100、1101としては、モノクロのカメラを用いてもよいし、カラーのカメラを用いてもよい。
画像転送部105は、第1カメラ101~第4カメラ1101で撮影された第1画像~第4画像のデータを、画像処理装置11へ転送する。画像転送部105は、第1画像~第4画像を別々の画像データとして転送してもよいし、第1画像~第4画像を繋ぎ合わせてサイドバイサイド画像を生成し単一の画像データとして転送してもよい。
(画像処理装置)
画像処理装置11は、画像取得部110、前処理部800、対応点探索部(マップ生成手段)801、視差マップ合成部(視差マップ合成手段)1103、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113、視差マップ後処理部802、デプスマップ生成部803を有する。視差マップ合成部1103は、複数の画像ペアのそれぞれから生成された複数の視差マップを合成することにより合成視差マップを生成する機能を有する。
画像処理装置11は、画像取得部110、前処理部800、対応点探索部(マップ生成手段)801、視差マップ合成部(視差マップ合成手段)1103、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113、視差マップ後処理部802、デプスマップ生成部803を有する。視差マップ合成部1103は、複数の画像ペアのそれぞれから生成された複数の視差マップを合成することにより合成視差マップを生成する機能を有する。
(マップ生成)
図12を参照して、第3実施形態におけるマップ生成処理の流れを説明する。図12は、図2のステップS202、S205、S206の詳細を示すフロー図である。
図12を参照して、第3実施形態におけるマップ生成処理の流れを説明する。図12は、図2のステップS202、S205、S206の詳細を示すフロー図である。
ステップS1200において、画像取得部110が、センサユニット10から第1画像~第4画像を取得する。第1画像~第4画像はそれぞれ、パターン投光部103から対象物12にパターン光を投影した状態で、第1カメラ101、第2カメラ102、第3カメラ1100、及び第4カメラ1101で撮影された画像である。なお、センサユニット10からサイドバイサイド画像形式のデータが取り込まれた場合は、画像取得部110がサイドバイサイド画像を第1画像~第4画像に分割する。本実施形態では、第1画像と第2画像を第1の画像ペア、第3画像と第4画像を第2の画像ペアとして、ステレオマッチングに利用する。
ステップS1201において、前処理部800が、第1画像~第4画像に対し平行化処理(レクティフィケーション)を行う。ステップS1202において、前処理部800が、平行化された第1画像~第4画像の各画素についてハッシュ特徴量を計算し、各画素の値をハッシュ特徴量に置き換える。
ステップS1203において、対応点探索部801が、第1の画像ペアである第1画像と第2画像の間で対応点の探索を行い、視差マップ1を生成する。続いて、ステップS1204において、対応点探索部801が、第2の画像ペアである第3画像と第4画像の間で対応点の探索を行い、視差マップ2を生成する。
ステップS1205において、視差マップ合成部1103が、第1の画像ペアから得られた視差マップ1と第2の画像ペアから得られた視差マップ2を合成し、合成視差マップを生成する。合成方法は特に限定されないが、例えば、視差マップ1と視差マップ2の両方で視差が得られている場合はそれらの平均値を合成視差とし、視差マップ1と視差マップ2のいずれか一方だけで視差が得られた場合はその値をそのまま合成視差とすればよい。
次にステップS1210において、画像取得部110が、センサユニット10から非パターン画像を取得する。非パターン画像は、照明部104から対象物12に非パターン光(均一照明など)を投影した状態で、第1カメラ101又は第2カメラ102で撮影された画像である。
ステップS1211において、エッジ検出部112は、非パターン画像に対し平行化処理(レクティフィケーション)を行う。なお、画像の平行度が十分高い場合には、平行化処理は省略してもよい。ステップS1212において、エッジ検出部112は、非パターン画像から対象物12のエッジを検出する。
そして、ステップS1213において、マップ修正部113が、ステップS1212で検出されたエッジを基準として、ステップS1205で生成された合成視差マップを修正する。マップ修正処理の詳細は図4で示したとおりである。
以上述べた本実施形態の構成によれば、複数の画像ペアから得られた視差マップを合成することで、計測のばらつきを低減することができる。したがって、第2実施形態の構成よりもさらに高精度かつ信頼性の高いマップを安定して得ることができる。
なお、本実施形態では、合成視差マップに対しマップ修正処理を施したが、合成視差マップからデプスマップへの変換処理を先に行い、デプスマップに対しマップ修正処理を施してもよい。また、本実施形態では、2組の画像ペアを用いたが、3組以上の画像ペアを用いてもよい。また、同じ画像を2つ以上の画像ペアで利用してもよい。例えば、第1画像~第3画像の3枚の画像を用いて、第1画像と第2画像のペア、第1画像と第3画像のペア、第2画像と第3画像のペアの3組の画像ペアを形成してもよい。また、画像ペアごとに撮影条件を異ならせてもよい。例えば、本実施形態の構成において、第1カメラと第2カメラの露光時間と、第3カメラと第4カメラの露光時間を異ならせることにより、いわゆるハイダイナミックレンジ(HDR)撮影に準じた効果が得られ、計測のロバスト性を向上できる。また、本実施形態のように2組のステレオカメラを用いるのではなく、1組のステレオカメラで複数回の撮影を行うことにより複数組の画像ペアを取得してもよい。この場合も、撮影回ごとに撮影条件(露光時間やパターン光の点灯時間など)を異ならせることで、計測のロバスト性を向上することができる。
さらに、非パターン光投影時にも、複数のカメラで同時に撮影を行うことで複数の非パターン画像を取得し、それぞれの非パターン画像から検出されたエッジ情報を合成することで、高精度なエッジ情報を生成することも好ましい。エッジ情報の精度を向上することにより、修正マップの精度及び信頼性をさらに向上することができる。
<第4実施形態>
図13を参照して、本発明の第4実施形態に係る3次元計測システム1の構成例について説明する。第4実施形態では、空間符号化パターン方式とステレオマッチングを組み合わせて対象物12の3次元情報を高速かつ高精度に求める。
図13を参照して、本発明の第4実施形態に係る3次元計測システム1の構成例について説明する。第4実施形態では、空間符号化パターン方式とステレオマッチングを組み合わせて対象物12の3次元情報を高速かつ高精度に求める。
センサユニット10の構成は第2実施形態と同じでよい。画像処理装置11は、画像取得部110、パターン復号部1300、視差予測部1301、前処理部800、探索範囲設定部1302、対応点探索部801、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113、視差マップ後処理部802、デプスマップ生成部803を有する。パターン復号部1300は、空間符号化パターン方式によって、第1画像から距離情報を取得する機能をもつ。視差予測部1301は、パターン復号部1300で得られた距離情報に基づき第1画像と第2画像の間の視差を予測し参考視差マップを出力する機能を有する。探索範囲設定部1302は、予測視差に基づいて対応点の探索範囲を設定する機能を有する。それ以外の構成は第2実施形態と実質的に同じであるため説明を割愛する。
(マップ生成)
図14を参照して、第4実施形態におけるマップ生成処理の流れを説明する。図14は、図2のステップS202、S205、S206の詳細を示すフロー図である。なお、第2実施形態のマップ生成処理(図9)と同じ処理については同一のステップ番号を付し、詳しい説明を割愛する。
図14を参照して、第4実施形態におけるマップ生成処理の流れを説明する。図14は、図2のステップS202、S205、S206の詳細を示すフロー図である。なお、第2実施形態のマップ生成処理(図9)と同じ処理については同一のステップ番号を付し、詳しい説明を割愛する。
ステップS900において、画像取得部110が、センサユニット10から第1画像と第2画像を取得する。ステップS901において、前処理部800が、第1画像及び第2画像に対し平行化処理(レクティフィケーション)を行う。ステップS902において、前処理部800が、平行化された第1画像及び第2画像の各画素についてハッシュ特徴量を計算し、各画素の値をハッシュ特徴量に置き換える。
ステップS1400において、パターン復号部1300が、第1画像を解析しパターンを復号することによって、第1画像上の複数の点における奥行方向の距離情報を取得する。
ステップS1401において、視差予測部1301が、ステップS1400で得られた各点の距離情報に基づき、各点を平行化された第1画像の画像座標系に射影したときの2次元座標と、同じ点を平行化された第2画像の画像座標系に射影したときの2次元座標とを計算し、2つの画像の間での座標の差を計算する。この差が予測視差である。視差予測部1301は、ステップS1400で距離情報が得られたすべての点についての予測視差を求め、そのデータを参考視差マップとして出力する。
ステップS1402において、探索範囲設定部1302が、予測視差に基づいて、第1画像及び第2画像に対し、対応点の探索範囲を設定する。探索範囲の大きさは、予測の誤差を考慮して決定される。例えば、予測の誤差が±10画素である場合には、マージンを含めても、予測視差を中心とした±20画素程度を探索範囲に設定すれば十分と考えられる。仮に水平ラインが640画素である場合に、探索範囲を±20画素(つまり40画素)に絞り込むことができれば、水平ライン全体を探索するのに比べて探索処理を単純に1/16に削減することができる。
ステップS1403において、対応点探索部801が、設定された探索範囲に限定して第1画像と第2画像の間で対応点の探索を行い、各画素の視差を求める。対応点探索部801は、対応点の検出に成功した点(画素の座標)に視差情報を関連付けた視差データを生成する。この情報が視差マップである。
次にステップS1410において、画像取得部110が、センサユニット10から非パターン画像を取得する。非パターン画像は、照明部104から対象物12に非パターン光(均一照明など)を投影した状態で、第1カメラ101又は第2カメラ102で撮影された画像である。
ステップS1411において、エッジ検出部112は、非パターン画像に対し平行化処理(レクティフィケーション)を行う。なお、画像の平行度が十分高い場合には、平行化処理は省略してもよい。ステップS1412において、エッジ検出部112は、非パターン画像から対象物12のエッジを検出する。
そして、ステップS1413において、マップ修正部113が、ステップS1412で検出されたエッジを基準として、ステップS1403で生成された視差マップを修正する。マップ修正処理の詳細は図4で示したとおりである。
以上述べた本実施形態では、予測された視差に基づき対応点の探索範囲が限定される。これにより、探索範囲を格段に狭くできるため、対応点の探索に要する時間を大幅に短縮することができる。また、ステレオマッチング、つまり対応点探索の成功率及び精度の向上も期待できる。したがって、本実施形態によれば、空間分解能の高い3次元計測を、高速かつ高精度に行うことができる。
なお、本実施形態では、視差の予測のために空間符号化パターン方式による測距を行ったが、ステレオマッチングよりも高速に測距ないし視差予測が可能な方法であれば、空間符号化パターン方式以外の手法で測距ないし視差予測を行ってもよい。例えば、時間コード化パターン投影方式、モアレトポグラフィ方式(等高線方式)、照度差ステレオ方式(照射方向/Photometric Stereo)、照度差方式、レーザー共焦点方式、白色共焦点方式、光干渉方式、視体積交差方式(Shape from silhouette)、因子分解方式(factorization)、Depth from Motion(Structure from Motion)方式、Depth from Shading方式、Depth from focusing方式、Depth from defocus方式、Depth from zoom方式、光時間差(TOF)測定方式、光位相差(TOF)測定方式等が挙げられる。また、本実施形態では、視差マップに対しマップ修正処理を施したが、視差マップからデプスマップへの変換処理を先に行い、デプスマップに対しマップ修正処理を施してもよい。
また、第3実施形態で述べた構成(複数の画像ペアを用いることによる視差マップの精度向上や、複数の非パターン画像を用いることによるエッジ情報の精度向上など)を第4実施形態に組み合わせてもよい。
<第5実施形態>
図15を参照して、本発明の第5実施形態に係る3次元計測システム1の構成例について説明する。第5実施形態は、第4実施形態の方法(空間符号化パターン方式とステレオマッチングの組み合わせ)の変形例であり、予測視差の生成とステレオマッチング(視差マップの生成)をともに複数回行うことで、計測の精度及びロバスト性をさらに向上する。以下の説明では、第4実施形態と異なる構成を主に説明し、第4実施形態と同様の構成については説明を省略する。
図15を参照して、本発明の第5実施形態に係る3次元計測システム1の構成例について説明する。第5実施形態は、第4実施形態の方法(空間符号化パターン方式とステレオマッチングの組み合わせ)の変形例であり、予測視差の生成とステレオマッチング(視差マップの生成)をともに複数回行うことで、計測の精度及びロバスト性をさらに向上する。以下の説明では、第4実施形態と異なる構成を主に説明し、第4実施形態と同様の構成については説明を省略する。
センサユニット10の構成は第4実施形態と同じでよい。画像処理装置11は、画像取得部110、パターン復号部1300、視差予測部1301、前処理部800、探索範囲設定部1302、対応点探索部801、視差マップ合成部1103、エッジ検出部(エッジ検出手段)112、マップ修正部(修正手段)113、視差マップ後処理部802、デプスマップ生成部803を有する。視差マップ合成部1103は、複数の画像ペアのそれぞれから生成された複数の視差マップを合成することにより合成視差マップを生成する機能を有する。
(マップ生成)
図16及び図17を参照して、第5実施形態におけるマップ生成処理の流れを説明する。図16は、図2のステップS202、S205、S206の詳細を示すフロー図である。図17は、タイミングチャートである。
図16及び図17を参照して、第5実施形態におけるマップ生成処理の流れを説明する。図16は、図2のステップS202、S205、S206の詳細を示すフロー図である。図17は、タイミングチャートである。
駆動制御部106からの開始信号をトリガとして、1回目の計測が実施される。まずパターン投光部103が点灯し、所定のパターン照明を対象物12に投影する。そして、第1カメラ101と第2カメラ102で同時に撮像が行われ、画像転送部105から第1画像及び第2画像の転送が行われる。ステップS1600、S1601において、画像取得部110が、第1画像及び第2画像からなる第1の画像ペアを取得する。画像取得部110は、パターン復号部1300に第1画像を送り、前処理部800に第1画像と第2画像を送る。
続いて、駆動制御部106からの開始信号をトリガとして、2回目の計測が実施される。まずパターン投光部103が点灯し、所定のパターン照明を対象物12に投影する。そして、第1カメラ101と第2カメラ102で同時に撮像が行われ、画像転送部105から第1画像及び第2画像の転送が行われる。ステップS1610、S1611において、画像取得部110が、第1画像及び第2画像からなる第2の画像ペアを取得する。画像取得部110は、パターン復号部1300に第2画像を送り、前処理部800に第1画像と第2画像を送る。
2回目の計測と並列に、1回目の計測で得られた第1の画像ペアに対する画像処理が開始される。ステップS1602において、前処理部800が、第1画像及び第2画像に対し平行化処理(レクティフィケーション)を行う。ステップS1603において、前処理部800が、平行化された第1画像及び第2画像の各画素についてハッシュ特徴量を計算し、各画素の値をハッシュ特徴量に置き換える。
ステップS1604において、パターン復号部1300が、第1画像を解析しパターンを復号することによって、第1画像上の複数の点における奥行方向の距離情報を取得する。
ステップS1605において、視差予測部1301が、ステップS1604で得られた各点の距離情報に基づき予測視差を求め、そのデータを参考視差マップとして出力する。なお、第1画像に対する処理は、第1画像の転送が完了した時点から開始してもよい。
2回目の計測で得られた第2の画像ペアの転送が完了すると、第2の画像ペアに対する画像処理が開始される。ステップS1612において、前処理部800が、第1画像及び第2画像に対し平行化処理(レクティフィケーション)を行う。ステップS1613において、前処理部800が、平行化された第1画像及び第2画像の各画素についてハッシュ特徴量を計算し、各画素の値をハッシュ特徴量に置き換える。ステップS1614において、パターン復号部1300が、第2画像を解析しパターンを復号することによって、第2画像に基づく距離情報を取得する。そして、ステップS1615において、視差予測部1301が、距離情報に基づいて予測視差を計算する。
理論上は、1回目(ステップS1605)で得られる予測視差と2回目(ステップS1615)で得られる予測視差は同じになるはずであるが、実際は完全に同一にはならない。1回目と2回目では異なるカメラ(視点)で撮影された画像を用いるため、画像の見え(つまり画像情報)に差異があるからである。それゆえ、1回目と2回目で予測視差の値に差が生じたり、一方は視差の予測に成功したが他方は失敗するということもあり得る。そこで、ステップS1620において、視差予測部1301が1回目の予測視差と2回目の予測視差を合成し、合成予測視差を求める。合成方法は特に限定されないが、例えば、1回目と2回目の両方で予測視差が得られている場合はそれらの平均値を合成予測視差とし、1回目と2回目のいずれか一方だけで予測視差が得られた場合はその値をそのまま合成予測視差とすればよい。
ステップS1621において、探索範囲設定部1302が、合成予測視差に基づいて、第1の画像ペアと第2の画像ペアのそれぞれに対し、対応点の探索範囲を設定する。
ステップS1622において、対応点探索部801が、第1の画像ペアの間で対応点の探索を行い、各画素の視差を求め、視差マップ1を生成する。同様に、ステップS1623において、対応点探索部801が、第2の画像ペアの間で対応点の探索を行い、視差マップ2を生成する。
ステップS1624において、視差マップ合成部1103が、第1の画像ペアから得られた視差マップ1と第2の画像ペアから得られた視差マップ2を合成し、合成視差マップを生成する。合成方法は特に限定されないが、例えば、視差マップ1と視差マップ2の両方で視差が得られている場合はそれらの平均値を合成視差とし、視差マップ1と視差マップ2のいずれか一方だけで視差が得られた場合はその値をそのまま合成視差とすればよい。
続いて、駆動制御部106からの開始信号をトリガとして、非パターン画像の撮影が行われる。まず照明部104が点灯し、均一照明を対象物12に投影する。そして、第1カメラ101又は第2カメラ102で撮像が行われ、画像転送部105から非パターン画像の転送が行われる(図17は、第1カメラで非パターン画像を撮影する場合のシーケンスを示している。)。ステップS1630において、画像取得部110が、非パターン画像を取得する。画像取得部110は、エッジ検出部112に非パターン画像を送る。
ステップS1631において、エッジ検出部112は、非パターン画像に対し平行化処理(レクティフィケーション)を行う。なお、画像の平行度が十分高い場合には、平行化処理は省略してもよい。ステップS1632において、エッジ検出部112は、非パターン画像から対象物12のエッジを検出する。
そして、ステップS1633において、マップ修正部113が、ステップS1632で検出されたエッジを基準として、ステップS1624で生成された合成視差マップを修正する。以後の処理は前述の実施形態と同様である。
以上述べた本実施形態の構成によれば、第4実施形態と同様の作用効果に加え、次のような利点を有する。第一に、複数の画像ペアから得られた視差マップを合成することから、計測のばらつきを低減することができる。第二に、第1画像と第2画像の両方から視差を予測することで、高精度な予測視差を得ることができる。仮に一方の画像の情報が欠損していたとしても、他方の画像を使って視差を予測できる可能性が高い。したがって、対応点の探索範囲をより適切に設定でき、精度及びロバスト性をさらに向上することができる。
<変形例>
上記実施形態は、本発明の構成例を例示的に説明するものに過ぎない。本発明は上記の具体的な形態には限定されることはなく、その技術的思想の範囲内で種々の変形が可能である。例えば、上記実施形態では、エッジ検出用の画像を撮影する際に非パターン光で対象物12を照明しているが、十分に明るい環境の下では、そのような専用の照明を行わずに(つまり非パターン光を照射せずに)エッジ検出用の画像を撮影してもよい。すなわち、エッジ検出用の画像は、測距用のパターンが投影されていない状態で撮影された画像であればよく、エッジ検出用の画像の撮影時に非パターン光を照射するか否かは重要ではない。
上記実施形態は、本発明の構成例を例示的に説明するものに過ぎない。本発明は上記の具体的な形態には限定されることはなく、その技術的思想の範囲内で種々の変形が可能である。例えば、上記実施形態では、エッジ検出用の画像を撮影する際に非パターン光で対象物12を照明しているが、十分に明るい環境の下では、そのような専用の照明を行わずに(つまり非パターン光を照射せずに)エッジ検出用の画像を撮影してもよい。すなわち、エッジ検出用の画像は、測距用のパターンが投影されていない状態で撮影された画像であればよく、エッジ検出用の画像の撮影時に非パターン光を照射するか否かは重要ではない。
また、上記実施形態では、アクティブ計測の例として、空間符号化パターン方式(第1実施形態)、ステレオマッチング(第2及び第3実施形態)、空間符号化パターン方式とステレオマッチングのハイブリッド(第4及び第5実施形態)の3種類の3つの方式を例示したが、本発明はこれら以外のアクティブ計測に対しても適用可能である。例えば、第1実施形態のように1つの投光装置と1つのカメラからなる計測系において、パターン光として、ランダムドットパターン、グレイパターン、時間符号化されたパターンなどを用いてもよい。
上記実施形態では、ステレオマッチングにハッシュ特徴量を利用したが、対応点の類似度評価には他の手法を用いてもよい。例えば、類似度の評価指標としてはSAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)、NC(Normalized Correlation)などによる左右画像の画素の類似度計算法がある。また、上記実施形態では、視差の予測とステレオマッチングとで共通するカメラの画像を用いたが、それぞれ異なる三次元計測用のカメラ画像を用いてもよい。
<付記>
対象物(12)にパターン光を投影して撮影された画像を用いて、各画素に奥行距離に関する情報が関連付けられたデータであるマップを生成するマップ生成手段(111,801)と、
前記対象物(12)にパターン光を投影せずに撮影された画像を用いて、前記対象物のエッジを検出するエッジ検出手段(112)と、
奥行距離が不連続となる位置が前記対象物(12)のエッジの位置に合致するように、前記検出されたエッジに基づいて前記マップを修正する修正手段(113)と、
を有することを特徴とする画像処理装置(11)。
対象物(12)にパターン光を投影して撮影された画像を用いて、各画素に奥行距離に関する情報が関連付けられたデータであるマップを生成するマップ生成手段(111,801)と、
前記対象物(12)にパターン光を投影せずに撮影された画像を用いて、前記対象物のエッジを検出するエッジ検出手段(112)と、
奥行距離が不連続となる位置が前記対象物(12)のエッジの位置に合致するように、前記検出されたエッジに基づいて前記マップを修正する修正手段(113)と、
を有することを特徴とする画像処理装置(11)。
1:3次元計測システム
10:センサユニット
11:画像処理装置
12:対象物
10:センサユニット
11:画像処理装置
12:対象物
Claims (13)
- 対象物にパターン光を投影して撮影された画像を用いて、各画素に奥行距離に関する情報が関連付けられたデータであるマップを生成するマップ生成手段と、
前記対象物にパターン光を投影せずに撮影された画像を用いて、前記対象物のエッジを検出するエッジ検出手段と、
奥行距離が不連続となる位置が前記対象物のエッジの位置に合致するように、前記検出されたエッジに基づいて前記マップを修正する修正手段と、
を有することを特徴とする画像処理装置。 - 前記修正手段は、前記マップから前記対象物の領域を抽出し、当該領域を前記検出されたエッジによって複数の分割領域に分割し、前記複数の分割領域のうち所定の閾値より小さい分割領域を除外することによって、前記マップを修正する
ことを特徴とする請求項1に記載の画像処理装置。 - 前記マップ生成手段は、前記対象物にパターン光を投影し異なる視点から撮影された複数の画像を用いて、ステレオマッチングにより、前記マップを生成するものである
ことを特徴とする請求項1または2に記載の画像処理装置。 - 前記マップ生成手段は、前記対象物にパターン光を投影して撮影された画像を用いて、空間符号化パターン方式により、前記マップを生成するものである
ことを特徴とする請求項1または2に記載の画像処理装置。 - 前記マップ生成手段は、
前記対象物にパターン光を投影し異なる視点から撮影された第1画像と第2画像からなる画像ペアを取得する取得手段と、
ステレオマッチングとは異なる方式により前記第1画像と前記第2画像の間の視差を予測する視差予測手段と、
予測された視差に基づき、ステレオマッチングにおける対応点の探索範囲を設定する設定手段と、
前記第1画像と前記第2画像を用い、前記設定された探索範囲に限定したステレオマッチングを行うステレオマッチング手段と、
を有する
ことを特徴とする請求項3に記載の画像処理装置。 - 前記視差予測手段は、空間符号化パターン方式により得られた距離情報に基づいて、視差を予測する
ことを特徴とする請求項5に記載の画像処理装置。 - 前記マップ生成手段は、複数の画像ペアのそれぞれから前記ステレオマッチング手段により生成された複数の視差マップを合成することにより、合成視差マップを生成する視差マップ合成手段をさらに有する
ことを特徴とする請求項5または6に記載の画像処理装置。 - 前記修正手段は、前記合成視差マップ、または、前記合成視差マップから変換されたデプスマップを修正する
ことを特徴とする請求項7に記載の画像処理装置。 - 前記視差予測手段は、複数の予測視差を生成し、
前記設定手段は、前記複数の予測視差を合成した合成予測視差を、前記複数の画像ペアの探索範囲の設定に用いる
ことを特徴とする請求項7または8に記載の画像処理装置。 - 前記対象物にパターン光を投影せずに撮影された画像は、前記対象物に均一光を投影して撮影された画像である
ことを特徴とする請求項1~9のうちいずれか1項に記載の画像処理装置。 - パターン光を投影する第1投光部、および、1つ以上のカメラを少なくとも有するセンサユニットと、
前記センサユニットから取り込まれる画像を用いて処理を行う、請求項1~10のうちいずれか1項に記載の画像処理装置と、
を有することを特徴とする3次元計測システム。 - コンピュータを、請求項1~10のうちいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。
- 対象物にパターン光を投影して撮影された画像を用いて、各画素に奥行距離に関する情報が関連付けられたデータであるマップを生成するステップと、
前記対象物にパターン光を投影せずに撮影された画像を用いて、前記対象物のエッジを検出するステップと、
奥行距離が不連続となる位置が前記対象物のエッジの位置に合致するように、前記検出されたエッジに基づいて前記マップを修正するステップと、
を有することを特徴とする画像処理方法。
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP19944896.0A EP4009274A4 (en) | 2019-09-10 | 2019-09-10 | IMAGE PROCESSING DEVICE, THREE-DIMENSIONAL MEASUREMENT SYSTEM, AND IMAGE PROCESSING METHOD |
| US17/638,536 US12125226B2 (en) | 2019-09-10 | 2019-09-10 | Image processing device, three-dimensional measurement system, and image processing method |
| PCT/JP2019/035512 WO2021048917A1 (ja) | 2019-09-10 | 2019-09-10 | 画像処理装置、3次元計測システム、画像処理方法 |
| JP2021545002A JP7184203B2 (ja) | 2019-09-10 | 2019-09-10 | 画像処理装置、3次元計測システム、画像処理方法 |
| CN201980099847.0A CN114341940A (zh) | 2019-09-10 | 2019-09-10 | 图像处理装置、三维测量系统、图像处理方法 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2019/035512 WO2021048917A1 (ja) | 2019-09-10 | 2019-09-10 | 画像処理装置、3次元計測システム、画像処理方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021048917A1 true WO2021048917A1 (ja) | 2021-03-18 |
Family
ID=74866262
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2019/035512 Ceased WO2021048917A1 (ja) | 2019-09-10 | 2019-09-10 | 画像処理装置、3次元計測システム、画像処理方法 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US12125226B2 (ja) |
| EP (1) | EP4009274A4 (ja) |
| JP (1) | JP7184203B2 (ja) |
| CN (1) | CN114341940A (ja) |
| WO (1) | WO2021048917A1 (ja) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7298562B2 (ja) * | 2020-07-20 | 2023-06-27 | トヨタ自動車株式会社 | 車両の周辺検知装置 |
| US20220044192A1 (en) * | 2020-08-04 | 2022-02-10 | Transportation | Warehouse Optimization SaaS LLC | Managing automated guidance and validation of stacking items to handling units |
| US11979661B1 (en) * | 2022-11-07 | 2024-05-07 | Himax Technologies Limited | Method for performing light shaping with aid of adaptive projector, and associated apparatus |
| CN117437288B (zh) * | 2023-12-19 | 2024-05-03 | 先临三维科技股份有限公司 | 摄影测量方法、装置、设备及存储介质 |
| CN120807378B (zh) * | 2025-09-15 | 2025-11-18 | 诺比侃人工智能科技(成都)股份有限公司 | 一种用于提升炫光、阴影环境下的图像处理方法 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015035658A (ja) * | 2013-08-07 | 2015-02-19 | キヤノン株式会社 | 画像処理装置、画像処理方法、および撮像装置 |
| JP2019502295A (ja) * | 2015-11-09 | 2019-01-24 | ヴァーシテック・リミテッドVersitech Limited | アーチファクトを意識したビュー合成のための補助データ |
| JP2019138822A (ja) * | 2018-02-14 | 2019-08-22 | オムロン株式会社 | 3次元計測システム及び3次元計測方法 |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8538166B2 (en) * | 2006-11-21 | 2013-09-17 | Mantisvision Ltd. | 3D geometric modeling and 3D video content creation |
| JP5160643B2 (ja) * | 2007-07-12 | 2013-03-13 | トムソン ライセンシング | 2次元画像からの3次元オブジェクト認識システム及び方法 |
| JP6234401B2 (ja) * | 2013-03-05 | 2017-11-22 | キヤノン株式会社 | 画像処理装置、撮像装置、画像処理方法、及びプログラム |
| US9582888B2 (en) * | 2014-06-19 | 2017-02-28 | Qualcomm Incorporated | Structured light three-dimensional (3D) depth map based on content filtering |
| CN104634276B (zh) * | 2015-02-12 | 2018-08-07 | 上海图漾信息科技有限公司 | 三维测量系统、拍摄设备和方法、深度计算方法和设备 |
| CN105517677B (zh) * | 2015-05-06 | 2018-10-12 | 北京大学深圳研究生院 | 深度图/视差图的后处理方法和装置 |
| KR102550931B1 (ko) * | 2016-11-29 | 2023-07-04 | 삼성전자주식회사 | 스테레오 매칭 방법 및 장치 |
| US20190068853A1 (en) * | 2017-08-22 | 2019-02-28 | Microsoft Technology Licensing, Llc | Structured light and flood fill light illuminator |
| JP6970376B2 (ja) * | 2017-12-01 | 2021-11-24 | オムロン株式会社 | 画像処理システム、及び画像処理方法 |
-
2019
- 2019-09-10 WO PCT/JP2019/035512 patent/WO2021048917A1/ja not_active Ceased
- 2019-09-10 EP EP19944896.0A patent/EP4009274A4/en active Pending
- 2019-09-10 JP JP2021545002A patent/JP7184203B2/ja active Active
- 2019-09-10 CN CN201980099847.0A patent/CN114341940A/zh active Pending
- 2019-09-10 US US17/638,536 patent/US12125226B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015035658A (ja) * | 2013-08-07 | 2015-02-19 | キヤノン株式会社 | 画像処理装置、画像処理方法、および撮像装置 |
| JP2019502295A (ja) * | 2015-11-09 | 2019-01-24 | ヴァーシテック・リミテッドVersitech Limited | アーチファクトを意識したビュー合成のための補助データ |
| JP2019138822A (ja) * | 2018-02-14 | 2019-08-22 | オムロン株式会社 | 3次元計測システム及び3次元計測方法 |
Non-Patent Citations (2)
| Title |
|---|
| P. VUYLSTEKEA. OOSTERLINCK: "Range Image Acquisition with a Single Binary-Encoded Light Pattern", IEEE PAMI, vol. 12, no. 2, 1990, pages 148 - 164 |
| See also references of EP4009274A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2021048917A1 (ja) | 2021-03-18 |
| US20220292703A1 (en) | 2022-09-15 |
| JP7184203B2 (ja) | 2022-12-06 |
| CN114341940A (zh) | 2022-04-12 |
| US12125226B2 (en) | 2024-10-22 |
| EP4009274A4 (en) | 2023-08-02 |
| EP4009274A1 (en) | 2022-06-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7184203B2 (ja) | 画像処理装置、3次元計測システム、画像処理方法 | |
| US11486698B2 (en) | Systems and methods for estimating depth from projected texture using camera arrays | |
| US9392262B2 (en) | System and method for 3D reconstruction using multiple multi-channel cameras | |
| JP7078173B2 (ja) | 画像処理装置及び3次元計測システム | |
| CN103649674B (zh) | 测量设备以及信息处理设备 | |
| KR101892168B1 (ko) | 반사도 맵 표현을 이용한 깊이 맵 표현의 증강 | |
| CN111971525B (zh) | 用立体镜测量物体的方法和系统 | |
| US20220036118A1 (en) | Systems, methods, and media for directly recovering planar surfaces in a scene using structured light | |
| JP7168077B2 (ja) | 3次元計測システム及び3次元計測方法 | |
| WO2016181687A1 (ja) | 画像処理装置と画像処理方法およびプログラム | |
| US11348271B2 (en) | Image processing device and three-dimensional measuring system | |
| CN108592886B (zh) | 图像采集设备和图像采集方法 | |
| CN111373222A (zh) | 光投射系统 | |
| JP4337203B2 (ja) | 距離画像生成装置および距離画像生成方法、並びにプログラム提供媒体 | |
| TWI627604B (zh) | 利用差異化圖案產生深度圖的系統及方法 | |
| JP2015137897A (ja) | 距離計測装置及び距離計測方法 | |
| TW202034024A (zh) | 結構光校正系統 | |
| WO2025134472A1 (ja) | 機械学習装置および推論装置 | |
| Dai et al. | Informal Technical Report Current Status of Avatar Project and Potential Improvement Directions |
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: 19944896 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2021545002 Country of ref document: JP |
|
| ENP | Entry into the national phase |
Ref document number: 2019944896 Country of ref document: EP Effective date: 20220301 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |