Abstract:
A graphical imaging system, wherein the rough location, size and shape of objects in the image is summarized by a first characteristic descriptor, representing a parametric &#34;pose&#34; computed for each object. A second characteristic descriptor, i.e. a &#34;gesture matching&#34; function, is provided in order to select the single object, or else the set of objects, that best comports with the user&#39;s selection gesture. When most closely matched, these key characteristic descriptors permit simple and natural user gestures to distinguish among a large set of graphic objects that may overlap both spatially. User gestures can be simple slashes passing through the object, or quick, coarse approximations of objects&#39; shapes.

Description:
RELATED APPLICATIONS 
     This application is related to Ser. No. 869,554, filed Apr. 15, 1992, Ser. No. 869,559, filed Apr. 15, 1992, and Ser. No. 08/101,646, filed on even date with this application, all assigned to the present assignee, the disclosures of which are, in their entirety, each specifically incorporated by reference herein. 
     FIELD OF THE INVENTION 
     This invention pertains to computer programs enabling users to edit images, especially images of text, graphic diagrams, and freehand drawings. Typically, the image being edited is displayed to the user on a computer screen or other imaging device, and the user performs operations by typing strokes at a keyboard and/or by making gestures and pressing buttons using one or more pointing devices such as a mouse or stylus. 
     BACKGROUND OF THE INVENTION 
     Among the most important user operations are those enabling the user to select an object or objects in the image to which further operations subsequently will be applied, e.g. move object, delete object, change object size, etc. The object(s) selectable may include any combination of the following: single characters, single words, lines or paragraphs of alpha numeric text such as found in an image of a page of text; graphic symbols, arrowheads, and geometric figures including lines, circles, and rectangles such as found in graphic drawings; and contiguous isolated strokes, stroke fragments bounded by corners, and stroke fragments bounded by junctions such as found in freehand sketches. The issue of determining which visible items in an image may be made available as selectable image objects is the subject of copending application Ser. No. 08/101,646. In that case, a graphic editing application program maintains a set of selectable image objects during the course of an image editing session. This invention relates to enabling the user from time to time to select for further processing one or more of these objects as conveniently as possible. 
     An important problem faced by any user-interactive image editing tool is therefore the determination of which object or objects in the image are intended by the user to be indicated by a given set of keystroke and/or stylus gesture commands. Keystrokes are capable of specifying symbolic labels or identities unambiguously, but they are an awkward and unnatural interface for the inherently spatial information contained in a displayed image. Conversely, gestures made with a pointing device are convenient for specifying spatial information in the form of locations on an imaging surface, but can lead to ambiguous specification of the object(s) the user intends to select when several objects occupy the same region of the image. Stylus-based selection can be done, for example only, by the following means: (1) having the user touch the stylus or press a mouse button at a single point in the image whereafter the program selects the object or object&#39;s whose location parameter lies at or nearest to that point; (2) having the user touch the stylus or press a mouse button at a point in the image whereafter the program selects the object(s) whose spatial extent most nearly approaches the location specified; (3) having the user draw a closed or nearly closed curve whereafter the program either selects all objects sufficiently enclosed by, or else all objects whose location parameters are enclosed by, the closed curve. 
     The first two methods fail to support user selection of objects in a very important situation, namely, when the set of objects that the user may wish to select among shares overlapping support at the level of marks in the image. Here, the user may wish to select just a vertical line, just a horizontal line, or an entire corner shape. Specifying a single point on one of these lines does not provide sufficient information to distinguish among the alternatives. Moreover, the third method (encircling intended objects) becomes unacceptable when additional objects are found within the region enclosing the desired objects. 
     SUMMARY OF THE INVENTION 
     The object of the present invention is to provide a method and apparatus which will interpret users&#39; simple, natural gestures in order to distinguish the object(s) in an image that the user intends to select. 
     In accordance with the invention, the foregoing object is achieved by the novel union of user interface design technology with concepts from the field of computer vision. 
     In accordance with one aspect, the invention conjoins two key concepts. First, the rough location, size, and shape of objects in the image is summarized by a first characteristic descriptor, representing a parametric &#34;pose&#34; computed for each object. Next, a second characteristic descriptor, i.e. a &#34;gesture matching&#34; function, is provided in order to select the single object, or else the set of objects, that best comports with the user&#39;s selection gesture. When most closely matched, these key characteristic descriptors permit simple and natural user gestures to distinguish among a large set of graphic objects that may overlap both spatially. User gestures can be simple slashes passing through the object, or quick, coarse approximations of objects&#39; shapes. 
     In accordance with a further aspect of the invention for selecting portions of objects, primitive curve or line segments having no crossings, junctions or sharp corners are approximately linked end to end to define paths. The paths are evaluated to estimate the similarity between them and a selection gesture curve, in order to enable selection of the path that most closely approximates the selection gesture curve. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a display editing system in accordance with the invention. 
     FIGS. 2a-e show a plurality of inputted image objects. 
     FIG. 3 shows a plurality of overlapping image objects. 
     FIGS. 4a and b shows a plurality of selectable objects. 
     FIGS. 5a-f shows the relationship between gesture and object. 
     FIG. 6 shows the factor used in analyzing an image object. 
     FIG. 7 is a flow chart illustrating the pose description vector of an object on gesture. 
     FIG. 8 schematically illustrates the selection function. 
     FIG. 9 is an overall flow chart of the selection routine. 
     FIG. 10 illustrates an aspect of selection according to the invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     One embodiment of a display editing system which is the subject of the present invention is shown generally in FIG. 1, wherein an input/display component 10 is illustrated, along with a data input device 12. The input/display component is a combination display device as well as an input device. Thus input data entered by the input device 12 is shown on the display as entered. The input device 12 is any form of pointer or pointing device, such as a stylus, mouse, or even the operator&#39;s hand, sensed by appropriate proximity or other form of sensing devices. Other forms of input, such as scanned hard copy is also employable. Thus, data inputted by the input device 12 to the screen 10 and displayed on the screen is entered by means of a digitizer 14 which in turn drives a display driver 16 for creating images on the screen in real time as data is entered. The data digitized by the digitizer 14 is conveyed to a CPU 18, wherein it is processed by under control of a program stored in the program memory 20, and the results stored in a data memory 22. The display screen 10 can be employed to perform editing or drafting functions as desired by means of a menu selection 24, through the input device 12, and which is displayed directly on the display screen 10, along area 24. 
     The foregoing digitizer input and display technique is representative of any of a plurality devices for the input and display of image objects, examples of which are readily apparent in the prior art. 
     FIG. 8 illustrates generally the procedures employed in accordance with the invention to select an image object, i.e. the selecting of an object or objects in an image that are best indicated by a given user-input selection gesture. To accomplish this, an overall gesture matching function, shown in FIG. 8, chooses among the outputs of a cadre of independent subfunctions. Each subfunction provides for a characteristic style or format of user selection gestures. For example, one subfunction may provide for the selection of a set of objects by encircling them, while another may let the user select a single object by drawing a slash through it. 
     Each subfunction performs object-gesture matching under its own set of matching criteria, and it computes two items. The first item is the single object, or set of objects, that best matches the selection gesture, under that subfunction&#39;s criteria. The second item is a subfunction-confidence-score that estimates the &#34;confidence or &#34;likelihood&#34; of this subfunction as the gesture selection format intended by the user. The overall gesture matching function compares subfunction-confidence-scores across gesture matching subfunctions, and returns the object(s) selected by the highest scoring subfunction (as long as this falls above a threshold value). As shown in FIG. 8, user selection gesture 96 and precompiled or currently constructed selectable graphical objects 98 are each processed through a series of selection subfunction operations 102. The output of each selection subfunction is a series of selected objects 104 and the respective confidence score 106 representing each of those objects. In a two step process, described further below, the series of objects scores are then gated in a final analysis 108 to produce the best match of an object for a gesture. 
     The architecture of this overall gesture matching function permits the present invention to incorporate an extensible set of object selection techniques. The user simply executes a selection gesture and the system infers user intent by comparing subfunction-confidence-scores across the available object selection subfunctions. In order that subfunction-confidence-scores may be compared across subfunctions in a meaningful way, in their design they must be calibrated to a common standard. Under a preferred standard, each score ranges between 0 and 1, where 0 indicates that subfunction has no confidence that the object(s) it returns corresponds to the user&#39;s intent, while 1 indicates absolute certainty. For example, an extremely simple measure of confidence score for an &#34;encircling&#34; gesture may be expressed as one minus the weighted ratio of the distance between the curve&#39;s endpoints and the curve&#39;s length. 
     Two selection subfunctions are disclosed herein that may be used as selection subfunctions 102 to produce selected objects 104 in the above architecture. It is apparent, however, that the invention is not limited to these two embodiments. First, a &#34;pose-matching&#34; routine results in a selection of a single object that is most similar to (least different from) the location, orientation, size, and shape of the user selection gesture. This routine is especially useful for singling out objects found in close or overlapping proximity to many other spurious objects. Second, a &#34;path-matching&#34; routine selects and computes a set of objects in the image that best corresponds to the path of a selection gesture. This routine is especially useful for quickly selecting several objects lying along a curvilinear path. It is of course apparent that other techniques may alternatively be employed. 
     Pose Matching Selection 
     FIG. 2a-e, illustrates one aspect of the invention, wherein FIG. 2a is a free hand example of a line drawing graphic image or a structural graphic image. FIGS. 2b-e each show objects, as indicated by the solid lines, that a user might wish to select from the image. 
     Referring to FIG. 3, a plurality of overlapping image objects drawn on a display screen is illustrated. Object selection by conventional spatial location fails when the objects lie in roughly the same location on the imaging surface, as do the rectangle, circle and triangle in this figure. 
     Referring to FIGS. 4a and 4b, selection by pointing to a point on an object fails when objects share support. Thus, in FIG. 4a, three selectable objects are constructed from two line segments. Conventional selection of the horizontal segment does not distinguish between selection of only the horizontal segment versus selection of the &#34;L&#34;. In FIG. 4b, conventional encircling gestures fail when spurious objects fall within the region enclosed by the target selected objects. 
     With respect to FIGS. 5a-f, selection of one of a plurality of overlapping image objects, in accordance with the invention, is made by appropriately coupling a gesture to an object. Thus, in FIG. 5a, the object selected by gesture 30 is the rectangular object 32. In FIG. 5b, circle gesture 34 selects the circular object 36. In FIG. 5c, the line gesture 38 selects the triangular object 40. In FIG. 5d, gesture 41 selects the short line segment 42. In FIG. 5e, gesture 44 selects the long line segment 46 passing through the box 48. In FIG. 5f, the circle gesture 50 selects the box 52. Note than in FIG. 5c, the gesture 38 need not even closely resemble the object selected, but is just a shorthand indication of location, orientation and size of the target object. Similarly, a horizontal gesture could be used to select the rectangle in FIG. 5a. 
     For a typical graphic object, and for the shape of a selection gesture made with a pointing device, referring to FIG. 6, an effective parametric description of the pose, that is, the object or gesture&#39;s 60 rough location, orientation, size, and shape, consists of the following five parameters: the x-location (x) on the abscissa 62, y-location (y) on the ordinate 64, orientation (θ) 66, scale factors, such as length 68 and or width 69, and aspect ratio (r) parameters of an oriented bounding box 70 associated with the object (with respect to a fixed global coordinate system). 
     The x-y location may be computed as the centroid of the ON pixels of the object. The orientation parameter may be taken as the orientation of the principle axis of inertia through the centroid. The scale parameter may be computed as a linear function of the logarithm of the length of the object (linear extent along the principle axis of inertia). The aspect ratio may be taken as the maximum of a fixed minimum value and the ratio of the object&#39;s width (linear extent along the axis perpendicular to the principle axis of inertia) and length. The pose description vector is extensible and may be imbued with more parameters than the five named above in order to provide more distinguishing information. As shown in FIG. 7, the data input 80 is employed to derive x-y location 82, orientation 84, aspect ratio 88, and any additional parameters 90 to define a pose description vector 92 which is a characteristic description representative of an object or gesture. For example, additional parameters could include higher order geometric moments, angular closure, and contour texture measures. The pose description vector defines, for each image object, a first characteristic descriptor, stored in location 94. It also defines, for each user selection gesture, a second characteristic descriptor, stored in a location 96. A comparison and analysis function 98 is then performed between the defined graphical objects and the user selection gesture to determine a confidence level for determining that object which best meets the user selection gesture. The resultant selected object 100 is then defined. The confidence level and selection process is described in more detail in connection with FIG. 8. 
     2.1 Pose-Matching Routine 
     The pose-matching routine (FIG. 9) for assessing the similarity/difference of two poses must take account of the relative significance of the location, orientation, scale, and aspect ratio parameters jointly in a highly nonlinear fashion; a simple Euclidian distance measure is inappropriate. For example, the difference in the orientation parameters of poses is significant when the aspect ratio of both objects is relatively high (near 0) but becomes insignificant when either object displays low aspect ratio (near 1). For the purposes of the present implementation of the invention, the following is the formula for the pose difference D between two poses, ##EQU1## The constant parameters are assigned the following values: 
     
         ρ.sub.1 =0.75; ρ.sub.2 =0.2; ρ.sub.3 =0.693. 
    
     The difference formula is incorporated in the pose-matching routine by prescreening candidate objects on the basis of spatial location using a spatially- and scale-indexed data structure which is described in the aforementioned copending application Ser. No. 08/101,646. The pose difference between the selection gesture and each of these preselected objects is computed in turn, and the object with the least difference is returned. Since the pose match distance D above ranges from 0 (perfect match) to 1 (no match), the subfunction-confidence-score may be taken simply as 1-D. 
     The overall matching operation as described in FIG. 9, first shows an input gesture applied to the system, block 120. Next, the system creates pose parameters for the input gesture, block 122. Then, from a collection of objects stored in a data structure, block 124, candidate objects are selected based on proximity to the input gesture, block 126. Next, the system does a lookup for pose parameters for candidate objects, block 128. The system then compares the sets of pose parameters for the input gesture with those of candidate objects, block 130, and chooses the most similar object. 
     Path Matching Selection 
     To effect the path matching operation as shown in FIG. 9, this invention provides a path-matching selection subfunction which collects a set of image objects that best accounts for the path of the selection-gesture-curve. For this subfunction, first define a path to be a sequence of primitive curve segments (curve segments containing no crossings, junctions, or sharp corners) approximately linked end-to-end. Next, define a path-quality measure that estimates the similarity between a path and a selection-gesture-curve. In more detail, the path-quality measure for any path is computed by a set of steps in a routine as follows: 
     1. Begin with the curve-segment deemed to be the beginning of the path sequence. Call this the &#34;leftmost&#34; segment. Project the &#34;leftmost&#34; end of this segment onto the selection-gesture-curve, as shown in FIG. 10. 
     1a. Initialize the variable, current-segment to be the leftmost segment. 
     1b. Initialize the variable, last-projection-proportion to be the proportion of the selection-gesture-curve to the left of the projection point. 
     1c. Initialize the variable, best-possible-score s b  to be the proportion of the selection-gesture-curve to the right of the projection point. 
     1d. Initialize the variable, actual-score, s a  to o. 
     2. Compute a variable called fit-quality-factor, ƒq for the current-segment, as follows, ##EQU2## where p 4  is a tunable parameter for which a value of 0.5 is satisfactory, d m  is the maximum distance between a point on the current-segment and the selection-gesture-curve, and 1 is the length of the current-segment. 
     3. Set the variable, next-projection-proportion, p n  to be the proportion of the selection-gesture-curve to the left of the projection of the &#34;right&#34; end of the current-segment onto the selection-gesture-curve. 
     4. Set a variable called this-segment-selection-curve-array-fraction, f r  to be the difference between the next-projection-proportion and the last-projection-proportion. 
     5. Set a variable called this-segment-projection-length, p 1  to be the curve distance along the selection-gesture-curve between the projections of the left and right ends of the current-segment. 
     6. Set a variable called excess-segment-length-cost, c el  to be the value, ##EQU3## 
     where p 5  is a tunable parameter for which the value.25 is satisfactory. 
     7. Update the variable actual-score 
     
         s.sub.a =s.sub.a +ƒ.sub.q ƒ.sub.r -c.sub.el 
    
     8. Update the variable, best-possible-score: 
     
         s.sub.b =s.sub.a +1-ρ.sub.n 
    
     9. Set the leftmost-segment to be the next segment in the path sequence, and to proceed to step 2. 
     For the main body of the algorithm, maintain a data structure called the path-list consisting of a list of paths along with their actual scores s a , and their best-possible-scores, s b . The basic search algorithm proceeds as follows. 
     1. Initialize the path-list with the set of curve-segments possessing an endpoint lying within a threshold distance of the &#34;leftmost&#34; endpoint of the selection-gesture-path. 
     2. Initialize the variable current-actual-score S a  to be the maximum actual score s a  over the paths in path-list. 
     3. Initialize the variable current-best-possible-score S b  to be the maximum best-possible-score s b  over the paths in the path-list. 
     4. Set the variable, best-possible-path to be the path in path-list having the greatest best-possible-score. 
     5. Perform an expansion operation on the best-possible-path. This consists of extending the path with all curve-segments one of whose endpoints falls within a threshold distance of the rightmost end of the rightmost segment in the path. The result of this operation is a list of new paths, one for each such extension segment found. Call this result, current-expanded-path-list. 
     6. Compare each path in path-list with each path in current-expanded-path-list, and remove any path whose rightmost curve-segment is the same as the rightmost curve-segment of any other path which contains fewer curve-segments. 
     7. Update the variable, path-list, to be the union of path-list and expanded-path-list. 
     8. Examine each path in path-list. Update the variable current-acutal-score, S a , to be the best-actual-score among these, and set the variable, best-actual-path to be the corresponding path. 
     9. Eliminate from path-list any path whose best-possible score s b  is less then the current-actual-score S a . 
     10. Eliminate from path-list any path which has already been expanded and for which its actual-score s a  falls below the current-actual-score S a . 
     11. If ony one path remains, output it as the best fitting path and output its actual score s a  as the confidence value. If more than one path remains, proceed to step 5. 
     Certain changes and modifications of the embodiment of the invention herein disclosed will be readily apparent to those of average skill in the art. Moreover, uses of the invention other than for coordinate determination in a digitizer system will also be readily apparent to those of skill in the art. It is the applicants&#39; intention to cover by the claims all such uses and all those changes and modifications which could be made to the embodiments of the invention herein chosen for the purposes of disclosure which do not depart from the spirit and scope of the invention.