This paper presents the use of the ZED depth sensor in a robot-based painting application. The use of a stereo depth sensor is a very important factor in robotic applications, since it is both the initial and the essential step in a sequence of robotic operations, where the goal is to detect and extract the useful surface and objects or the obstacle on a wall that is not intended for painting. The ZED depth sensor was used for surface recording and navigation of our painting robot. Later, wall extraction was performed using simple image processing and morphological operations in a surface extraction algorithm. The goal was to use well-known, simple, and proven image processing operations in the algorithm to ensure both reliable and smooth operation of the robot’s vision system in an industrial environment. The experiments showed that the developed algorithm detects and extracts the wall successfully under various depth measurement conditions.