Modeling sensors and applying sensor model to automatic generation of object recognition program