function result=imgentropy(img) %img必须为灰度图像(2-D) %written by hangbing6174,CUMT