OpenCV笔记(2)
2018-08-07 本文已影响0人
ToddMa
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
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);