In this study, the method used involves segmenting images into fixed-sized square regions called superpixels and then analyzing features of each superpixels to determine whether it belongs to the foreground or background. The study also discusses the process of selecting relevant features and testing different combinations. These features include characteristics of the superpixel itself—its local relationships with neighboring superpixels, and global features of the entire image. Importantly, it emphasizes making the decision-making process understandable—achieved by using a decision tree model for analyzing the collected features. This study focuses on teaching a self-driving system how to accurately separate foreground (movable areas like floors) from background (non-movable areas) in images captured inside buildings. This approach aims to strike a balance between entirely automated segmentation models like Convolutional Neural Networks (CNNs)—which lack explainability, and purely knowledge-based segmentation models, where all information is predefined. This information is stored in a database for analysis. Specifically, it addresses the scenario of an autonomous vehicle navigating public spaces without endangering people.