The dissertation is a compilation of seven articles, where several algorithms are proposed for depth-map image compression: three algorithms for lossless com-pression [P1, P3, P5], and four algorithms for lossy comcom-pression [P2, P4, P6, P7].
In our research, we choose to encode the depth-map images using an image seg-mentation, transmitted to the decoder using a contour compression algorithm, and then filling the obtained regions, using a region reconstruction algorithm. Hence, our developed lossless compression coders provide an algorithm for each of these tasks. Two strategies were studied and two algorithms were developed to encode the contour using vertex positions or contour edges. Also, two algorithms were developed for region reconstruction: CERV and APC coders are the best lossless compression algorithms that we developed. They outperform the state of the art coders all the time.
In the proposed lossy compression algorithms, we used the strategy of gener-ating sequences of images for each specific distortion, which are then compressed by a lossless compressor. We further proposed the development of a progressive coding algorithm, P-GSO, and a study of the parameterization of planar models,
PF.
At the beginning of our research two algorithms were developed, NCV and
L-CRS, that generated segmentations based on the concept of variability inside a region. Later we developed algorithms with better results, nevertheless they represent the starting point of our research in the two areas.
Implementation Aspects
“Simplicity is prerequisite for reliability.”
— Edsger W. Dijkstra In this chapter, we present auxiliary information regarding the implementation of the algorithms presented in Chapter 3 and Chapter 4. All developed algorithms were first implemented and tested inMATLAB[59, 60], the programming language invented by Cleve Barry Moler in 1980. However, theMATLABimplementations of the algorithms were found to be too slow, and after some preliminaryMATLABtests almost every algorithm was reimplemented in the C programming language, where Microsoft Visual Studio [8] was the Integrated Development Environment (IDE) used to develop and compile each algorithm’s C project. For the NCV [P1] and
L-CRS [P2] algorithms we used a combination of MATLAB and C code, while the other five algorithms CERV[P3],GSO [P4],APC [P5],P-GSO[P6] andPF [P7] are implemented in the C programming language.
The last stage in each compressor is represented by the entropy coding stage, which has as the basic principle the Arithmetic Coding algorithm [46], and hence in each C project we used the implementation of the Arithmetic Coder designed by Ian H. Witten in [97].
A.1 APC algorithm
InAPC, before coding the vector S of3OTsymbols, some deterministic changes are introduced at the encoder. The role of these changes is to modify the distribution of the3OT symbols in such a way that the final codelength is reduced. Note that the changes are deterministic and the decoder can always detect and reverse them.
The first change is to reduce the number of3OTsymbols 2 in the vector S, and is done by analyzing the special cases when the description of a contour segment Γkreaches a vertex, placed on the border of an image area, where the column-wise search guarantees that there is no adjacent vertex to codify a 3OTsymbol 2. For example, when we find an anchor point P1= (is, js) using the column-wise search,
85
(a) (b)
Figure A.1: (a) Reducing the number of 3OT symbols sk = 2, when symbol sk= 0 is impossible. Blue dots are marking the vertices checked for anchor points, the arrows indicate the next vertex to be visited, red (black) dots are marking the visited (unvisited) vertices, and the green dot is marking the found anchor point.
(b)Template context used for coding Υ, where ‘x’ is the label of current position.
then this guarantees that, in the contour graph, there are no unvisited vertex positions in the previous js−1 columns and in the first is−1 positions (lines) of the js column. Hence, any vertex Pk = (i, j) found at the boundary of this area, for which i < is and j = js+ 1 (or with i ≥ is and j = js), has a maximum of three unvisited adjacent vertices. When a vertex Pk = (i, j) is reached and the previous vertex in the contour segment was Pk−1= (i, j + 1), then there are only two more possibilities to further describe the contour segment, by selecting the adjacent vertex Pk+1 = (i − 1, j) or Pk+1 = (i + 1, j) that is unvisited. In this case symbol sk = 0 is an impossible3OT symbols, and that is why we remap the remaining possible3OTsymbols, 1 and 2, with the symbol 0 and respectively symbol 1, as it is shown in Figure A.1.(a).
The second change done is to modify the optimal context tree obtained for the vector S of 3OTsymbols. Note that only for the 3OT representation, the optimal context tree is much more unbalanced than other cases because the representation was designed so that the symbols 2 appears as few times as possible. Hence, in the optimal ternary context tree obtained for vector S, the subtree for the branch labeled ‘0’ (for symbol 0) has many leaf nodes, while the subtree for the branch labeled ‘2’ (for symbol 2) has only a few leaf nodes. By analyzing the3OT
representation, we notice that any two consecutive vertices, in a contour segment, can not be codified by two consecutive symbols 2, and this case may appear in S only because of vector concatenation. Hence, we studied the context tree of a general 3OT chain-code vector, and noticed that, in the context (sk−2 6= 2, sk−1 = 2), the symbol sk = 1 is more frequent than the symbol sk = 0, i.e. the probability to encode a symbol 1 is higher than the probability to encode a symbol 0. This is why the symbol sk = 1 is changed into s0k = 0, and sk = 0 into s0k= 1.
The change introduces also some other small ‘branch interchanges’ between the subtrees ‘0’ and ‘1’, but overall the change has a positive effect. However, because the branch ‘2’ has only a few leaf nodes with a similar position on other branches, the change does not cause disturbances in the optimal context tree.
Another implementation aspect used inAPCis the special coding of matrix Υ, done using theTCTM. Matrix Υ is encoded as the latest information, in column-wise scanning, using the template context of length dT = 18, as it is shown in Figure A.1.(b). In our tests, after pruning, the optimal context tree has about seven leaf nodes. The alphabet used to create the context tree contains three sym-bols, however the coding distributions for each node are computed using only two symbols, since symbol 2 is ignored because does not codify any useful informa-tion and only specifies that the informainforma-tion regarding current posiinforma-tion is already available. At the decoder, if Υ(i, j) = 1 is decoded, then the contour segment Γk
having the anchor point P1= (i, j) is decoded and Υ is updated with symbols 2 on the vertex positions of Γk. Only after drawing Γk,the decoding of Υ is resumed.