The ability of cognition and recognition for complex environment is very important for a real autonomous robot. A corridor-scene-classifier based on spiking neural networks (SNN) for mobile robot is designed to help the mobile robot to locate correctly. In the SNN classifier, the integrate-and-fire model (IAF) spiking neuron model is used and there is lateral inhibiting in the output layer. The winner-take-all rule is used to modify the connecting weights between the hidden layer and the outputting layer. The experimental results show that the corridor-scene-classifier is effective and it also has strong robustness.