Abstract:
A method and system for generating additional template images containing an object of interest in a plurality of defined orientations from a single stored digitized pixel matrix template image frame is disclosed by which the object of interest may be translated and rotated within the template frame and thereby presented in a variety of predetermined positions.

Description:
CROSS REFERENCE TO RELATED APPLICATION 
     Reference is made to co-pending application Ser. No. 755,873, entitled &#34;Object Recognition Template Shifting&#34; filed of even date and assigned to the same assignee as the present application. That application is directed to a quadrant shifting technique in which previously stored frames or templates depicting an object of interest in various orientations in one quadrant of a frame can be generated into templates depicting the object of interest disposed in each such orientation in any quadrant and in either front or reverse sides for comparison with an image of randomly disposed objects of interest to be identified and located in a field of view. The present application, on the other hand, discloses a system and method for frame or template generation wherein a plurality of templates of an object of interest depicting it in various desired orientations can be generated from a single random input image. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to the field of image recognition or object identification and, more particularly, to a low cost image or template generation technique which reduces the number of input frames required to generate images of an object of interest in any desired orientation within a field of view. 
     2. Description of the Prior Art 
     In recent times robots have been introduced into the automated assembly of production parts in ever-increasing numbers. It is often necessary that a robot be able to pick up work pieces from a moving conveyor, for example, and correctly assemble them to a structure of interest. This requires that either the positioning of the work pieces relative to the robot be consistently precise or that the location and orientation of work pieces disposed at random be correctly identified and this information be communicated to the robot so that it may position the pick up accordingly. 
     Some automated identification systems exist in the prior art. For example, it has been possible to address machine parts or the like as with a video camera to produce a scan frame of the field of view. From this, a pixel scan may then be used to convert the frame into a series of binary bits on a pixel-by-pixel basis to produce a complete frame in memory. This stored &#34;object&#34; frame may then be compared to previously stored data in other frames to identify the part of interest and possibly its location and orientation in the frame in relation to the frame axes. 
     In order to properly procure meaningful location and orientation information pertaining to objects of interest randomly disposed within the field of view, however, it has heretofore been incumbent on such systems to compare the object image with an unwieldy amount of stored data. This has usually been in the form of numerous frames or &#34;templates&#34; portraying the object of interest in almost every conceivable position throughout the four quadrants of the field of view. While such a system is quite feasible, in addition to memory, it requires a great deal of high speed number-crunching capability, especially if operated on a real-time basis, and is therefore relatively complicated and very expensive. 
     It is readily apparent that a definite need exists to simplify aspects of a system of the class described such that the necessary tasks may be accomplished by easier, less costly means. This certainly applies to the generation of templates of the object of interest in various orientations to be compared later with an actual object of interest randomly disposed in the field of view. 
     SUMMARY OF THE INVENTION 
     The present invention simplifies template generation of images for use in the identification of objects of interest and determining their orientation in the field of view. This is accomplished from a single pictorial image by the provision of a low-cost image manipulation technique. The technique not only reduces the number of pictorial images which must be made to a single image, but it also significantly reduces the number of frames required to be stored in memory by enabling images of the object of interest to be produced from memory in a plurality of orientations in any given quadrant of the field of view. 
     In the preferred embodiment a single digitized image is created from a video frame of an object of interest disposed at random in the field of view by converting the frame into binary bits on a pixel-by-pixel basis. This sample image is then stored in memory and used to generate the desired templates. The object centroid coordinates are determined along with the slope or angle of the major axis of the best-fit ellipse around the object. Using the known centroid and major ellipitical axis, the coordinates of the centroid may be translated and rotated as desired as a point in two-dimensional space to, in effect, position the image of the object of interest in any position desired. From this template the other templates of object of interest may be generated by a pixel-by-pixel translation and rotation of the single stored image. In one embodiment, eight images of the object are made with the major or long axis of the ellipse surrounding the object of interest at 111/4° increments spaced evenly throughout the 90° quadrant. While any desired number can be used, eight images have been found to be adequate to identify most objects of interest. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings: 
     FIG. 1 is a block diagram of the template generation system of the invention; 
     FIGS. 2a and 2b represent a logic diagram associated with the template generation system of the invention; 
     FIGS. 3a-3d illustrate the translation and rotation of the centroid coordinates of the image used in the template generation system of the invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     In order to overcome limitations associated with loss of precision due to the nature of the digitized image and to enhance the clarity of the generated image of the object of interest the technique of the present invention is also applied to the midpoints between pixels. This occurs when the pixel of interest is detected as an image pixel rather than a background pixel and is surrounded by image pixels. This increases the number of image pixels and successfully closes gaps which otherwise might occur in the image of the object of interest due to rounding off of values in processing the image because of the digitized nature of the image. 
     A matrix of any desired number of pixels can be used to produce the templates in accordance with the invention. While a greater number of pixels produces a better or clearer image of the object of interest, a larger matrix requires more memory and data processing capability. By using the technique of the present invention, however, it has been found that an initial matrix of 32×32 pixels processed in accordance with the invention produces sufficient clarity to facilitate correct identification of most objects of interest and it is sufficiently simple to allow real-time object identification. 
     FIG. 1 illustrates a typical imaging system including a video camera 10 for generating an image of an object to be used as a comparison norm 11 which may be randomly located in the field of view of the camera such as on a surface 12. The system further includes an analog to digital (A/D) converter 13 for digitizing the image, random access memories 14 and 15 for storing digitized data, a central processing unit (CPU) for controlling the system, which may be a microprocessor 16, and an output device 17. 
     The manual generation of a series of digital video frames depicting a comparison object of interest in a plurality of orientations for manual template generation has long been the standard used for comparison. This manual template generation is very difficult to do accurately and is very time consuming. It requires careful positioning of the object of interest in the field of view for each frame or template. Digitizing video pictures requires rounding off values of pixel intensity to whole integers resulting in a reduction of clarity. For this reason normally a series of several frames must be generated and digitized to accomplish the minimum accuracy required to produce one acceptable template in memory. An acceptable template must produce image edges with sufficient accuracy to allow reproducible recognition of like objects of interest later pattern recognition. In the past, this has required either a composite of several images as described above or utilization of a matrix having a great number of pixels as a 525×525 pixel video image used in broadcast television. 
     As mentioned above, the present invention greatly simplifies the process by eliminating the need for multiple manual template generation and allows the use of a smaller pixel matrix in achieving template generation portraying images of sufficient clarity to assure proper object identification. FIGS. 2a, 2b and 3a-3d illustrate the technique utilized in accordance with the present invention. FIG. 3 depicts the derivation of equations used for the translation or rotation of the image of an object of interest in a given quadrant of the field of view to produce desired image orientation. The logic sequence is shown in FIGS. 2a and 2b. 
     In accordance with the present invention, a video image frame pixel matrix containing the object of interest is digitized by the A/D converter 13 into a corresponding matrix of binary bits which is stored in memory in accordance with the step 20 of FIG. 2a. Based on the stored image data the centroid coordinates X IC , Y IC  are calculated at 21. This point is also illustrated at 50 in FIG. 3. Next the major image axis angle OI which represents the angle of the major axis of the best fit ellipse around the object is determined as at 22. 
     The derivation of the translation and rotational functions utilized in the invention is illustrated in FIGS. 3b-3d. FIG. 3b illustrates the translation of the coordinates of the centroid from the random location of the initial image to the axis origin. The equations represent the standard equations for the translation of an object in two-dimensional space to the origin. FIG. 3c illustrates the standard equations for the rotation of an object in two-dimensional space about the origin to any desired angle. FIG. 3c illustrates a 90° rotation. FIG. 3d represents a retranslation of the centroid pixel, and thus the image itself, in the rotated state back to the point in the quadrant which is desired. 
     Given the ability to translate and rotate the centroid pixel, X IC , Y IC  all the pixels in the matrix, images can then be generated in accordance with the equations to any desired angle at which the image of the comparison object is sought to be disposed. A first template can then be generated at angle θ t  which denotes the angle of the first template as shown at 23 of FIG. 2A. After this has been determined the entire image represented by the pixel matrix can be translated and rotated in accordance with the equations of FIGS. 3a-3d on a pixel-by-pixel basis. 
     A template space is first cleared in memory at 24 and the necessary parameters calculated at 25 and 26. 
     The image clarification technique of the invention will now be described. Starting at 27, the first scanned frame pixel (X I , Y I ) is evaluated at 28 as to whether it is an image or background pixel. If, in fact, it is determined to be an image pixel or a pixel pertaining to the comparison object of interest, it is further evaluated and the coordinate corresponding to the desired template determined by rotation and translation at 29. In addition, at 30, 31, 32 and 33 adjacent X and Y pixels are also evaluated as to whether they are properly part of the object image. Thus, for example, if the adjacent X pixel (X I  +1, Y I ) is also an image pixel, the mid-pixel point (X I  +0.5, Y I ) is then evaluated and used as an additional point at 32 and 33. Similar treatment is accorded the mid-pixel point for locations (X I , Y I ) and (X I , Y I ). 
     It should be noted that if pixel (X I , Y I ) is not an image pixel the system skips to 34 where the next image pixel or the next pixel is picked up at 35. This occurs until an actual object image pixel is found. Similarly, if an adjacent image pixel at 30 or 32 is found to be a background pixel that corresponding mid-pixel evaluation step is omitted. This continues until the last pixel of a frame is evaluated at which time the template is complete and the system is set up to generate the next template via 35 and 36 or the sequence ends with the last template at 37. 
     This enables a series of templates as desired to be generated from the single stored image rather simply and inexpensively. These images can be stored for later comparison with a template containing the image of an object of interest whose identity and orientation are sought to be determined. The above cross-referenced application allows images representing but one of the four quadrants to be used to represent all four quadrants and either the front or reverse side of the object of interest by quadrant shifting and may be used in conjunction with the present invention to further simplify an entire object recognition system.