Detection of infrared dim small target based on image patch contrast