An array-based node-oriented max-tree representation
This paper presents an array-based node-oriented structure for the max-tree representation, which allows direct access and flexible manipulation of its nodes, and is more suitable for OpenMP parallel processing. The proposed structure is based on two arrays called node array (NA), which stores attributes of the nodes, and node index (NI), which indicates the node that each pixel belongs to. We compare it with the pixel-oriented max-tree representation based on a parent array (parent) and an ordering array (S) that allows tree traversals. We show that our max-tree representation requires less memory when the ratio between the number of image pixels and max-tree nodes is greater than 1.6, which is often the case. It is more flexible, and can compute some attributes, such as height and dynamics, with a complexity linear on the number of max-tree nodes instead of the number of image pixels. In our experiments our structure computed the height attribute on average 11.4 faster than the parent/S representation. Also, for a single area-open filter, the sequential implementation of our structure is on average 1.14 times slower and the parallel implementation in a 4-core CPU is 1.2 times faster than the parent/S structure. For an area-open filter followed by the hmax filter, our sequential implementation is 1.34 times faster and our parallel implementation is 2.32 times faster than the parent/S structure.