Image processing method and apparatus therefor

Abstract: In order to obtain a field angle wider than that determined by a lens of a photographing apparatus by means of image processing, a given image is selected as a reference image from a still image train acquired by photographing an object by time-serially changing the visual point position and direction, a procedure for coordinate-transforming specific points in the respective images onto a two-dimensional coordinate system identical to that of the reference image is derived, a two-dimensional space is Voronoi-divided in correspondence with the specific points based on the derived procedure, the respective images are coordinate-transformed using a coordinate transform procedure for transforming the respective images to the reference images, and the coordinate information of each of the coordinate-transformed images is inserted in one of the Voronoi domains including the specific points of the respective images. In order to provide a rearranging method of the form and external pattern in a three-dimensional scene, and an apparatus therefor, which can easily create a geometric form model on the basis of, e.g., photographs of a building without measuring the heights and widths of walls of an actual building using a tape measure or the like, a three-dimensional form is rearranged on the basis of a group of a plurality of images obtained by photographing a three-dimensional space from a plurality of visual points, an external pattern of a form area, which is exactly or roughly equal to a uniform plane, is produced, and the external pattern is stored in correspondence with the designated area and position of the three-dimensional form.

Description: The present invention relates to an image processing method and an apparatus therefor and, more particularly, to a technique suitably used for an image processing method and an apparatus therefor, which can acquire an image with a sufficiently wide field angle as compared to the field angle of the photographing apparatus used in the photographing operation. Also, the present invention relates to a method of rearranging the form and external pattern of an object in a three-dimensional scene and an apparatus therefor. As an image input apparatus for inputting an image with a sufficiently wide field angle, an image input apparatus which photographs and inputs an image using a lens having a wide field angle such as a fisheye lens is known. Since the fisheye lens has a very wide field angle, the image input apparatus using it can input an image with a very wide field angle. However, the image input apparatus using the conventional technique cannot acquire an image having a field angle larger than that determined by the fisheye lens even when a lens with a wide field angle such as a fisheye lens is used. When the form and external pattern of an object in a three-dimensional scene (e.g., in a room) are to be three-dimensionally rearranged, a geometric model is created by one of various methods: (1) a method of using a geometric form model obtained by modelling a geometric form using a CAD; (2) a method of creating a geometric form model by inputting the geometric form on the basis of numerical value data of a design drawing; (3) a method of creating a geometric form model by obtaining numerical values by measuring the heights and widths of walls in an actual room using, e.g., a tape measure; and the like. Meanwhile, a pattern image is separately prepared as a pattern on the surface of the form model. Then, a three-dimensional space is constructed by the texture mapping technique. As the pattern image to be separately prepared, an actually photographed image, an image created by the computer graphics technique, and the like may be used. However, in the conventional method, when no numerical value data such as a design drawing are available, or when no form model data created by the CAD is available, the heights and widths of walls of an actual building must be measured using, e.g., a tape measure, and a geometric form model cannot be easily created based on a photograph of the building without such cumbersome works. It is a concern of the present invention to obtain an image with a wider field angle than that determined by a lens of a photographing apparatus in consideration of the above-mentioned problems. It is another concern of the present invention to provide a method of rearranging the form and external pattern of an object in a three-dimensional scene and an apparatus therefor, which allow to easily create a geometric form model on the basis of, e.g., a photograph of a building without requiring any measurement of the heights and widths of walls of an actual building, in consideration of the above-mentioned problems. In accordance with the present invention there is provided an image processing method as set out in claim 1. According to another aspect of the present invention there is provided image processing apparatus according to claim 13. In order that the present invention may be more readily understood embodiments thereof will now be described by way of example and with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig 1 is a schematic functional diagram showing the arrangement of an image processing apparatus of the present invention; Fig 2 is a block diagram showing an example of the image processing apparatus of the present invention; Fig. 3 is a flow chart showing the flow of the processing of an image processing apparatus according to the first embodiment of the present invention; Fig. 4 is a flow chart showing the flow of the processing of an image processing apparatus according to the first embodiment of the present invention; Fig. 5 is a view showing the photographing state of a still image train, and the still image train acquired by the photographing operation; Fig. 6 is a view showing the designating state of corresponding points between adjoining images in the still image train; Fig. 7 is a view showing the Voronoi division state of a predetermined space; Fig. 8 is a view showing the image production state; Fig. 9 is a block diagram showing the arrangement of an image processing apparatus according to the sixth embodiment of the present invention; Fig. 10 is a flow chart showing the flow of the overall processing of the sixth embodiment; Fig. 11 which is composed of Figs. 11A and 11B is a flow chart showing the flow of the processing in step S222 of the sixth embodiment; Fig. 12 is a view showing a straight line, half line, and line segment appearing in a photographing image; Fig. 13 is a view for helping explanation of a calculation formula of vanishing points; Fig. 14 is a flow chart showing the flow of the processing in step S223 in Fig. 10; Fig. 15 is a flow chart showing the flow of the processing in step S604 in Fig. 14; Fig. 16 is a view showing an example of geometric transformation of a texture; and Fig. 17 which is composed of Figs. 17A and 17B is a flow chart showing the flow of the processing in step S222 according to the seventh embodiment of the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS (a) First Embodiment: An embodiment of an image processing method and an apparatus therefor according to the present invention will be described in detail below with reference to the accompanying drawings. Fig. 1 is a functional diagram showing an example of an image processing apparatus of this embodiment. As shown in Fig. 1, the image processing apparatus of this embodiment comprises an image input unit 1, a reference image determination unit 2, a specific point selection unit 3, a first procedure derivation unit 4, a second procedure derivation unit 5, a division unit 6, a coordinate transformation unit 7, and a wide angle image production unit 8. The image input unit 1 inputs a still image train 9 obtained by photographing an image by changing the visual point position and direction in the time domain. The reference image determination unit 2 determines a given image as a reference image from the still image train input by the image input unit 1. The specific point selection unit 3 selects, as specific points, identical points in the respective photographed images constituting the still image train 9. The first procedure derivation unit 4 derives a procedure for coordinate-transforming one of adjoining images to the other image so that the specific points selected by the specific point selection unit 3 match each other between the adjoining images. The second procedure derivation unit 5 derives a procedure for coordinate-transforming the specific points transformed by the procedure derived by the first procedure derivation unit 4 onto a two-dimensional coordinate system identical to that of the reference image. The division unit 6 divides a two-dimensional space to which the reference image belongs into a plurality of domains in correspondence with the specific points transformed by the procedure derived by the second procedure derivation unit 5. The coordinate transformation unit 7 coordinate-transforms the respective images of the still image train 9 onto the two-dimensional space to which the reference image belongs. The wide angle image production unit 8 produces a single image as a whole by inserting coordinate information of each of images coordinate-transformed onto the two-dimensional space to which the reference image belongs into each of the domains divided in correspondence with the specific points of the images. Fig. 2 is a basic block diagram for explaining a detailed arrangement of the image processing apparatus of this embodiment. Referring to Fig. 2, a CPU 11 controls and processes the processing procedures executed by the respective units arranged in the image processing apparatus of this embodiment. A first memory device 12 stores programs that describe the processing procedures to be executed by the CPU 11. A second memory device 13 has a still image train memory unit d1 for storing an image train input when an image input interface unit 17 (to be described later) inputs images in accordance with the processing program stored in the first memory device 12, a sheet of large image memory unit d2 for storing a sheet of large image produced, and a work area d3 for storing intermediate calculation results, and the like. A mouse 14 serves as a position coordinate indication device which is used by an operator to indicate a point in an image. A keyboard 15 is used for instructing a data name. A window system 16 serves as a display device for confirming image data. The image input interface unit 17 fetches the still image train 9 shown in Fig. 1 into the second memory device 13. The still image train 9 is obtained in such a manner that dynamic images obtained from a dynamic image photographing device such as a video camera are A/D-converted by, e.g., a dynamic image digitizer, and the converted images are fetched as a time-serial still image train via the image input interface 17. On the other hand, a group of photographs photographed using a still image photographing device such as a silver halide camera for photographing a still image while slightly changing the visual point position are A/D-converted by, e.g., a film scanner, and the converted images are fetched as a still image train via the image input interface 17. In this manner, the still image train can be acquired by various existing methods. Fig. 5 shows the photographing state and the acquired still image train 9. In Fig. 5, a video camera 51 acquires a still image train while following a path indicated by a bold line. In addition, a bus 18 constitutes an information transmission path in the image processing apparatus of this embodiment. The operation of the image processing apparatus of this embodiment will be described below with reference to Figs. 3 and 4. Figs. 3 and 4 are flow charts showing the main flow of the respective processing operations executed using the image processing apparatus of this embodiment. In step S201, processing for storing a still image train 9, which is acquired by some method, in the still image train memory unit d1 of the second memory device 13 (Fig. 2) via the image input interface unit 17 (Fig. 2) is performed. Assume that, in step S201, still images in the input still image train 9 are given consecutive numbers, and a total of N images, i.e., first to Nth images are input. Furthermore, each image is expressed by Im i (i = 1, 2,..., N). The flow then advances to step S202, and one image Im K of these images is designated as a reference image. The designation method in step S202 is not particularly limited. For example, the first, last, or middle image may be designated, or an operator may designate an arbitrary image. Note that the images in the still image train 9 are arranged in the movement order of the visual point. For this reason, adjoining images Im i and Im i+1 (i = 1, 2,..., N-1) of the image train have a high correlation therebetween. Thus, in the next step S203, identical points photographed in adjoining images are designated from all the combinations of adjoining images as corresponding points by the position indication device such as a mouse. Fig. 6 shows this state. In step S204, a transform matrix of an affine transformation for coordinate-transforming one of adjoining images to the other image so that corresponding points match each other between the adjoining images is calculated using the corresponding points designated in step S203. Note that the affine transformation is a coordinate transformation for transforming (x, y) to (x', y') like in the following formulas: x' = b 1 x + b 2 y + b 3 , y' = b 4 x + b 5 y + b 6 This transformation can be expressed by the following matrices: Note that B in equation (1) is called the transform matrix of the affine transformation. In the case of an image Im i which is present before the reference image Im K in the image train, i.e., when i < K, an affine transform matrix M i for transforming from the image Im i to an image Im i+1 is calculated. In the case of an image Im i which is present before the reference image Im K in the image train, i.e., when i > K, an affine transform matrix M i for transforming from the image Im i to an image Im i-1 is calculated. Subsequently, in step S205, an affine transform matrix T i for transforming each image Im i to the reference image Im K is calculated using the calculated affine transform matrices M i . When i < K, T i is calculated by T i = M K-1 · ...· M i+1 · M i ; when i > K, T i is calculated by T i = M K+1 ·...· M i-1 · M i . In this manner, the affine transform matrices from the respective images to the reference image of the still image train 9 are obtained. In step S206, A which stands for a two-dimensional space R 2 is prepared. This preparation is realized by setting an area for storing two-dimensional position information in the work area d3 of the second memory device 13 (Fig. 2). In step S207, the image central point of each image Im i (i = 1, 2,..., N) of the still image train is obtained, and is set in C i . In step S208, the image central point C i is transformed by the affine transform matrix T i to calculate C i ' = T i ·C i , thus obtaining an image central point C i '. The image central point C i ' is set in the two-dimensional space A. More specifically, the point position information is stored in the two-dimensional position information memory area. In step S209, the predetermined space A is Voronoi-divided using each image central point C i ' as a generating point, as shown in Fig. 7. In this processing, the boundary lines of Voronoi division domains are stored as line segment formulas in the two-dimensional position information memory area to store each Voronoi domain as a set of line segments. The Voronoi division will be described in detail below. For example, a question about how to determine an oasis closest to a designated point P if oases O 1 ,..., O n are present at n positions of a given desert will be examined below. When all distances PO i are calculated, and a minimum value of the calculation results is obtained, the question can be solved for a time proportional to n. However, if a map which illustrates territories of O i , i.e., indicates that "O i is closest to the designated point within this range" is prepared in advance, the closest O i can be easily determined by checking a territory to which P belongs. Upon calculation of this territory, a two-dimensional Euclidean distance is used, and the map that illustrates the territories is called a Voronoi diagram. A Voronoi diagram of two points O 1 and O 2 is obtained by dropping a perpendicular bisector to a line connecting the points O 1 and O 2 . Also, a Voronoi diagram of three points O 1 , O 2 , and O 3 is obtained by dropping perpendicular bisectors from the center of a circumscribed circle of a triangle O 1 O 2 O 3 to its respective sides. In general, a Voronoi diagram for n points is obtained by O(nlogn) steps, and when a Voronoi diagram and a point P are given, a territory to which P belongs can be determined by O(logn) steps. Domain division for obtaining such Voronoi diagram is called Voronoi division, and each of the divided domains is called a Voronoi domain. In step S210, each Voronoi domain having the image central point C i ' as a generating point is designated as V i . In step S211, each image Im i is affine-transformed to calculate Im i ' = T i ·Im i , thus obtaining an image Im i '. In this case, the coordinate value of the pixel position obtained by affine-transforming each pixel is stored in the still image memory unit d1 on the memory area d1 of the second memory device 13 that stores the images Im i , thereby holding coordinate-transformed data. In this manner, the value of each image Im i ' can be substituted in the two-dimensional space satisfying V i ∩ Im i ' as needed. Furthermore, in step S212, an image G having a needed proper size corresponding to a portion of the predetermined space A is prepared. More specifically, a memory area is prepared on the work area d3 of the second memory device 13. In the initial state, the image G has no values in its pixels. In step S213, the values of Im i ' are substituted in image areas satisfying V i ∩ Im i ' on the image G, thus producing the image G. Fig. 8 is a view for explaining steps S211 and S212. With the above-mentioned processing, an image sufficiently larger than the field angle can be acquired by the image processing. (b) Second Embodiment: The second embodiment of the present invention will be described below. In the second embodiment, step S203 of designating corresponding points in the first embodiment described above is realized not by designation using a mouse by an operator but by an image processing technique (image correlation method, template matching method, multiple resolution method (coarse to fine), or the like) which is used in corresponding point retrieval processing for stereoscopic images. (c) Third Embodiment: The third embodiment of the present invention will be described below. In the third embodiment, in step S207 in the first embodiment, the central point of each image is obtained using a point of a given coordinate value on each image in place of C i as a generating point of Voronoi division. (d) Fourth Embodiment: The fourth embodiment of the present invention will be described below. In the fourth embodiment, in the Voronoi division processing in step S209 in the first embodiment, the distance calculation used upon calculations of territories uses a distance calculation method taking other elements into consideration, in place of a simple two-dimensional Euclidean distance. For example, the following methods may be used: (1) a method of calculating distance in the screen in consideration of the lens distortion of the photographing system; (2) a method of using distances which are weighted to assure a larger territory for an image with a higher resolution when both images with high and low resolutions are mixed; and (3) a method of using distances which are weighted depending on image quality when images with high and low qualities are mixed due to a change in sunshine condition and the like. (e) Fifth Embodiment: The fifth embodiment of the present invention will be described below. In the fifth embodiment, in steps S204 and S205 in the first embodiment, in place of the affine transformation, the coordinate transformation between images can use various other techniques for coordinate-transforming one two-dimensional coordinate to the other two-dimensional coordinate, for example, a projection transformation for transforming (x, y) to (x', y') like in the following formulas: x' = b 1 x + b 2 y + b 3 b 7 x + b 8 y + 1 , y' = b 4 x + b 5 y + b 6 b 7 x + b 8 y + 1 and, a pseudo affine transformation for transforming (x, y) to (x', y') like in the following formulas: x' = b 1 x + b 2 xy + b 3 y + b 4 , y' = b 5 x + b 6 xy + b 7 y + b 8 As described above, according to the above embodiments, images which have time-varying visual point positions and directions can be superposed on a two-dimensional coordinate system identical to that of a reference image such that specific points in the images match each other between adjoining images. Thus, a single wide-angle image having a wide field angle, i.e., a field angle from that of the first image to that of the last images of the input still image train can be produced. As a result, an image having a field angle larger than that determined by the lens can be obtained by the image processing. (f) Sixth Embodiment <Arrangement of Apparatus of This Embodiment> Fig. 9 is a block diagram showing the arrangement of an apparatus for realizing this embodiment. The apparatus shown in Fig. 9 comprises a calculation/control CPU 21 for controlling this apparatus, a memory device 22 which has a data memory unit for storing control programs (to be described later) and data required for calculations and control, and comprises a ROM or RAM, a pointing device 23 such as a mouse used by an operator to input commands, a keyboard 24 used for inputting data and commands, and an image display device 25 controlled by a window system in this embodiment. The apparatus also comprises an image input interface 26 for inputting image data via an image reading device such as a scanner, or a medium or communication, and a bus 27 for connecting the above-mentioned constituting elements. <Processing of Apparatus of This Embodiment> Fig. 10 is a flow chart of this embodiment. The operation sequence will be described in detail below with reference to Fig. 10. In step S221, single eye two-dimensional images such as scenes in a room are loaded. These images can be obtained by various methods such as a method of photographing a scene in a three-dimensional space such as a room from various directions and positions using a normal film type camera, and converting photographs into image data using a film scanner, a method of photographing dynamic images using, e.g., a video camera and digiterizing the dynamic images as still images, or a method of directly and electronically obtaining image data using an electronic still camera. In step S222, the form of the scene in the three-dimensional space is rearranged based on the group of images. In step S223, a three-dimensional scene is considered as a group of areas which are exactly or roughly equal to a plane, such as a wall, and the external patterns of these areas are acquired as texture images. In step S224, the positions of the texture images obtained in step S223 in the three-dimensional form obtained in step S222 are designated. Since the three-dimensional form and its external pattern are obtained in combination with the form, the rearranged three-dimensional form and its corresponding texture images are stored as external patterned geometric form data in step S225. Thereafter, the stored data can be rearranged as a patterned three-dimensional space using a conventional texture mapping technique for a three-dimensional geometric form. Steps S222, S223, and S224 will be described in more detail below. (Rearranging Procedure I: S222) The processing procedure for rearranging the form of an object in a scene in the three-dimensional space in step S222 will be described in detail below with reference to Figs. 11A and 11B. In step S301, one image is selected. In this image, an edge in an image corresponding to an edge line of the three-dimensional form of an object in a scene such as the boundary between given adjoining walls is designated by the mouse (S302). At this time, the edge is expressed as (a) a line segment when the obtained edge has two end points in the image; (b) a half line when one end point of the edge is present in the image and the other end point is an open end outside the image; or (c) a straight line when neither of the two end points are present in the image. Fig. 12 shows this example. In step S303, connection relation information and connection angle information of the line segments/half lines/straight lines obtained in step S302 are input. For example, in the case of photographing image example 1 in Fig. 12, information such as (1) line segment A and half line B are connected at their end points, and extend perpendicular to each other, (2) line segments A and C are connected at their end points, and extend perpendicular to each other, (3) half line B and line segment C are connected at their end points, and extend perpendicular to each other, and the like. On the other hand, in the case of photographing image example 2 shown in Fig. 12, for example, information indicating that only straight line D is present is input. Step S303 is repeated until the input operations of information that can be designated are completed (step S304). In step S305, it is checked if two vanishing points can be calculated from the image. Note that the two vanishing points can be calculated when the line segments/half lines/straight lines designated in step S303 include two lines which extend parallel to each other in a real space, planes defined by the two parallel lines are perpendicular to each other, and the two parallel lines are not parallel to each other on the image plane. If YES in step S305, the flow advances to step S306. In step S306, vanishing points are calculated. The vanishing point is calculated as an intersection between two straight lines on the screen. In step S307, the directional vectors of the line segments/half lines/straight lines in the image are obtained. The method in step S307 will be described in detail below. First, the focal point of a camera that photographed images is obtained. As shown in Fig. 13, when four straight lines L 1 , L 2 , L 3 , and L 4 in a three-dimensional space satisfy: L 1 ∥ L 2 , L 3 ∥ L 4 L 1 ┴ L 2 , L 3 ┴ L 4 (∥ means parallel and ┴ means perpendicular) if the intersection (vanishing point) between L 1 and L 2 is represented by v 1 and the intersection (vanishing point) between L 3 and L 4 is represented by v 2 (v 1 = (v 11 , v 12 ), v 2 = (v 21 , v 22 )), the distance between the photographing surface and the focal point position, i.e., the focal length (screen distance), c, is given by: c = (v 1 ·v 2 ) 1/2 Furthermore, if the directional vectors of L 1 , L 2 , L 3 , and L 4 are represented by D 1 , D 2 , D 3 , and D 4 , these directional vectors are respectively given by: Based on these directional vectors, the directional vectors of other line segments/half lines/straight lines are calculated by utilizing the relations of the line segments/half lines/straight lines. On the other hand, if NO in step S305, the flow skips steps S306 and S307, and advances to step S308. The processing in these steps S301 to S307 is repeated until the processing for all the images is completed (step S308). With steps S301 to S308, the forms each obtained from only a sheet of image are restored. Furthermore, in step S309, adjoining images which have neighboring photographing positions and directions of the camera are selected. In step S310, the connection relations and identities of the line segments/half lines/straight lines between the images are designated. This processing is repeated until the end of all the designations (step S311). Furthermore, the processing is repeated until the end of designations between all the combinations of adjoining images (step S312). In step S313, the form of the entire scene is obtained from the form information newly added by the processing in steps S309 to S312 on the basis of the form obtained in steps S301 to S308. (Pattern Acquisition Procedure: S223) Fig. 14 is a flow chart showing step S223 of acquiring the external pattern of an object in the three-dimensional scene as a pattern image. Step S223 will be described in more detail below with reference to Fig. 14. In step S601, a desired texture such as one wall is selected. In step S602, an image including the selected texture is selected from all the images. In step S603, it is checked if the desired texture is received in a sheet of image. If YES in step S603, the flow advances to step S605; otherwise, the flow advances to step S604. If NO in step S603, the desired texture is present across a plurality of images. For this reason, a plurality of images including the texture are united into one large image in step S604. (Synthesizing Procedure of a Plurality of Images: S604) The processing in step S604 will be described in detail below with reference to Fig. 15. First, images including the texture are arranged in the movement order of the visual point, and are given consecutive numbers to obtain a total of N images, i.e., first to Nth images (step S701). Furthermore, each image is expressed by Im i (i = 1, 2,..., N). One image Im K of these images is designated as a reference image in step S702. The designation method in step S702 is not particularly limited. For example, the first, last, or middle image may be designated, or an operator may designate an arbitrary image. Since the images are arranged in the movement order of the visual point, adjoining images Im i and Im i+1 (i = 1, 2,..., N-1) of the images have a high correlation therebetween. Thus, in the next step S703, identical points photographed in adjoining images are designated from all the combinations of adjoining images as corresponding points by the position indication device such as a mouse. Fig. 6 above shows this state. In step S704, a transform matrix of an affine transformation for coordinate-transforming one of adjoining images to the other image so that corresponding points match each other between the adjoining images is calculated using the corresponding points designated in step S703. Note that the affine transformation is a coordinate transformation for transforming (x, y) to (x', y') like in the following formulas: x' = b 1 x + b 2 y + b 3 , y' = b 4 x + b 5 y + b 6 This transformation can be expressed by the following matrices: Note that B is called the transform matrix of the affine transformation. In the case of an image Im i which is present before the reference image Im K in the image train, i.e., when i < K, an affine transform matrix M i for transforming from the image Im i to an image Im i+1 is calculated. In the case of an image Im i which is present before the reference image Im K in the image train, i.e., when i > K, an affine transform matrix M i for transforming from the image Im i to an image Im i-1 is calculated. Subsequently, in step S705, an affine transform matrix T i for transforming each image Im i to the reference image Im K is calculated using the calculated affine transform matrices M i . When i < K, T i is calculated by T i = M K-1 ·...· M i+1 · M i ; when i > K, T i is calculated by T i = M K+1 ·...· M i-1 · M i . In this manner, the affine transform matrices from the respective images to the reference image of the still image train are obtained. In step S706, A which stands for a two-dimensional space R 2 is prepared. In step S707, an image central point of each image Im i (i = 1, 2,..., N) of the still image train is obtained, and is set in C i . The image central point C i is transformed by the affine transform matrix T i to calculate C i ' = T i ·C i , thus obtaining an image central point C i '. The image central point C i ' is set in the two-dimensional space A (step S708). More specifically, the point position information is stored in a two-dimensional position information memory area. In step S709, the predetermined space A is Voronoi-divided using each image central point C i ' as a generating point, as shown in Fig. 7 above. In this processing, the boundary lines of Voronoi division domains are stored as line segment formulas in the two-dimensional position information memory area to store each Voronoi domain as a set of line segments. Each Voronoi domain having the image central point C i ' as a generating point is designated as V i (step S710). In step S711, each image Im i is affine-transformed to calculate Im i ' = T i ·Im i , thus obtaining an image Im i '. More specifically, the coordinate value of the pixel position obtained by affine-transforming each pixel is stored in the memory area of the memory device 22 that stores the images Im i , thereby holding coordinate-transformed data. In this manner, the value of each image Im i ' can be substituted in the two-dimensional space satisfying V i ∩ Im i ' as needed. Furthermore, in step S712, an image G having a needed proper size corresponding to a portion of the predetermined space A is prepared (a memory area is prepared in the memory device 22). In the initial state, the image G has no values in its pixels. In step S713, the values of Im i ' are substituted in image areas satisfying V i ∩ Im i ' on the image G, thus producing the image G. Fig. 8 above is a view for explaining steps S711 and S712. With the above-mentioned processing, one large image including the texture can be produced from the images including the texture. In step S605, a texture area is cut off from the large image including the texture. This operation is attained based on an operator's instruction using the pointing device such as a mouse. Since the surface of the texture obtained in step S605 is not normally parallel to the photographing surface in the three-dimensional space, geometric distortion is generated in the image. In order to correct this distortion, geometric transformation of the texture is performed in step S606. Fig. 16 shows this example. Note that this embodiment exemplifies only correction of geometric distortion. When a uniform shade and density are not obtained under the influence of the position and light amount of a light source, and the like, the nonuniform shade and density may be corrected. Also, when there is a portion concealed by, e.g., an obstacle, the portion may be corrected by interpolation or extrapolation. (g) Seventh Embodiment: As in the sixth embodiment, the flow of the entire processing follows Fig. 10, i.e., steps S221 to S225. Of these steps, the processing in step S222 is performed as follows. The processing in step S222 will be described in detail below with reference to Figs. 17A and 17B. (Rearranging Procedure II: S222) In step S1201, two images corresponding to adjoining visual points are selected. In these two images, an edge, commonly appearing in the two images, of those in images corresponding to the edge lines of the three-dimensional form of an object in a scene such as the boundary between given adjoining walls, and its end points are designated by the mouse (S1202). At this time, the edge is expressed as (a) a line segment when the obtained edge has two end points in the image; (b) a half line when one end point of the edge is present in the image and the other end point is an open end outside the image; or (c) a straight line when neither of the two end points are present in the image. Fig. 12 shows this example. The designated end points serve as corresponding points of the two images. In step S1203, connection relation information and connection angle information of the line segments/half lines/straight lines obtained in step S1202 are input. For example, in the case of photographing image example 1 in Fig. 12, information such as (1) line segment A and half line B are connected at their end points, and extend perpendicular to each other, (2) line segments A and C are connected at their end points, and extend perpendicular to each other, (3) half line B and line segment C are connected at their end points, and extend perpendicular to each other, and the like. On the other hand, in the case of photographing image example 2 shown in Fig. 12, for example, information indicating that only straight line D is present is input. Step S1203 is repeated until the input operations of information that can be designated are completed (step S1204). In step S1205, the three-dimensional position of corresponding points of the two images is calculated by the principle of triangulation. The processing in steps S1201 to S1205 is repeated for all the combinations of adjoining images (step S1206). Furthermore, in step S1207, images corresponding to adjoining visual points are selected. In step S1208, the connection relations and identities of the line segments/half lines/straight lines are designated between the images. This processing is repeated until the end of all the designations (step S1209). Furthermore, the processing is repeated until the end of designations between all the combinations of adjoining images (step S1210). In step S1211, the form of an object in the entire scene is obtained from the form information obtained by the processing in steps S1203 and S1208. According to this embodiment, the rearranging method for the form and external pattern of an object in a three-dimensional scene and an apparatus therefor, which can easily create a geometric form model on the basis of, e.g., photographs of a building without measuring the heights and widths of walls of an actual building using a tape measure or the like can be provided. More specifically, the problem that there is no technique for easily creating a geometric form model from, e.g., photographs of a building without performing any cumbersome operations for measuring the heights and widths of walls of an actual building using a tape measure or the like when neither numeric value data such as a design drawing nor form model data created by a CAD are available, can be solved. Note that the present invention may be applied to either a system constituted by a plurality of equipments or an apparatus consisting of a single device. Needless to say, the present invention may be applied to a case wherein the invention is attained by supplying a program to the system or apparatus. In this case, a storage medium that stores a program according to the present invention constitutes the present invention. By reading out the program from the storage medium to the system or apparatus, the system or apparatus operates in a predetermined way.

