# Infrared Image Superpixel Segmentation Based on Seed Strategy of Contour Encoding
## 1 Introduction  
Infrared (IR) systems have a stronger penetrating ability and are less affected by fog and haze than visible systems. In recent decades, IR systems have been widely used in the remote sensing and surveillance fields, and the speed and accuracy of detection are key indica-tors. Blocks as basic processing units, instead of points, can effectively increase processing speed and serve as a pre-processing tool to facilitate task implementation such as removing halo artifacts from dehazing images [1, 2]. Therefore, a reliable block (superpixel) segmentation method is necessary. Superpixel segmentation is an unsupervised image clustering method, the concept of which was first proposed by [PERSON] et al. [3]. An image usually includes a lot of redundant information that participates in information processing, such as adjacent pixels with similar gray values in a sky region; the handling of such data is unnecessary. Superpixel segmentation divides images into several simple connected regions with similar features, such as brightness, texture, and contrast, in order to replace point-to-point operations. Compared with single pixels, superpixels can effectively represent image features and reduce the number of processing units [4]. Therefore, superpixel segmentation has become a key pre-processing step in many computer vision applications, such as image dehazing [5], stereo 3D reconstruction [6], object recognition [7], remote sensing image segmentation [8, 9],and many others. For these applications, a superpixel as a homogeneous region should have the following properties [10; 11]:  
* Each superpixel is a simply connected domain, and each pixel in the image is classified into only one superpixel;
* Superpixels should have regular shapes and adhere well to image boundaries. Furthermore, they should have consistent texture, and internal pixels should have similar properties;
* The density of superpixels is adaptive to the complexity of the image contents. The number of superpixels in a sparse region (e.g., an area of the sky), should be fewer than that in a dense region;
* The generation of superpixels should be fast, memory-efficient, and require little manual intervention. Automatic superpixel segmentation has received widespread attention in the last decade, and can be broadly divided into two processing strategies [11; 12]: graph-based algorithms, and gradient-based algorithms. Graph-based algorithms [9; 13; 14] aim to construct an undirected graph and minimize a defined cost function to generate superpixels. These methods treat pixels as nodes in the graph, and the edge weights between adjacent nodes are proportional to the similarity between the two nodes. Gradient-based algorithms [12; 15; 16] first obtain coarse segmentation by initial clustering, then iteratively refine the coarse clusters until a convergence condition is satisfied, such as the number of iterations or image quality criteria. This type of method usually starts from an initial seed set and finally assigns a superpixel label to each pixel. While methods in both categories can generate superpixels, they also have their own drawbacks. Graph-based algorithms have better performance in adhering to image boundaries but lack operational efficiency, which limits their use in many real-time applications. In addition, the shapes of superpixels are generally extremely irregular and lack compactness. In contrast, gradient-based algorithms perform well in terms of time complexity, but are inadequate for complex or irregular regions, as the superpixels easily cross the image boundary. Therefore, most tasks involve a trade-off between adherence to boundaries and efficiency. In recent years, increases in video resolution have led to a growing demand for an efficient superpixel generation algorithm with better boundary adherence. Due to its efficiency advantage, the clustering method has drawn much attention, and many constraints have been proposed to improve the boundary tracing ability [17].