Image processing method and apparatus

Abstract: An image processing method according to an embodiment of the present invention has the following steps: the multi-viewpoint image input step for inputting images obtained from a plurality of viewpoint positions arranged on different straight lines, the detection step (2, 7, 17, 8) for detecting a viewpoint position and its view direction in which a user is seeing at the viewpoint position, and the image generation step (11, 12, 13, 8) for generating a virtual image viewed from the predetermined viewpoint by using the images input in the multi-viewpoint image input step on the basis of the detected predetermined viewpoint position and the view direction. In the image generation step, optimal corresponding points are obtained by detecting a straight line having a width on an epipolar plane image corresponding to the input images, thereby generating an image.

Description: The present invention relates to an image processing method and apparatus and, more particularly, to an image processing apparatus and method which interpolates images obtained by a plurality of image sensing means (e.g., cameras) to generate an image viewed from a viewpoint different from the viewpoints of the image sensing means. As an apparatus for stereoscopically displaying images viewed from a plurality of viewpoints, a stereo display, a lenticular display, and the like are available. The above stereo display is designed to alternately display images obtained by two cameras upon high-speed switching. An observer can observe a stereoscopic image by using shutter glasses or polarization glasses which are synchronized with this high-speed switching operation. In the lenticular display, for example, images A, B, C, and D obtained by four cameras are arranged in units of pixels, as shown in Fig. 1, provided that the pixel position (1,1) of the first image A is expressed as A (1,1). A sheet called a lenticular sheet obtained by arranging a large number of semicylindrical lenses is bonded to a front surface to allow stereoscopic expression of images viewed from four viewpoints. In the above conventional apparatus, however, only stereoscopic images in the directions in which the cameras are aimed can be observed. That is, in the stereo display, when an object is photographed while the two cameras are fixed, the observer always sees the same image even if the observer moves his/her viewpoint In contrast to this, in the lenticular display, the observer can move his/her viewpoint in the lateral direction. However, the observer can only see images viewed from some of the cameras at intervals. That is, the viewpoint of the observer cannot be continuously moved in the lateral direction or in a space (i.e., the viewpoint cannot be moved to an arbitrary position in a space to aim the viewpoint in an arbitrary direction) GB-A-2244621 discloses a method of machine vision stereo matching in which corresponding points in at least two different images of a scene are matched by the use of epipolar lines. A point in one image is selected and the position of the resulting epipolar line is calculated using matrices defining parameters associated with the capturing of the image. The epipolar line is used to identify points in another image as potential matches to the selected point. Further constraints are applied to the identified points to find the one point which most likely matches the selected point. US 4,654,872 discloses a system for recognizing a three-dimensional object. Images of the object are recorded from at least three directions and feature points are extracted from each of at least three images. Two sets of feature points on epipolar lines are formed. A set of feature points is selected which satisfy a restricting condition determined by the relationship of the imaging directions. Based on the positions of the feature points in the images, the positions of the corresponding feature points on the object are calculated and used to recognize the shape, size, position of the object. The present invention has been made in consideration of the above. According to the present invention, there is provided a method of processing data as set out in claim 1. The present invention also provides a method of processing data as set out in claim 2. The present invention also provides an apparatus for processing data as set out in claim 5. The present invention also provides an apparatus for processing data as set out in claim 6. The present invention also provides a computer program product as set out in claim 9. The present invention further provides a computer program product as set out in claim 10. Optional features are set out in claims 3, 4, 7, 8 and 11. Embodiments of the present invention provide an image processing apparatus and method which can accurately generate interpolated images in the image interpolation processing. Embodiments will be described in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof: Fig. 1 is a perspective view for explaining a lenticular lens display; Fig. 2 is a view showing a sequence of inter-viewpoint interpolation processing by way of background explanation; Fig. 3 is a block diagram showing the hardware arrangement of an image processing apparatus according to an embodiment of the present invention; Fig. 4 is a flow chart showing a procedure for image processing including image interpolation processing in an embodiment; Fig. 5 is a view showing the calculation principle of a corresponding point search range from photographic parameters in step S122; Fig. 6 is a flow chart showing a sequence of corresponding point search processing in step S123; Fig. 7 is a view of a format showing the jth epipolar plane image; Fig. 8 is a flow chart showing a sequence of straight line detection in step S123; Fig. 9 is a view for explaining an interpolation processing algorithm; Fig. 10 is a view for explaining the interpolation processing algorithm; and Fig. 11 is a view for explaining the interpolation processing algorithm. BACKGROUND By way of background explanation, a method will be described of using an epipolar plane image (to be referred to as an EPI hereinafter) as a method of using a plurality of images photographed from a plurality of viewpoint positions to generate images viewed from positions different from the respective photographing positions. In this method, as shown in Fig. 2, lines (101a, 102a, 103a, 104a) in the respective images (101, 102, 103, 104) at the same position are extracted and synthesized into one image (2000). Straight line detection is then performed on this EPI, and interpolation processing is performed to obtain interpolated lines (101a', 102a', 103a'), thereby obtaining points (corresponding points) corresponding to target points. From each corresponding point, an image viewed from a position different from a photographing position is obtained. In such a method, a sequence of points forming a straight line on an EPI as discrete data is regarded as corresponding points. For this reason, if, for example, straight lines of the same color appear at equal intervals on an EPI to form a stripped pattern, or thin lines are present in a uniform area, a sequence of points which is not regarded as corresponding points may be mistakenly detected as a straight line. An image therefore is constructed on the basis of information including the erroneous corresponding points, resulting in synthesizing a distorted image, e.g., an image whose forward/backward positional relationship is reversed, or an image having a distorted pattern. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described in detail in accordance with accompanying drawings. Figure 3 exemplifies the hardware arrangement in which four cameras are used as the image input units for executing the image processing in an embodiment. Reference numerals 1020 to 1023 denote image input units such as cameras; 1024, an input port; 1025, a CPU; 1026, a RAM; 1027, a ROM; 1028, a disk I/O port; 1029, a hard disk; 1030, a VRAM; 1031, a video signal output I/F; and 1032, a lenticular display. In this embodiment, the four cameras are used. However, the number of cameras is not limited to four but may be any number. Image processing programs are stored in the RAM 1026 or ROM 1027. The CPU reads out, interprets, and executes these programs. Note that these programs may be stored in the hard disk 1029, and may be loaded into the RAM 1026, as needed, to be executed. A method according to this embodiment of the present invention allows proper correction processing even if a photographed image includes distortion, offset, or noise. This method will be mainly described below. Fig. 4 is a flow chart showing a sequence of processing in this embodiment. In step S121, original images input from image input units 1020 to 1023 such as cameras in the system shown in Figure 3 are subjected to geometric correction processing for, e.g, the chromatic aberration and distortion of each lens, an offset from each optical axis, and the posture/position of each camera, and correction processing for the sensitivity irregularity of a CCD sensor and the like. If correction data are calibrated and stored in a ROM 1027 and a RAM 1026 (Figure 3) in advance, such correction processing can be performed at a high speed by referring to tables in these memories. In addition, if these correction data are obtained before each image input operation is performed, accurate correction can be realized. This correction processing is completed, the flow advances to step S122 to determine a corresponding point search range (to be described later) from photographic parameters. The flow then advances to step S123 to search for corresponding points between the respective images by using the determination result. When the corresponding point search processing is completed, the flow advances to step S124 to perform image interpolation processing. Thereafter, in step S125, the input images having undergone correction and the interpolated images are displayed on a lenticular display 1. The processing in each step will be described in detail next. The corresponding point search range calculation processing (step S122) will be described first with reference to Fig. 5. Fig. 5 the calculation principle for a corresponding point search range. Referring to Fig. 5, reference numeral 101 denotes a plane at the rear end of a space to be photographed; 102, a photographic space Ω; 103, a plane at the front end of the space to be photographed; 104, a distance to the plane at the rear end of the space to be photographed; 105, a distance (Lf) to the plane at the front end of the space to be photographed; 106, an angle α defined by a vertical line extending from a photographing position P1 (108) to a sensing plane and a straight line extending from a photographing position P2 (110), separated from the photographing position P1 by a distance d (109), to an object a (112) on the plane at the front end of the photographic space Ω; 107, an angle β defined by a straight line extending to an object b (113) on the plane 101 at the rear end of the photographic space Ω and a vertical line extending from the viewpoint position P1; and 111, a focal length f. Reference symbols a' (114) and b' (115) respectively denote the positions of the object a (112) and the object b (113) on the sensing plane. The distance between the positions a' and b' in an image plane as a corresponding point search range is obtained in accordance with the geometric pattern in Fig.5. A distance d1 (the distance between a position, on the sensing plane, which corresponds to an object point and a position where the sensing plane and the optical axis intersect) to the object a (112) at the front end of the photographic space Ω on the sensing plane at each of the photographing positions P1 (108) and P2 (110) is obtained. The distance d1 can be obtained by the following equation according to Fig. 5: d1 = f/tanα = f/(d/Lf) Similarly, a distance to the object (113) at the rear end of the photographic space Ω at each of the viewpoint positions P1 (108) and P2 (110) is obtained: d2 = f/tanß = f/(d/Le) As described above, the corresponding point search range may be changed within the interval between d1 to d2 which corresponds to the inclination range of straight line search as corresponding point search. A search pitch s in the interval between d1 and d2 can be set from the number (N) of cameras according to the following equation: s = 1/N Corresponding point search processing (step S123) based on the obtained corresponding point search parameters will be described next with reference to Fig. 6. Fig. 6 is a flow chart showing the corresponding point search processing in step S123 described above. In step S131, initialization is performed to set a target raster to the first raster of each image. In step S132, the target raster of each image (each raster is parallel to an epipolar plane) is stored in a work memory to virtually form the jth epipolar plane image (EPI). In this case, as shown in Fig. 7, the jth EPI is a set of points EPj(x,i), on an image plane, which satisfy EPj(x,i) = Ni(x,j) where Ni(x,j) is the xth pixel value on the jth raster of the ith image (i = 1 to 4), i.e., the value of a pixel, of the ith image, which is indicated by coordinates (x,j). If image input units such as cameras are arranged parallel at equal intervals, all corresponding points are arranged on a straight line on this EPI. For this reason, corresponding points can be detected by detecting a straight line on the EPI in step S133. In addition, image interpolation may be performed on the detected straight line. In step S124, therefore, corresponding points are calculated from the obtained straight line and stored. Since the detected straight line directly affects the image quality, more accurate corresponding points are preferentially detected in the corresponding point search processing in step S123. In this case, a straight line having a width is defined as an array of straight lines having the same inclination, and detection of a straight line having a width indicates detection of a parallelogram area in which each straight line satisfies a straight line determination condition. For example, four parallel straight lines constitute a straight line having a width of 4. As the width of a straight line increases, the possibility of accurate corresponding points becomes higher. Such a straight line therefore is preferentially detected as corresponding points. For example, a priority is given to a correspondence relationship detected by straight line detection of a straight line having a width of 4 over that detected by straight line detection of a straight line having a width of 2. The algorithm will be described in detail below with reference to the flow chart in Fig. 8. In step S150, search straight line width W = h is set. If the initial value of the search straight line width is excessively large, the processing cannot be completed within a reasonable calculation time. For this reason, for example, h = 8 is set. In step S151, priority order n = 1 and target pixel line r = 1 are set. In step S152, assume that EPj(x,r) is set as a target pixel, that the value range of m as the distance from the target pixel which corresponds to the inclination of each straight line is set as m = d1 to d2, and that the value range of x of the target pixel is set as x = 1 to nx where nx is the size on the sensing plane in the main scanning direction. In this case, all values m which correspond to the inclinations of straight lines and satisfy the following equation are obtained,.and the number of detected straight lines is stored as L: Since m is changed at the search pitch s set in step S122, it may take a real number value. Although equation (5) represents a case wherein straight lines are obtained from the value range of i from 1 to 4, i.e., four images, it is apparent that straight lines may be obtained from five or more images, i.e., the value range exceeding the range of i from 1 to 4. In the above equation, the value of x + w + m x (i - r) is rounded to determine a corresponding x-coordinate. TH2 is a threshold for corresponding points. This threshold TH2 may be 1200 x W. This threshold "1200 x W" is based on three calculations of differences because of the four-line epipolar plane EPI. If, therefore, the respective difference values are 20 or less, 3 x 20 2 = 1200 is set on the assumption that corresponding points are almost equal in color, and the resultant value is multiplied by the width W of the parallelogram. That is, 1200 x W is set. In the above method, when a pixel value is based on R, G, and B signals of the three primary colors, the above operation is performed for each signal. However, this method can cope with a case wherein a pixel value is converted into a value in various colorimetric system such as YIQ or HSI, and thresholds suitable for the respective colorimetric systems can be used. If EPj(x+w+mx(i-r),i) is not present, it is checked whether the straight line determination condition is satisfied between the target point EPj(x,r) and EPj(x+mx(i-2),r-1). If the condition is satisfied, a parallelogram area is detected. If the condition is not satisfied, it is determined that no corresponding points with this inclination m are present, and the processing is continued. In step S153, corresponding points of the priority order n are obtained from the straight lines having the inclination m which are obtained in steps S151 and S152, and the search straight line width h and the colors of the straight lines (an array of h types of colors when detection is performed with the width h) are stored in the memory. The processing in steps S152 and S153 is regarded as one cycle. This cycle is repeated until it is determined in step S154 that the number of unprocessed pixels does not decrease. In this case, the value of the priority order n is incremented by one in step S155. If, however, EPj(x+mx(i-r),i) has already been processed in step S155, the processing is continued while EPj(x+mx(i-r),i) - EPj(x,r) = 0. If the number of unprocessed pixels does not decreased even after the processing in steps S152 to S154, the flow advances to step S157 to add one to the target line, and the same processing as that in steps S152 to S155 is performed with EPj(x,r+1) being set as a target pixel. Note that x = 1 to nx. If it is determined in step S156 that the last line is processed, the search straight line width is decreased by ΔW in step S159. Thereafter, the processing in steps S151 to S157 is performed. If it is determined in step S158 that the search straight line width is smaller than one, the corresponding point search processing is ended. Subsequently, in step S135 in Fig.6, one is added to the value of a raster j, and then the processing of steps S132 to S134 is performed in the same manner as described above. If it is determined in step S136 that the last raster is processed, the corresponding point search processing is ended. With the above processing, corresponding points which cannot be obtained from two images can be detected, and occlusion and the like can be properly processed. For this reason, the corresponding point search precision can be improved. In addition, the frequency of detection of erroneous corresponding points can be decreased by preferentially detecting straight lines having larger widths. In the method of detecting a straight line having a width of 1, in a monochrome parallelogram, several straight lines are detected per target point, resulting in an excessive calculation time. In the method of this embodiment, detection can be performed by search processing with respect to one target point. Therefore, the calculation time can be shortened, and the memory area for storing straight line data can be reduced. The flow advances to step S124 in Fig. 4 to perform image interpolation processing. The image interpolation processing is performed by using the corresponding points obtained in step S123. An algorithm for this processing will be described in detail below with reference to Figs 9 and 10. Fig. 9 shows the jth EPI. Reference symbols a , b, and c respectively denote pixel values. The area enclosed with the thick solid line represents a portion detected as a parallelogram area having a width of 5, and the area enclosed with the thick dotted line represents a portion detected as a parallelogram area having a width of 3. A case wherein n images are interpolated between input images at equal intervals will be described. For the sake of descriptive convenience, n = 2. Consider the jth EPI. As shown in Fig. 10 two lines may be interpolated between the respective lines of the EPI. As the pixel value of an interpolated line on a straight line connecting corresponding points of an original image, the average value of the corresponding points on the straight line may be set. For this purpose, the following processing B1 to B4 is performed. B1. Consider a straight line connecting corresponding points of priority order 1. The pixel value of an interpolated line on this straight line is set to the average value of the pixel values of the original image on the straight line. If, however, the corresponding points are detected as a straight line (parallelogram area) having a width, a plurality of straight lines are processed together. The parallelogram area having a width of 5 in Fig. 9 is regarded as five parallel straight lines "cccaa" or a straight line having a width of five pixels. As shown in Fig. 10, therefore, in interpolating a parallelogram area, an intersecting portion between interpolated lines and a parallelogram is filled with an array of average values (cccaa in this case) of the straight lines constituting the parallelogram area. B2. When the processing of the corresponding points of priority order 1 is completed, processing of corresponding points of priority order 2 is performed. Although this processing is basically the same as that of B1, pixels which have been interpolated in the processing of B1 are not processed. B3. When the processing of the corresponding points of priority order 2 is completed, processing of corresponding points of priority order 3 is started. Similar to the processing of B2, pixels having undergone interpolation processing are not processed. Subsequently, processing is performed up to corresponding points of the last priority order in the same manner as described above. B4. With regard to pixels which are not interpolated even after the processing of B1 to B3, interpolation is performed from neighboring pixels. The methods for this processing include a method of using the average value of the neighboring pixel values, and a method of directly using the value of the nearest pixel. B5. The processing of B1 to B4 is performed for j = 1 to ny, and an interpolated image is obtained by using j2, j3, j5, j6, j8, and j9. In this case, as shown in Fig. 10 the lines interpolated by the processing of B1 to B4 are respectively represented by j2, j3, j5, j6, j8, and j9. For example, interpolated image 2 can be constructed by arranging the interpolated lines j2 (j = 1 to ny), as shown in Fig.11. The same processing is performed for interpolated images 3, 5, 6, 8, and 9. By generating an interpolated image from many input images using the above arrangement and method, corresponding points which cannot be obtained from two images can be detected. The interpolation precision therefore can be improved. Since search parameters using photographing parameters can be automatically determined even in corresponding point search processing, the search processing can be performed at a high speed. In addition, since corresponding points are obtained from many images, the problem of occlusion can be solved, as described above. Furthermore, since the correspondence relationship between pixels at the respective viewpoints is preferentially detected by matching of patterns including adjacent pixels instead of matching in units of pixels, more accurate corresponding point detection can be realized, thereby suppressing a deterioration in the image quality of an image formed by interpolation. The above description has been made without considering the vertical disparity. However, an image can also be generated in consideration of the vertical disparity in the following manner. Multi-viewpoint images photographed from photographing viewpoints arranged at large intervals on a plane in the form of a lattice are held. These multi-viewpoint images are subjected first to inter-viewpoint interpolation in the lateral direction. Inter-viewpoint interpolation is then performed in the vertical direction. As has been described above, in an embodiment, images photographed from a plurality of positions are input, and the input multi-viewpoint image data is decomposed into an EPI. A straight line is detected on the basis of the width of a straight line on this EPI, and corresponding points between images are detected from this straight line. An image which should be obtained by performing a photographing operation from a different position is generated by using the detected corresponding points. With this arrangement, even in a case wherein the forward/backward relationship of images of an object is reversed, or a fine pattern is distorted as in the prior art, an interpolated image can be generated with high precision. According to the embodiment, by automatically determining corresponding search parameters, the speed of interpolation processing can be increased by detection of a straight line having a width. In addition, images corresponding to movement of the viewpoint in the back-and-forth direction are constructed by using many images obtained by interpolation processing and multi-viewpoint images which are photographed while the viewpoint is moved at sufficiently small intervals, thereby allowing movement of the viewpoint in the back-and-forth direction, which cannot be handled by the prior art. Embodiments may comprise a system constituted by a plurality of devices or an apparatus comprising a signal device. Furthermore, embodiments may comprise a program for supplying to a system or apparatus, for example, a storage medium, storing a program. The system or apparatus installed with the program read from the medium realizes the functions according to the invention.

Claims: A method of processing data defining a plurality of images of an object recorded at mutually different view point positions on a straight line to generate data from which an image of the object from a new view point position can be generated, characterised by : combining image data from respective input images of an object recorded at different view point positions on a straight line to give combined image data in a two-dimensional coordinate space by arranging a respective line of pixels from the same raster position in each input image as parallel lines of pixels in the two-dimensional coordinate space with each line of pixels in the two-dimensional coordinate space having a position relative to the other lines therein depending on the view point position at which the image from which it was taken was recorded; and searching the combined image data in the two-dimensional coordinate space to identify mutually corresponding pixels which represent the same part of the object, the search being carried out to identify corresponding pixels lying on adjacent parallel straight lines forming parallelogram areas of different widths in the two-dimensional coordinate space. A method of processing data defining pixels in a plurality of parallelogram areas of different widths in a two-dimensional coordinate space containing pixel data from respective images of an object recorded at mutually different view point positions on a straight line such that a respective line of pixels from the same raster position in each input image are arranged as parallel lines in the two-dimensional coordinate space with each line of pixels in the two-dimensional coordinate space having a position relative to the other lines therein depending on the view point position at which the image from which it was taken was recorded, each parallelogram area containing corresponding pixels lying on adjacent parallel straight lines within the two-dimensional coordinate space, to generate image data for an image of the object from a different view point position, comprising interpolating the pixel data of corresponding pixels in dependence upon the parallelogram areas in which the pixels lie to generate interpolated pixel data for display in the image from the new view point position. A method according to claim 2, wherein mutually corresponding pixels within a parallelogram area of wider width are selected in preference to mutually corresponding pixels in a parallelogram area of narrower width as the corresponding pixels to be used to generate the image data for the image of the object from the different view point position. A method according to any preceding claim, wherein data is received for images recorded at different view point positions on a plurality of straight lines which form a lattice on a plane, and wherein data for images recorded on one of the straight lines in the lattice is selected for processing. Apparatus for processing data defining a plurality of images of an object recorded at mutually different view point positions on a straight line to generate data from which an image of the object from a new view point position can be generated, characterised by : means for combining image data from respective input images of an object recorded at different view point positions on a straight line to give combined image data in a two-dimensional coordinate space by arranging a respective line of pixels from the same raster position in each input image as parallel lines of pixels in the two-dimensional coordinate space with each line of pixels in the two-dimensional coordinate space having a position relative to the other lines therein depending on the view point position at which the image from which it was taken was recorded; and search means for searching the combined image data in the two-dimensional coordinate space to identify mutually corresponding pixels which represent the same part of the object, the search means being arranged to carry out the search by identifying corresponding pixels lying on adjacent parallel straight lines defining parallelogram areas of different widths in the two-dimensional coordinate·space. Apparatus for processing data defining pixels in a plurality of parallelogram areas of different widths in a two-dimensional coordinate space containing pixel data from respective images of an object recorded at mutually different view point positions on a straight line such that a respective line of pixels from the same raster position in each input image are arranged as parallel lines in the two-dimensional coordinate space with each line of pixels in the two-dimensional coordinate space having a position relative to the other lines therein depending on the view point position at which the image from which is was taken was recorded, each parallelogram area containing corresponding pixels lying on adjacent parallel straight lines within the two-dimensional coordinate space, to generate image data for an image of the object from a different view point position, comprising means for interpolating the pixel data of corresponding pixels in dependence upon the parallelogram areas in which the pixels lie to generate interpolated pixel data for display in the image from the new view point position. Apparatus according to claim 6, wherein the apparatus is arranged to select mutually corresponding pixels within a parallelogram area of wider width in preference to mutually corresponding pixels in a parallelogram area of narrower width as the corresponding pixels to be used to generate the image data for the image of the object from the different view point position. Apparatus according to any of claims 5 to 7, operable to receive data for images recorded at different view point positions on a plurality of straight lines which form a lattice on a plane, and to select data for images recorded on one of the straight lines in the lattice for processing. A computer program product comprising instructions for causing a programmable processing apparatus to become operable to perform a method as set out in claim 1. A computer program product comprising instructions for causing a programmable processing apparatus to become operate to perform a method as set out in at least one of claims 2 to 4. A computer program product according to claim 9 or claim 10 when embodied as a data storage device storing the instructions.

Inventors: KATAYAMA AKIHIRO, ONO EITA, SATO HIROAKI, TANAKA KOICHIRO, URISAKA SHINYA, KATAYAMA, AKIHIRO, ONO, EITA, SATO, HIROAKI, TANAKA, KOICHIRO, URISAKA, SHINYA, KATAYAMA, AKIHIRO, C/O CANON K.K., ONO, EITA, C/O CANON K.K., SATO, HIROAKI, C/O CANON K.K., TANAKA, KOICHIRO, C/O CANON K.K., Urisaka, Shinya, c/o Canon K.K.
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1995
Main classification: G06T15
IPC codes: G06T15