OpenCV笔记(2)

https://docs.opencv.org/master/db/da5/tutorial_how_to_scan_images.html
https://docs.opencv.org/master/d7/d37/tutorial_mat_mask_operations.html
https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
cv::Mat::isContinuous()
cv::getTickCount()
cv::getTickFrequency()
cv::LUT()
cv::at()
filter2D
cv::namedWindow
waitKey()
addWeighted
cv::Mat::zeros
cv::saturate_cast
cv::Mat::convertTo
cv::Scalar
cv::Point

image.png

image.png

image.png

image.png
Scalar intensity = img.at<uchar>(y, x);
Scalar intensity = img.at<uchar>(Point(x, y));

Vec3b intensity = img.at<Vec3b>(y, x);
uchar blue = intensity.val[0];
uchar green = intensity.val[1];
uchar red = intensity.val[2];

Vec3f intensity = img.at<Vec3f>(y, x);
float blue = intensity.val[0];
float green = intensity.val[1];
float red = intensity.val[2];

img.at<uchar>(y, x) = 128;
vector<Point2f> points;
//... fill the array
Mat pointsMat = Mat(points);
Point2f point = pointsMat.at<Point2f>(i, 0);
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • # Awesome Python [![Awesome](https://cdn.rawgit.com/sindr...
    emily_007阅读 6,607评论 0 3
  • 二姐生于八十年代初,在家排行老二,性格有些木讷,还有些许倔强,她上面有个姐姐,下面有个弟弟。二姐家地处山东河北交界...
    emy0317阅读 1,865评论 2 2
  • 2018-4-6 星期五 天气晴.大风 我喜欢当兵,我现在心想等我长大以后要当军人,我的枪法还不...
    快乐的祥宝阅读 1,098评论 0 0
  • 不知是不是都有这么个习惯 想睡时没睡着就会面临很晚才会睡着 我是这样的 深夜就像一个欲魔 它会唤醒你白日里藏在心底...
    木砚墨阅读 1,397评论 0 0
  • 童喜喜老师分享: 一,前言 敬爱的诸位老师,亲爱的诸位伙伴,大家好! 群里有老朋友,也有新面孔。在教育写作课的分享...
    你是幸运的周杰阅读 3,456评论 3 3