随笔分类 -  opencv

摘要:cv::Mat histogramEqualization(cv::Mat img){ int rows=img.rows; int cols=img.cols; cv::Mat grayScale=cv::Mat::zeros(cv::Size(256,1),CV_32SC1); cv::Mat 阅读全文
posted @ 2019-09-17 20:30 hiligei 阅读(468) 评论(0) 推荐(0)
摘要:#include<opencv2/core/core.hpp> #include<opencv2/highgui/highgui.hpp> #include<opencv2/imgproc/imgproc.hpp> #include<iostream> // center:极坐标的变换中心 // m 阅读全文
posted @ 2019-09-16 19:00 hiligei 阅读(1415) 评论(1) 推荐(0)
摘要:int main(){ cv::Mat img=cv::imread("/home/nan/图片/highdeepth/starry.jpg",cv::IMREAD_REDUCED_COLOR_8); // imread( const String& filename, int flags = IM 阅读全文
posted @ 2019-09-10 10:45 hiligei 阅读(7154) 评论(0) 推荐(0)
摘要:int main(){ cv::Mat src1=(cv::Mat_<float>(2,3)<<1,2,3,4,5,6); cv::Mat src2=(cv::Mat_<float>(2,3)<<11,12,13,14,15,16); cv::Mat src3=(cv::Mat_<float>(3, 阅读全文
posted @ 2019-09-09 22:01 hiligei 阅读(1084) 评论(0) 推荐(0)
摘要:int main(){ cv::Mat m1(5,5, CV_8UC1); for(int i=0;i<m1.rows;++i) for(int j=0;j<m1.cols;++j) m1.at<uchar>(i,j)=i*2+j*2+1; // uchar与8U匹配。 std::cout<<m1< 阅读全文
posted @ 2019-09-09 20:09 hiligei 阅读(306) 评论(0) 推荐(0)
摘要:int main(){ cv::Mat m1=(cv::Mat_<int>(3,2)<<1,2,3,4,5,6); cv::Mat m2=(cv::Mat_<int>(3,2)<<2,4,6,8,10,12); cv::Mat m3=(cv::Mat_<int>(3,2)<<3,6,9,12,15, 阅读全文
posted @ 2019-09-08 18:40 hiligei 阅读(1085) 评论(0) 推荐(0)
摘要:一:构造并访问单通道。 int main(){ cv::Mat m=(cv::Mat_<int>(3,2)<<1,2,3,4,5,6); for(int i=0;i<m.rows;++i){ for(int j=0;j<m.cols;++j) std::cout<<m.at<int>(i,j)<<" 阅读全文
posted @ 2019-09-08 18:32 hiligei 阅读(2099) 评论(0) 推荐(0)
摘要:cv::Scalar scalar1(v); cv::Mat mat3(size,CV_8UC1,scalar1); std::cout<<mat3<<std::endl; std::cout<<std::endl; int a[2][3][3]={ {{0,0,0},{0,0,0},{0,0,0} 阅读全文
posted @ 2019-09-08 09:42 hiligei 阅读(1992) 评论(0) 推荐(0)
摘要:template<typename _Tp> class Scalar_ : public Vec<_Tp, 4> { public: //! various constructors Scalar_(); Scalar_(_Tp v0, _Tp v1, _Tp v2=0, _Tp v3=0); S 阅读全文
posted @ 2019-09-06 20:49 hiligei 阅读(777) 评论(0) 推荐(0)