大津法python代码
时间: 2023-08-31 22:08:03 浏览: 98
大津法阈值选取代码
5星 · 资源好评率100%
OTSU算法的Python代码如下所示:
```python
import numpy as np
def OTSU(img_array):
height = img_array.shape * np.arange(threshold)) / background_pixel
foreground_mean = np.sum(count_pixel<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [图像图像处理作业—全局阈值迭代法和大津阈值法+python代码](https://blog.csdn.net/weixin_37799689/article/details/89284032)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* [大津二值化算法(Otsu‘s Method)及python算法实现](https://blog.csdn.net/Galen_xia/article/details/107911867)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [OTSU算法/大津法/最大类间方差法 python实现](https://blog.csdn.net/laonafahaodange/article/details/123746067)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文