To analyse automatically remote sensing images, many pattern recognition methods have been developed. Among the former, quote the segmentation that consists in recognition of textures in images or again the target detection whose goal is to find a reference target in an observation sensor. This last is the object of this paper. We define a detection algorithm independent of the position of the sensor as compared to the target.. We investigate how the optimal filter depend on the transformations, the prototype pattern and sensor properties, and we will give explicit examples of optimal filter functions for active and passive sensor.