I want to use a template image to search target in the another image.But the target have scale and rotation change,also the target mix with noise which the color is same wit
You need to calculate scale and rotation invariant features. There exist several feature descriptors that claim these properties. Scale invariance is often emulated by matching against a set of different scales of the target. Another way can be to normalize scale and rotation of the target first.
Have a look here: https://dsp.stackexchange.com/questions/4893/scale-and-rotation-invariant-feature-descriptors