SYMBOL CLASSIFICATION WITH SHAPE FEATURES APPLIED TO NEUTRAL NETWORK

Abstract: An image processing device and method for classifying symbols, such as text, in a video stream employs a back propagation neural network (BPNN) whose feature space is derived from size, translation, and rotation invariant shape-dependent features. Various example feature spaces are discussed such as regular and invariant moments and an angle histogram derived from a Delaunay triangulation of a thinned, thresholded, symbol. Such feature spaces provide a good match to BPNN as a classifier because of the poor resolution of characters in video streams.

Description: Symbol classification with shape features applied to neutral network CROSS-REFERENCE TO RELATED APPLICATIONS The present invention is related to one described in United States Patent Application entitled "SYSTEM AND METHOD FOR ANALYZING VIDEO CONTENT USING DETECTED TEXT IN VIDEO FRAMES," filed August 9, 1999, Ser. No. 09/370,931, which is commonly assigned to the assignee of the present invention and the entirety of which is hereby incorporated by reference as if fully set forth herein. The invention is also related to one disclosed in United States Provisional Patent Application No. 60/117,658, filed on January 28, 1999, entitled "METHOD AND APPARATUS FOR DETECTION AND LOCALIZATION OF TEXT IN VIDEO," which is commonly assigned to the assignee of the present invention. The disclosure of this related provisional patent application is incorporated herein by reference for all purposes as if fully set forth herein. The invention is also related to one disclosed in an application, filed concurrently herewith, entitled "VIDEO STREAM CLASSIFIABLE SYMBOL ISOLATION METHOD AND SYSTEM," which is commonly assigned to the assignee of the present invention. The disclosure of this related provisional patent application is incorporated herein by reference for all purposes as if fully set forth herein. BACKGROUND OF THE INVENTION The present invention relates to systems that recognize patterns in digitized images and more particularly to such systems that isolate symbols such as text characters in video data streams. Real-time broadcast, analog tape, and digital video are important for education, entertainment, and a host of multimedia applications. With the size of video collections being in the millions of hours, technology is needed to interpret video data to allow this material to be used and accessed more effectively. Various such enhanced uses have been proposed. For example, the use of text and sound recognition can lead to the creation of a synopsis of an original video and the automatic generation of keys for indexing video content. Another range of applications relies on rapid real-time classification of text and/or other symbols in broadcast (or multicast, etc.) video data streams. For example, text recognition can be used for any suitable purpose, for example video content indexing. Various text recognition techniques have been used to recognize digitized patterns. The most common example is document optical character recognition (OCR). The general model for all of these techniques is that an input vector is derived from an image, the input vector characterizing the raw pattern. The vector is mapped to one of a fixed number or range of symbol classes to "recognize" the image. For example, the pixel values of a bitmap image may serve as an input vector and the corresponding classification set may be an alphabet, for example, the English alphabet. No particular technique for pattern recognition has achieved universal dominance. Each recognition problem has its own set of application difficulties: the size of the classification set, the size of the input vector, the required speed and accuracy, and other issues. Also, reliability is an area that cries out for improvement in nearly every area of application. As a result of the foregoing shortcomings, pattern recognition is a field of continuous active research, the various applications receiving varying degrees of attention based on their respective perceived merits, such as utility and practicability. Probably the most mature of these technologies is the application of pattern recognition to text characters, or optical character recognition (OCR). This technology has developed because of the desirability and practicality of converting printed subject matter to computer-readable characters. From a practicality standpoint, printed documents offer a data source that is relatively clear and consistent. Such documents are generally characterized by high-contrast patterns set against a uniform background and are storable with high resolution. For example, printed documents may be scanned at arbitrary resolution to form a binary image of the printed characters. Also, there is a clear need for such an application of pattern recognition in that the conversion of documents to computer-based text avoids the labor of keyboard transcription, realize economy in data storage, permits documents to be searched, etc. Some application areas have received scant attention because of the attending difficulty of performing symbol or character classification. For example, the recognition of patterns in video streams is an area that is difficult due to at least the following factors. Characters in a video stream tend to be presented against spatially non-uniform (sometimes, temporally variable) backgrounds, with poor resolution, and low contrast. Recognizing characters in a video stream is therefore difficult and no reliable methods are known. In addition, for some applications, as disclosed in the foregoing related applications at least, fast recognition speeds are highly desirable. Systems and methods for indexing and classifying video have been described in numerous publications, including: M. Abdel-Mottaleb et al., "CONIVAS: Content-based Image and Video Access System," Proceedings of ACM Multimedia, pp. 427-428, Boston (1996); S-F. Chang et al, "VideoQ: An Automated Content Based Video Search System Using Visual Cues," Proceedings of ACM Multimedia, pp. 313-324, Seattle (1994); M. Christel et al, "Informedia Digital Video Library," Comm. of the ACM, Vol. 38, No. 4, pp. 57-58 (1995); N. Dimitrova et al., "Video Content Management in Consumer Devices," IEEE Transactions on Knowledge and Data Engineering (Nov. 1998); U. Gargi et al., Indexing Text Events in Digital Video Databases," International Conference on Pattern Recognition, Brisbane, pp. 916-918 (Aug. 1998); M.K. Mandal et al., "Image Indexing Using Moments and Wavelets," IEEE Transactions on Consumer Electronics, Vol. 42, No. 3 (Aug. 1996); and S. Pfeiffer et al., "Abstracting Digital Moves Automatically," Journal on Visual Communications and Image Representation, Vol. 7, No. 4, pp. 345-353 (1996). The extraction of characters by a method that uses local thresholding and the detection of image regions containing characters by evaluating gray-level differences between adjacent regions has been described in "Recognizing Characters in Scene Images," Ohya et al., IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 16, pp. 214-224 (Feb. 1994). Ohya et al. further discloses the merging of detected regions having close proximity and similar gray levels in order to generate character pattern candidates. Using the spatial context and high contrast characteristics of video text to merge regions with horizontal and vertical edges in close proximity to one another in order to detect text has been described in "Text, Speech, and Vision for Video Segmentation: The Informedia Project," by A. Hauptmann et al, AAAI Fall 1995 Symposium on Computational Models for Integrating Language and Vision (1995). R. Lienhart and F. Suber discuss a nonlinear color system for reducing the number of colors in a video image in "Automatic Text Recognition for Video Indexing," SPIE Conference on Image and Video Processing (Jan. 1996). The reference describes a split-and-merge process to produce homogeneous segments having similar color. Lienhart and Suber use various heuristic methods to detect characters in homogenous regions, including foreground characters, monochrome or rigid characters, size-restricted characters, and characters having high contrast in comparison to surrounding regions. The use of multi -valued image decomposition for locating text and separating images into multiple real foreground and background images is described in "Automatic Text Location in Images and Video Frames," by A. K. Jain and B. Yu, Proceedings of IEEE Pattern Recognition, pp. 2055-2076, Vol. 31 (Nov. 12, 1998). J-C. Shim et al. describe using a generalized region-labeling algorithm to find homogeneous regions and to segment and extract text in "Automatic Text Extraction from Video for Content-Based Annotation and Retrieval," Proceedings of the International Conference on Pattern Recognition, pp. 618-620 (1998). Identified foreground images are clustered in order to determine the color and location of text. Other useful algorithms for image segmentation are described by K.V. Mardia et al. in "A Spatial Thresholding Method for Image Segmentation," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 10, pp. 919-927 (1988), and by A. Perez et al. in "An Iterative Thresholding Method for Image Segmentation," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 9, pp. 742-751 (1987). Various techniques for locating text in a digitized bitmap are known. Also known are techniques for binarizing character data to form an image that can be characterized as black-on-white and for performing character recognition on bitmap images. Text, and other patterns, in video streams range from the predictable, large, and clear, which are easy to classify to the crude, fleeting, and unpredictably-oriented and -positioned, which contain insufficient information, even in principle, to classify without assistance from auxiliary contextual data. There is also on-going research to increase recognition speed as well as accuracy. Therefore, there is room for improvement in the current state of the art, particularly where the application, such as video stream data, strains current technology. SUMMARY OF THE INVENTION Briefly, an image processing device and method for classifying symbols, such as text, in a video stream employs a back propagation neural network (BPNN) whose feature space is derived from size, translation, and rotation invariant shape-dependent features. In general, a feature space is a space occupied by the symbol to be recognized. A shape- dependent feature may be regarded as line portions of the symbol. Using the shape-dependent features in the feature space, an angle histogram may be formed which is used as a feature vector for the symbol concerned. The feature vector is applied to the BPNN for generating various candidate symbols. While a BPNN is used in the subject invention, the BPNN and the training of such employs known techniques, such as, for example, described in US Patent 4,912,654. Various example feature spaces are discussed such as regular and invariant moments and an angle histogram derived from a Delaunay triangulation of a thinned, thresholded, symbol. Such feature spaces provide a good match to BPNN as a classifier because of the poor resolution of characters in video streams. The shape-dependent feature spaces are made practicable by the accurate isolation of character regions using the above technique described in the current application. The ability to detect and classify text appearing in video streams has many uses. For example, video sequences and portions thereof, can be characterized and indexed according to classifications derived from such text. This can lead to indexing, enhanced search capabilities, annotation features, etc. In addition, recognition of text in a video stream can permit the presentation of context-sensitive features such as an invokable link to a web site generated in response to the appearance of a web address in a broadcast video stream. Text in video presents a very different problem set from that of document OCR, which is a well-developed, but still maturing technology. Text in documents tends to be uni-colored and high quality. In video, scaled-down scene images may contain noise and uncontrolled illumination. Characters appearing in video can be of varying color, sizes, fonts, orientation, thickness, backgrounds can be complex and temporally variant, etc. Also, many applications for video symbol recognition require high speed. The technique employed by the invention for classifying video text employs an accurate high speed technique for symbol isolation. The symbol bitmap is then used to generate a shape-dependent feature vector, which is applied to a BPNN. The feature vector provides greater emphasis on overall image shape while being relatively insensitive to the variability problems identified above. In the technique for isolating character regions, connected component structures are defined based on the edges detected. Since edge detection produces far fewer pixels overall than binarizing the entire field occupied by a symbol, the process of generating connected components can be much more rapid. The selection of feature space also enhances recognition speed. With simulated BPNNs the size of the input vector can seriously affect throughput. It is very important to be selective with regard to the components used from the selected feature space. Of course, heterogeneous feature spaces may be formed by combining mixes of different features such as moments and line-segment features. Also, computational economies may be realized where the selected features share computational steps. The invention will be described in connection with certain preferred embodiments, with reference to the following illustrative figures so that it may be more fully understood. With reference to the figures, it is stressed that the particulars shown are by way of example and for purposes of illustrative discussion of the preferred embodiments of the present invention only, and are presented in the cause of providing what is believed to be the most useful and readily understood description of the principles and conceptual aspects of the invention. In this regard, no attempt is made to show structural details of the invention in more detail than is necessary for a fundamental understanding of the invention, the description taken with the drawings making apparent to those skilled in the art how the several forms of the invention may be embodied in practice. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is diagram illustrating machinery that may be used to implement the invention. FIG. 2 is a flowchart showing a character classification method according to an embodiment of the invention. FIGS. 3 A and 3B illustrate text regions in a video screen that contain information classifiable according to an embodiment of the invention. FIG. 4A shows the appearance of a text segment from a captured digital image of a video frame. FIG. 4B shows the text segment after edge detection filtering. FIG. 4C illustrates the effect of several stages of filtering within or prior to edge detection, noting that these may not actually show intermediate results but are shown for purposes of illustrating concepts associated with the invention. FIGS. 5 A and 5B illustrate the effect of edge filtering according to an embodiment of the invention. FIG. 5C illustrates an example of a gap-closing algorithm that can be used in the invention. FIGS. 6A-6D illustrate a technique for text line segmentation according to an embodiment of the invention. FIGS. 7A and 7B are flow diagrams illustrating a technique for the creation and management of connected components according to a filtering process of an embodiment of the invention. FIG. 8 is a flowchart illustrating a character classification method according to an embodiment of the invention. FIGS. 9A-9D illustrate the filtering of a segmented character to derive a feature vector precursor. FIGS. 10A and 10B illustrate Delaunay triangulation and Voronoy diagram stages in an image filtering step in a character classification process according to an embodiment of the invention. FIGS. 11 A and 1 IB illustrate an angle histogram-type feature space according to an embodiment of the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to FIG. 1, an image text analysis system 100 employs a video processing device 110, video source 180, and possibly, monitor 185 to receive video input and generate and store character information embedded in it. Video processing device 110 receives video images, parses frames, isolates text areas and character regions, and classifies the text and/or character regions according to procedures discussed in detail below. Video is supplied from the video source 180. Video source 180 can be any source of video data including a VCR with a analog-digital converter (ADC), a disk with digitized video, a cable box with an ADC, a DVD or CD-ROM drive, digital video home system (DVHS), digital video recorder (DVR), hard disk drive (HDD), etc. Video source 180 may be capable of providing a few short clips or multiple clips, including longer length digitized video images. Video source 180 may provide video data in any analog or digital format, such as MPEG-2, MJPEG. Video processing device 110 may include image processor 120, RAM 130, storage 140, user I/O card 150, video card 160, I O buffer 170, and processor bus 175. Processor bus 175 transfers data between the various elements of video processing device 110. RAM 130 further comprises image text work space 132 and text analysis controller 134. Image processor 120 provides over-all control for video processing device 110 and performs the image processing required for image text analysis system 100, including analyzing text in video frames based upon system-selected and user-selected attributes. This also includes implementing editing processes, processing digitized video images for display on monitor 185 and/or storage in storage 140, and transferring data between the various elements of image text analysis system 100. The requirements and capabilities for image processor 120 are well known in the art and need not be described in greater detail, other than as required for the present invention. The image processor 120 may be implemented as a suitable programmed computer circuit. A set of instructions loaded into a program memory may cause the computer circuit to effect the operations which are described hereinafter with reference to FIGS. 2-1 IB. The set of instructions may be loaded into the program memory by reading a carrier, such as, for example, a disk, which contains the set of instructions. The reading may be effected via a communication network such as, for example, the Internet. In that case, a service provider makes the set of instructions available to interested parties. RAM 130 provides random access memory for temporary storage of data produced by video processing device 110, which is not otherwise provided by components within the system. RAM 130 includes memory for image text work space 132 and text analysis controller 134, as well as other memory required by image processor 120 and associated devices. Image text work space 132 represents the portion of RAM 130 in which video images associated with a particular video clip are temporarily stored during the text analysis process. Image text work space 132 allows copies of frames to be modified without affecting the original data, so that the original data may later be recovered. In one embodiment of the present invention, text analysis controller 134 represents the portion of RAM 130 dedicated to storage of an application program executed by image processor 120 that performs the analysis of video images on the basis of system- or user-defined text attributes. Text analysis controller 134 may execute well-known editing techniques, such as morphing or boundary detection between scenes, as well as the novel techniques for video text recognition associated with the present invention. Text Analysis controller 134 may also be embodied as a program on a CD-ROM, computer diskette, or other storage media that may be loaded into a removable disk port in storage 140 or elsewhere, such as in video source 180. Storage 140 comprises one or more disk systems, including removable disks (magnetic or optical), for permanent storage of programs and other data, including required video and audio data. Depending upon system requirements, storage 140 may be configured to interface with one or more bi-directional buses for the transfer of video and audio data to and from video source(s) 180, as well as the rest of the system. Storage 140 is capable of transferring data at video rates, as required. Storage 140 is sized to provide adequate storage for several minutes of video for editing purposes, including text attribute analysis. Depending upon specific applications and the capability of image processor 120, storage 140 may be configured to provide capability for storage of a large number of video clips. User I/O card 150 may interface various user device(s) (not shown) to the rest of image text analysis system 100. User I O card 150 converts data received from the user devices to the format of interface bus 175 for transfer to image processor 120 or to RAM 130 for subsequent access by image processor 120. User I/O card 150 also transfers data to user output devices such as printers (not shown). Video card 160 provides an interface between monitor 185 and the rest of video processing device 110 through data bus 175. I/O buffer 170 interfaces between video source 180 and the rest of image text analysis system 100 through bus 175. As previously discussed, video source 180 has at least one bi-directional bus to interface with I/O buffer 170. I/O buffer 170 transfers data to/from video source 180 at the required video image transfer rate. Within video processing device 110, I/O buffer 170 transfers data received from video source 180 to storage 140, to image processor 120, or to RAM 130, as required. Simultaneous transfer of video data to image processor 120 provides means for displaying video image as they are received. Referring now to FIGS. 2, 3 A, and 3B, a text extraction and recognition operation (as outlined in FIG. 2) 100 can be performed by the video processing device 110 or any other suitable device on a video sequence containing text, such as illustrated in FIGS. 3 A and 3B. Individual frames 305 are subjected to the procedure outlined in FIG. 2 to result in an isolation of individual text regions such as 310, 315, 360, 365, 370, and 375. Note that the procedure can be applied to an integral of multiple frames integrated to reduce the complexity of the background and increase the clarity of the text. That is, where a number of subsequent frames contain the same text regions (and this can be identified where the text regions contain substantially the same signal characteristics such as a similar spectral density function), multiple successive frames can be integrated (e.g., averaged). This tends to make the text regions clearer and cause the text to be better set off against the background. Where a background is a moving image, the complexity of the background is necessarily reduced by this procedure. Note that some of the benefits of such signal-averaging may also be obtained from the source where time integration is done for moving picture enhancement, as in modern televisions. Thus, for the following discussion, the notion of operating on a "single" frame is by no means restricted to a single "frame grab" and the "frame" upon which image analysis is done could be a composite of one or more successive video frames. Initially, image processor 120 may separate colors of one or more frames of the video image and store a reduced color image for use in extracting text. In one embodiment of the present invention, image processor 120 uses a red-green-blue (RGB) color space model to isolate the red component of the pixels. An example of how a text portion of a frame might look is shown in FIG. 4A. The red component is often the most useful for detecting white, yellow, and black colors, which are predominantly used for video text. That is, for overlaid (superimposed) text, the isolated red frame provides sharp, high- contrast edges for the common text colors. The current method may also be used to extract text that is not overlaid on the video but is actually part of it such as a film sequence that dwells on a billboard or street sign. In such a case, the red frame may not be the best to use. In such cases, a gray scale (alpha channel) may provide the best starting point. Note that in alternate embodiments of the present invention, image processor 120 may use various color space models, such as the gray scale image or the Y component of a YIQ video frame, etc. The isolated frame image is stored in image text work space 132. Then, in step S210, before further processing is performed, the captured image may be sharpened. For example, the following 3x3 mask could be used: -1 -1 -1 -1 8 -1 -1 -1 -1 in which each pixel is the sum of eight times itself plus the negative of each of its neighbors. The above matrix representation for bitmap filters (or "masks") is a common notation in the art. There are many such derivative filters that are known in the art and invention contemplates the use of any of a variety of different techniques for isolating text regions. The above is merely a very simple example. The filtering step can include multiple passes, for example gradient detection along one dimension followed by gradient detection along the other dimension (while simultaneously smoothing in the respective orthogonal directions) followed by addition of the two filtering results. In step S210, random noise may be reduced using, for example, a median filter as described by R.C. Gonzalez and R.E. Woods in "Digital Image Processing," Addison-Wesley Publishing Company, Inc. (1992). Edge detection may employ another edge filter. Through this filter, the edges in the sharpened (red, gray-scale, etc.) image may be (and preferably are) amplified and non- edges, attenuated, using, for example, the following edge mask. -1 -1 -1 -1 12 -1 -1 -1 -1 where, again, each pixel is the sum of the above respective coefficients (weights) applied to itself and the neighboring pixels. In FIG. 4C, the results of the previous filtering steps is illustrated. The original image 163 is edge-filtered to result in a differential image 164, which is then edge-enhanced to result in a final image 165 that is subjected to the following filtenng In step S215, a threshold edge filter, or "edge detector" is applied If Edge m n represents the m,n pixel of an xN edge image and F m „ the enhanced image resulting from step S210, the following equation may be used for edge detection Equation 1 l 1 Ed g e m,» = Σ Σ W ι,j F nι +l ,n +J < L ed g e /=-l y = -l where 0<m<M and 0<n<N, and L e( j ge is a threshold value which may or may not be constant The values w, are weights from the edge mask The outermost pixels may be ignored in the edge detection process Note, again, that the sharpening filter may also be applied implicitly in this thresholding operation The edge threshold L e( j ge is a pre-determmed threshold value, which may be a fixed- value or a vaπable value The use of a fixed threshold may result in excessive salt and pepper noise and cause discontinuities in the fixed edges around the text Known methods of opening (e g , erosion followed by dilation) result in loss of parts of text An adaptive threshold edge filter, one with a vaπable threshold, ameliorates these tendencies and is a great improvement over the use of a static threshold In step S220, in one mode of adjusting the edge detection threshold, after a first fixed threshold is applied using the edge detector, the local threshold for any pixels neighboring (withm a specified tolerance) edge pixels identified in the fixed threshold step is lowered, and the filter reapphed In another mode, the latter effect may as easily be accomplished by applying to the result of the threshold step, a smoothing function (assuming the result is stored with a pixel depth greater than two), and then thresholding again This would cause pixels, marked as non-edges, to become marked as edges The degree of threshold-lowering for a pixel preferably depends on the number of neighboπng pixels marked as edges The rationale behind this is that when neighboring pixels are edges, it is more likely that the current pixel is an edge The edge pixels resulting from the lowering of their local threshold is not used for calculating the reduced threshold for neighbonng pixels Alternatively, a fixed threshold value may be used with a low-pass weighting function to insure that single or small numbers of non-edge pixels surrounded by strong edge pixels (pixels that have a high gradient) are marked as edge pixels In fact, all the steps S210 - S220 described above can be described by a single numerical operation in the form of Equation 1, but with wider ranges on the summations. Their separation into distinct steps should not be considered necessary or limiting and may depend on particulars of the computational equipment and software as well as other considerations. Once the character edges are detected, image processor 120 performs preliminary edge filtering to remove image regions that do not contain text or in which text cannot reliably be detected. For example, frames with an extreme paucity of edges, a very low edge density (number of edge pixels per unit area), or low degree of aggregation of edge pixels (that is, they do not form long-range structures, e.g., noise) may be excluded from further processing. Image processor 120 may perform edge filtering at different levels. For instance, edge filtering may be performed at a frame level or a sub-frame level. At the frame level, image processor 120 may ignore a frame if more than a reasonable fraction of the frame appears to be composed of edges. Alternatively, filter- functions such as spectral analysis can be applied to determine if the frame is likely to have too many edges. This could result from a high density of strong-edge objects in the frame. The assumption is that overly complex frames contain a high proportion of non-character detail and that it would be disproportionately burdensome to filter it through character classification. When frame-level filtering is used, image processor 120 maintains an edge counter to determine the number of edge pixels in the image frame. This, however, can lead to the skipping and ignoring of frames that contain intelligible text, such as frames with noisy portions as well as portions with intelligible text. To avoid the exclusion of such image frames or sub frames, image processor 120 may perform edge filtering at a sub-frame level. To do this, image processor 120 may divide the frame into smaller areas. To accomplish this, image processor 120 may, for example, divide the frame into three groups of pixel columns and three groups of pixel rows. Next, image processor 120 determines the number of edges in each sub-frame and sets its associated counter accordingly. If a subframe has more than a predetermined number of edges, the processor may abandon that subframe. The predetermined maximum edge count per region may be set according to the amount of time required to process the image region or the probability that their size relative to the pixel density would render the accuracy of recognition below a desired minimum. A greater number of sub-frames may be utilized to insure against missing smaller regions of clean text surrounded by regions identified as uninterpretable. Next, in step S225, image processor 120 performs a connected component (CC) analysis on edges generated in the previous step. This analysis groups all edge pixels that are contiguous within a specified tolerance. That is, every edge pixel that is adjacent, or within a certain distance of another edge pixel, is merged together with that pixel. Ultimately, this merging process defines structures, or connected components each having a contiguous or near-contiguous set of edge pixels. The motivation for this is that each text character region is assumed to correspond to a single CC. The tolerance may be set to any suitable value depending on the resolution of the image capture, the degree of upsampling (the proportion of pixels added by interpolation from the original image) or downsampling (the proportion of pixels removed from the original image). Referring now to FIG. 4B, inadvertent gaps or breaks between CCs corresponding to contiguous characters may appear as a result of edge detection with a fixed threshold. For example, breaks such as shown at 171 or 172, can occur. The use of the edge- detection scheme described helps to insure the merging of such broken CC portions. Beginning with breaks as in the left hand characters of FIGS. 5 A and 5B, the CC merging method results in the points in the breaks 174, 175, and 176 being identified as edge points and being merged into the single connected component structures at 181 and 182, respectively. Note that the closing of "bad" breaks in connected regions can be accomplished by various mechanisms in addition to the particular method described above. For example, dilation could be applied after erosion or thinning. To avoid the effect of increasing the total area of the edge pixels, the dilation could be followed by thinning before detecting the connected components. Also, the gray scale depth of the binarized thresholded image resulting from the application of Equation 1 could be increased and then a smoothing function could be applied and thresholding (Equation 1) performed again. There are many image processing techniques that could be used to accomplish the desired closing effect. Still another alternative is to mark pixels as edges when they are substantially surrounded by edge pixels in a contiguous series such as illustrated in FIG. 5C. That is, each of the 24 cases illustrated is a pixel with its neighborhood of eight pixels. In each of these cases, the neighborhood has 5 or more edge pixels in a contiguous series. Of course, the number in the contiguous series could be changed or special cases added to the group as well. In addition, the size of the matrices could be increased. The type of pixels favored to be marked as edges by an algorithm such as defined with respect to FIG. 5C are those where a pixel is deemed less likely to be part of a continuous break. A similar result may be obtained by closing (dilation followed by erosion) or by using less sharpening in the mask or preprocessing with respect to the thresholding (application of Equation 1). The CC is a set of pixels determined to form a contiguous series with no non- edge pixels dividing one portion from another. A list is made of each CC, which contains the coordinate of the leftmost, rightmost, topmost, and bottommost pixels in the structure, along with an indication of the location of the structure, for example, the coordinates of the center of the structure. Also stored can be the number of pixels that form the connected component structure. Note that the pixel count represents the area of the particular connected component structure. Predetermined system and/or user thresholds may be used to define the maximum and minimum limits for area, height and width of the connected component structure to determine which connected component structures to pass on to the next processing stage. The last step is a filter to determine if a CC may qualify as a character or not. Other heuristics can be used to assemble CCs too small to meet CC heuristics by themselves or to split ones that are too large. In step S230, image processor 120 sorts the connected components satisfying the criteria in the previous steps in ascending order based on the location of the bottom left pixel. Image processor 120 sorts on the basis of the pixel coordinate. The sorted list of Connected components is traversed to determine which CCs form blocks ("boxes") of text. Image processor 120 assigns the first CC to the first box and also as the initial or current box for analysis. Image processor 120 tests each subsequent CC to see if its bottommost pixel lies on the same horizontal line (or a nearby one) as the corresponding pixel of the first CC. That is, it is added to the current text box if its vertical location is close to that of the current CC. If it does, it is assumed to belong to the same line of text. The vertical coordinate difference threshold may be fixed or variable. Preferably, the closeness of the horizontal coordinate of the second CC is a function of the height of the CCs. The horizontal distance of the candidate new addition to the current text box is also tested to see if it lies within an acceptable range. If a CC does not meet the criteria for merging with the current text box, a new text box is generated with the failing CC marked as its first element. This process may result in multiple text boxes for a single line of text in the image. When the next connected component in a series has a substantially different vertical coordinate or a horizontal coordinate that is lower than that of the last CC the current text box may be closed at the end of the horizontal traverse and a new one started. For each box, image processor 120 then performs a second level of merging for each of the text boxes created by the initial character merging process. This merges text boxes that might have been erroneously interpreted as separate lines of text and therefore placed in separate boxes. This could result from strict connected component merging criteria or due to poor edge detection, thereby resulting in multiple CCs for the same character. Image processor 120 compares each box to the text boxes following it for a set of conditions. The multiple test conditions for two text boxes are: a) The bottom of one box is within a specified vertical-spacing of the other, the spacing corresponding to an expected line spacing. Also, the horizontal spacing between the two boxes is less than a variable threshold based on the average width of characters in the first box. b) The center of either of the boxes lies within the area of the other text box, or c) The top of the first box overlaps with the bottom of the second text box and the left or right side of one box is within a few pixels of the left or right side of the other, respectively. If any of the above conditions is satisfied, image processor 120 deletes the second box from the list of text boxes and merges it into the first box. Image processor 120 repeats the process until all text boxes are tested relative to each other and combined as far as possible. In step S235, image processor 120 accepts the text boxes obtained from step 235 as text lines if they conform to specified constraints of area, width and height. For each of the text boxes, image processor 120 extracts the sub-image corresponding to the text box from the original image. Image processor 120 then binarizes the subimage in preparation for character recognition. That is, the color depth is decreased to 2, with thresholding set to a value that insures the characters are properly set off from the background. This is a difficult problem and it may involved a number of steps, such as integrating multiple frames to simplify a complex background. The threshold for binarizing the image can be determined as follows. Image processor 120 modifies the text box image by calculating the average grayscale value of the pixels in the text box (AvgFG). This is used as the threshold for binarizing the image. Also calculated is the average grayscale value of a region (for example, 5 pixels) around the text box (AvgBG). The subimage is binarized by marking anything above AvgFG as white and anything below AvgFG as black. The average for the pixels marked as white, Avgl, is calculated along with the average for the pixels marked as black, Avg2. Once the text box is converted to a black and white (binary) image, image processor 120 compares Avgl and Avg2 to AvgBG. The region that has an average closer to AvgBG is assigned as the background and the other region is assigned as the foreground (or text). For example, if the black region average is closer to AvgBG, the black region is converted to white and vice versa. This assures that the text is always a consistent value for input to an OCR program. Image processor 120 subsequently stores the extracted frame text in image text work space 132 and the process continues with the next frame at process step 205. Note that, prior to local thresholding, a super-resolution step can be performed to enhance the text resolution. Next, individual character regions must be isolated before classification can be done. To isolate the individual character regions from lines of text, various heuristics may be used, for example, ratios of character height to width, ceilings and thresholds for height and width, etc. These heuristics generally fall into the category of predictions of permissible values for various dimensional features. Connected components may fail to correspond to a character because of a lack of clarity in the original text. Referring now to FIGS. 6A-6D, if the CC partitioning fails, another tool may be used for partitioning the characters along a horizontal line. One example is a vertical projection 425 that is a function of the horizontal coordinate and whose value is proportional to the number (and possibly also, the gray-scale value, as illustrated) of foreground pixels in a vertical column coinciding with the x-coordinate and contained within the current text box. That is, the vertical column over which the pixels are integrated does not exceed the size of the text box so only the current row of characters is measured this way. This "Gray-scale" vertical projection 425 may also be weighted by a window function 425 whose width is proportional to an expected width for the next character in a sequence. The result of weighting by the window function 425 is illustrated at 420. The minimum projection values may be used to define the left and right edges of the character. Referring to FIG. 7A, a method for isolating the character regions, starts with a first CC and proceeds sequentially through a text box. Beginning at step S310 a first, or next, CC is selected. At step S312 the selected CC is tested against dimensional heuristics to see if the CC meets them. The heuristic tests on the CC may indicate that the CC is unlikely to be a full character or that it is too large and likely includes more than one character. If the CC is found to be too big in step S314, an alternative method of partitioning the characters is applied in step S316, for example, the Gray-scale projection described above. If the CC is found to be too small in step S322, the next CC is tested against the heuristics in step S318. If this shows, in step S320, that the following CC is too small also, the then the current and following CCs are merged in step S326 and flow proceeds back to step S310 until all the character regions have been isolated. If the following CC is not too small, the current CC is discarded in step S324 and flow proceeds to step S310. Referring to FIG. 7B, another way of partitioning the characters saves alternative character regions that fail the heuristics and attempts to classify the alternatives. Upon classification, the alternative that achieves the highest confidence level is chosen. Other character regions are then treated accordingly. For example if the image corresponding to two merged CCs is classified with a high confidence measure, the field corresponding to the CC with which the first CC was merged is no longer treated as a separate character field. In step S330, a first, or next, CC is selected. At step S332 the selected CC is tested against dimensional heuristics to see if the CC meets them. If the CC is found to be too big in step S334, an alternative method of partitioning the characters is applied in step S336. If the CC is found to be too small in step S338, the current CC, and the current CC combined with the next CC, are both retained as alternative character fields. When the character fields are submitted for classification as described below, a confidence measure is used to choose between the alternatives. Then flow proceeds back to step S310 until all the character regions have been isolated. If the break operation of step S336 produces a low-confidence measure, then the oversized and fractured fields are retained as alternatives for use in classification and the classification results used to choose between the alternatives. Note that the regions coinciding with characters need not be defined to be rectilinear boxes. They could be rubber-band type bounding regions (a convex polygon with an arbitrary number of sides) or an orthogonally convex rectilinear polygon (A rectilinear polygon in which every horizontal or vertical segment connecting two points inside also lies totally inside) or any other suitable shape substantially enclosing the interesting features of the expected symbols or characters. Note also that the text box formation can be omitted entirely and the connected components used directly to identify candidate character regions. In such a case, however, it is expected that greater numbers of connected components will be outside of the particular symbol set into which they are to be mapped (classified). Note also that it is clear from the foregoing description that the above technique can be applied to symbol classification generally and is not limited to textual character classification. Referring to FIG. 8, once all the character regions have been isolated (subsumed by step S405), the characters can be classified in sequence. Next, in step S410, a first or sequential character region is selected. In step S415, the part of the original image (or the red portion thereof) is then subjected to some appropriate image analysis to prepare for feature analysis. For example, the image may be binarized (thresholded), gray-scaled image, binarized and thinned, etc. The pretreatment varies based on the feature space used. Referring also to FIGS. 9A-9D, for example, a feature space may make use of certain feature points, (as described below). The feature points are identifiable with skeleton characters and to derive these from the regular video characters (FIG. 9A), the image may be binarized (FIG. 9B) and then thinned (FIG. 9C). Then the feature points (FIG. 9D, 465-468) may be derived as the corner points 465, bends 466, crossing points 467, and end points 468 of the thinned character 460,470. This sort of image processing is well-suited to the angle- histogram feature space described below. A lower degree of image processing would be needed for calculating size-invariant moments. Note that other feature point definition systems may be used as well. Referring again to FIG. 8, the original character may be subjected to various different analyses to define a feature vector that may be applied to the inputs of a suitably- trained back propagation neural network (BPNN). For the techniques that employ size- invariant moments, the unthinned or thinned characters may be used. In step S420, the chosen feature vector is generated by the appropriate image analysis. A variety of these can be used. A number of different feature spaces have been defined for the application that concerns the instant patent. The defined feature spaces, which are described in detail below, are size and rotation invariant and considered particularly suitable to video character classification using a BPNN classifier. A first feature space is derived from the feature points of the thinned character as illustrated by FIGS. 9A-9D. Referring to FIGS. 10A and 10B, first, a Delaunay triangulation (FIG. 10 A) or a Voronoy diagram (FIGL. 10B) is derived from the feature points 12. The image processor 120 performs the triangulation and then, for each triangle 1- 6, generates an inventory of the internal angles. It then uses this inventory to generate a histogram of the angles, as shown illustrated in FIG. 11 A. The histogram simply represents the frequency of angles A, B, and C of a given size range in the set of triangles 1-6 defined by the triangulation. Note that other triangulation methods or polygon-generating methods can be used. For example, referring to FIG. 10B, a set of Voronoy polygons 17 and 18 can be used to define a set of angles A', B', and C, each associated with a vertex 14 of the Voronoy diagram. The angle histogram that results serves as the feature vector for the particular character from which the features points were derived. Other size and rotation invariant features may be added to the above feature space, for example, the number of horizontal lines, the number of crossing points, the number of endpoints, holes, inflection points, midpoints etc. Another variation on the angle histogram is the use of only the two largest (or smallest) of the interior angles of each triangle. Still another variation of the angle histogram is to use a two dimensional angle histogram instead of the one-dimensional angle histogram. For example, referring to FIG. 1 IB, the largest (or smallest) pair of angles for each triangle defines an ordered pair (ordered by size) for each triangle in the Delaunay triangulation (or each vertex of the Voronoy diagram). The first element of each ordered pair is used for the first dimension of the matrix and the second element, for the second dimension of the matrix. In this way, the association between angles is preserved as information for training and classifying using the BPNN classifier. Still another feature spaced considered particularly suitable for the video character BPNN classifier is an array of size-invariant moments. These moments are defined by the following equations. Although there is a large number of separate moments that could be used in the circumstance, a particular few are selected for this application. First, the pixel indices of the pixel location coinciding with the center of mass, i, j , is given by where B[i][j] is 1 where the z ' ' th pixel of the thresholded image is a foreground pixel and 0 otherwise and A is the aggregate area of the foreground pixels given by The translation-invariant moments are given by: Ip,q M γ iV1 0,0 where M p q is t ep,qth raw moment of the character image given by: and ι P + C l 2 ' The invariant moments selected for input to the BPNN are: (H,0 - l,2 f + (3*72,1 ~ θ,3 ) 2 ; ^4 = (%,0 - 1,2 ) 2 +(%,! - ^0,3 ) 2 ; 5 = ( 37 7 2 ,ι " 7 7o, 3 )( 7 72,ι - 7 7o, 3 )[ 3 ( 7 7 3 ,o ~ ^ ) 2 ~ 3(τ7 2 ,ι ~ ^cs) 2 ] + (^3,o - 37 7ι, 2 )( 7 7 3 ,o " 7 7ι, 2 )[( 7 7 3 ,o - 7/ ) 2 " 3 (η 2 ,ι ~ T/Ys) 2 ] and Ψβ = (^2,0 " 7θ,2 )[( 3 ,0 " 37 7l,2 ) 2 ~ (72,1 - ^O.S ) 2 ] + 47 7l,l( 3,0 + 7 7l,2)( 7 72,l - 7 7θ, 3 ) Referring again to FIG.8, in step S2425, each feature vector is applied to the trained BPNN which outputs various candidate classes and hopefully, depending on the inputs, one very strong candidate. If there are multiple candidate characters, a best guess may be made in step S430 by combining the probability output by the BPNN with frequency of use data for the presumed language and context. Such data may be compiled from different types of material, for example, television advertising transcripts, printed material, streaming or downloaded files the Internet. One way to combine is to weight the probabilities output by the BPNN by the corresponding probabilities associated with frequency-of-use statistics. It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. For example, the text analysis presented above described a predilection for horizontally-aligned text. It is clear that the same methods could be applied to other alignments such as vertically aligned text, text along a curve, etc. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims: CLAIMS: 1. A method for classifying symbols in an image data stream containing symbols, comprising: training a back propagation neural network (BPNN) on a feature space including at least two shape-dependent features; capturing an image from a video data stream; detecting an image region coextensive with a symbol to be classified embedded therein; deriving a feature vector from said image based on said feature space; applying said feature vector to said BPNN to classify said symbol. 2. A method as in claim 1, wherein said at least two shape-dependent features include size, translation, and rotation invariant moments. 3. A method as in claim 1, further comprising: identifying feature points in said image; said at least two shape-dependent features including a measure of an incidence of angles appearing in a triangulation of said feature points. 4. A method as in claim 1, further comprising: identifying feature points in said image; forming at least one of a Delaunay triangulation and a Voronoy diagram based on said feature points; said at least two shape-dependent features include a histogram representing an incidence of angles appearing in said at least one of a Delaunay triangulation and a Voronoy diagram. 5. A device for classifying symbols in an image data stream containing symbols, comprising: an image data storage unit (140) with an input (175) connected to capture data from said image data stream and an output (175); an image processor (120), connected to said image data storage unit output, programmed to detect an image coextensive with a symbol to be classified embedded therein; said image processor including a back propagation neural network (BPNN) (120) trained on a feature space; said feature space including at least one shape-dependent feature; said image processor being programmed to derive a feature vector from said image based on said feature space and to apply said feature vector to said BPNN to classify said symbol. 6. A device as in claim 5, wherein: said image processor is programmed to identify feature points in said image and to form at least one of a Delaunay triangulation and a Voronoy diagram based on said feature points; said derivation of said feature points includes thinning a binarized version of said image; said image processor is further programmed such that said at least two shape- dependent features include a histogram representing an incidence of angles appearing in said at least one of a Delaunay triangulation and a Voronoy diagram. 7. A computer program product for an image data processing device, the computer program product comprising a set of instructions which, when loaded into the image data processing device, causes the image data processing device to effect the method as claimed in claim 1.

Inventors: AGNIHOTRI LALITHA, DIMOTROVA NEVENKA, AGNIHOTRI, LALITHA, DIMOTROVA, NEVENKA
Applicants: KONINKL PHILIPS ELECTRONICS NV, KONINKLIJKE PHILIPS ELECTRONICS N.V.
Application year: 2000
Main classification: G06K9
IPC codes: G06K9