Mat image(height, width, CV_8UC3, 0);
Mat img = Mat::zeros(height, width,CV_32FC);
Mat img = Mat::zeros(height, width,CV_64FC);
○ 화소접근
Mat image;
image.at(j, i) = 255;
image.at(j, i)[channel] = 255;
cv::Mat_ img = image;
img(j, i) = 255;
uchar* data = image.prt( j );
data[i] = 255;
○ Saturation Arithmetics
I(x, y) = min(max(round(r), 0), 255)
I.at(y, x) = saturate_case(r)
dst(I) = saturate_cast(src1(I) * alpha + src2(I) * beta + gamma)
void addWeighted( InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst )
dst(I) = saturate_cast(|src(I) * alpha + beta|)
void convertScaleAbs(InputArray src, OutputArray dst, double alpha=1, double beta=0)
m(I) = saturate_cast(alpha * (*this)m(I) + beta)
void Mat::convertTo(OutputArray m, int rtype, double alpha=1, double beta=0 )
○ 기타
putText(img, "text", Point(x,y), FONT_HERSHEY_SIMPLEX, 1., Scalar(B, G, R), 1);
putText(img, "text", Point(x,y), FONT_HERSHEY_DUPLEX, 1., Scalar(B, G, R), 1);
Rect rt;
Mat sub = img(rt).clone();
댓글 없음:
댓글 쓰기