http://ja.wikipedia.org/wiki/%E3%82%AC%E3%82%A6%E3%82%B9%E9%96%A2%E6%95%B0
cv::Mat src = cv::Mat::zeros(15,15,CV_16U);
src.at<ushort>(7,7) = cv::saturate_cast<ushort>(10000);
std::cout<<src<<std::endl;
cv::Mat src1 = cv::Mat::zeros(15,15,CV_16U);
src1.at<ushort>(7,7) = cv::saturate_cast<ushort>(10000);
cv::GaussianBlur(src1,src1,cv::Size(15,15),0.5,0,4);
std::cout<<"sigma = 0.5"<<std::endl<<src1<<std::endl;
cv::Mat src2 = cv::Mat::zeros(15,15,CV_16U);
src2.at<ushort>(7,7) = cv::saturate_cast<ushort>(10000);
cv::GaussianBlur(src2,src2,cv::Size(15,15),1.0,0,4);
std::cout<<"sigma = 1.0"<<std::endl<<src2<<std::endl;
cv::Mat src3 = cv::Mat::zeros(15,15,CV_16U);
src3.at<ushort>(7,7) = cv::saturate_cast<ushort>(10000);
cv::GaussianBlur(src3,src3,cv::Size(15,15),2.0,0,4);
std::cout<<"sigma = 2.0"<<std::endl<<src3<<std::endl;
二次元のガウス関数をかける方法である。結果を下に記述する
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 2, 11, 18, 11, 2, 0, 0, 0, 0, 0;
0, 0, 0, 0, 2, 29, 131, 215, 131, 29, 2, 0, 0, 0, 0;
0, 0, 0, 0, 11, 131, 585, 965, 585, 131, 11, 0, 0, 0, 0;
0, 0, 0, 1, 18, 215, 965, 1592, 965, 215, 18, 1, 0, 0, 0;
0, 0, 0, 0, 11, 131, 585, 965, 585, 131, 11, 0, 0, 0, 0;
0, 0, 0, 0, 2, 29, 131, 215, 131, 29, 2, 0, 0, 0, 0;
0, 0, 0, 0, 0, 2, 11, 18, 11, 2, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sigma = 2.0
[0, 0, 0, 0, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0, 0;
0, 0, 0, 1, 1, 3, 4, 4, 4, 3, 1, 1, 0, 0, 0;
0, 0, 1, 2, 6, 11, 15, 17, 15, 11, 6, 2, 1, 0, 0;
0, 1, 2, 7, 17, 33, 48, 54, 48, 33, 17, 7, 2, 1, 0;
1, 1, 6, 17, 42, 78, 114, 129, 114, 78, 42, 17, 6, 1, 1;
1, 3, 11, 33, 78, 146, 213, 241, 213, 146, 78, 33, 11, 3, 1;
2, 4, 15, 48, 114, 213, 310, 351, 310, 213, 114, 48, 15, 4, 2;
2, 4, 17, 54, 129, 241, 351, 398, 351, 241, 129, 54, 17, 4, 2;
2, 4, 15, 48, 114, 213, 310, 351, 310, 213, 114, 48, 15, 4, 2;
1, 3, 11, 33, 78, 146, 213, 241, 213, 146, 78, 33, 11, 3, 1;
1, 1, 6, 17, 42, 78, 114, 129, 114, 78, 42, 17, 6, 1, 1;
0, 1, 2, 7, 17, 33, 48, 54, 48, 33, 17, 7, 2, 1, 0;
0, 0, 1, 2, 6, 11, 15, 17, 15, 11, 6, 2, 1, 0, 0;
0, 0, 0, 1, 1, 3, 4, 4, 4, 3, 1, 1, 0, 0, 0;
0, 0, 0, 0, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0, 0]
ガウス関数型に分布しているのが分かるだろう。
半値半幅は1.17 × sigma になる。
ガウス関数型に分布しているのが分かるだろう。
半値半幅は1.17 × sigma になる。
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。