64,649
社区成员
发帖
与我相关
我的任务
分享
void GetThreshPic(Mat *ptrMat)
{
Mat im =*ptrMat;
if(im.empty())
{
cout << "Cannot load image!" << endl;
}
cvtColor( *ptrMat, *ptrMat, CV_RGB2GRAY );
threshold( *ptrMat, *ptrMat, 125, 255,0 );
// return im;
}
int _tmain(int argc, _TCHAR* argv[])
{
cv::Mat im = cv::imread("D:\\Program Files (x86)\\CCAD\\CCAD\\splash.jpg");
//im=
GetThreshPic(&im);