becauseofAI / MobileFace

A face recognition solution on mobile device.
MIT License
746 stars 207 forks source link

请问mobileface_enhancement.py第36行的calcHist传入的图片是bug还是故意这么写的? #15

Closed guoguangchao closed 5 years ago

guoguangchao commented 5 years ago

mobileface_enhancement.py第36行的calcHist函数:hist = cv2.calcHist(img_gray, [0], None, [256], [0, 256])的img_gray没有用中括号,这样计算的是img_gray第一个维度的直方图而不是整个图片的直方图,计算整个图片的直方图应该是hist = cv2.calcHist([img_gray], [0], None, [256], [0, 256]),请问这里是写错了,还是算法就是要计算第一个维度的直方图?谢谢!

becauseofAI commented 5 years ago

@guoguangchao The effect of img_gray is similar or even better than [img_gray]. You can try them freely and choose which method to use according to the actual situation.

guoguangchao commented 5 years ago

我试过了,确实不加中括号的效果更明显,谢谢