在opencv中可以直接调用OTSU进行阈值分割: threshold(src, dst, 0, 255, THRESH_BINARY_INV | THRESH_OTSU);
想要知道OTSU求出的具体阈值是多少只需要让变量=threshold即可。
如int a= threshold(image_grey, image_binary, 0, 255, THRESH_BINARY_INV | THRESH_OTSU);
在opencv中可以直接调用OTSU进行阈值分割: threshold(src, dst, 0, 255, THRESH_BINARY_INV | THRESH_OTSU);
想要知道OTSU求出的具体阈值是多少只需要让变量=threshold即可。
如int a= threshold(image_grey, image_binary, 0, 255, THRESH_BINARY_INV | THRESH_OTSU);