TECHNICAL FIELD
[0001]
The present invention relates to a method and a device for lossless coding of a region of interest (ROI) in transmission of a still image. The method and the device are particularly well suited for the S+P transform.
BACKGROUND OF THE INVENTION AND PRIOR ART
[0002]
In transmission of digitized still images from a transmitter to a receiver, the image is usually coded in order to reduce the amount of bits required for transmitting the image.
[0003]
The reason for reducing the amount of bits is usually that the capacity of the channel used is limited. A digitized image, however, consists of a very large number of bits. When transmitting such an image, consisting of a very large number of bits, over a channel, which has a limited bandwidth, transmission times for most applications become unacceptably long, if every bit of the image has to be transmitted.
[0004]
Therefore, much research efforts in recent years have concerned coding methods and techniques for digitized images, aiming at reducing the number of bits necessary to transmit.
[0005]
These methods can be divided into two groups:
[0006]
Lossless methods, i.e. methods exploiting the redundancy in the image in such a manner that the image can be reconstructed by the receiver without any loss of information.
[0007]
Lossy methods, i.e. methods exploiting the fact that all bits are not equally important to the receiver, hence the received image is not identical to the original, but looks, e.g. for the human eye, sufficiently alike the original image.
[0008]
Furthermore, in some applications a part of a transmitted image may be more interesting than the rest of the image and a better visual quality of this part of the image is therefore desired. Such a part is usually termed region of interest (ROI). An application in which this can be useful is for example medical databases. In some cases it is also desired or required that the region of interest is transmitted lossless, while the quality of the rest of the image is of less importance.
[0009]
One method, which can be used, for coding of still images is the wavelet based S+P transform. The S+P transform is completely reversible and can be performed directly without memory expansion. The S+P transform is described in A. Said and W. A. Pearlman, ‘Reversible image compression via multiresolution representation and predictive coding’, in Proc. SPIE Conf. Visual Communications and Image Processing '93, Cambridge, Mass., Nov. 1993, Proc. SPIE 2094, pp. 664-674, which is incorporated herein by reference.
[0010]
It consists of the S transform, see V. K Heer and H-E. Reinfelder, ‘A comparison of reversible methods for data compression’, Proc. SPIE, vol. 1233 Med. Imag. IV, pp 354-365, 1990., which also is incorporated herein by reference and which is a pyramid sub band decomposition, and of a prediction used to take out the remaining redundancies from the high frequency sub bands. The forward transformation is done by applying a subband decomposition several times. The inverse is found by applying the corresponding compositions in reverse order.
[0011]
In J. Ström, P. C. Cosman, ‘Medical image compression with lossless regions of interest’, Signal Processing 59, Nr 2, Jun. (1997) 155-171 it is described how a lossless region of interest can be calculated for the S transform.
[0012]
However, when trying to apply such a technique to the wavelet based S+P transform, i.e. lossless transmission of the region of interest and a lossy transmission of the rest of the image, no straightforward technique can be used.
[0013]
Thus, today there exist no way for lossless region of interest coding of an S+P transformed image. This is due to the fact that it is not easy to select the information in the S+P transformation coded original image which should be transmitted in order to obtain a perfect, lossless reconstruction of the region of interest, without having to transmit the entire image lossless.
SUMMARY
[0014]
It is an object of the present invention to solve the problem of how to select the data in an S+P transformed image in order to achieve a lossless region of interest in a receiver.
[0015]
This object is obtained by means of calculating a mask for the region of interest as will be described below.
[0016]
Thus, in order to achieve a perfectly reconstructed region of interest, while maintaining a fair amount or compression, bits need to be saved by sending less information about the background or the part of the image which is not interesting, or at least wait with that information until a later stage in the transmission.
[0017]
To do this, a lossless mask is calculated. The mask is a bit plane indicating which wavelet coefficients have to be exactly transmitted if the receiver should be able to reconstruct the desired region perfectly. In the case that an ROI in the image is chosen to be lossless, the A-predictor used in the S+P transform referred to above should be used.
[0018]
This is because when the A-predictor is used no prediction of high frequencies is performed with the help of high frequencies. If this was the case, like in the C-predictor case, see the reference above, a possible error might propagate all the way to the edge of the image, and also inside the ROI, making it unfeasible to provide a lossless ROI.
[0019]
The mask is calculated following the same steps as the forward S+P transform, i.e. tracing the inverse transform backwards. To start out with, the mask is a binary map of the ROI, so that it is 1 inside the ROI and 0 outside. In each step it is then updated line by line and then column by column. In each step the mask is updated so that it will indicate which coefficients are needed exactly at this step, for the inverse S+P to reproduce the coefficients of the previous mask exactly.
[0020]
The last step of the inverse S+P is a composition of two sub bands. To trace this step backwards, the coefficients in the two sub bands that are needed exactly are found. The second last step is a composition of four sub bands into two. To trace this step backwards, the coefficients in the four sub bands that are needed to give a perfect reconstruction of the coefficients included in the mask for two sub bands are found.
[0021]
All steps are then traced backwards to give a mask that implicates the following:
[0022]
If the coefficients corresponding to the mask are transmitted and received exactly, and the inverse S+P (with the A-predictor) calculated on them, the desired ROI will be reconstructed perfectly.
[0023]
To trace a step backwards on a separate line, where X_{m}(n) is the mask before the step inversion, L_{m}(n) and H_{m}(n) are the masks for the low and high frequency sub band afterwards, the following steps are carried out:
[0024]
For the S+P with the A predictor:
$\mathrm{For}\ue89e\text{\hspace{1em}}\ue89e\mathrm{all}\ue89e\text{\hspace{1em}}\ue89en\ue89e\text{\hspace{1em}}\ue89e\mathrm{in}\ue89e\text{\hspace{1em}}\left[1-\frac{N}{2}\right]\ue89e\text{\hspace{1em}}\ue89e\mathrm{do}\ue89e\text{:}$ ${H}_{m}\ue8a0\left(n\right)=1\ue89e\text{\hspace{1em}}\ue89e\mathrm{If}\ue89e\text{\hspace{1em}}\ue89e\left\{{X}_{m}\ue8a0\left(2\ue89en\right)=1\right\}\ue89e\mathrm{OR}\ue89e\left\{{X}_{m}\ue8a0\left(2\ue89en+1\right)=1\right\},0\ue89e\text{\hspace{1em}}\ue89e\mathrm{otherwise}$ ${L}_{m}\ue8a0\left(n\right)=1\ue89e\text{\hspace{1em}}\ue89e\mathrm{If}\ue89e\text{\hspace{1em}}\ue89e\left\{{X}_{m}\ue8a0\left(2\ue89en-2\right)=1\right\}\ue89e\mathrm{OR}\ue89e\left\{{X}_{m}\ue8a0\left(2\ue89en-1\right)=1\right\}\ue89e\mathrm{OR}$ $\left\{{X}_{m}\ue8a0\left(2\ue89en\right)=1\right\}\ue89e\mathrm{OR}\ue89e\left\{{X}_{m}\ue8a0\left(2\ue89en+1\right)=1\right\}\ue89e\mathrm{OR}$ $\left\{{X}_{m}\ue8a0\left(2\ue89en+2\right)=1\right\}\ue89e\mathrm{OR}\ue89e\left\{{X}_{m}\ue8a0\left(2\ue89en+3\right)=1\right\},0\ue89e\text{\hspace{1em}}\ue89e\mathrm{otherwise}$
[0025]
Thus, the binary mask for the low frequency sub band and the high frequency sub band, respectively is set to a binary one, i.e. the corresponding coefficient is to be transmitted in order to obtain a lossless region of interest, if the above conditions are fulfilled.
[0026]
For synchronisation, the same mask is found both in the encoder and the decoder. After a certain stage, skipping can be switched on and background list entries detected. These are the ones corresponding to sets containing no coefficients that are indicated for exact transmission by the lossless mask.
[0027]
The background list entries can then be skipped totally, put in a wait list for later improvement or given a lower priority in some kind of interleaving scheme.
[0028]
Furthermore, the shape of the ROI does not have to be defined before the transmission and can therefore be specified either by the transmitter or the receiver at any stage of the transmission.
[0029]
The ROI can also be formed by two or more parts, which are not in contact with each other. The technique is then applied in the same manner.