Fix some bugs in HoughTransform.