The paper proposes an intelligent K-means segmentation algorithm that clearly segments foreground objects and completely occluded objects. When a person completely occludes an object while entering into the area of video surveillance, it is considered as an anomaly. The paper comes up with a robust technical solution to address this. The proposed algorithm chooses an optimal value for K and segments the object. The scope of the system extends to the area such as prison, airport etc. where there is a need to monitor completely occluded objects and other objects in the foreground. The system is tested with images from Stereo Thermal Dataset and achieves a precision rate of 88.89% while segmenting objects. From the experimental results, we infer that the proposed algorithm is robust in segmenting the objects without losing its shape and number.