US 5,510,838 AGrant
Apparatus and Method for Picture Representation by Data Compression
Issue Date:1996-04-23
•28 Claims
•32 Drawing Sheets
Abstract
Processes for pictorial representation by data compression including dividing a picture into regions of designated brightness values, fixing a characteristic scale for each region representing a number of pixels, dividing each region into cells, identifying each cell representing the basic structure of each cell by way of models, and storing and/or transmitting the data for each such model in the form of primary compression of the picture.
Metadata
Assignee
- IGP, Research and Development Ltd.
Inventors
- Yosef Yomdin
- Yoram Elihai
- Miriam Briskin
Application Information
Application Number:US 3432106
Filing Date:1994-11-22
Priority Date:1992-01-08
Art Unit:265
Classifications
IPC:
H04N 730H04N 732
Field of Search:
348384;390;429;671
Patent Drawings (32 sheets)
Description
FIELD OF THE INVENTION
This invention relates to apparatus and methods for representing pictures by data compression, particularly, but not exclusively, for the purpose of storing and/or transmitting the compressed data and subsequently reconstructing the picture in a manner as faithful as possible.
BACKGROUND OF THE INVENTION
The representation of various objects by data compression is a problem with which the art has been increasingly occupied in recent times. The problem is encountered in many cases, e.g. when a picture, or a succession of pictures, for example constituting a television broadcast, has to be registered in a magnetic memory, such as a video tape, or is to be transmitted over a distance by electromagnetic waves or by cable. On the one hand, it is of considerable economic importance to increase as much as possible the amount of optical and acoustic information that can be registered on a given memory, whereby to reduce the size and cost of magnetic tapes or other information storage means. On the other hand, the available wave bands are increasingly crowded, and so are the cables, and it is increasingly necessary to compress the transmitted data, so that as great a number of them as possible may be transmitted over a given frequency or by a given cable. Data compression problems, therefore, are increasingly acute, both in data storage and in data transmission.
In particular, the art has dealt with the problem of compressing the data which represent an object, e.g. a picture. A process for the production of images of objects is disclosed in EPA 0 465 852 A2, which process comprises the steps of: (1) approximating the object by a model comprising at least one differentiable component; (2) establishing the maximum allowable error and the degree of the polynomials by which the differentiable components of the model are to be approximated; (3) constructing a grid of a suitable pitch; (4) computing the coefficients of the Taylor polynomials of the aforesaid differentiable components at selected points of said grid.
However, none of the method and apparatus of the prior art are wholly satisfactory. Either the degree of compression is too small, or the picture cannot be faithfully reconstructed--viz. "decompressed"--from the compressed data, or both. There is another important requirement, not satisfied by known compression methods: application of image processing operations on compressed data, and natural extendibility of the compression scheme to video sequences compression.
In describing this invention, two-dimensional pictures, in particular color pictures, such as those created on a television screen, are considered, but three- or more than three-dimensional objects could be represented by the apparatus and method provided by the invention, e.g. by defining them by means of views or cross-sections in different planes.
The efficiency of a compression method depends on the one hand on the degree of compression, which should be as high as possible, but on the other on the faithfulness with which the picture reconstructed from the compressed data reproduces the original one. Perfect reproduction is obtained when the two pictures are visually undistinguishable. Two pictures are considered to be "visually undistinguishable", as defined by the MPEG (Motion Picture Expert Group of the International Standard Organization), when any ordinary viewer cannot distinguish between them when viewing them from a distance equal to six times the picture height. Different requirements for visual undistinguishability may be defined for different applications, such as: high end computer imaging, PC computer imaging, PC or video games, multimedia, pre-press applications, fax, colour video conferencing, videophone, archiving, medical imaging, aerial picture analysis, etc. However, the invention does not always require that the picture representation and the original be visually undistinguishable, though this is generally preferred: the degree of similarity may depend on the particular application and on the degree of faithfulness that is required of the representation in each case.
SUMMARY OF THE INVENTION
Broadly, the method of picture representation by data compression according to the invention comprises the steps of:
1. subdividing the picture into regions;
2. registering the values of a brightness function (or "grey levels") preferably at each pixel of the picture;
3. fixing for each region a characteristic scale (hereinafter indicated by L) preferably defined in terms of a number of pixels;
4. dividing each region into cells, each comprising a number of points (pixels) defined by two variables (coordinates), said cells having linear dimension in the order of L, and preferably equal approximately to L;
5. identifying in each cell the "basic elements" or "structures", as hereinafter defined;
6. in each cell, representing the basic elements by models (or submodels), as hereinafter defined; and
7. storing and/or transmitting, for each cell the data defining each model, said data together representing the "primary compression" of the picture.
Optionally, said data may be further compressed by any suitable methods, or otherwise processed as will be explained hereinafter.
The regions into which the picture is subdivided are chosen in such a way that the data to be stored and/or transmitted for each of them will not be too numerous, and thus will not create files that are too cumbersome, particular with regard to the hardware that is available and to its capacity. Therefore in some cases the whole picture may be considered as a single region, or conversely, in other cases the regions will only be small fractions of the whole picture. Thus a suitable subdivision into regions will offer no difficulties to skilled persons.
The picture to be represented is defined by the brightness values of the basic colours (usually three) for each pixel, or by equivalent data. Said values may be available in the form of computer files, or may be transmitted by a picture generating apparatus, e.g. a TV camera, or may be read by means of canners. In any case, when a colour picture is to be compressed, the method according to the invention can be applied separately to each of the three (or two or four) basic colours, and corresponding monochrome picture images are obtained. Alternatively, transformation of colour data, by methods known in the art (see e.g. R. J. Clarke, Transform Coding of Images, Academic Press, 1985, from page 248) may be carried out, and the three original monochrome signals, corresponding to the RGB system, can be transformed into one (monochrome) luminance signal and two reduced bandwidth colour-information carrying signals (sometimes referred to collectively, hereinafter, as "colour information signals).
Therefore, hereinafter the expression "brightness function" (or "grey levels") should be understood as meaning the function defined by the array of the brightness values of any basic color or of the values of any of the luminance and/or colour information carrying signals.
By decompressing the compressed and stored and/or transmitted data relative to the various cells, which contain all the chromatic information required, a "picture image", viz. an image which colosely approximates the picture, can be reconstructed. Said data include a brightness value for each pixel and for each basic colour, or equivalent information deriving from the transformation hereinbefore mentioned, and this information permits any apparatus capable of creating an image, be it e.g. a computer which has stored the said information in its memory, or a printer, a still camera, a TV camera, and so on, which receive the information from a computer, to create the picture image. Such apparatus and their operation are well known to persons skilled in the art.
The information defining, in any chosen way, the brightness distribution of the various colors or signals, may be a function of time. This will occur e.g. whenever a motion or a television picture is compressed and reconstructed. In such a case, the method steps according to the invention should be carried out in a very short time, e.g. in the order of 30 frames per second.
The apparatus according to the invention comprises:
A-means for defining the brightness values of the basic colours, or equivalent information, preferably at each pixel of the original picture;
B-means for registering the said brightness values or equivalent information, as sets of values associated with the pixels of a number of cells, of predetermined size, of each region of the picture;
C-means for determining the parameters of any one of set of basic models, in particular by minimizing the square deviation of the values of said basic model from the values of a brightness function at the pixels of the cell; and
D-means for storing and/or transmitting information defining the types of basic models chosen and the said parameters thereof.
The means A- for determining the brightness values of the points of the cell may be different depending on the particular embodiment of the invention. They may consist, e.g., merely in means for relaying to the apparatus values which are defined by means that are not part of the apparatus, in particular by the apparatus which creates or transmits the original picture. Thus, if the invention is applied to the compression of a television movie, for the purpose of registering it on a video tape, the brightness values relative to each point of the television receiver screen are transmitted, as functions of time, from a broadcasting station via electromagnetic waves or via cable, and these same values can be relayed directly to the registering means B-. The brightness value determining means will then essentially be a part of the television receiver: said values will be registered in the apparatus according of the invention concurrently with their appearing as optical values on the receiver screen. In this case, one may say that the picture is being compressed in real time. A similarly situation will prevail if the picture to be compressed is not being transmitted, but has been registered on a magnetic tape: the reading of the tape, that would be carried out in order to screen the registered picture in a normal way, will directly provide the brightness values. In other embodiments, the invention may be used to compress a picture that is already optically defined. Then the brightness value determining means will be normally constituted by a scanner.
The storing and/or transmitting mans D- may be conventional in themselves, and may be constituted, e.g. by magnetic tapes, such as video tapes, by optical or magnetic disks, or by television broadcasting apparatus, and the like.
The stored and/or transmitted, compressed picture must be reconstructed by decompression from the compressed data, so that it may be viewed. Therefore, there must be additionally provided
E-means for reconstructing the picture by producing at each point of each cell a color brightness, for each color, the value of which is defined by the value at said point of said basic model having said parameters.
In some embodiments, decompressing mans E- are part of the apparatus according to the invention. Thus, if the invention is used to compress data for recording television pictures on video tapes, the apparatus will comprise means for actuating the television screen to screen pictures defined by the compressed data. This will generally occur when the reconstructed picture must be seen at the location at which it has been compressed. However, if the point at which the picture is to be seen, is different from the one at which the apparatus comprising components A- to D- is located, means E- will not be physically a part of sad apparatus. In general, means E- are functionally, but not necessarily or even usually structurally connected with means A- to D-. These latter, while usually connected with one another, need not necessarily be structurally combines.
In a preferred aspect of the invention, the basic structures comprise background areas, edges, ridges, positive and negative hills and, optionally, saddles as hereinafter defined.
In a preferred aspect of the invention, the identification of the basic structures and their representation by models are carried out by the following steps:
I. constructing geometric models representing said structures;
II. associating to each of said geometric models a mathematical model representing it;
III. condensing said models to define a global model for each cell of the regions; and subsequently
IV. encoding and quantizing the data defining said global model; wherein steps II and III may be partly concurrent.
It should be understood that, since, as has been said before, the process of the invention is carried out separately on each basic color or on each luminance or color information carrying signal, the "objects" which the geometric models are intended to represent may not be, and generally are not, actually physical objects which the eye would discern in the picture, but represent characteristics of the distribution of the basic color brightness or the value of the color signal under consideration. Therefore, in principle, the objects and the corresponding models could be quite different for different basic colors or color information signals. Thus, in principle, the amount of compressed data required to represent a color picture would be three or four times as large as the amount required for each basic color or color information signal. However, it has been surprisingly discovered that it is possible to identify in the models two different kinds of parameter, which will be called respectively "geometric parameters" and "brightness parameters", such that the geometric parameters are, in most practical cases, the same for all the basic colors or color information signals. Thus, in most cases it is enough to process the monocromatic luminance signal and add the color data later, which color data, when operating according to the invention, may require as little as an additional 3% to 10% approximately of data. This is an important feature of this invention, particularly in its preferred aspect.
It is therefore another preferred aspects of the invention a method of compressing color pictures, which comprises carrying out the compression method hereinbefore defined with reference to one basic color or monochrome signal and successively repeating it for the remaining basic colors or color information carrying signals, by using the same modes with the same geometric parameters and determining the appropriate brightness parameters, as will be defined hereinafter.
In the process according to the invention, geometric and/or mathematical models are considered as "representing" picture elements or other geometric and/or mathematical models whenever they approximate these latter to a degree determined by absolute or relative parameters or thresholds, the determination of which is part of the invention. The absolute thresholds have a fixed value. The relative thresholds depend on the values of the quantity considered over a certain area, or over the entire region. Usually, but not necessarily, the relative thresholds have the form of kM, where k is a coefficient and M is the average value of the quantity over the area that has been chosen for averaging.
The various thresholds will be defined as they come into play during various stages of the process, for specific embodiments of the invention.
Definition of the basic elements or structures
By "basic elements" is meant, in the broad definition of the invention, a number of simple structures such that in combination they approximate any actual structure or "object" that can be found in the picture. In carrying out the invention, a list of such basic elements is prepared for each application. Usually the same list is adequate for all applications of the same nature, e.g. for all TV pictures.
As used in this specification, the term "submodel" is to be construed as meaning: a) an array of grey levels of RGB values for a certain part of a picture (e.g. grey level z=.PHI..sub.ab (x,y), wherein .PHI. is an expression depending on parameters a and b); or b) the geometry of certain objects on a picture (e.g. the form of a certain curve can be represented as y=.PSI..sub.cd (x), such as e.g. y=cx+dx.sup.2).
The term "model" means an expression consisting of one or more submodels, and allowing for computing for any given x,y a grey level z=.PHI.(x,y).
The parameters of submodels, representing the geometry of objects, are called "geometric parameters", and the parameters of submodels, representing grey levels, are called "brightness parameters". Some of the models explicitly contain submodels responsible for the position and the geometry of the described objects, as shown in the following example:
In the model z=.PHI.(x,y), wherein .PHI. is equal to a.sub.1 x+b.sub.1 y+c.sub.1, if y.gtoreq..alpha.x.sup.2 +.beta.x+.chi., and is equal to a.sub.2 x+b.sub.2 y+c.sub.2, if y<.alpha.x.sup.2 +.beta.x+.chi., the geometric submodel is the curve y=.alpha.x.sup.2 +.beta.x+.chi. and .alpha.,.beta.,.chi. are the geometric parameters. z=a.sub.1 x+b.sub.1 y+c.sub.1 and z=a.sub.2 x+b.sub.2 y+c.sub.2 are two other submodels of this model.
Polynomial models or submodels are those given by polynomials of low degree (usually .ltoreq.4), with coefficients assuming a limited number of values (usually .ltoreq.256).
To "represent" a picture, or a part thereof, or a certain object that is in the picture, by a model, means to replace the original grey or RGB levels z=f(x,y) by the grey level model values z=.PHI.(x,y).
In all the definitions of picture objects (not of models and submodels), hereinafter, reference is made to a given part of a picture of a size approximately equal to the scale L. Therefore said definitions are scale-dependent. A list of basic elements, particularly suitable for representing TV picture, but also for other applications, will now be described. However, persons skilled in the art may modify it and add other basic elements, when dealing with other applications or with particular cases of the same application.
Smooth objects and smooth regions--The word "smooth" is used and will always be used hereinafter to define those brightness distributions (brightness surfaces) that can be represented by a polynomial P(x,y) of a low degree, e.g. a degree generally not higher than 4, in a visually undistiguishable way. Thus smooth regions are those in which the brightness surface z=f(x,y) defining the distribution of a colour in the picture, can be so represented; and smooth objects are those any part of which inside any cell can be so represented by a polynomial model or submodel of a low degree. Analogously, a "smooth curve" is a curve in the neighbourhood of whose intersection with any cell the picture can be represented by a model, within which the curve is defined by a polynomial of low degree.
Simple models or submodels are those containing a small total number of parameters (usually .ltoreq.6), each of these parameters assuming a limited number of values (usually .ltoreq.256).
Simple models or submodels are those containing a small total number of parameters (usually .ltoreq.6), each of these parameters assuming a limited number of values (usually .ltoreq.256).
Simple objects--An object, part of a picture, is said to be "simple", if for any cell the part of the object inside the cell can be represented in a visually undistinguishable way (as hereinbefore defined) by a simple model or submodel.
Curvilinear structures--Are those in which the brightness distribution can be represented by a surface z=f(x,y), generated by a simple (as the word is defined hereinbefore) profile, a point of which follows a simple curve, the parameters defining the profile being simple functions of the position of said point on said curve. Curvilinear structures can be unbounded (in the cell under consideration), or bounded at one end, or at both ends to constitute a segment. They can also form nets, when several curvilinear structures are joined at some points or portions, that will be called "crossing".
Local simple elements--An element is "local" if its diameter is comparable with L, at most 2 to 3 L. Local simple elements are those that are local and simple, as the latter word is defined hereinbefore.
In practice, the aforesaid types of brightness distributions are never found in their pure form, but types that are sufficiently similar to be treated as such are generally found.
The determination of the characteristic scale L is a fundamental step. If L is too small, the structure found in the cells--the "object"--can easily be represented by basic element models, but the amount of data that will be involved in the compression is too high for the compression to be successful. On the other hand, if L is too large, it is impossible to represent the objects in a visually undistiguishable way by means of basic element models.
Therefore the choice of L will depend on each specific application, and L will be chosen as the largest scale that permits to approximate the actual objects by means of basic element modes in such a way as to achieve a visually undistinguishable representation, or at least as faithful a representation as desire for the specific application; and it will also depend, of course, on the quality and resolution of the original picture.
L is expressed in terms of pixels. For instance, when applying the invention to the compression of television images, it is found that L should be comprised between 10 and 16 pixels, e.g. about 12 pixels. For most applications, L may be comprised between 6-8 and 48 pixels, but these values are not a limitation. A frequent value is L=16. It is appreciated that each cell, if square, contains L.times.L pixels, so that if L is 16, the cell will contain 256 pixels. A square cell having the dimensions L.times.L will be called the "standard cell". Since most hardware is designed to operate with ASCII symbols, such a size of cell or a smaller one is convenient. If a certain object is simple or smooth with respect to a given scale L, it is simple or smooth with respect to any smaller scale.
It has been found that, for representing television pictures, if the picture is divided into cells of 4.times.4 pixels, and in each cell the grey levels are approximated by second degree polynomials, an essentially visually undistinguishable picture representation is obtained. Therefore in a television picture any object is smooth and simple on a characteristic scale of 4. Furthermore, for such an application, the array of basic elements hereinbefore described is adequate and sufficient for picture representation on any scale between 8 and 16, preferably of 12.
In the preferred aspect of the invention, the basic structures are defined as follows:
background (also called sometimes "smooth") areas are those wherein the values of the brightness function may be considered to be changed slowly;
edges are curvilinear structures on one side of which the values of the brightness function undergo a sharp change;
ridges are curvilinear structures defined by a center line, the cross-sections of which in planes perpendicular to the center line are bell like curves, and they are positive or "white" (ridges proper) or negative or "black" (valleys), according to whether at the point of each cross-section located on the center line the brightness function value is a maximum or a minimum;
hills are points or small areas at which the brightness function value is a maximum (positive--white--hills or hills proper) or a minimum (negative--black--hills or hollows) and decreases or increases, respectively, in all directions from said point or small area.
saddles are curvilinear structures which comprise a central smooth region bounded by two edges, wherein the brightness function values increase at one edge and decrease at the other. They may be treated as basic structures, for convenience purpose, or they may be separated into their aforesaid three components: two edges and an intermediate smooth area.
The said basic structures represent a particular case of the basic elements hereinbefore defined. In particular, (white and black) ridges and edges are specific cases of curvilinear structures. Hills and hollows are specific cases of local simple structures.
Preferably they are identified through the derivatives of the brightness function z=f(x,y), x and y being the Cartesian (or other) coordinates of a coordinate system of the region considered, or through the derivatives of an approximating function, as will be explained hereinafter.
DESCRIPTION OF THE DRAWINGS
In the drawings:
FIGS. 1 to 50--geometrically illustrate various stages or particular cases of the processes described as embodiments of the invention, and each of them will be described, in order that its content may be clearly understood, at the appropriate stage of the description of preferred embodiments;
FIG. 51 is an original RGB still picture of the size approximately 480.times.720 pixels;
FIG. 52 represents the same picture after compression by the process according to the invention to 1/50 of the initial data volume and decompression;
FIG. 53 represents the same picture after compression to 1/40 by the standard JPEG method and decompression;
FIGS. 54, 55, 56 show the stages of analysis of a small area of a 48.thrfore.48 pixels region of FIG. 51, shown at a greatly enlarged scale, wherein;
FIG. 56 represents the result of the edge-line analysis;
FIG. 57 represents the original of the 48.times.48 pixels region, its representation by the global model before quantization and after quantization (small pictures from left to right). Big pictures represent the same images in a 1:5 zoomed form;
FIG. 58 represents the result of a picture processing operation, performed on a compressed form of the above picture;
FIGS. 59, 60, 61 represent three color separations (R,G,B) of the picture of FIG. 52 compressed and decompressed according to the invention;
FIGS. 62-67 represent the video sequences compression;
FIG. 62 represents 10 frames (as hereinafter defined) of a videosequence (on a 48.times.48 region), the upper line being the original sequence and the bottom line the sequence after compression (1:150);
FIGS. 63 and 64 show the results of analysis of the frames 4 and 7 (control frames) as still pictures;
FIG. 65 shows (by yellow and blue components) the results of the motion predicted for the components from frame 4 to frame 7;
FIGS. 66 and 67 show the interpolated positions of the components (blue lines) against the real position (yellow lines) on the intermediate frames 5 and 6;
FIG. 68 is a picture to be represented by compression;
FIG. 69 is a representation obtained by decompressing data that had been compressed at a ratio of 1:35;
FIG. 70 is another picture to be represented by compression; and
FIG. 71 is its representation obtained by decompressing data that had been compressed at a ratio of 1:50.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
In the process of the invention in tis preferred aspects, the following steps are carried out:
Preferably, a grid is fixed in the region considered.
Preferably, each point of the grid considered is assigned to one of three domains indicated as A.sub.1, A.sub.2 and A.sub.3, according to the values of the derivatives of f(x,y) at that point and to the following criteria.
Domain A.sub.1 contains all the points where all the said derivatives of orders 1 and 2 are small and do not exceed a certain threshold T.sub.1. A convenient way of expressing that condition, to which reference will be made hereinafter, is to say that the domain A.sub.1 is the set of the points of the grid for which
In the above formula, G.sub.abs and S.sub.abs are thresholds, the values of which will be set forth hereinafter. .lambda..sub.1 and .lambda..sub.2 are the eigenvalues of the matrix ##EQU1## which will be designated hereinafter as W.
Domain A.sub.2 includes the grid points where the gradient of the brightness function f is large This condition can be expressed by saying the set A.sub.2 is defined by
where G.sub.abs is the same as the above and G.sub.rel is a relative threshold equal to K.sub.grad .multidot.M.sub.1 wherein M.sub.1 is the mean value of .vertline..gradient.f.vertline..sup.2 over the region considered. Typical values of the parameter K.sub.grad are between 0.2 and 0.5, and 50.ltoreq.G.sub.abs, S.sub.abs .ltoreq.250.
Preferred values of these coefficients are G.sub.abs =S.sub.abs =100, K.sub.grad =0.3.
Domain A.sub.3 includes the points in which the second order derivatives are bigger than a threshold T.sub.3, while .vertline.grad(f).vertline. does not exceed another threshold T.sub.2. T.sub.3 and T.sub.2 are relative thresholds, viz. they are defined as certain percentage of the average value of the second order derivatives and of .vertline.grad(f).vertline. respectively.
In a more preferred form of the invention, the domain A.sub.3 is actually the sum total of five sub-domains defined by the following conditions:
wherein M.sub.ratio is another threshold (typical values whereof will be given later).
Preferably the brightness function is approximated by an approximating function p(x,y). When this is done, the function p and its derivatives and gradient should be substituted for the function f and its derivatives and gradient in all the formulae in these appear, e.g. as hereinbefore.
The approximating function is any convenient function, preferably involving a limited number of parameters, the values and derivatives of which are close enough to those of the brightness function in the area considered for it to be representative of the brightness function. In particular, it may conveniently be a polynomial of the second degree having the form p(x,y)=a.sub.00 +a.sub.10 x+a.sub.01 y+a.sub.20 x.sup.2 +a.sub.11 xy+a.sub.02 y.sup.2, though a different function, e.g. a polynomial of a higher degree or a function other than a polynomial, might be chosen in particular cases. The coefficients of p(x,y) are determined by minimizing the expression constituted by the sum of the square of the differences between the values of z and p at the grid points offer the entire window considered, or, in other words, by minimizing the square deviation of the function p from the function z over the area considered. More complex functions, including polynomials of degree 3 and higher, can also be used whenever the use is required for a better implementation of the process according to the invention, as well as more complicated measures of approximation than the square deviation.
In this manner, the approximating function and its derivatives will have a given value at each grid point. Preferably, the derivatives used in the following steps of the process of the invention are those up to the order 2. Within the degree of accuracy desired for the process, the derivatives and the gradient of the approximating function p(x,y) can be regarded as being the same as those of the brightness function z=f(x,y).
The matrix W becomes then ##EQU2##
In the aforesaid preferred embodiment of the invention, the same comprises therefore the following steps:
1) The values of a brightness function z=f(x,y) are registered preferably at each pixel of the picture or of a region thereof, if it is chosen to operate successively on a number of regions in order to contain the number of data to be handled at each time. The regions are preferably squares of side R (hereinafter "the region scale").
2) The values of the derivatives of the brightness function z=f(x,y), preferably in order up to 2, e.g. are approximately computed by the following steps. A"window" and a grid related thereto are determined. The window is a square having a side "l" which is ordinarily of a few pixels, preferably between 3 and 6, and more commonly of 4. The grid is constituted by the pixels themselves, if "l" is an uneven number of pixels, and is constituted by the central points between the pixels, viz. the points located halfway between adjacent pixels both in the x and the y direction, if "l" is an even number of pixels. These alternative definitions of the grid are adopted for reasons of symmetry.
3) For each grid point (pixel or central point between pixels), the brightness function z(x,y) is approximated by the approximating function p, preferably a polynomial, as hereinbefore explained.
4) A number of thresholds is fixed. The various thresholds may be fixed or not at different stages of the process, or may vary in different parts of it for specific applications of the invention. But, for convenience of exposition the thresholds will be considered as being all fixed during each step of the process.
5) Each grid point is assigned to one of three domains indicated as A.sub.1, A.sub.2 and A.sub.3, according to the values of the derivatives of the approximating function at that point and to the criteria hereinbefore explained.
Domain A.sub.1 contains all the points where all the derivatives of the approximating function p (from now on considered in place of the brightness function f) of orders 1 and 2 are small and do not exceed a certain threshold T.sub.1. A convenient way of expressing that condition, as noted, is to say that the domain A.sub.1 is the set of the points of the grid for which
In the above formula, B.sub.abs and S.sub.abs are the aforementioned thresholds, the values of which are related to the value of l. .lambda..sub.1 and .lambda..sub.2 are the eigenvalues of the matrix W ##EQU3##
Domain A.sub.2 includes the grid points where the gradient of the averaging function p is large This condition can be expressed, as noted, by saying the set A.sub.2 is defined by
where G.sub.abs is the same as the above and G.sub.rel is a relative threshold equal to K.sub.grad .multidot.M.sub.1 wherein M.sub.1 is the mean value of .vertline..gradient.f.vertline..sup.2 over the entire region or its parts. Typical and preferred values of the parameters or thresholds will be given hereinafter.
Domain A.sub.3 includes the points in which the second order derivatives are bigger than a threshold T.sub.3, while .vertline.grad(p).vertline. does not exceed another threshold T.sub.2. T.sub.3 and T.sub.2 are relative thresholds, viz. they are defined as a certain percentage of the average value of the second order derivatives and of .vertline.grad(p).vertline. respectively.
In a preferred form of the invention, as has been said, the domain A.sub.3 is actually the sum total of five sub-domains defined by the following conditions:
wherein M.sub.ratio is another threshold (typical values whereof will be given later).
6) The basic structures are identified in the domains. Preferably, these structures includes, as noted, smooth regions, edges, ridges, and hills, and optionally saddles, wherein ridges and hills may be positive or negative, or black or white, the negative (black) ridges being "valleys" and the negative (black) hills being depressions or "hollows", as they will be sometimes called hereinafter. Other elements may be associated to the said ones, and in some cases, some of them may be omitted.
The background (or smooth) regions are those defined by the domain A.sub.1, and in them the brightness function and the approximating function have only moderate variations.
The edges essentially indicate the sharp passage from two different values of the brightness and they may constitute the passage from one smooth region to another, characterized by different average values of the brightness function. They are defined in the domain A.sub.2. They are the first example of a curvilinear structure.
(Positive and negative) ridges and hills are defined in various sub-domains into which the domain A.sub.3 is preferably divided.
Ridges are curvilinear structures define by a center line, the cross-sections or profiles of which in planes perpendicular to the center line are bell-like curves that can generally be approximated, in the simplest manner, by parabola. Mathematically, the center lines of the regions are determined by condition that the first derivative of the brightness function vanishes in the direction of the bigger eigenvalue of the second differential of the brightness function.
Hills are structures in which the brightness function has a maximum or a minimum and respectively decreases or increases in all directions from said maximum or minimum point. They may in general be approximated in the simplest manner by paraboloid. Mathematically, the central points of the hills and the hollows are determined by the condition of the vanishing of the first differential of the brightness function.
The detailed identification of the structures, particularly in the domain A.sub.3, will be described hereinafter for a preferred embodiment of the invention.
7) The curvilinear basic structures are approximated by lines related to their center lines and parameters related to their profiles. This step can be considered as the construction of geometric models.
In this connection, it is important to note that although the basic structures are represented geometrically, essentially by surfaces, those surfaces define, with some approximation, a physical quantity, viz. a brightness or a colour information signal, as a function of geometric variables, viz. two coordinates in the plane of the picture to be compressed. Those structures therefore describe in geometric terms a brightness or signal distribution over the picture surface.
Sometimes the profiles of the curvilinear structures must be defined only in the immediate vicinity of the center line, as will be better explained hereinafter: in fact it is essentially sufficient to define the curvature of the structure at the center line in a plane perpendicular to the center line.
8) Preferably, superfluous structures and/or portions thereof are eliminated. Structures and their portions are considered "superfluous" if their elimination does not substantially affect the quality of the compression, viz. does not cause the reproduced picture obtained by decompressing the compressed data to be unacceptably different from the original. This will be generally true if they are superimposed or almost superimposed to other structures or portions thereof or do not differ from them to a degree defined by appropriate thresholds fixed as provided for in Step 4. Specific criteria will be set forth in describing an embodiment of the invention, but in general can be determine by skilled persons for each type of application, taking into account the quality required for the picture's reproduction. Omission of this step or reduction thereof to a minimum will not damage the quality of the picture reproduction, but may affect the degree of compression and thus render the process less economical. This step further, may be partially concurrent with Step 7 and will be completed in Step 9, hereinafter.
9) The basic structures are represented by mathematical models. This step consists in the approximate representation of the basic structures by mathematical models according to two criteria: a) that the approximation is sufficiently close; b) that the number of data required to define the models be as small as possible. It will be understood that each basic structure could be represented in an exact or almost exact manner by mathematical expressions, but these would in general require an excessive number of parameters for their definition, so that the degree of compression would be relatively low without any significant gain as to the accuracy of the reproduction. Conversely, oversimplified models could be chosen, whereby a very high compression would be obtained but the quality of the reproduction would not be satisfactory. A compromise between the two exigencies of a high compression and a good reproduction quality must be achieved by an appropriate choice of the mathematical models. Examples of such models will be given hereinafter, but it should be understood that it is within the skill of the expert person to construct the appropriate ones for each basic structure and each particular application of the invention, by approximation methods as described herein.
10) The models thus constructed are interrelated, preferably by the omission of part of them, to construct a global model for each cell of the region. The model parts that are omitted are the ones that overlap or that do not contribute anything significant to the quality of the picture reproduction. The criteria to be followed are essentially the same as in Step 8. A number of standard models will be defined for each type of application of the invention, and in any case, to each type of model will be associated a code identifying it, so that each specific model will be identified by its code and a set of parameters specific to it. At this point the compression process has reached the stage of primary compression, the primary compressed data obtained consisting of codes identifying the type of each model and the parameters of each model.
11) Preferably, "filtering" is carried out. This stage consists of the elimination of information that is considered excessive because it has only a little psycho-visual significance. The simplification involves dropping some models completely and eliminating some excessive parameters of the models that are retained. The evaluation of the parameters to be dropped is carried out on the global model, since parameters that are significant on the local basis, viz. if we consider each specific model, lose significance in the global model. In part this operation has been carried out in the construction of the global model, during which parts of the local models are dropped. However, it is verified and completed in this stage.
It should be understood that the steps so far described need not necessarily be completely separate from one another and need not necessarily take place in the order in which they are listed, but variations may be made in said order, and further, one or more steps may be carried out in separate stages and/or in part or in the whole concurrently with another step or steps.
12. Quantization. This step consists in approximating the parameter values of the primary compressed data on the basis of a predetermined set of values, which are limited in number. Each parameter is substituted by the closest value of this set. The criteria for quantization depends on several considerations, such as the degree of compression that is desired, the degree of accuracy or resolution of the compressed picture that is required, the geometric and visual interpretation of the models, and so forth. Some examples of quantization will be given for a specific embodiment of the invention.
13) Encoding. The quantized data are represented in the form of a binary file. This operation is lossless, since when the binary file is decoded, the quantized values of the parameters that have been used to form the binary file are entirely recovered. Certain criteria to be followed in this operation will be described in describing an embodiment of the invention. Huffman-type coding can be used in some cases.
14) Decompression. This consists in reproducing from the binary file the quantized values of the parameters and those values are substituted into a global model representing the brightness function for each region, which will direct a computer to attribute to each point of the compressed picture its appropriate brightness levels.
All the above operations can be repeated severally for the various basic colors, thus obtaining monochrome picture compressions which are combines. Alternatively, transform coding of color data, by methods known in the art, may be carried out and the original monochrome signals corresponding to the RGB system can be completed by transform coding into one monochrome luminance signal and two reduced bandwidth color-information carrying signals.
In a preferred embodiment of the invention, the process steps are carried out as follows.
Step 1
The values of the brightness function z(x,y) are registered.
Step 2
The side "l" of the window is assumed to be 4 pixels. Consequently the grid is constituted by the central points between the pixels. However, it may be preferable to use other or additional values of "l", as will be explained hereinafter.
Step 3
The brightness function z=f(x,y) is approximated by the approximating function p(x,y) which, in this embodiment, is a polynomial of the second degree having the form p(x,y)=a.sub.00 +a.sub.10 x+a.sub.01 y+a.sub.20 x.sup.2 +a.sub.11 xy+a.sub.02 y.sup.2. The coefficients of the function p are determined by minimizing the square deviation of said function from the function z. The values of the derivatives of z are approximated by the coefficients of p(x,y). All the computations are performed with the machine accuracy of the hardware on which the process is implements. The accuracy of twelve bits and less is sufficient.
Step 4
The following absolute and relative threshold values are preferably used in the embodiment described herein. For each one, three numbers are given. The first two numbers five the bounds, between which the described parameter usually is to be fixed. The third number in parentheses gives the preferred value of the parameter.
G.sub.abs, S.sub.abs (grey levels): 50-250 (100);
K.sub.grad : 0.1-0.5 (0.2);
M.sub.ratio : 0.2-0.5 (0.3);
K.sub.j : 0.5, 1.2 (0.8);
D.sub.center : 0.5-1 pixel (0.7 pixel);
T.sub.slope (grey values): 20-40 (35);
D.sub.segment : 2-4 pixels (3 pixels);
D.sub.1segm : 1-3 pixels (2 pixels);
D.sub.2segm : 0.3-0.8 pixel (0.5 pixel);
T.sub.segm : 20.degree.-30.degree. (30.degree.);
B.sub.segm (grey levels): 10-30 (20);
K'.sub.j =1.2 K.sub.j ;
C.sub.1 =0.8;
D.sub.comp : 0.3-1 pixel (0.5 pixel);
r: 1-5 pixel (3 pixels);
D.sub.gcenter =D.sub.center ;
K.sub.curv =1-3 (2);
W.sub.grad =2-6 (3.5);
M.sub.ridge (grey levels): 20-60 (30);
D.sub.1grad : 1-5 pixels (3 pixels);
D.sub.2grad : 0.2-1 pixel (0.5 pixel);
.DELTA..sub.grad : 6-10 pixels (8 pixels);
.delta..sub.grad : 20%-50% (30%)
.delta.: 0.05-0.2 (0.1);
.kappa.: 0.05-0.2 (0.1);
d: 2-4 pixels (3 pixels);
F.sub.1, F.sub.2, F.sub.3, F.sub.4 (grey levels): 5-20 (10);
Q.sub.1, Q.sub.2, Q.sub.3, Q.sub.4, Q.sub.5, Q.sub.6 : 0.3-1.2 (0.6);
S.sub.r (grey levels): 10-30 (20);
T.sub.8 : 0.3-1 pixel (0.5 pixel);
T.sub.9 : 0.1-0.3 (0.2);
T.sub.10 (grey values): 5-20 (10).
Step 5
At each point of the grid, grid constructed as described hereinbefore, the quadratic form g(x,y)=a.sub.20 x.sup.2 +a.sub.11 xy+a.sub.02 y.sup.2, which constitutes the second degree part of the approximating function p, is reduced to the principal axes by means of an orthogonal transformation P. P is represented by ##EQU4##
In the new coordinates x',y', the polynomial p(x,y) takes the form p(x',y')=a'.sub.00 +a'.sub.10 x'+a'.sub.01 y'+.lambda..sub.1 x'.sup.2 +.lambda..sub.2 y'.sup.2. .lambda..sub.1 and .lambda..sub.2 are the eigenvalues of the matrix W hereinbefore defined, and .beta..sub.1 =(.beta..sub.11, .beta..sub.21), .beta..sub.2 =(.beta..sub.12, .beta..sub.22) are the eigenvectors of the same matrix W defined by: W.beta.=.lambda..beta. or of the second differential d.sup.2 p, and a'.sub.00 =a.sub.00.
The points are assigned to the different domains as follows. The domains A.sub.1, A.sub.2, and A.sub.3 are defined in the following manner.
Given p(x,y)=.SIGMA.a.sub.ij x.sup.i y.sup.j (for i+j.ltoreq.2), the matrix P, the coefficients a'.sub.ij, .lambda..sub.1, .lambda..sub.2 and .beta..sub.1 and .beta..sub.2 can be computed by various well known computation procedures. For .lambda. approximately equal to .lambda..sub.2 the computation of P and .beta. may become insufficiently accurate. In this case the matrix P is not computed and is merely defined to be equal to I (identity matrix).
Denote by .gradient.f the vector (a.sub.10, a.sub.01) of the gradient of p(x,y) at each point of the grid ##EQU5## since the transformation P is orthogonal. Denote by M.sub.1 =the mean value of the .vertline..gradient.f.vertline..sup.2 over all the grid points in the region.
The set A.sub.1 is defined as the set of those points of the grid, for which: .vertline..gradient.f.vertline..sup.2 <G.sub.abs, .lambda..sub.1.sup.2 +.lambda..sub.2.sup.2 <S.sub.abs.
The thresholds G.sub.abs, S.sub.abs usually take values between 50 and 250. IN this example we assume G.sub.abs =100, S.sub.abs =100.
The set A.sub.2 is defined as the set of those points of the grid for which:
.vertline..gradient.f.vertline..sup.2 .gtoreq.max G.sub.abs, G.sub.rel !, where G.sub.abs is as above, and G.sub.rel =K.sub.grad .multidot.M.sub.1. Typical values of the parameter K.sub.grad are between 0.1 and 0.5. IN this example we assume K.sub.grad =0.2.
The thresholds G.sub.abs, S.sub.abs and K.sub.grad above, as well as K.sub.j, j=1, . . . , 5, M.sub.ratio which will be defined below, are the parameters of the detection of the basic structures, which must be fixed for each region of the picture. Their usual and preferred values, for the present application, will be indicated.
The set A.sub.1 will serve as the basis for constructing the smooth regions and the background. The set A.sub.2 will be used for construction of the edges.
The set A.sub.3 is then constructed, wherein the (white and black) ridges, (white and black) hills and, in this embodiment, saddles will be identified. At the ridge points one eigenvalue is big, and the second small and the derivative in the direction of the biggest eigenvalue is zero. At hills and hollows, dp=0, and both eigenvalues are big and have the same sign. At the saddle points, dp=0 and both eigenvalues are big and have opposite signs. The values of dp and of the eigenvalues identify the said basic structures as far as the invention is concerned.
The eigenvalues are always ordered in such a way that .vertline..lambda..sub.1 .vertline..gtoreq..vertline..lambda..sub.2 .vertline..
The conditions that divide the domain A.sub.3 into five subdomains A.sub.3j, j being 1 to 5, have already been set forth. The points of the various subdomains form the basic structures of this domain as follows:
The threshold M.sub.ratio usually takes values between 0.2 and 0.5 and typically 0.3.
Denote as M.sub.2j =the mean value of .lambda..sub.1.sup.2 +.lambda..sub.2.sup.2 over the grid points in the region where .lambda..sub.1 and .lambda..sub.2 satisfy one of the above five conditions, viz. the condition (j) wherein j=1, . . . , 5.
Let A.sub.3j be the set of gridpoints in the region where .lambda..sub.1 and .lambda..sub.2 satisfy the condition (j) and .vertline..gradient.f.vertline..sup.2 <max G.sub.abs, G.sub.rel !, .lambda..sub.1.sup.2 +.lambda..sub.2.sup.2 .gtoreq.max S.sub.abs, S.sub.jrel !. Here the thresholds G.sub.abs, G.sub.rel, S.sub.abs are as defined above, S.sub.jrel =K.sub.j .multidot.M.sub.2j. The typical values of the parameters K.sub.j, j=1, . . . , 5, are between 0.5 and 1.2, or typically J.sub.j =0.8.
An easy alteration (instead of .lambda..sub.1 /.lambda..sub.2, .lambda..sub.1 /.lambda..sub.2 +.lambda..sub.2 /.lambda..sub.1 is used) makes all the quantities computed till now homogeneous and symmetrical expressions in .lambda..sub.1 and .lambda..sub.2. Hence they can be expressed in terms of the initial coefficient a.sub.ij, without performing the reduction to the principal axes. Thus, the computations can be arranged in such a way that the reduction will be performed only at the points of the (usually small) set A.sub.3.
The identification of the ridges, hills and saddles will now be described exemplified for an embodiment of the invention.
In a new coordinates system (x',y') the polynomial p(x',y') is given by p(x',y')=a'.sub.00 +a'.sub.10 x'+a'.sub.01 y'+.lambda..sub.1 x'.sup.2 +.lambda..sub.2 y'.sup.2.
On the sets A.sub.31 and A.sub.32 we perform an additional transformation
We get:
(Note that by the definition of A.sub.3j, .vertline..lambda..sub.1 .vertline. is big).
We say that the considered gridpoint is part of a white (black) ridge if it belongs to A.sub.31 (A.sub.32, respectively) and .vertline.a'.sub.10 /2.lambda..sub.1 .vertline.<D.sub.center, .vertline.a'.sub.01 .vertline.<M.sub.slope. Here the thresholds D.sub.center and M.sub.slope usually take the values 0.5 pixel.ltoreq.D.sub.center .ltoreq.1 pixel, and 20.ltoreq.T.sub.slope .ltoreq.40. In this embodiment we assume D.sub.center =0.7 pixel, T.sub.slope =35.
We associate to such a gridpoint a white (black) segment (of unit length), centered at the point x"=0, y"=0 (in the new coordinates x", y") and directed along the y" axis in this new coordinate system. We also associate to this gridpoint the values .lambda..sub.1 and a".sub.00. The segments thus constructed approximate the ridge lines, since at them the derivative of f and of its approximating function p in the direction of the biggest eigenvalue is zero.
The condition .vertline.a'.sub.10 /2.lambda..sub.1 .vertline.<D.sub.center is caused by the fact that p approximates f in a reliable way only near the center of the square having the size "l" and therefore, the ridge is detected in a reliable way only if it is close enough to the center of the square, and .vertline.a'.sub.10 /2.lambda..vertline. is the distance of the ridge from said center.
On the gridpoints, belonging to the sets A.sub.33, A.sub.34, A.sub.35, we perform an additional transformation:
(On these sets, both .lambda..sub.1 and .lambda..sub.2 are big).
We get: p(x"',y"')=a"'.sub.00 +.lambda..sub.1 (x"').sup.2 +.lambda..sub.2 (y"').sup.2.
We say that the considered gridpoint represents a positive (white) hill, a negative (black) hill (hollow) or a saddle point, if it belongs to A.sub.33, A.sub.34 or A.sub.35, respectively, and
Here D.sub.center is the same parameter as above. We associate to such a point the center of the new coordinate system x"', y"', the value a"'.sub.00 and the values .lambda..sub.1, .lambda..sub.2, and the direction of the eigenvectors .beta..sub.1, .beta..sub.2 as defined above.
The center of the new coordinate system is the point where dp=0. Once more, this center should be close enough to the center of the cell for the detection to be reliable.
To each positive or negative hill or saddle point, we also associate a unit segment, centered at the center of the new coordinate system x"'y"', and directed along the y"' axis.
All the segments obtained are separated into two sets: "white" segments, for which .lambda..sub.1 <0, and "black" ones, for which .lambda..sub.1 >0.
The segments constructed by now correspond to the positive and negative ridges, the positive and negative hills and to the saddle points. Although by definition only ridges represent curvilinear structures, both hills and saddle points, if prolonged can visually represent a part of a curvilinear structure and be processed as such. Since curvilinear structures form the most coherent and compact elements in picture description, it is desirable to include as many details as possible in simple curvilinear structures, instead of representing them as separated local elements.
Therefore, on this stage we consider all the segments obtained as potential representation of the "ridge lines" and attempt to construct from them maximally extended geometrically simple compounds.
Step 6
Structure components are constructed in this step. Each component consists of an orderly array of closely related segments of the same "color". Herein, we consider white segments. The construction of the black ones is completely similar.
Each segment constructed is characterized by its central point (which was defined in local coordinates for each l.times.l square; this point is not necessarily one of the gridpoints), and by its direction. Also the approximate grey level value a".sub.00 at this central point and the biggest eisenvalue .lambda..sub.1 are associated to each segment. We now carry out the following steps.
1. Regardless of the origin of each segment in a certain l.times.l--square, we represent now all the segments by the coordinates of their central points in the global coordinate system, viz. the coordinate system originally associated with the R.times.R region on which we operate, and by the angles with respect to the global coordinate system. The set of segments if ordered, for example, by the natural ordering of l.times.l--squares of their origin.
2. We consider the first segment s.sub.1 and associate to it all the "neighbouring" segments s.sub.j, viz. those segments whose centers are closer to the center of s.sub.1 than D.sub.segm. The threshold D.sub.segm usually takes values between 2 and 4 pixels. Here we assume D.sub.segm =3 pixels.
For each segment among the neighboring segments s.sub.j, we check the following conditions (see explanatory FIG. 1):
i. The distance d.sub.1 between the center of s.sub.1 and the projection of the center of s.sub.j onto the s.sub.1, is less than D.sub.1segm.
ii. The distance d.sub.2 between the center of s.sub.j to its projection onto s.sub.1 is less than D.sub.2segm.
iii. The angle between the directions of s.sub.1 and s.sub.j is less than T.sub.segm.
iiii. The difference between the grey levels a.sub.00 associated to s.sub.1 and s.sub.j does not exceed (in absolute value) B.sub.segm.
3. The thresholds D.sub.1segm, D.sub.2segm, T.sub.segm, B.sub.segm, have approximately the following usual and preferable values:
preferably 0.5 pix., T.sub.segm =30.degree., B.sub.segm =10-30, preferably 20 grey levels.
4. Those among the s.sub.j, which satisfy all the conditions, i, ii, iii, iii, are included into the component constructed.
On s.sub.1 one of two possible directions is fixed. Then the included segments are ordered according to the order of the projections of their centers on s.sub.1, and on each of them one of two possible directions is chosen in a way coherent with s.sub.1.
5. We take the first and the last segments with respect to the order introduced, and for each of them we repeat the operations 1-4, adding segments which are still free (i.e., do not belong to the component under construction or to other components.
6. We order the segments, added to the first one, and the segments already in the component, according to the order to the projection of their centers on the first component. The same for the last component. In this way we order all the segments of the component under consideration.
7. We take the first and the last segment and repeat the operations 1-5.
8. We repeat the aforesaid operations until no free segments can be added to the component. This completes construction of the component, which is represented by an ordered array of segments of the same colour.
9. We take the first among the remaining free segments and repeat operations 1-8, constructing the next component.
As it was explained above, we try to construct a small number of long components instead of the big number of short ones. As a result, it is desirable to have more segments available. Therefore the values of the thresholds K.sub.j and D.sub.cent, given above, are rather "liberal". As a result, some components can be constructed which represent visually insignificant structure. To remove these components, the following procedure is applied:
1. We construct an array of "strong segments", repeating all the operations described, but with the thresholds K'.sub.j greater than K.sub.j. By construction, each strong segment is also a regular segment, and thus the array of strong segments is a subarray of all the regular segments.
2. We construct the components from the regular segments, but then we drop each component which does not contain at least one strong segment.
The preferable values of K'.sub.j are about 1.2 times bigger than K.sub.j.
Components, constructed above, represent the ridges detected. The hills and hollows, found as described above, represent the corresponding simple local structures. In principle hills and hollows are not curvilinear structures and are detected separately from the ridges, as described above. However, by construction, some part of hills and hollows can appear exactly on the components constructed. If their width is approximately the same as the width of the corresponding ridge, they can be omitted.
Thus, the hill (hollow) is omitted if the corresponding segment belongs to some component, and the bigger eigenvalue .lambda..sub.1 at this point satisfy .vertline..lambda..sub.1 .vertline..gtoreq.C.sub.1 .LAMBDA., where .LAMBDA. is the mean value of .lambda..sub.1 over the segments of the component, and C.sub.1 is a threshold. Usually C.sub.1 =0.8.
This operation, however, essentially belongs to Step 11 (filtering).
Step 7
The operations described in this stage are essentially approximation operations. It is to be understood that they need not necessarily be performed at this stage, but may in part or on the whole be performed at an earlier or at a later stage.
1. The components that have been constructed are subdivided into the parts which satisfy the following condition: the projection of all the segments of the component onto the interval, joining the central points of the first and the last segments, should be one-to-one and in the order defined above. We check whether the condition is satisfied starting form the second segment and continue with the following segments until we find one which does not satisfy the condition. The beginning of this segment is the point which mark the passage from the component part considered to another one. The process is then repeated starting from said point. FIG. 2 shows an example of the construction of a component part.
2. Now we approximate components, up to required accuracy, by polygonal lines. This is done as follows, with reference to FIG. 3:
a) We construct the interval, joining the centers A and B of the first and the last segments of the component part constructed as under 1.
b) We find the segment on the component part for which the distance d of its center C to AB is maximal. If d<D.sub.comp, the procedure is completed, and the internal AB provides the required approximation. If d.gtoreq.D.sub.comp, we consider the intervals AC and CB and repeat the procedure with each part AC and CB of the component separated.
c) This subdivision process is continued until the component is approximated by a polygonal line, joining the centers of some of its segments, with the following property (see FIG. 4): for each segment of the component, the distance of its center to the corresponding interval of the polygonal line, is less than D.sub.comp. In this embodiment, the threshold D.sub.comp is usually equal to approximately 0.3 to 1 pixel, preferably 0.5.
By now, each component is approximated by the polygonal line, joining the centers of some of its segments. This polygonal line is a geometric submodel, representing the central line of the ridge.
In order to define the profile, the following two numbers are associated with each interval I.sub.i of the approximating polygonal line: .lambda..sub.i =.lambda..sub.Ii, which is the mean vale of .lambda..sub.1 over all the segments between those whose centers the interval I.sub.i joins, including the end segments (remember that all the segments of each component are ordered); a.sub.i =a.sub.Ii, which is the mean value of the brightness a".sub.00 over the same segments as above.
Finally, each ridge component in A.sub.3 is represented by:
the ordered array of the vertices P.sub.i of the polygonal line (i.e., the endpoints of the intervals of this line). These points are given by their global coordinates in the region.
the ordered arrays of the numbers .lambda..sub.i and a.sub.i, defined as above.
The said numbers defined the profile of the ridge, specifically its level coordinates (brightness values=a.sub.i) and its curvature in the vicinity of the center line (.lambda..sub.i). Theoretically, the curvature is defined in an infinitesimal interval about the point of the center line considered and perpendicularly thereto, but here we deal with finite, though small, intervals and therefore the curvature defines the profile in an interval in the order to the distance between adjacent pixels, which, for the purposes of these operations, is the smallest significant interval.
The identification and approximation of edges will now be described. As stated, the set A.sub.2 has been defined by .vertline..gradient.p.vertline..sup.2 .gtoreq.max G.sub.abs, G.sub.rel !, and thus consist of the gridpoints, where the gradient .gradient.p is "big".
However, the set A.sub.2 is spread around the regions of a high slope of z=f(x,y), and does not by itself represent the central lines of the edges. Therefore, we perform first a certain filtering of the points in S.sub.2, trying to screen out the points far away from the edge's central lines.
Consider a point in A.sub.2 and let p(x,y)=a.sub.00 +a.sub.10 x+a.sub.01 y+a.sub.20 x.sup.2 +a.sub.11 xy+a.sub.02 y.sup.2 be the approximating polynomial computed at this point. .gradient.f by definition is the vector (a.sub.10, a.sub.01). We consider the set of values which p assumes on the line Q, parallel to .gradient.f passing through said point, and find the vertex of the parabola, defined by said set of values. If the distance of this vertex from the said point is smaller than D.sub.gcenter, the gridpoint is excluded from the set A.sub.2, and we pass to the next gridpoint in A.sub.2. Here, the threshold D.sub.gcenter is usually equal to D.sub.center defined above. Thus, we exclude from consideration the points which are too close to the sides of the edges. In this way, D.sub.gcenter determines the minimal width of the edges which can be recognized.
For each of the remaining points we compute the number ##EQU6##
Mathematically, .kappa. is the curvature of the level curve of p(x,y) at (0, 0), viz. the curve defined by p(x,y)=p(0,0). It approximates the curvature of the center line of the edge at this point. We drop the points where
where K.sub.curv =1-3 or typically 2.
Thus, we omit the highly curved edges which usually appear around small local patches, which we have earlier identified as hills or hollows. The remaining gridpoints form a smaller set A.sub.2 ', at which the more detailed analysis is performed.
At each gridpoint of A.sub.2 ' we construct a polynomial q(x,y) of degree 3, providing the minimum of the square deviation .SIGMA. f(x,y)-q(x,y)!.sup.2 over all the pixels of the l.times.l'--cell, centered at this gridpoint. The parameter l' is usually slightly bigger than l. In this embodiment l'=6.
This polynomial is restricted to the straight line Q passing through the origin (the gridpoint) in the direction of .gradient.f=(a.sub.10,a.sub.01), viz. the values with the polynomial assumes on the line Q are considered as a function of the distance of their projections on the line Q from the origin (variable t). We get a polynomial q of degree three of the variable t. These operations are illustrated in FIG. 5. We find the points of extrema (maximum and minimum points) of q(t), t.sub.1 and t.sub.2, by solving the quadratic equation q'(t)=0, and the values .alpha..sub.1 =q(t.sub.1), .alpha..sub.2 =q(t.sub.2).
The following condition is checked: t.sub.1 and t.sub.2 exist, t.sub.1 >0, t.sub.2 <0, and .vertline.t.sub.1 .vertline. and .vertline.t.sub.2 .vertline. do not exceed W.sub.grad. Here the threshold W.sub.grad determines essentially the maximal width of the edges that can be detected in a reliable way. Usually, W.sub.grad is approximately equal to 1/2 l'. In this embodiment W.sub.grad =2-6, preferably 3.5. (Alternatively, one can check the condition that both the points t.sub.1 and tz.sub.2 on the line Q belong to the l'.times.l'--cell considered.)
If the condition set forth above is not satisfied, the gridpoint is excluded from the set a.sub.2 ', and we pass to the next gridpoint.
If the condition is satisfied, we associate to the grid point considered the following object called an "edge element"): 1. The unit segment I.sup.e centered at the point C in FIG. 6, which is the central point of the interval t.sub.1, t.sub.2 ! on the line Q, and directed in an orthogonal direction to .gradient.f (i.e., in the direction of the edge). 2. The segment t.sub.1, t.sub.2 ! of the line Q (by construction,this segment is centered at the same point C, and is directed along .gradient.f). We also associate to each edge element two values .alpha..sub.1 and .alpha..sub.2. .alpha..sub.1 =q(t.sub.1) and .alpha..sub.2 =q(t.sub.2).
Step 8
The following operations are designed to detect geometric connections between the ridges, found before, and the edges under construction, to eliminate superfluous data.
Consider the example, illustrated in FIG. 7, a and b. Therein the broken lines denote the ridge components, detected earlier, and the marks .tangle-soliddn. denote the segment I.sup.e, detected as described hereinbefore and shown in FIG. 6. The lines l.sub.1 and l.sub.2 in FIG. 7b usually appear on sides on sides of edges, because of the typical profile of the edge, illustrated in FIG. 8. They can be omitted from the data, since the required profile is detected as described in Step 7, and can be reconstructed from the data thus obtained.
In the example of FIG. 7c and d, the edges E.sub.1 and E.sub.2 are detected on both sides of the ridge l.sub.2. The lines l.sub.1 and l.sub.3 have the same nature as the lines in the first example. Here the lines l.sub.1 and l.sub.3 and the edges E.sub.1 and E.sub.2 can be omitted.
Ridges and edges that are particularly closely related will be said to have an "adherency" relationship. To detect such relationships, we proceed as follows:
1. The ridge components, detected earlier, are stored in a certain order. We start with the first component. It is represented by an ordered array of segments.
2. For each segment in this array, those edge elements are considered whose centers are closer to the center of the segment than D.sub.1grad .multidot.D.sub.1grad =1-5, preferably 3 pixels. This procedure is illustrated in FIG. 9.
3. Then, the following condition is checked (see FIG. 9): if the segment is a white (black) one, the distance .rho. is computed between its center and those from the points t.sub.1 and t.sub.2 of the edge element which is the maximum (minimum) of the corresponding profile. If .rho..gtoreq.D.sub.2grad, we pass to the next from the edge elements above. If .rho.<D.sub.2grad, the edge element is marked as "adherent" to the segment considered, and the segment is marked as "adherent" to edge elements from the side, where the center of the edge element lies. Here D.sub.2grad =0.2-1, preferable 0.5 (It should be remembered that the segments are oriented.). Then we pass to the next edge element and repeat the procedure. (If the segment is already marked, this mark is not changed.) When all the edge elements, chosen as described in 1 are checked, we pass to the next segment of the compound.
4. After all the segments have been processed, the following data are obtained:
a. Each segment of the component considered is marked as "adherent" or "unadherent"!on each of its sides.
b. Some of the edge elements are marked as "adherent" at one of the points t.sub.1 or t.sub.2.
5. Now all the segments of the component under consideration are processed once more in the following way:
Starting from the first segment (in their standard order), the segments are checked until the first segment marked as adherent from the left appears (simultaneously, exactly the same procedure is performed on the right side). The number of this segment is memorized. If the distance of its center from the center of the first segment in the component is greater than the .DELTA..sub.grad, the center of this segment is marked as the partition point. .DELTA..sub.grad is a threshold, the value of which is usually between 6 and 10 pixels. In this embodiment .DELTA..sub.grad =8.
Then the next segment marked as adherent from the left is found. If the distance of its center from the center of the previous segment, marked from the left, is greater than .DELTA..sub.grad, both its center and the center of the previous segment are marked as the partition points. If not, the next segment marked from the left is found and the procedure is repeated.
Exactly the same procedure is simultaneously perform on the right side of the component.
6. As a result, the component is divided into subcomponents by the partition points found as described. For each subcomponent on each side, by construction the adherent segments are either uniformly denser than .DELTA..sub.grad, or uniformly sparser than .DELTA..sub.grad. See FIG. 10.
7. For each subcomponent the proportion of the marked segments to all the segments is computed on each side.
Now several cases are distinguished:
a) If the marked segments are .DELTA..sub.grad --dense on both sides, the subcomponent is preserved, and the marking of the edge elements, adherent to its segments, is preserved.
b) If the marked segments are .DELTA..sub.grad --dense on one side, and on the second side the proportion of the marked segments is less than .delta..sub.grad when .delta..sub.grad is a parameter of values between 20% and 50%, preferably 30%, the subcomponent is omitted, and the marking of the edge elements adherent to its is canceled.
If the proportion is larger than or equal to .delta..sub.grad, we proceed as in a).
c) If the marked segments are .DELTA..sub.grad --sparse on both sides of the subcomponent, we proceed as in a).
8. for each subcomponent which has not been omitted, the following numbers are computed:
leftvalue, equal to the mean value of .alpha..sub.1 or .alpha..sub.2 on all the edge elements adherent from the left (from .alpha..sub.1 or .alpha..sub.2 take the value corresponding to the free end of the edge element).
leftwidth-the mean value of the length of the intervals t.sub.1, t.sub.2 ! for the edge elements, adherent from the left.
and similarly for the right hand side of the subcomponent.
9. Now we pass to the next ridge component and repeat all the operations 1-8, and so on, until all the components have been processed.
As a result each component has been subdivided into subcomponents, a part of these subcomponents has been omitted, and for the rest the data as in 8 has been computed. All the edge elements are still preserved and some of their extreme points t.sub.1, t.sub.2 are marked as adherent.
At this stage all the edge elements are omitted which are marked at at least one of their extreme points. The surviving "free" edge elements are used now to construct "edge components". Remember that each edge element consists of the interval t.sub.1, t.sub.2 ! and the segment I.sup.e --see FIG. 11--centered at the center of C of t.sub.1, t.sub.2 ! and orthogonal to it (thus, I.sup.e is directed along the edge, which is orthogonal to the direction of t.sub.1, t.sub.2 !.
Now the array, consisting of all the edge segments I.sup.e, is formed. All the operations, described hereinbefore for the construction of components (Step 6) above are applied to the segments I.sup.e. Only the condition iiii in operation 2 for said construction is omitted. The D.sub.1segm, D.sub.2segm, T.sub.segm, are replaced by the parameters D.about..sub.1segm, D.about..sub.2segm, T.about..sub.setm, whose values are usually the same.
As a result, a number of edge components is constructed.
10. At this stage the procedure described in Set 7 for the division of ridge components into parts and their approximation by polygonal lines is applied to the edge components. The parameter D.sub.comp is replaced by D.sub.edge, whose typical values are between 0.3 and 1, typically 0.5
As a result, each edge component is approximated by the polygonal lines joining the centers of some of its segments. This polygonal line is a submodel, representing the central line of the edge.
In order to construct the profile, the following three numbers are associated to each interval J.sub.j of the approximate polygonal line:
min.sub.j, which is the average value of all the minima of the edge elements, constituting the part of the component between the ends of J.sub.j (i.e. the average of the minima of .alpha..sub.1, .alpha..sub.2).
max.sub.j, which is the average value of all the maxima, respectively (i.e. the average of the maxima of .alpha..sub.1, .alpha..sub.2).
width.sub.j, which is the average value of all the lengths .vertline.t.sub.2 -t.sub.1 .vertline. over the same edge elements.
Finally, each edge component is represented by:
the ordered array of the vertices P.sub.i of the polygonal line (i.e., the end points of the intervals J.sub.j). These points are given by their global coordinates on the region.
the ordered array of the numbers min.sub.j, max.sub.j, width.sub.j.
The operations, described above, can be implemented in two variants:
a) After construction of the ridge components, they are subdivided and approximated by polygonal lines (approximation procedure). Then the procedure for the construction of edge lines is applied to each subcomponent obtained in this subdivision, separately. It can cause the further subdivision of the subcomponents and their corresponding approximation by polygonal lines.
b) The procedure for the construction of edge lines is applied to the entire ridge components; it produces a certain subdivision of each component into subcomponents. Then the approximation procedure is applied to each subcomponent separately.
In each case, in addition to the numbers .lambda..sub.i and a.sub.i, associated to each interval I.sub.i of the approximating polygonal line, we associate to each interval also the numbers leftvalue.sub.i leftwidth.sub.i, rightvalue.sub.i, rightwidth.sub.i, determined as described. The averaging here is done over all the edge elements, adherent to the ridge segments in the interval I.sub.i.
The approximation procedure can be modified to give a better visual approximation to the components which are curved--see FIG. 12.
The subdivision points can be shifted into the convexity direction of the component, thus diminishing the distance from the component to the approximating polygonal line roughly twice.
In the model construction stage hereinafter we describe the models and methods which utilize the information obtained in the detection stage, only in a partial way. In particular, the following alterations can be made:
Each ridge component (or an interval in its polygonal approximation) has the adherent edge elements on the right and on the left of it. The "widths" .vertline.t.sub.2 -t.sub.1 .vertline. of these edge elements can be used to approximate the corresponding ridges by the models with the variable width (see FIG. 13):
Each edge component (or an interval in its polygonal approximation) is constructed from the edge elements. Their width allow for approximation of the edges by the variable width models (see FIG. 14):
The edge profile analysis as described hereinbefore neglects an information obtained by approximation by polynomial q, viz. its maximum and minimum values, unless both the profile extrema are within the distance W.sub.grad (or l') from the gridpoint under consideration. This restricts the width of the edges detected to approximately W.sub.grad, or l', which in the present realization are of the order of 5-6 pixels.
However, the profiles of the form shown in FIGS. 15a, b, and c, can be used to detect wider edges, by analyzing the adherency relations among the corresponding edge elements illustrated in FIGS. 16a and b.
The numbers leftvalue, rightvalue, etc., computed for each component (or an interval of the polygonal line), together with the marking of the edge elements, allow for a construction of curvilinear structures, more complicated than those used above. For example, the profile like that shown in FIG. 17, which is typical for many pictures, can be easily identified and approximated, using the "end adherency" marking of the edge elements, their widths and the numbers leftvalue, rightvalue etc., providing the grey levels of the profile at the extrema.
In the implementation described here--see FIG. 18--we omit the edge components adherent to the surviving ridge components. This operation increases the compression ratio, but in some cases it can cause quality problems. The part A'AA"DC--FIG. 18--is represented by a ridge on the ridge component AD, while CE and DF are represented by edge components. This can cause a visually appreciable discontinuity in the shape of the lines A'CE and A"DF on the picture.
An appropriate choice of the parameters reduces this effect to a completely acceptable level.
However, another realization is possible where the gradient components CA' and DA" are memorized and used to correct the representation of the element CA'A". The decrease of the compression ratio, caused by storing this additional information, is eliminated almost completely by the fact it is correlated with the rest of the data.
This involves representing basic structures by mathematical models.
By now the following output has been produced by the preceding process steps:
1) Ridge polygonal lines. To each interval I.sub.i on such a polygonal line, the numbers .lambda..sub.i, a.sub.i, leftvalue.sub.i, leftwidth.sub.i, rightvalue.sub.i, rightwidth.sub.i are associated.
2) Edge polygonal lines. To each interval J.sub.i on such a line, the numbers min.sub.j, max.sub.j (together with the indication of what side of the component max (min) are achieved), width.sub.j are associated.
3) Hills (hollows). Each one is given by the point (represented by its global coordinates on the region), .lambda..sub.1 and .lambda..sub.2, .vertline..lambda..sub.1 .vertline..ltoreq..vertline..lambda..sub.2 .vertline. (For hills, .lambda..sub.1 <.lambda..sub.2 <0, for hollows .lambda..sub.1 >.lambda..sub.2 >0), and the angle .theta.(O.ltoreq..theta.<180.degree.), between the direction of .lambda..sub.2 and the first axis of the global coordinate system on the region.
4) The set A.sub.1 of the "smooth" or the "background" points on the grid; at each gridpoint belonging to A.sub.1, the value a.sub.00 (the degree zero coefficient) of the approximating polynomial p(x,y) is stored.
Basic models that can conveniently be used will now be described. The following model is used to represent a ridge over one interval of the corresponding polygonal line--see FIG. 19.
Assume that the interval I is given by the equation (in the global coordinate system u, v on the regions):
and the two lines l.sub.1 and l.sub.2, orthogonal to I and passing through its ends are given by -.beta.u+.alpha.v+c.sub.1 =0, -.beta.u+.alpha.v+c.sub.2 =0 (notice that c.sub.2 -c.sub.1 is the length of I, assuming that c.sub.2 >c.sub.1). Then the model .PHI..sub.Iridge (u,v) is defined by ##EQU7##
There, .delta. is a parameter between 0.05-0.2, preferably 0.1.
The function .psi..sub.r (s) (s=.alpha.u+.beta.v+c) can be chosen in various ways. In the most accurate approximate mode it must satisfy the following properties--see FIG. 20: ##EQU8##
In particular, the following function can be used as .psi..sub.r (s): the 5th order spline function. .psi..sub.r, satisfying conditions (*), being once continuously differentiable, and having zero derivatives at leftwidth, rightwidth and 0.
The information, concerning each ridge (left-right values and widths, .lambda.) is redundant, and usually one can use much simpler models, utilizing only a part of this information. In particular, one can take .psi..sub.r (s)=a+.lambda.s.sup.2. Thus we have ##EQU9##
Thus, the model is given by a parabolic cylinder with the axis I, the coefficient .lambda. and the height a on the axis, see FIG. 21.
Various modifications of this model can be used with no changes in the rest of the process. For example, the quadratic function a+.lambda.(.alpha.u+.beta.v+c).sup.2 can be replaced by any function .psi..sub.r (s) of s=.alpha.u+.beta.v+c (which is the distance of the point (u,v) to the line I), having approximately the same shape, height and curvature--see FIG. 22.
Instead of the abrupt vanishing out of the .delta.(c.sub.2 -c.sub.1) neighborhood of I at its ends, the profile function a+.lambda.(.alpha.u+.beta.v+c).sup.2 (or .psi.(.alpha.u+.beta.v+c)) can be multiplied by a weight function, which smoothly changes from 1 to 0, as the points (u, v) move away from the strip bounded by l.sub.1 and l.sub.2,etc.
The following model is used to represent an edge over one interval of the corresponding polygonal line.
Let max, min and width be the numbers, associated to the interval J, as described above. We use the same notations as hereinbefore, with reference to FIGS. 19-22, except that the interval therein indicated by I is now indicated by J.
The model .PHI..sub.Jedge (u, v) is defined by ##EQU10##
Here for s=.alpha.u+.beta.v+c=the distance of the point (u, v) from the line J, as .psi..sub.e (s) any function can be taken, satisfying the following conditions:
a) .psi..sub.e (-1/2 width)=min (or max, according to the orientation of the component. This information is associated to it.).
b) .psi..sub.e (1/2 width)=max (min);
c) The graph of .psi..sub.e has the shape approximately shown in FIG. 24.
In particular, let f(.tau.)=.tau..sup.3 -3.tau.. Then .psi..sub.e (s)=1/2 (max+min)+1/4 (max-min) f(2s/width) (or .psi..sub.e (s)=1/2 (max+min)-1/4 (max-min) f(2s/width), respectively can be used.
Another possible form of the edge model is a combination of two ridge models. Namely, for an interval J given, two intervals J' and J", shifted to 1/2 width are constructed--see FIG. 24.
On each of J' and J", a ridge model is constructed as described hereinbefore, with a value equal to min (max, respectively) and .lambda. for both ridges equal approximately .+-.2(max-min)/(width).sup.2. The values of this combined model at each point is equal to an appropriate weighted sum of the two ridge models constructed--see FIG. 25.
The following model is used to represent hills and hollows; it is the polynomial p(x,y) of degree 2, obtained on the 1.times.1--cell, in which the corresponding element has been detected. More accurately, if the hill (hollow) is represented by the grey level a, the center (u.sub.o, v.sub.o), .lambda..sub.1, .lambda..sub.2 and .theta., then, in a new coordinate system u', v' with the origin at (u.sub.o, v.sub.o) and the axis 0v' forming the angle .theta. with 0v,
Thus the model, representing hills and hollows, is an elliptic paraboloid (which coincides with the original approximating polynomial p(x,y)).
Other functions having approximately the same shape can be used, as graphically illustrated in FIGS. 26.
The submodels hereinbefore described represent hills, hollows and intervals of the ridge and edge-polygonal lines.
Now, for each polygonal line, the model corresponding to it is defined as follows: for a line L(L') consisting of the intervals I.sub.i (J.sub.j),
Here the functions .PHI..sub.Iiridge (u,v) .PHI..sub.Jjedge (u,v) are defined as above, with u,v being the global region coordinates. Such models are illustrated in FIG. 27.
Instead of "rectangular" models hereinbefore defined, one can use other forms; for example, elliptical ones or rectangular ones completed by two semi-disks, as graphically illustrated in FIG. 28.
To each model representing a ridge or edge, a boundary line is associated in one of the following ways:
a) for each interval I, two lines l.sub.1, l.sub.2 parallel to I and passing at the distances (1+.kappa.) leftwidth and (1+.kappa.) rightwidth respectively. form the piece of the boundary corresponding to I; for edges on the distance 1/2 (1+.kappa.) width).
b) for each interval I the lines, passing on both sides of I at the distance 1/2.multidot.(left width+rightwidth).multidot.(1+.kappa.) forms a boundary; for edges--the same as above.
c) for each interval I the lines, passing on both sides of I at the distance computed through .lambda. by the following formula:
pixels. Here H.sub.ridge takes grey level values between 20-60, preferably 30.
d) The lines at the constant distance d.
e) The boundary is not computed.
Here, .kappa. and d are the parameters. Usually .kappa..apprxeq.0.05-0.2 and preferably 0.1, and d.apprxeq.2-4 pixels, preferably 3.
This procedure is illustrated in FIG. 29. For each of the possibilities a-d, the boundary is formed by the curves l.sub.1 and l.sub.2 for each interval I and the orthogonal lines (or semidisks) for the end intervals of the polygonal line, as shown in FIG. 29.
The model function .PHI..sub.Lridge (.PHI..sub.L'edge) is defined around the polygonal line L, in particular on its boundary. By construction, it takes a constant value on the parts of the lines l.sub.1 and l.sub.2, bounded by the ends of each segment.
For each of the hills and the hollows, the boundary line is associated in one of the following ways: for a hill (hollow), given by x.sub.o, y.sub.o, .lambda..sub.1, .lambda..sub.2, .theta., a:
i. It is an ellipse centered at (x.sub.o, y.sub.o), with the main axis in the direction .theta., and the semiaxes r.sub.1, r.sub.2, computed through .lambda..sub.1 and .lambda..sub.2 and a by the following formula: r.sub.1 =(H.sub.h /.lambda..sub.1).sup.1/2, r.sub.2 =(H.sub.h /.lambda..sub.2).sup.1/2. The parameter H.sub.h takes values between 20-60 grey levels, preferably 30.
ii. An ellipse as above with r.sub.1, r.sub.2 given by the following formula through .lambda..sub.1 /.lambda..sub.2 and a: r.sub.1 =r, r.sub.2 =(.lambda..sub.1 /.lambda..sub.2).sup.1/2 .multidot.r. r usually takes values between 1-5 pixels, preferably 3 pixels.
iii. An ellipse as above with r.sub.1 =r, r.sub.2 =r;
iiii. r.sub.1, r.sub.2 given as the parameters;
iiiii. The boundary line is not computed.
The model function .PHI..sub.h, hereinbefore defined, takes a constant value on the boundary line.
Steps 10 and 11-
From now on, x,y denote the global coordinates on the region. By now for each ridge polygonal line L, edge polygonal line L' and each hill or hollow defined in stages 6 to 8, the model .PHI..sub.Lridge (x, t), .PHI..sub.L'edge (x, y) or .PHI..sub.h (x, y), representing the corresponding picture element, has been constructed. Also, the boundary line has been constructed for each model, as hereinbefore described. The part of the picture contained inside the boundary line will be called "the support" of the corresponding model. The construction of the global model representing the picture on the entire region is performed in several stages.
A certain part of the set of all the models is specified; usually, the models with the maximal visual contribution are chosen. Hereinafter a detailed description of some possible choices will be given.
a. The region is subdivided into square cells of the size m.times.m. Here, m is approximately equal to the basic scale L. The parameter L is the same as defined above. Below, m is usually between 6-48 pixels.
b. For each m.times.m--cell C, all models in whose supports intersect C, are considered. This situation is graphically illustrated in FIG. 30.
c. The polynomial P.sub.c (x,y) of a low degree (usually .ltoreq.2) is constructed, which minimizes the square deviation from the following data:
the values "a.sub.00 " at all points in the initial grid in C, which belong to the set A.sub.1 and do not belong to the model supports intersecting C;
the values of the models on the boundary lines inside C.
Various routines to compute P.sub.c (x, y) can be utilized by a skilled person.
In particular, one possible realization is as follows: a sufficient number of points is chosen on each boundary line. Now P.sub.c is constructed as the polynomial, providing the minimal square deviation of the model values at these points and the values a.sub.00 at the A.sub.1 --points.
Now, a partial global model .PHI.(x,y) is constructed, corresponding to the part of all the models chosen before. ##EQU11##
Other methods of "glueing together" the local models can be used by a skilled person. In particular, the one usually known as a "partition of unity" can be applied. It is performed as follows: let .PHI..sub.i (x, y) denote all the models in , and let S.sub.i be the support of .PHI..sub.i, i=1, . . . , N.
The functions W.sub.i (x,y) are constructed with the following properties:
a. W.sub.i (x, y).ltoreq.0
b. .SIGMA..sub.i W.sub.i (x, y)=1
c. W.sub.i (x, y) is equal to 0 out of a certain neighborhood of S.sub.i -i=1,2, . . . N.
In particular, W.sub.i can be constructed as follows: one can easily construct continuous functions W'.sub.i (x, y), W'.gtoreq.0, which are equal to 1 inside 1/2 S.sub.i, and are equal to 0 outside of 2S.sub.i. Then, W.sub.i =W'.sub.i /.SIGMA..sub.i W'.sub.i satisfies conditions a, b, c.
(Here .lambda..multidot.S denotes the result of a homothetic transformation of the subset S.)
Then, the value of the partial global model .PHI..sub. (x, y) is defined as the weighted sum of the values of the models .PHI..sub.i with the weights Wi:
(The function W.sub.0 (x, y) above corresponds to the complement of all S.sub.i and .PHI..sub.o (x, y) is equal to P.sub.c (x, y), belonging to each of the m.times.m cells C).
Construction of a global model by the above partition of unity formula provides in particular smoothing out the discrepancies between the local models.
By now the partial global model .PHI..sub. (x, y) is constructed. Then the part ' of the remaining models is chosen (see below), and the filtering is performed.
a. Namely, for each ridge model .PHI..sub.r in ', given by the polygonal line L, consisting of the intervals I.sub.i :
.PHI..sub.r is omitted if either .PHI..sub.r represents the white ridge, and the grey levels a.sub.i associated to each interval I.sub.i satisfy:
a.sub.i -.PHI..sub. (x.sub.i,y.sub.i).ltoreq.max(F.sub.1, Q.sub.1.H.sub.1) where (x.sub.i,y.sub.i) is the central point of the interval I.sub.i. Here, H.sub.1 is the average value of a.sub.i -.PHI..sub. (x.sub.i,y.sub.i) over the intervals of all the white ridges in ', F.sub.1 and Q.sub.1 are the external parameters, or:
.PHI..sub.r represents the black ridge, and
a.sub.i -.PHI.(x.sub.i,y.sub.i).gtoreq.min (-F.sub.2, Q.sub.2.H.sub.2), where H.sub.2 is the average value of a.sub.i -.PHI.(x.sub.i,y.sub.i) over all the intervals of the black ridges in '.
Usually, F.sub.1 and F.sub.2 are between 5-20 grey levels, preferably 10, Q.sub.1 and Q.sub.2 are between 0.3-1.2, preferably 0.6.
b. For an edge model .PHI..sub.e in ', .PHI..sub.e is omitted if:
max.sub.i -.PHI.(x.sub.i,y.sub.i).ltoreq.max(F.sub.3, Q.sub.3.H.sub.3) and
min.sub.i -.PHI.(x.sub.i y.sub.i).gtoreq.-max(F.sub.3, Q.sub.3 .multidot.H.sub.3).
Here, (x'.sub.i,y'.sub.i) and (x".sub.i,y".sub.i) are the points on the sides of the edge interval, as shown in FIG. 31, and H.sub.3 is the corresponding average. F.sub.3, Q.sub.3 are parameters.
c. The hill .PHI..sub.h is dropped, if a-.PHI.(x,y).ltoreq.max(F.sub.4, Q.sub.4 .multidot.H.sub.4) and the hollow .PHI..sub.4 is dropped if a-.PHI.(x,y).gtoreq.-max (F.sub.4, Q.sub.4 .multidot.H.sub.5). Here (x,y) is the center of the hill (hollow), a=a.sub.00 is its associated grey level value, and H.sub.4 (H.sub.5) is the average of a-.PHI.(x,y) over all the hills (hollows) in '.
F.sub.4 and Q.sub.4 are the parameters, and usually F.sub.4 is between 5-20 grey levels, preferably 10,Q.sub.4 is between 0.3-1.2, preferably 0.6. Denote .sub.1, the set of models in ' which have not been filtered out.
Now the next partial global model .PHI.,'(x,y) is constructed. It can be done in various ways. One possible construction is the following: ##EQU12##
Alternatively, .PHI.,'(x,y) can be constructed, using the partition of unity as described above.
The part " of the remaining models is chosen, and the filtering and the construction of the next partial model, .PHI.,',", are performed as described hereinbefore.
This process is now repeated until all the models detected are used or filtered out.
Now will be described some specific choices of ,', etc.
i. is empty. Thus, as the first partial global model we take .PHI.(x,y)=P.sub.c (x,y), for (x,y) belonging to each m.times.m--cell C.
This partial global model is called a "rough background", and it is given by a piecewise polynomial function which on each m.times.m--cell C is equal to the corresponding polynomial P.sub.c.
' here consists of all the models detected. Thus, on the second step we filter out insignificant models and complete the construction of a global model.
ii. Here we first construct a partial global model, called "background". It includes the smooth domains as well as the "best smooth approximation" of the domains, containing ridges, hills and hollows.
Usually, smooth areas of the background are separated by the edges and ridges with strongly different grey level values on two sides. Thus, the ridge polygonal line is called "separating" if for at least one of its intervals, the associated sidevalues, differ for more than S.sub.r. Here, S.sub.r is a threshold, usually between 10-30 grey levels, preferably 20. A profile of a separating ridge is shown in FIG. 32.
Now is defined as consisting of all the edges and separating ridges and ' contains all the remaining ridges, hills and hollows. The partial model .PHI..sub. is called a background.
iii. Here the background is constructed as in ii. Then ' is taken to contain all the remaining ridges, for which
for at least one interval Ii of the corresponding polygonal line. Here H.sub.6 is the average of 1a.sub.i -.PHI.(x.sub.i,y.sub.i) over the intervals of all the remaining ridges, Q.sub.6 is a parameter. Usually Q.sub.6 is the same as above.
Then, the second partial model is .PHI.' and " is taken to contain all the remaining (after a filtering according to .PHI., )ridges, hills and hollows.
iiii. Here contains all the detected ridges, edges, hills and hollows.
Among the variants i, ii, iii and iiii above, i is usually computationally simple, while iiii usually provided the best visual quality.
Version iii is relatively simple computationally and moreover provides high visual quality and high compression. It is preferable.
Various options for the choice of boundary lines have been described above. The option a (c for edges), i for hills and hollows--provides the best quality but usually the lowest compression, since additional information must be memorized.
The option e (iiiii) is compatible only with the version (i) of the "rough" background construction. It provides higher compression, but usually lower quality.
The option c usually provides both a good quality and a high compression ratio.
Usually the profiles of the ridges and edges look as in FIG. 33.
Thus, if the bounding lines will be chosen as shown in FIG. 33, and the profile functions .PSI. used in the model's construction as described above, this will provide the required shape and usually the inclusion of these edges and ridges to the partial model allows one to filter out the "side ridges", as shown in FIG. 33.
One of the possible ways to add the local models (ridges, hills and hollows) to the background is to define the resulting models as shown in FIG. 34. ##EQU13##
The local approximation in the m.times.m--cells C can be obtained in various ways, not only using the polynomials P.sub.c (x,y). For example, if two or more models supports intersect this cell, the gray levels on it can be obtained just by extrapolating the model values on the boundary lines. Thus, no information must be stored for the cell shown in FIG. 35.
The "smooth cells" can be represented by only one value (at the center), and then linearly interpolated, taking into account the models values on the boundary lines.
Other principles of choice of , ', etc., than those described above, can be used. In particular, in the regions, where a large number of hills and hollows are densely positioned, can be chosen to contain only hills. The partial model .PHI. is constructed in such a way that the hollows of a typical height (average height) are produced between the hills. In the subsequent filtering, usually many of the detected hollows are filtered out (being "well predicted" by .PHI.): see FIG. 36.
Since various smooth domains and the domains with different types of texture are usually separated by edges, it may be desirable to form a partition of the entire region into subpieces, separated by edges and separating ridges. These subpieces can be defined in various ways. In particular, one can form a polygonal subdivision of the region.
As such a subdivision is constructed, it can be used as follows:
a) various average values, as above, can be computed with respect to those naturally defined subpieces, and not to the square region, which is not related to the picture structure; and
b) The size m of a subdivision of the region into the m.times.m--cells, can be chosen separately for each subpiece, thus allowing for an economic representation of the smooth areas.
Global Model Construction by linear interpolation
The way of constructing global models, hereinafter described, can lead to a particularly simple realization of the process. The structure of the compressed data, obtained in this way, is convenient for operations on compressed pictures and for videosequence compression.
Hereinafter a more detailed description of this realization is given.
1. Let the set of models be chosen. All the models in this set are assumed to be provided with their boundary lines and their values on the boundary lines, as described above.
2. As usual, the region is sub-divided into m.times.m cells. The corners of these cells form a grid, which will be denoted by G.
3. To each point w in G, a grey value v(w) is associated, which is the (averaged over a small neighborhood) grey level value of the original picture at the point w. In particular, we can always assume that G is a subgrid of the basic grid, used in the models identification process. Then u(w) can be defined as the constant term a.sub.00 of the polynomial p(x,y) constructed at w.
4. The value of the global model .PHI.(x,y) at each point x,y of a certain m.times.m--cell C is defined as follows:
a. Consider all the models in whose supports intersect C. The part of the boundary of C not covered by the supports of these models, is subdivided into segments with the end point either at the corners of C or on the boundary lines of the models involved.
b. Thus the values of .PHI. are defined at each endpoint either as v(w) for a corner w, or as the value of the corresponding model at its boundary point. Define the values of .PHI. at the interior points of the boundary segments by linearly interpolating the values of the endpoints: see FIG. 43.
c. Finally, for any (x,y) in C, not belonging to the supports of the models intersecting C, the horizontal line through (x,y) is drawn until the first intersection on the left and on the right either with the boundary segments of C or with the boundary lines of some of the models. The values of .PHI. at these intersection points are already defined (either by b. above, for the boundary segments of C, or by the value of the corresponding model on its boundary line). Then the value of .PHI. at (x,y) is defined by linear interpolating the values at the intersection points.
d. The values of .PHI.(x,y) for (x,y) belonging to the support for one of the models is defined as the value of this mode at (x,y). If (x,y) belongs to the support of several models, the value .PHI. (x,y) is determined by averaging the values of the models involved, as described above.
For example, in FIG. 43 the values of .PHI. on AB, CD, DE, EF and GA are defined by linear interpolation of the values at the endpoints. The values at (x.sub.1,y.sub.1), (x.sub.2,y.sub.2), (x.sub.3,y.sub.3) are defined by linear interpolation of the values at A.sub.1 and B.sub.2 )A.sub.2 and B.sub.2, A.sub.3 and B.sub.3, respectively.
5. The global model has some important advantages:
a. Its values are continuous, by construction. This prevents certain visual distortions. This continuity is maintained also on the boundaries of the regions, if the same values v(w) are used for the boundary gridpoints w in both adjacent regions. This eliminates the necessity of smoothening operations.
c. Computations of the values of .PHI. are local: for each point in a m.times.m cell C, only information concerning C is used in computations. This property is important for a hardware implementation of the process.
d. Very simple structure of compressed data: the parameters of the local models and the values v(w) at the points of G, not covered by the supports of the models.
6. Filtering operations can be performed on this model as herein described. In particular, in smooth regions the grid G may be too dense. Then one can compare the values v(w) at G with the values interpolated from the, say, twice-spaced grid, and to omit the gridpoint in G, whose values are approximated closely enough by this interpolation.
In the filtering stage (Step 11) the following considerations and examples should be kept in mind. In this stage we eliminate some excessive information, according to its psychovisual significance. This involves simplification of the models, carried out by eliminating some excessive parameters, without dropping the model completely. Since the models are constructed on the base of a local analysis, a posteriori they may contain "excessive" parameters. The following examples will clarify this step of the process.
EXAMPLE 1
Assume that a central line of a certain curvilinear structure is represented by a broken line, consisting of a number of straight segments. However, if the deviation of the intermediate points from the straight segment connecting the endpoints is less than a certain threshold T.sub.8, the broken line can be replaced by said segment with no visual degradation (see FIG. 37), and all the parameters, representing the intermediate points of the broken line, can be omitted. T.sub.8 is usually between 0.3-1 pixel, preferably 0.5.
EXAMPLE 2
Hills and hollows may be represented by bell-shaped models with an elliptical base (see FIG. 38).
Let r.sub.1 r.sub.2 be the semiaxes and .theta. the angle of the biggest semiaxis with the ox.
For .vertline.r.sub.2 /r.sub.1 -1.vertline..ltoreq.T.sub.9, the ellipse is visually indistinguishable from the circle of radius r=1/2(r.sub.1 +r.sub.2). Thus we can replace the ellipse by this circle and to store only r, instead of r.sub.1, r.sub.2, .theta.. T.sub.9 is usually between 0.1-0.3, preferably 0.2
EXAMPLE 3
Smooth regions can be represented by polynomials of degree 2, z=a.sub.0 +a.sub.1 x'+a.sub.2 y'+a.sub.11 x'.sup.2 +2a.sub.12 x'y'+a.sub.22'.sup.2 (in local coordinates x',y' at each cell).
If all the coefficients of the second order are less than T.sub.10, all the three second order terms can be omitted with no visual degradation.
For any specific model realization the corresponding thresholds T.sub.10 can be found in advance in a straightforward psychovisual experiment. T.sub.10 is usually between 5-20 grey levels, preferably 10.
In a further filtering stage, entire models may be filtered out, viz. screened out entirely, because of their small psychovisual contribution.
A general scheme is as follows: We choose a part of models and construct on their base a partial global model. Then for each of the remaining models we measure its contribution to this partial picture. If it is less than T.sub.1, the model is omitted. Next we add a part of the surviving models to the partial model, and construct a second partial global model. Once more, we measure the contribution of the remaining models, then repeat the procedure. In detail this procedure is described above.
EXAMPLE 4
We construct a background using the edges and smooth regions detected (see detailed description below). This background is our partial model. Then we add the ridges, the hills and hollows, dropping those whose height over the background is less than T.sub.12.
EXAMPLE 5
We construct the background and perform the first filtering, as in Example 4. Then we add part of the "surviving" ridges to the background (those of greater than average height), using the profile illustrated in FIG. 39.
Here the height of the side channels 1 and 2 is proportional (within a certain fixed coefficient) to the height of the ridge.
Experiments show that this profile is typical for ridges on the usual pictures, and in this way we form a second partial model.
Usually the ridges, corresponding to the side channels are detected and stored. However, now they will be screened out, since their contribution has been already provided by the chosen profile.
The threshold value T in the filtering process depend strongly on the structure of the picture, the distribution of sharpness, brightness, on the geometry of the models, etc. An important point is that the primarily compressed data provide an adequate and easily extractable information of this sort. So highly adaptive methods of filtering can be constructed, providing a high degree of utilization of the visual perception properties.
On the other hand, a very simple form of thresholds T can be given:
where T.sub.abs is the (usually low) absolute threshold, and I.sub.aver is the average value of the threshold quantity. Above, a detailed description is given.
Step 12-
In this, the quantization step, we approximate the parameters values of the primarily compressed data by the values from a certain smaller array, constructed according to the psychovisual significance of each parameter and their combinations.
Since the parameters have very simple geometric and visual interpretation (position, slope, curvature and width of curve position and form of hills, their brightness, etc.), the levels of admissible quantization in their various combinations can be established rather accurately. Thus, the quantization is performed in several steps:
Aggregation of parameters and models
At this stage we aggregate together those parameters whose psychovisual significance and/or their dynamic range depend on their mutual values.
Part of this aggregation can be built into the model's structure, but another part depends on the mutual position of the models on the picture, and hence can be performed only when the models have be identified.
Aggregation can be followed by the substitution of other parameters and/or a coordinate change, to express in a better way a mutual dependence of parameters.
EXAMPLE 6
This is similar to the preceding filtering Example 1--see FIG. 40.
Experiments show that the replacements of the intermediate vertices E.sub.1, E.sub.2, E.sub.3 in the direction perpendicular to the segment AB, are visually much more important than the replacements in the AB direction.
Thus, we aggregate the parameters in the following way:
a) The coordinates of the endpoints A and B are quantified with respect to the global region coordinate system.
b) The new coordinate system is constructed, its first axis being parallel to AB and the second axis perpendicular to AB.
c) Coordinates of the intermediate points E.sub.i are expressed with respect to this new system.
d) The coordinate values are quantized, the quantization step for the first coordinate being bigger than the step for the second coordinate.
e) The dynamic range of the new coordinates is also determined naturally. The first coordinate for the point E.sub.i is bounded by its values for A and B. For the second coordinate the experiments show that its range usually is bounded by approximately 20% of .vertline.AB.vertline..
EXAMPLE 7
The same broken line as in Example 6 can be described by the following parameters: lengths .rho. of the segments and the angles .theta. between the consequent segments: see FIG. 41:
The psychovisual considerations allow one to define the appropriate quantizations steps and dynamic ranges for .rho.'s and .theta.'s.
EXAMPLE 8
For models that are geometrically close to one another, the experiments show, that of the greatest visual importance are the perturbations, which change the "topological" structure of the picture, viz. create new visual contacts between the models or separate visually unified models, as illustrated in FIG. 42.
On the other hand, parameter perturbations, which alter the positions and forms but preserve the topological structure, are much less detectable.
Thus the parameters of nearby models, responsible for their mutual positions, can be aggregated, and their dynamic range and quantized values can be chosen in such a way that the topology of the picture to be preserved by the quantization.
EXAMPLE 9
This is similar to Example 2 under filtering. Experiments show that for the description of the ellipses, the closer the ratio r.sub.1 r.sub.2 to 1, the smaller is the visual significance of the angle .theta..
Thus, we can use new parameters: r.sub.1, e=r.sub.2 r.sub.1 and .theta.. The dynamic range of r.sub.1 depends on the scales chosen, e is bounded by 1 (r.sub.2 .ltoreq.r.sub.1), and .theta. belongs to o,.pi.!.
However, the quantization steps for .theta. can be chosen in greater size as the values of e are closer to 1.
Subdivision of the dynamic range of the aggregated parameters
At this stage the common dynamic range of the aggregated variables is subdivided into subparts. In each subpart, one specific value of the parameters is fixed, which represents this subpart.
The quantization consists of replacing parameter values belonging to a certain subpart by the value representing this subpart chosen above. The first two steps are performed according to the psychovisual significance of the parameters values. These steps have partially been described in Examples 5-9 above.
A general procedure, described above, is well known under the name "vector quantization" (see A. Gersho and R. M. Gray, Vector Quantization and Signal Compression, Kluwer Academic Publishers, Boston/Dordrecht/London, 1992!). Thus, for any other realization of basic models and their parameters, the corresponding quantization procedures can be constructed by skilled persons.
Step 13-Encoding
This is a procedure which ultimately represents the quantized data, obtained in step 12, in the form of a binary file (or a bit-stream). This procedure is without loss in the sense that after decoding we obtain exactly the quantized values of all the parameters. In principle, any lossless encoding process can be applied at this stage. However, a correct organization of data reflecting the specific nature of the parameters to be encoded, can greatly reduce the volume of the final encoded file.
Encoding of geometric parameters
The order of the models representing the basic elements detected is not important in the construction of the global model. This fact can be utilized in constructing a more economic encoding.
The geometric parameters must be encoded with respect to a correct scale. For example, in order to encode the positions of the points entering our models, we can subdivided the region into the smaller cells. Since the order of the objects is not important, we can encode the coordinates of the points in each cell separately. Since each cell is smaller than the entire domain, for the same level of quantization we need fewer bits to encode the coordinates with respect to a cell.
Additional data which must be memorized for each cell is the number of the points in it. Even if the distribution of the points is ordinary, an easy computation shows that in such a subdivision we usually gain a significant amount of bits. However, if the cells have approximately the size of the basic scale L, we know that the possible number of objects in each cell is small, and therefore the number of bits we need to memorize the amount of objects in each cell drops.
Thus we encode the geometric parameters with respect to the cells approximately of the size of the basic scale L. In this way we utilize the experimentally known uniformity of distribution of the basic elements on the picture.
The parameters, which are (or can be) correlated, must be aggregated in a correct way. For example, the slopes or widths of the curvilinear structures, or the brightness of the models, etc., within one region are usually concentrated around a small number of typical values.
Thus, values can be memorized once per region, and for each model only the difference must be encoded. In particular, the average value can be used as a typical one.
Huffman-like coding can be used to utilize non-uniformity in distribution of the values of certain parameters. In order that this coding be effective, the parameters must be properly subdivided into groups with similar distribution. For example, the values of the slopes by themselves usually are distributed uniformly around the picture and hence Huffman encoding will not reduce the amount of data. However, if in each region we subtract the average value, for the differences distribution, we can expect a strong concentration around zero and application of Huffman encoding will reduce significantly the volume of data.
Some transformations of parameters in each region can be used to make their distributions over different regions similar.
The size of the regions into which the picture is subdivided is important in the effectiveness of the Huffman encoding, as earlier detailed.
Finally, the binary data encoding the quantized values of the parameters, as well as the types of the models, is organized in a binary file. In principle, this file can be further compressed by any lossless method.
On the other hand, this file can be organized in such a way that provides easier access to various parts of the encoded picture and in order to make it error-resistant. Usually these operations increase the volume of data insignificantly.
Note that the models are constructed in an invariant way. And subdivisions into regions is done only for reasons of convenience. Thus some models from one region can be encoded in a neighbouring one, and the pointers can be used to identify the correct regions for each model in the process of decompression.
Step 14-
At this stage--decompression--we produce from the binary file obtained in Step 13 the picture represented by its RGB values at each pixel. The binary file is transformed to the quantized values of parameters. This is done by the same encoding procedures which are used in Step 13, since by nature these procedures are invertible.
The quantized values are interpreted as the values of "primarily compressed data". This means that the quantized values obtained are represented by the figures with the number of digital or binary digits which are required by the computer being used and by computations accuracy considerations.
The obtained values of the parameters are substituted into the global model z=.PHI. (x,y) (for each region separately). This global model represents an explicit instruction for a computer, how to compute the value of the grey level z (or RGB) for each given values x,y of the coordinates of the pixel. The computer finds the values of z for all the regions. For each region the coordinates (x,y) of each pixel are substituted to the model .PHI., and the corresponding value z=.PHI. (x,y) is computed.
In this way, we obtain the values z (or RGB) at each pixel of the picture.
At the decompression stage some smoothening operations can be performed, to eliminate the discrepancies between the adherent models in different regions.
It can happen that the detection (or filtering, or quantization) procedures introduce certain systematic distortions into the parameter values. These distortions can be corrected in the decompression process by introducing appropriate corrections to the values of the parameters stored.
For example, the detection process with a large "l" scale introduces a certain low-pass effect. In particular, the widths of the ridges and edges and the sizes of hills may be obtained at a size which is 20% larger than their correct values on the picture. Then, in the process of decompression, each value of the width or size can be multiplied by 0.8, which will partially correct the undesirable distortion.
An important property of our models is that they scale-invariant. They are mathematical expressions which can be interpreted according to any given scale.
Thus, the size of the picture to be obtained in the process of decompression is a free parameter of this process. In particular, we can obtain the picture of the same size as the initial one, but any desired zoom or contraction can be produced. The same obtains with respect to non-uniform rescalings in x and y directions. In particular, the picture, compressed in one of the TV standards (PAL, NTS) can be decompressed into another one.
The same can be said, in fact, of more complicated geometric transformations. See "Operations" below.
Size of the windows
It is important to stress that although in all the examples the linear dimension "l" of the window was 4, it can (and sometimes should) be different, for example, 3 or 5 pixels. In particular, l=3 can be used to capture properly the finest scale details on the usual video or pre-press pictures.
The process, in particular the identification of the basic structure, can also be arranged in the following way: The basic identification is performed with l=4 until all the segments and hills and hollows are identified. Then at each point where segment or hill (hollow) has been found, the polynomial of degree 2 is constructed which provides the best mean square approximation of the picture on the 3.times.3-cell around the center of the segment or the hill. Then, the initial polynomial (constructed on a 4.times.4-cell) is replaced by this new one. All the rest of the processing remains unchanged. This is done in order to improve the accuracy of the detection of the parameters of the objects (their height, position and curvatures).
In the same way, in the process of edge elements construction, the degree 2 polynomials can be computed on 4.times.4-cells, instead of 6.times.6 or 5.times.5. Alternatively, both the polynomials can be computed and combined to provide better estimating of the edge parameters.
In the above processes, the weighting functions on the pixels of 4.times.4 (6.times.6)-cells can be used (instead of smaller cells), in order to compute approximating polynomials.
Compression of color pictures
Color pictures are represented by several color separations, according to various approximations and standards (RGB, YIQ, CMYB, etc.; see e.g. R.J. Clarke, Transform Coding of Images, Academic Press, 1985, from page 248!. Each color separation usually represents a grey-level picture of a certain quantization. For example, for RGB each of these basic colors is represented by 256 grey values (8 bits) on each pixel.
1. The simplest way to compress color pictures consists in compressing each color separately.
2. The compression process described above provides a tool for a much better utilization of a redundancy, existing in color information.
Different color separations of the same picture represent essentially the same objects in various parts of the light spectrum. The models described above capture the geometry of these objects. Therefore, each color separation can be represented by exactly the same models with exactly the same geometric parameters. Only the brightness parameters of these models differ from one separation to another.
3. Thus the color compression is performed as follows:
a. One of the separations (for example R) is compressed as a grey level picture. In particular, all the models are constructed.
b. The same models, with the geometric parameters, are used to represent G and B.
c. The brightness parameters of these models are adjusted for each separation of G and B separately, to provide a faithful representation.
d. In the compression data, a complete information is stored only for R, and only the value of the brightness parameters are stored for G and B.
4. The same method can be applied to other combinations of the basic colors, for example to YIQ (see R. J. Clarke, Transform Coding of Images, Academic Press, 1985, from page 248!). Then the grey level picture corresponding to the luminance Y is compressed, as described above, and only the values of the brightness parameters are stored for the chrominances I and Q. Since the visual sensitivity to the values of I and Q is much lower than to Y, the required accuracy of a quantization of the brightness parameters for I and Q is much less than for Y.
5. In the preferred embodiment described above, the geometric parameters of the models are:
the coordinates of the centers and the directions of the eigenvectors for hills and hollows;
the coordinates of the vertices of the polygonal lines, representing ridges and edges;
the width (or right(left)width) for each interval of the polygonal line;
the position of the boundary line.
The brightness parameters are:
the height a.sub.00 and the curvatures .lambda..sub.1 and .lambda..sub.2 for hills and hollows;
The height a, the curvature .lambda. and the values left (right) value for each interval of a ridge.
the min(max) values for each interval of an edge.
All these brightness parameters are the average grey level (or curvature) values of certain points or on certain curves. Thus, to find the values of these parameters for a given color separation (say, G), we compute (for this separation) the required averages at the same points and along the same curves.
In particular, the following procedure can be applied: in the original compression (say, for R) all the brightness parameters are obtained by certain calculations described above from the polynomials p(x,y) and q(x,y) of degrees 2 and 3 respectively, approximating the original pictures on certain cells.
Then to find the brightness parameters for another separation (say, G), we compute the approximating polynomials p(x,y) and q(x,y) for G exactly at the same cells and then repeat the same calculations as for R.
In many cases, the values of brightness parameters for different color separations are strongly correlated, This is due to the fact that different color separations are the intensities of the light reflected by the same objects in different parts of the spectrum. Then (on small regions of a picture) these intensities are usually related by very simple transformations.
To remove this redundancy we can try to represent the brightness parameters of the separations G and B by means of simple transformations of the brightness parameters of R.
For example, assume that p.sub.1, . . . , p.sub.n are the brightness parameters of the model, representing the separation R on a certain region, and p'.sub.1, . . . , p'.sub.n and p".sub.2, . . . , p".sub.n are the corresponding parameters for G and B. We find the numbers a', b' and a", b", which provide the minimum of the mean square ##EQU14## the form (*) p'.sub.i =a'p.sub.i +b'+r'.sub.i
p".sub.1 =a"p.sub.i +b"+r.sub.i ".
Usually the correction terms r.sub.i ', r.sub.i " are visually negligible (if the regions are small enough--say, 24.times.24). Then, instead of memorizing p'.sub.i and p".sub.i, we store for each region only four numbers: a', b', a", b".
Various modifications of this method can be used. For example, we can try to find representations of the form (*) separately for various kinds of brightness parameters, say for edges, ridges, hills and hollows; or for the white and black models separately, etc.
7. A possibility of a simple expression of one color separation through another on small regions can be used to provide a color compression scheme, which can be combined with any grey level compression process (for example, DCT). This color compression procedure is less accurate than the one described above. However, it usually leads to much better results than the color compression scheme used, say, in JPEG standard. It is performed as follows:
a. The picture is subdivided into cells of the size s.times.s (usually s is between 8 and 24).
b. For the color separations chosen (for example, YIQ), on each block the numbers a', b' and a", b" are determined, which minimize the mean quadrate deviations ##EQU15## Here the summation is performed over all the pixels in the cells, and Y(x,y), I(x,y) and Q(x,y) denote the grey level values of the corresponding separations at the pixel with the coordinates (x,y).
(The numbers a', b', a", b" can be found by standard procedures well known to the skill person.)
c. The basic separation Y is compressed by the chosen compression method. Let Y' denote the grey values after decompression.
d. Then the grey values of I and Q after decompression are given by
I(x,y)=a'Y'(x,y)+b'
Q(x,y)=a"Y' (x,y)+b".
Thus, the compressed data for a color picture consists of a compressed data for Y, and of four numbers, a', b', a", b" for each cell, to represent I and Q. The example of a color compression according to this scheme is given below.
Processing of pictures in a compressed form
Picture processing consists in performing on pictures various visually meaningful operations: extraction of various features (defined in visual terms), comparison of pictures or their parts, stressing certain visual features and suppressing others, picture enhancement, creation of visual effects (conturing, quantization, etc.), various color operations, geometric transformations (rotation, zoom, rescaling, non-linear transformations as a "fish-eye"), 3D-geometric transformations (perspective projections, etc.), transformations related with a "texture" creation (i.e. matching pictures as a texture with 2D or 3D computer graphics primitives), etc.
1. In the compression process described above, pictures are represented by models, whose parameters present the (primary) compressed data. These parameters, as described above, have very simple visual meanings. As a result, any picture processing operation defined in terms of a desired visual effect, can be interpreted as a simple operation on the parameters of our models, i.e. as an operation on compressed data. As a consequence, in our compressed data structure, picture processing is performed much faster than the same operations on the original pictures; the same is true for the memory required.
2. This important property is not shared by conventional compression methods, like DCT. The reason is that the parameters representing the picture in these methods, like the digital cosine transform (DCT) coefficients, are related to the visual structures of the picture in a complicated way. Therefore, the effect of processing operations on these parameters is difficult to evaluate.
Examples of picture processing in the compressed data structure according to the invention
One of the very important operations in picture processing is edge detection, which consists in determining the location of abrupt changes of brightness.
In the compression process of the invention, the edges are detected and represented by corresponding models in the course of the compression process. Therefore, to show a picture consisting of only the edge regions, it is enough to drop all the models in our compressed data but the edges.
Our compressed data allows for a much more detailed shape analysis. The edges or ridges can be classified according to their profile; textured areas can be analyzed according to the type and the density of the texture elements (usually represented by hills and hollows in our compressed data).
Our compressed data comprises a very convenient input for a higher level picture analysis (picture comparison, complicated features extraction, computer vision, etc.).
Picture enhancements that can be performed
Sharpening a picture (high-pass filter). This visual effect can be achieved by increasing the "slope" of all the models involved. Increasing the brightness parameters and decreasing the width (size) of the models provides the required increasing of the slopes. A low-pass filter effect is achieved by an opposite variation of the parameters.
Much more specific effects can be achieved. For example, all the edges can be sharpened, while the small-scale textures (hills and hollows) can be smoothed.
Various visual effects can be produced. For example, replacement of the usual profiles by new ones, like those illustrated in FIG. 44(a) and (b) leads to a "granulation" effect.
One more, if required, this operation can be performed only on the models of a certain type.
Various color operations require only corresponding transformations of the brightness parameters for each color separation, as described above with reference to color pictures compression.
Artificial textures of various types can be created in our compressed data structure.
Geometrical transformations
Zoom and rescaling.
One of the important properties of our compressed data is its scale invariance. This means that the picture is represented by a mathematical model, which allows for computation of the brightness value .phi.(x,y) at any point. This computation is not related to the specific position of pixels. Therefore, the scaling and zoom, i.e. the size and proportion of the picture after decompression, are only the parameters of the decompression. In this sense the rescaling and zoom operations on the compressed data do not take time at all.
One of the important consequences of this scale invariance is that pictures can be compressed in one standard (PAL, NTSC, . . . ) and decompressed into the same or any other standard with no additional processing,
General transformations
Also more complicated transformations than zoom and rescaling can be interpreted as the parameters of decompression. However, in may applications it is important to represent a picture after a transformation in exactly the same compressed format as the initial picture.
In order to define this operation precisely, let us assume that a picture A and a screen B are given (not necessarily of the same size). Let .PSI.: B.fwdarw.A be a transformation which associates to each point p on the screen B the point q=.PSI. (p) on the picture A.
Now a new picture .PSI. (A) is defined on the screen B as follows: at any point p on B, the grey value (or the color) of the picture .PSI. (A) is equal to the grey value of the picture A at the point q=.PSI.(p).
Intuitively one can imagine that the picture A is printed on a rubber film. Then the rubber film is stretched by a transformation .PSI..sup.-1 (inverse of .PSI.) to match the screen B. The resulting picture on B is .PSI.(A).
If we want to represent .PSI.(A) in our standard compression format, using the compressed representation of the picture A and the transformation .PSI., we operated in the following way.
1. For each model in the compressed representation of A, the geometrical parameters are transformed by a linearization of .PSI.. More precisely, each polygonal line on A with the vertices v.sub.i is transformed into a polygonal line on B with the vertices .PSI..sup.-1 (v.sub.i). This is illustrated in FIG. 45.
2. In the same manner, the central point p of a hill (hollow) on A is transformed into the point .PSI..sup.-1 (p) on B.
3. The eigenvectors of hills and hollows are transformed by the differential d.PSI..sup.-1. Similarly, the curvatures .lambda. are transformed.
4. Finally, the heights of the hills, hollows, edges and ridges do not change in this transformation.
5. The polynomials representing the smooth regions are transformed by the differential of .PSI. on corresponding cells.
Especially simple form geometric transformations take in the global model structure described above.
1. The models are transformed from A to B as described.
2. For those of the points w of the grid G on B, which are not covered by the supports of the models, the grey level values v(w) are defined as the grey level values of the picture A at the points .PSI.(w) (more precisely, as the values of the global model, representing A).
In fact the procedure described above replaces .PSI. by its differential, i.e., it is based on local linearization of .PSI.. This inaccuracy is justified, since usually the scale of our models is much finer than the scale of non-linearity of .PSI..
Rotation is an especially simple example of geometric transformation. Here, all the geometry of the models is rotated to a corresponding angle, while the .lambda.'s and the rest of the brightness parameters do not change.
Similarly, zoom and rescaling can be interpreted.
3D-geometric transformations
Here the picture A is associated with a certain 3D object, and the transformation .PSI..sup.-1 is the projection of the object onto the viewer's screen. This is illustrated in FIG. 46.
To produce a picture on the screen in a conventional way, the intersection of the viewing rays through each pixel on the screen with the object must be computed (as well as the grey values (colors) of the picture A at these intersection points--Ray tracing).
The method described above produces from a compressed representation of A and the 3D data the compressed representation of the picture on the viewer's screen. It requires computation of the ray's intersection with the body only for a very small number of points (vertices of polygonal lines and centers of the hills and hollows). Thus, the required amount of computations is drastically reduced.
In this way, high quality pictures can be attached to 2D and 3D graphic primitives as a texture.
As a result, 3D scenes with a high quality realistic texture can be created. It will be possible to produce (with a small amount of computations) the view of this scene from any given position. Thus the user will interactively be able to choose (in real time) his viewpoint, and to "travel" inside the textured scene created.
In particular, a combination of a 3D terrain information (digital terrain model) with a high quality picture of a corresponding landscape will allow one to interactively create a view of this landscape from any desired position. This possibility can be used in entertainment and advertising applications.
Various additional effects in computer graphics, requiring long computation in conventional data structure (texture reflection, shading, etc.) can be performed very fast, if our compressed picture representation is used.
Our compression process for video sequences (see below) preserves the abovementioned properties. Therefore, all the operations described above can be applied to compressed video data. Since these operations are very fast (being performed on compressed data), the real time interactive video manipulation and processing becomes feasible.
Compression of video sequences
1. Generally, moving scenes are represented by sequences of still pictures (called frames), reproducing the scene in fixed time intervals.
Various standards are used for moving scenes representation in TV, video, cinema, computer animation, etc. As an example, we shall discuss below video sequences consisting of 480.times.720 pixels RGB still pictures, representing the scene in intervals of 1/30 sec. (30 frames per second). However, the compression method described below can be equally applied to other standards (see, for example , discussion of interlaced frames compression below).
In principle, video sequences can be compressed by compressing each frame separately. However, this approach presents two problems:
a. Compression of still pictures usually involves various discontinuities filtering of models and parameters according to certain thresholds, quantization, etc. For a single still picture these discontinuities cause no visual problem. However, in a sequence of frames, the jumps in grey values caused by these discontinuities lead to a serious quality degradation ("flickers", since they usually change from frame to frame in a completely unpredictable way.).
To avoid this affect, the compression must provide a certain continuity in time.
1. Usually, subsequently frames in a video sequence are strongly correlated, being the images of the same scene in a very short time interval. This correlation, which promises a much higher compression ratio for video sequences than for still images, is not utilized by a frame by frame compression.
Therefore, one expects a good video compression process to provide a desired continuity of the compressed pictures in time and to utilize the correlation between the neighboring frames.
Great efforts have been made in developing such processes (see MPEG documents, in publications of the International Standard Organization--ISO, ISO/IEC, JTC 1/Sl, 2/WG8). In particular, various "motion compensation" methods have been developed to utilize the fact that some parts of the adjacent frames are obtained from one another by a certain replacement. However, these methods reveal only a small part of a similarity between the neighboring video frames. Indeed, only nearby parts of the scene are moving in a coherent way. Usually various objects are moving in different directions, including the objects in the finest scale (leaves of a tree under the wind, waves on the water surface, texture details on two overlapping objects moving in different directions, etc.). Typically, brightness of the picture can be changed from frame to frame gradually, or sharpness of the frame can change as the result of refocusing of a camera, etc. These types of frame evolution, which certainly present a strong correlation between the neighboring frames, cannot be captured by conventional "motion compensation" procedures. (We shall call below these types of evolution "generalized motions".)
As a result, the existing video compression methods utilize only a small part of interframe correlation, give a low compression ratio and encounter serious quality problems.
2. We propose a method for video sequences compression, based on a still compression scheme, described above. Its basic advantage is that representation of the adjacent frames in our compressed data structure reveals much deeper similarity between them than in any conventional method. In fact, experiments show that in video sequences, representing natural moving scenes or resulting from animation, scientific visualization, etc., the neighboring frames can be represented by essentially the same models, with slightly different parameters.
Thus in our method the neighboring frames are always obtained from one another by a "generalized motion"--i.e., by a variation in time of the parameters of the same models.
Therefore, to represent several neighboring frames in a video sequence, it is enough to compress one of them (i.e., to represent it by our models) and to find the variation of the parameters of these models in time.
Of course, this representation will be visually faithful only for a small number of frames, so we have to repeat this procedure several frames later.
3. Let us give some examples of a representation of a generalized motion by our models.
a. A usual motion of a part of the picture. In this case, the "position parameters" (coordinates of the vertices of the polygonal lines for ridges and edges and coordinates of the centers for hills and hollows) of our models are described in a first order approximation by
x(t)=x(0)+v.sub.1 .multidot.t
y(t)=y(0)+v.sub.2 .multidot.t
where v=(v.sub.1, v.sub.2) is the motion vector of this part of the picture.
b. In a case where different models are moving in different directions, we have the same representation (*), but the motion vector changes from model to model.
c. In some situations, different vertices of the same model are moving in different directions. For example, (see FIG. 50). for a curvilinear structure in FIG. 50, vertices A and B are moving in opposite directions. In such situations, for each vertex its own motion vector is defined.
d. Gradual changes in sharpness. Here, the "widths" of the models involved decrease and their slopes increase in time. In a first order approximation, this evolution can be described by the same expression (*).
e. Gradual changes in brightness or color--the same as above, but for brightness and color parameters of the models involved.
Usually a first order approximation (*) of the parameters evolution in time provides a visually faithful representation of video sequences for 3 to 6 frames or more.
4. The compression method as above provides a serious additional compression factor (in comparison with a still compression). Indeed, for each 3 to 6 frames we need to memorize only the parameters of one frame and the corresponding generalized motion vectors, which have exactly the same structure as the corresponding parameters. Thus, the data to be stored is less than twice that of a still compressed picture. Since this information is enough to reconstruct 3 to 6 frames, we get an additional factor of 1.5 to 3.
5. However, mostly one does not need to memorize the generalized motion vectors for each model separately, since the parameters of different models usually change in time in a coherent way. Utilization of this coherency we call "generalized motion compensation". It is performed in the following way: We analyze the individual generalized motion vectors for each model and try to find correlations between these vectors.
For example, on certain blocks of the picture we represent these vectors in a form
where v is an average generalized motion vector over all the models in the block, and v.sub.i are the correction vectors for each model.
Usually on relatively small blocks the corrections v.sub.i are negligible, and then only the global generalized motion vector "v" must be memorized per block.
6. In some situations models can appear, disappear or change their type in the process of their evolution in time. Such changes cannot be described by variations of the parameters. However, most of these situations can be covered by simple mathematical models (time-depending), which we call "bifurcations".
For example, a ridge component can be split into two parts (see FIG. 48).
Topology of a curvilinear structure can be changed (see FIG. 49).
To represent such situations, we memorize the type of a bifurcation model involved and its parameters.
7. The general compression scheme above can be implemented in various ways: as the prediction of the following frame on the basis of the previous ones, as an interpolation (not of grey values, but parameters of the models), or as a combination of these and other methods. Below we describe in more detail one specific realization of the method.
8. The specific realization is based on an explicit compression of some subsequence of the control frames and an intrerpolation of the models parameters from the control frames to intermediate ones. Thus, for a sequence F.sub.0, F.sub.1, . . . , F.sub.i of frames, we define the frames F.sub.0, F.sub.s, F.sub.2s, F.sub.3s, . . . as the control frames and the rest as the intermediate ones. Here s is usually between 3 and 6.
a. Each control frame is compressed as a still picture, as described above.
b. Consider a certain control frame F.sub.js. For each model .PHI., representing this frame, we estimate the motion of its geometric "skeleton" (which consists, by definition in the underlying component for edges and ridges, and in the central point for hills and hollows). Below, this operation is described in more detail.
c. On the basis of a motion estimation obtained in stage b, we predict a position of a model .PHI. considered (or of its geometric skeleton) on the next control frame F(j+1)s (see FIG. 47).
d. We try to "match" the predicted model position with one of the models actually detected on a frame F(j+1)s. This is done by calculating the "Hausdorf" distance of the predicted component (center to the actually detected ones and choosing the nearest component .PHI.. If its distance to the predicted component (center) is less than a certain threshold, we "match" the model .PHI. on the frame Fjs with the model .PHI.' on the frame F(j+1)s. Hausdorf distance of two sets A and B is defined as max(x in A)min(y in B) distance (x,y).
Now we construct a representation of intermediate frames by the models: for each pair of matched models .PHI. and .PHI.' on the control frames Fjs and F(j+1)s, we define a model .PHI." of the same type on each frame between Fjs and F(j+1)s, with all the parameters obtained by a linear interpolation of the parameters of .PHI. and .PHI.'.
f. For each unmatched model .PSI. on Fjs we define a model .PSI. of the same type on each frame between Fjs and F(j+1)s with parameters, obtained by an extrapolation from the previous control frames, and with the brightness parameters multiplied by a factor, linearly decreasing from 1 to 0 from Fjs to F(j+1)s.
For unmatched models on F(j+1)s, exactly the same procedure is performed, but in an opposite time direction.
g. The background or smooth regions data (approximating polynomials or values at the grid G-points--see above) are linearly interpolated from the control frames to intermediate ones.
h. Finally, the color parameters (see above) are also linearly interpolated from the control frames.
Motion estimation
At stage b, we estimate the motion of each component (for ridges or edges) and each central point for hills and hollows. This is done as follows:
a. For ridge components, at the center of each segment in this component we compute (on a 3-dimensional cell of the size n.times.n.times.n) a polynominal P of degree 2 of three variables, providing the minimal square deviation from the 3D-grey level distribution, formed by the subsequent frames, where the time t is considered as the third coordinate. Here n is measured in pixels in the frame directions and in frame numbers in time direction. Its typical values are between 4 to 6. Then the quadrated part of P is transformed to the main axis (diagonalized). We define the plane of a motion of the segment as the plane, spanned by the two eigenvectors of P, corresponding to the smallest eigenvalues (Note that a segment was spanned by the eigenvector, corresponding to the smallest eigenvalue in a two-dimensional case.).
Then the motion plane of the component is defined by an averaging of the motion planes of its segments.
Finally, if between the motion planes of the segments are pairs, forming sufficiently big angle between them, we define the motion vector of the component as the average of the vectors corresponding to the intersections of the motion planes of these pairs of segments.
b. For edge components, at the center of each edge element, forming this component the same polynomial P of three variables as in "a," is constructed. The motion plane of the edge element is defined as the tangent plane to the level surface of P. The motion plane and the motion vector for the component are defined from the motion planes of the edge elements in the same way as in a for ridges.
c. For the central points of hills and hollows, the same polynomial P as above is computed and diagonalized. The motion vector of the center is defined as the eigenvector of P, corresponding to the smallest eigenvalue.
For interlaced sequences the corresponding 3-dimensional array is constructed by subsequent half-frames (each on its corresponding pixels). The approximating polynomials is then constructed on a cell of the size n pixels.times.n pixels.times.2n half frames. The rest of the compression process is performed as above.
The compressed data according to the procedure described above, consists of:
compressed data for each control frame;
pointers of watching, showing for each model on the control frame the watched model on the next one (or indicating that the model is unmatched).
Since the pointers require a relatively small percent of a compressed data volume, the additional compression factor here is approximately s-the distance between control frames.
Usually, almost all the pointers can be eliminated by the following procedure:
a. Using the compressed data on the two previous control frames, one can predict a motion of each model, and its position on the next control frame. Usually, this prediction is accurate enough to find the nearest actual model, which is a matched one, thus eliminating the necessity of a pointer.
b. Moreover, the same prediction can be used to simplify encoding of the next control frame-for each its model only corrections of the parameters with respect to the predicted ones must be memorized.
c. A "generalized motion compression" as described above can be applied.
Decompression
For each control frame its compressed representation is stored in a compressed data. For each intermediate frame, its (compressed) representation is constructed, as described above. Finally, each frame is decompressed as a still image.
9. Operations on compressed data
All the properties, which allow for image processing operations to be performed on a compressed data for still images, are preserved in a video compression scheme described above. Therefore, all these operations can be performed on a video compressed data. Moreover, they become relatively even more effective, since they must be performed only on the control frames: the interpolation procedure described above automatically extends them to the intermediate frames.
10. The video compression procedure, described above, is computationally effective, for the following reasons:
a. Only the control frames are entirely compressed as still images (Note that all frames can be analyzed to provide a better detection.).
b. The most computationally intensive part--motion detection--is performed only for components and centers--i.e., for a significantly reduced data.
c. Finally, the "motion compensation" part is performed on a compressed data.
The results obtained by the process according to the invention and its stages are further illustrated by FIGS. 51 to 67.
The following pictures represent the results and some intermediate steps of a compression of still images and video sequences, performed according to our method. All the operation has been performed on a SUN sparc 1 workstation.
1. FIG. 51 represents the original RGB still picture of the size approximately 480.times.720 pixels.
FIG. 52 represents the same picture after compression by our method to 1/50 of the initial volume and decompression.
FIG. 53 represents the same picture after compression to 1/40 by the standard JPEG method and decompression.
2 . FIGS. 54, 55, 56 show the stages of analysis of the 48.times.48 pixels region, indicated by a black square in FIG. 51. They represent this region at an enlarged scale.
Each white point represents a pixel. White stars on FIGS. 54 and 55 represent the points of the basic grid in the region A.sub.1.
The black and white segments detected in the region A.sub.3 are shown by small intervals of the corresponding color. Hills and hollows are shown by ellipse, and the gridpoints in the region A'.sub.2 are shown by the triangles (FIG. 54).
The green intervals on FIG. 55 represent the edge elements detected.
FIG. 56 represents the result of the edge-line procedure, as described above.
3. FIG. 57 represents the original of the 48.times.48 pixels region, its representation of the global model before quantization and after quantization (small pictures from left to right). Big pictures represent the same pictures in a 1:5 zoom form.
4. FIG. 58 represents the result of a picture processing operation, performed on a compressed form of the above picture:
The width of the models has been enlarge and their brightness has been decreased.
The zoom, represented on FIGS. 57 and 58, gives another example of an operation on compressed data. It has been performed by changing the decompression parameters, as described above.
5. FIGS. 59, 60, 61 represent three color separations (R,G,B) of FIG. 52 compressed and decompressed by our method. The R separation is compressed according to the complete process described above. Separations G and B are represented through R, as described hereinbefore.
6. FIGS. 62-67 represent the video sequences compression.
FIG. 62 represents 10 frames of a videosequence (on a 48.times.48 region). The upper line is the original sequence, and the bottom line is the sequence after compression (1:150).
FIGS. 63 and 64 show the results of analysis of the frames 4 and 7 (control frames) as still pictures (the arrows represent the endpoints of the ridge components detected).
FIG. 65 shows (by yellow and blue components) results of the motion predicted for the components from the frame 4 on frame 7.
FIGS. 66 and 67 show the interpolated positions of the components (blue lines) against the real position (yellow lines) on the intermediate frames 5 and 6.
In another embodiment of the invention, in which the basic structures are not identified as in the previous embodiment, the following operations are performed:
A picture is always considered as an array of pixels, P.sub.ij, of various sizes, for example 480.times.700, viz. 1.ltoreq.i.ltoreq.480 and 1.ltoreq.j.ltoreq.700. This array is assumed to be contained in the plane with coordinates x,y. Thus each pixel has discrete coordinates x,y, though the coordinates themselves are considered as continuous. The grey level brightness distribution z=f(x,y) assumes at each pixel P.sub.ij the value z.sub.ij =f(x.sub.i,y.sub.j), where the values of z vary between 0 and 255. A colour picture is generally defined by three intensity functions R(x,y), G(x,y) and B(x,y), each assuming values between 0 and 255, or by equivalent expressions obtained by the transform coding methods hereinbefore mentioned.
Considering now a single cell, one of the possible implementation processes according to the invention is carried out as follows. The simplest basic element type is chosen and the corresponding model's parameters are determined by minimizing, by known minimization routines, the deviation thereof from the actual object contained in the cell. As a measure of said deviation it is convenient to assume what will be called the "square deviation", viz. the sum of the squares of the differences between the values which the function z=f(x,y), defining the object, has at the various pixels and the corresponding value of the function .PHI. defining the model, viz.:
.sigma. is minimized for each cell with respect to the parameters of .PHI., e.g. by a standard minimization routine such as those from the IMSL library. If .sigma. is not greater than a predetermined threshold value T, the model is assumed to represent the object and the processing of the cell is stopped. The threshold value T may vary for various applications, but in general it is comprised between 5 and 15, and preferably is about 10, in the scale of the z or RGB values. If .sigma.>T, the procedure is repeated with another basic element model, and if none of them gives a small enough square deviation, the procedure is repeated with a model which is the sum of all the previously tried models. If, even thus, the square deviation is greater than the threshold value, the scale L is decreased. Experience has shown that, if the characteristic scale L is small enough, every object can be represented by a few basic element models.
Each model or combination of models is identified by a code number. Said number and the parameters of the model or combination of models assumed to represent the object of the cell, constitute the "primary compression" data relative to said cell.
At this stage, part of the primary compression data may be omitted and another part simplified, depending on their psychovisual contribution. Thus some small structures may be neglected, some other may be approximated (e.g. ellipsoidal ones by spherical ones), etc.
After the said secondary compression, quantization may be carried out. "Quantization" means herein using only a number of the possible parameter values, e.g. approximating each value by the nearest among an array of values differing from one another by a predetermined amount, e.g. 0, 32, 64 etc, thus considerably reducing down from 256 the number of possible values.
At this stage, the correlations between parameters relative to different cells may be taken into account, whereby larger models, which extend throughout regions that are bigger--e.g. 2-3 times bigger--than a single cell, may be defined. This further simplifies the compression data by extending the validity of certain parameters to larger areas. E.g., the same polynomial may represent a smooth curve extending through several neighbouring cells, curvilinear structures extending through several neighbouring cells may form regular nets, and the like. Small corrections on a single cell level may be required and stored.
All the aforesaid approximation methods may lead to discrepancies between neighbouring cells. These discrepancies may be smoothed out during the decompression stage, during which the basic elements of the same type (e.g. smooth regions, curvilinear regions etc) are smoothed out separately.
A particular application of the invention is the compression of TV pictures. It has been found that in any such picture, one can find certain smooth regions, curvilinear structures and local simple objects, such that:
a) the number of such basic elements in any standard cell is small, usually 5 or 6, the value of L being, as stated hereinbefore, preferably about 12 pixels;
b) any array of models, which represents faithfully (in a visually undistinguishable way) each of the above elements, faithfully represents the whole picture.
Rather high compression of TV-pictures is thus possible: the models contain a small number of parameters; each of them must be defined by at most 256 values.
An example of the implementation of the process according to the invention will now be given.
The picture to be represented by compression is a colour picture, as shown in FIG. 68 or FIG. 70. The following basic elements and models are used:
1 Model: smooth region-z=.PHI..sub.1 (x,y)=P.sub.1 (x,y)=a.sub.00 +a.sub.10 x+a.sub.01 y+a.sub.20 x.sup.2 +a.sub.11 xy+a.sub.02 y.sup.2 +a.sub.30 x.sup.3 +a.sub.21 x.sup.2 y+a.sub.12 xy.sup.2 +a.sub.03 y.sup.3. This model has 10 parameters.
2-Model: curvilinear structure-z=.PHI..sub.2 (x,y)
To define this model we use an orthonormal system of coordinates u,v that is rotated by an angle .theta. counterclockwise with respect to the system x,y. The central curve of the "line" is given by the equation v=r+ku.sup.2. The model is defined by:
.zeta.=.PHI..sub.2 '(x,y)=z.sub.1 =p.sub.00 +p.sub.10 x+p.sub.01 y for v.gtoreq.r+ku.sup.2 +h
z.sub.2 =p.sub.00 '+p.sub.01 'x+p.sub.01 'y for v.ltoreq.r+ku.sup.2 -h
z.sub.3 =tz.sub.1 +(1-t)z.sub.2, where t=(v-ku.sup.2 +h)/2h,
for r+ku.sup.2 +h>v>r+ku.sup.2 -h, and z=.PHI..sub.2 (x,y)=.PHI..sub.2 '(x,y)+cA, where A is the "profile function", equal to (2t).sup.2 -1!.sup.2, with t as above, for 0.ltoreq.t.ltoreq.1, and A equal to 0 otherwise.
Thus the model .PHI..sub.2 is completely determined by the parameters .theta., r, k, h, p.sub.00, p.sub.10, p.sub.01, p.sub.00 ', p.sub.10 ', p.sub.01 ', c--altogether 11 parameters.
3-Model: simple local objects-z=.PHI..sub.3 (x,y). Firstly we define a "supporting ellypse" by the angle .theta. which the short semiaxis makes with the x-axis, by the coordinates x.sub.0,y.sub.0 of the center, and by the values r.sub.1 .ltoreq.r.sub.2 of the semiaxis. The .PHI..sub.3 is defined as x=.PHI..sub.3 (x,y)=c(u.sup.2 /r.sub.1.sup.2 +v.sup.2 /r.sub.2.sup.2), where u and v are the coordinates of the point (x,y) in the coordinate system (u,v) hereinbefore defined. Here .psi.(s) has the form (s.sup.2 -1). Finally, the model generated by the objects contains "l" objects, with 1.ltoreq.l.ltoreq.6. The value of z that is finally obtained is the sum of the values of .PHI..sub.3 for all objects.
Usually, one stores the coefficients of the orthonormal system (u,v) rotated by the angle .theta.. Thus the model is characterized by:
1-the number of objects;
2-for each object, the coordinates x.sub.0, y.sub.0, the angle .theta., r.sub.1 <r.sub.2, and the coefficient c of each object in the linear combination.
3-thus the model on a cell of the third type is given by
It is more convenient to store the coefficients q and c in a transformed form. We consider the functions 1, x, y, .PHI..sub.3.sup.1, . . . , .PHI..sub.3.sup.1 as vectors in the inner product space of all the functions z=g(x,y) on the pixels of the cell under consideration. Then we apply the Gramm-Smidt orthogonalization procedure to the vectors and store the coefficients of the orthogonalized system. Those are the coefficients given in the Tables that will follow. In the following examples L=10, the cells are squares 10.times.10.
FIG. 68 shows an original picture--a landscape--to which the invention is applied. The procedure hereinbefore described has been followed. Table 1 shows the grey level values of a 40.times.40 region of the original, which is marked by a black dot in FIG. 69, which shows the decompressed reproduction. It is seen that this latter is quite undistinguishable from the original. Table 2 lists the grey levels of the models of the same region. Table 3 lists the same data of Table 2, but after quantization of the models. Table 4 lists the parameters of the models, which are of the type 3 (simple local objects) described above, indicated by code H, which constitute the compressed data. Each group of successive 5 rows contains the coefficients of one cell. Table 5 lists the same data as Table 4, but after quantisation. FIG. 70 shows another original picture--a girl sitting at a desk--and FIG. 71 the decompressed reproduction. Once again, the two images are undistinguishable. Tables 6 to 10 respectively correspond to Table 1 to 5 of the preceding example. However it is seen in Tables 9 and 10 that models indicated by E and T have been used: these respectively indicate models of the type 2 (curvilinear structures) and 1 (smooth regions) described hereinbefore.
While particular embodiments have been described by way of illustration, it will be understood that they are not limitative and that the invention can be carried out in different ways by persons skilled in the art, without departing from its spirit or exceeding the scope of the claims.
Claims
We claim:
1. A process of picture representation by data compression which comprises the steps of: subdividing the picture into regions; registering for each region a set of brightness values; fixing for each region a characteristic scale in terms of a number of pixels; dividing each region into cells, each of said cells comprising a number of pixels defined by two coordinates, said cells having a linear dimension in the order of said characteristic scale; identifying in each cell basic structures chosen from among smooth areas, positive and negative hills, and curvilinear structures chosen from among edges and ridges; constructing for said curvilinear structures geometric models comprising lines approximating the center lines of said structures and parameters defining the profiles of said structures; associating to each of said smooth areas, positive and negative hills and geometric models of curvilinear structures a mathematical model; condensing said mathematical models to define a global mathematical model for the cell; quantizing and encoding the data defining said global mathematical model; and storing and/or transmitting said data as representing the primary compression for the picture.
2. Process according to claim 1, further comprising the step of decompressing said data to reconstruct the picture.
3. Process according to claim 1, wherein said geometric and mathematical models, approximate said structures, and the degree of approximation is predetermined.
4. Process according to claim 1, wherein the basic structures are mathematically defined through the derivatives of a brightness function.
5. Process according to claim 4, wherein the brightness function is approximated by an approximating function p(x,y), where x and y are the coordinate system of said region, and where p(x,y) is a polynomial of the second degree having the form p(x,y)=a.sub.00 +a.sub.10 x+a.sub.01 y+a.sub.20 x.sup.2 +a.sub.11 xy+a.sub.02 y.sup.2.
6. Process according to claim 1, comprising defining a number of said models and associating to each of said models a code identifying each of said models, said each model being defined by said code and by its parameters.
7. Processing according to claim 1, comprising eliminating information having a limited psycho-visual significance by dropping some models and eliminating some excessive parameters of the models that are retained.
8. Process according to claim 4, comprising assigning each grid point to one of three domains A.sub.1, A.sub.2 and A.sub.3, wherein: domain A.sub.1 contains all the points where all the derivatives of the approximating function p of orders 1 and 2 do not exceed a threshold T.sub.1, domain A.sub.2 includes the grid points where the gradient of the approximating function p is large; and domain A.sub.3 includes the grid points in which the second order derivatives are bigger than a threshold T.sub.3, while .vertline.grad(p(x,y)).vertline. does not exceed another threshold T.sub.2 ; and identifying in the domains the basic structures.
9. Process according to claim 8, wherein the domain A.sub.1 is the set of the points of the grid for which +.lambda..sub.2.sup.2 <S.sub.abs. wherein G.sub.abs and S.sub.abs are thresholds and .lambda..sub.1 AND .lambda..sub.2 are the eigenvalues of the matrix ##EQU16## the domain A.sub.2 is the set of the points of the grid for which where G.sub.abs is a threshold and G.sub.rel is a relative threshold, and the domain A.sub.3 is the sum total of five sub-domains defined by the following conditions: (1) .vertline..lambda..sub.2 /.lambda..sub.1 .vertline.<M.sub.ratio, .lambda..sub.1 +.lambda..sub.2 <0 (2) .vertline..lambda..sub.2 /.lambda..sub.1 .vertline.<M.sub.ratio, .lambda..sub.1 +.lambda..sub.2 <0 (3) .vertline..lambda..sub.2 /.lambda..sub.1 .vertline..gtoreq.M.sub.ratio, .lambda..sub.1 <0, .lambda..sub.2 <0 (4) .vertline..lambda..sub.2 /.lambda..sub.1 .vertline..gtoreq.M.sub.ratio, .lambda..sub.1 >0, .lambda..sub.2 >0 (5) .vertline..lambda..sub.2 /.lambda..sub.1 .vertline..gtoreq.M.sub.ratio, .lambda..sub.1..lambda..sub.2 <0 wherein M.sub.ratio is a threshold.
10. Process according to claim 1, which comprises the steps of: 1) registering the values of the brightness function z=f(x,y); 2) determining a window and a grid related thereto; 3) for each grid point, approximating the brightness function z(x,y) by an approximating function; 4) fixing a number of thresholds; 5) assigning each grid point to one of three domains A.sub.1, A.sub.2 and A.sub.3 ; 6) identifying in the domains the basic structures; 7) approximating the curvilinear basic structures by lines related to their center lines and parameters related to their profiles; 9) representing the basic structures by mathematical models; 10) interrelating the models thus constructed to construct a global model; 12) quantizing the data thus obtained; and 13) encoding the same.
11. Process according to claim 1 wherein the characteristic scale is comprised between 6 and 48 pixels.
12. Process according to claim 10, wherein the window has a linear dimension comprised between 2 and 6 pixels.
13. Process according to claim 12, wherein the window has a linear dimension chosen from among 3 and 4 pixels.
14. Process according to claim 1 or 10, wherein the data quantization consists in substituting the values of the compressed data by the closest of a predetermined set of values.
15. Process according to claim 1, comprising encoding the compression data by representing the corresponding quantized data in the form of a binary file.
16. Process according to claim 1, comprising repeating the steps of said process for a set of brightness functions chosen from those representing the basic colors or those representing a monochrome signal and color data information carrying signals.
17. Process according to claim 1 comprising carrying out its operations for one of a set brightness functions chosen from those representing the basic colors or those representing a monochrome signal and color data information carrying signals, retaining the geometric parameters found for the models of said one brightness function and repeating said operations for the other brightness functions of the same set and using the same models with the said geometric parameters and the appropriate brightness parameters for each of the other brightness functions of the same set.
18. Process according to claim 10, wherein the window is a square having a side of a few pixels and the grid is constituted by the pixels themselves, if the side is an uneven number of pixels, and is constituted by the central points between the pixels, if the side is an even number of pixels.
19. Process according to claim 1, wherein the processing comprises one or more operations chosen from among further compression, picture comparison, feature stressing, picture enhancement, creation of visual effects, color operations, geometric transformations, 3D-geometric transformations and texture creation.
20. Process according to claim 1, wherein the information defining the brightness distribution of the various colors is a function of time.
21. Process according to claim 1, wherein the characteristic scale is between 6 and 48 pixels.
22. Process according to claim 1, wherein said picture comprises a plurality of video sequences, wherein only a subsequence of frames is compressed, and the intermediate frames are represented by the same models as the control frames, with the parameters obtained by interpolation from the control frames.
23. Process according to claim 1 wherein the steps 5 and 6 are performed by choosing among the prefixed list of models, those which (after minimization with respect to the parameters) provide the best approximation of the picture.
24. A process of representing a picture by data, comprising the steps of: subdividing the picture into regions; registering for each region a set of brightness values, said set of brightness values collectively defining a brightness function; dividing each region into cells, each of said cells comprising a number of pixels having a location defined by two coordinates; identifying in each said cell basic structures chosen among: (a) background areas wherein the values of said brightness function change slowly; (b) curvilinear edges having a center line wherein on one side of said edge the values of said brightness function undergo a sharp change; (c) curvilinear ridges having a center line, wherein the cross-sectional profile perpendicular to said center line is a bell-shaped curve; and (d) hills wherein the brightness function value is a maximum or minimum and decreases or increases, respectively, in all directions from said hills; constructing geometric models for those basic structures which are curvilinear, said geometric models comprising lines approximating the center lines of said structures and parameters defining the profiles of said structures; associating a mathematical model with each of said background areas, hills and geometric models; condensing said mathematical models to define a global mathematical model for the cell; quantizing and encoding the data defining said global mathematical model; and storing and/or transmitting said data.
25. A process according to claim 24, wherein the basic structures are chosen from among said background areas, said edges, said ridges and said hills, and chosen from among saddles comprising a central smooth region bounded by two edges, wherein the values of said brightness function increase at one edge and decrease at the other edge.
26. A process according to claim 1, wherein the basic structures are chosen from among smooth areas, positive and negative hills, edges and ridges, and saddles.
27. A process according to claim 1, wherein geometric and mathematical models are constructed for only part of the basic structures.
28. A process according to claim 1, wherein the condensing of the models to define a global model comprises eliminating at least one of the mathematical models.
Patent Citations (16)
| Patent | Date | Inventor | Cited By |
|---|---|---|---|
| US4715005 | 1987-12-01 | Heartz | |
| US4941193 | 1990-07-01 | Barnsley et al. | |
| US5052045 | 1991-09-01 | Peregin et al. | |
| US5065447 | 1991-11-01 | Barnsley et al. | |
| US5091976 | 1992-02-01 | Murayama | |
| US5113256 | 1992-05-01 | Citta et al. | |
| US5148492 | 1992-09-01 | Uzawa et al. | |
| US5148497 | 1992-09-01 | Pentland et al. | |
| US5150433 | 1992-09-01 | Daly | |
| US5177796 | 1993-01-01 | Feig et al. | |
| US5271071 | 1993-12-01 | Waite | |
| US5282255 | 1994-01-01 | Bovik et al. | |
| US5347600 | 1994-09-01 | Barnsley et al. | |
| EPX259971 | 1988-03-01 | ||
| NLX8902160 | 1989-08-01 | ||
| WOXWO91/19263 | 1991-12-01 |
Non-Patent Literature (7)
- Journal Of The Institution Of Engineers (India) vol. 65, ETI, 30 Nov. 1984, India pp. 34-39 R. S. Choras `Image Bandwidth Compression By Coding Of Low Pass and High Pass Picture System`.
- IEEE Transactions On Communications; vol. 38, No. 12, 31 Dec. 1990, New York (US), pp. 2137-2145; D. Chen et al. `Visual Pattern Image Coding` pp. 2140-2143, Section III, Parts A-D.
- Signal Processing Image Communication; vol. 1, No. 2, 31 Oct. 1989, Amsterdam (NL) pp. 153-180; M. Gilge et al. `Coding Of Arbitrarily Shaped Image Segments Based On A Generalized Orthogonal Transform`.
- Alta Frequenza; vol. 58, No. 3, 30 Jun. 1989, Milano (IT); pp. 277-285; XP000054475 D. D. Giusto et al. `High Performance Image Coding: Integration Of Different Techniques By A Knowledge-Based Recognition System` pp. 281-282, Section 4.2.
- Patent Abstracts of Japan; vol. 11, No. 376 (E-563); 8 Dec. 1987 & JP-A-62 143 585 (Sony Corp); 26 Jun. 1987 abstract.
- Mathematics of Physics and Modern Engineering, Sokolnikoff, 1958, McGraw-Hill Book Company, pp. 143-152.
- B. Lerner et al., Applications of artificial intelligence VI, Apr. 1988 pp. 104-116.