Claims: An image processing method comprising: the step of inputting a still image train obtained by photographing an object while time-serially changing the visual directions from which the object is photographed; a step of determining one image of the still image train input by the first step as a reference image; a step of selecting, as specific points, corresponding points photographed in two adjoining images forming part of the image train; a first coordinate-transforming step in which one of the adjoining images is coordinate-transformed to the other image so that the selected points of the adjoining images match each other; a second coordinate-transforming step in which the selected points transformed by the first coordinate-transforming step are coordinate transformed onto a two-dimensional coordinate system common to the two-dimensional coordinate system of the reference image; a step of dividing the two-dimensional space generated by the second coordinate-transforming step; a step of coordinate-transforming the images of the image train onto the two-dimensional space to which the reference image belongs; and a step of producing a single wide angle image by inserting coordinate information of each of the images coordinate-transformed onto the two-dimensional space to which the reference image belongs into each of the divided domains divided in correspondence with the selected points. A method according to claim 1, wherein the respective images are transformed to the reference image using the first coordinate-transforming step. A method according to claim 1 or claim 2, wherein the dividing step is carried out using a Voronoi dividing procedure on the basis of the selected points the coordinates of which have been transformed to the two-dimensional coordinate system of the reference image. A method according to claim 3, wherein the distances used when calculating the territories of the respective divided domains using the Voronoi are two-dimensional Euclidean distances. A method according to claim 3, wherein the distances used when calculating the territories of the respective divided domains using the Voronoi procedure are distances derived from a calculation formula taking elements other than a two-dimensional Euclidean distance into consideration. A method according to any one of the preceding claims wherein the image train is input from a single-eye camera generating two dimensional images. A method according to claim 3 for three-dimensionally rearranging the shape and external pattern of an object in a three-dimensional scene wherein the object photographed is a three-dimensional space photographed from a plurality of visual points; producing an external pattern of the form area, which is exactly or substantially equal to a uniform plane from one or a plurality of images of the group of the plurality of images; designating an area and position corresponding to the external pattern of the three-dimensional form; and storing the external pattern in correspondence with the designated area and position of the three-dimensional form. A method according to claim 7, wherein the step of rearranging the three-dimensional form comprises the steps of: extracting or designating edge lines in a three-dimensional structure from the respective images; designating connection relation information and connection angle information of edge lines obtained from known structural information in association with each of the designated edge lines in the respective images; restoring three-dimensional form information on the basis of the connection relation information and the connection angle information designated in the step of designating the connection relation information and the connection angle information; designating connection relation information of the edge lines on the basis of known structural information between a plurality of images; and uniting the restoration results between the plurality of images on the basis of the connection relation information designated in the step of designating the connection relation information, and restoring a form of a portion, which cannot be restored, on the basis of the connection relation information between the plurality of images. A method according to claim 7, wherein the step of rearranging the three-dimensional form comprises the steps of: selecting two images photographed from neighbouring visual point directions from the group of the plurality of images photographed from the plurality of visual points; extracting or designating edge lines in a three-dimensional structure from the selected images; designating connection relation information and connection angle information of edge lines obtained from known structural information in association with each of the designated edge lines in the selected images; restoring three-dimensional form information by designating identical edge lines between the two images and calculating a three-dimensional position on the basis of a principle of triangulation; designating connection relation information of the edge lines on the basis of known structural information between a plurality of images; and uniting the restoration results between the plurality of images on the basis of the connection relation information designated in the step of designating the connection relation information, and restoring a form of a portion, which cannot be restored, on the basis of the connection relation information between the plurality of images. A method according to claim 7, wherein the step of producing the external pattern comprises the step of cutting off the area, which is exactly or substantially equal to the uniform plane, from an image from which the entire area is acquired; and performing distortion correction and color/density correction for an external pattern in the cut-off area. A method according to claim 9, wherein the step of performing the distortion correction and the color/density correction comprises all or some of the steps of: correcting geometric distortion when the cut-off area suffers the geometric distortion caused when a photographing surface is not parallel to a photographing area; correcting a nonuniform shade and density when neither a uniform shade nor density are obtained under an influence of a position and light amount of a light source; and correcting a portion concealed by an obstacle or the like by an interpolation or extrapolation if the portion is present. A method according to claim 10, wherein the step of cutting off the area comprises the steps of: when the area, which is exactly or substantially equal to the plane, is acquired across a plurality of images, producing a single large image by uniting the plurality of images; and cutting off the pattern area from the produced large image. An image processing apparatus comprising: image input means (1) for inputting a still image train obtained by photographing an object whilst time-serially changing the visual directions from which the object was photographed; reference image selection means (2) for selecting one image from the still image train as a reference image; selection means (3) for selecting as specific points corresponding points photographed in two adjoining images forming part of the image train; first coordinate transformation means (4) for transforming selected points in the respective images to a two-dimensional coordinate system of the reference image by using a predetermined coordinate transformation procedure; division means (6) for dividing a two-dimensional space on the basis of the selected points which have been transformed to the two-dimensional coordinate system of the reference image; second coordinate transformation means (5) for coordinate-transforming the respective images by using a coordinate transformation procedure for transforming the coordinates of the respective images to coordinates of the reference image; and wide angle image production means (8) for producing a single image by inserting coordinate information of each of the coordinate-transformed images into each of domains which included selected points of the images. Apparatus according to claim 12, wherein the division means are Voronoi division means. Apparatus according to claim 14, wherein said Voronoi division means use two-dimensional Euclidean distances in calculating the territories of the respective divided domains. Apparatus according to claim 14, wherein said Voronoi division means use distances derived from a calculation formula taking elements other than a two-dimensional Euclidean distance into consideration.

Inventors: UCHIYAMA SHINJI, YAMAMOTO HIROYUKI, UCHIYAMA, SHINJI, YAMAMOTO, HIROYUKI, Uchiyama, Shinji, c/o Canon Kabushiki Kaisha, Yamamoto, Hiroyuki, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1996
Main classification: G06T11
IPC codes: G06T3