Ai
1 Star 5 Fork 1

cubone/learnopencv

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
otsu_method.cpp 464 Bytes
一键复制 编辑 原始数据 按行查看 历史
Vikas Gupta 提交于 2020-08-17 21:24 +08:00 . Rename Otsu_method.cpp to otsu_method.cpp
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main(){
Mat testImage = imread("boat.jpg", 0);
Mat dst;
double thresh = 0;
double maxValue = 255;
long double thres = cv::threshold(testImage,dst, thresh, maxValue, THRESH_OTSU);
cout << "Otsu Threshold : " << thres <<endl;
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cubone/learnopencv.git
git@gitee.com:cubone/learnopencv.git
cubone
learnopencv
learnopencv
master

搜索帮助