{"id":2325,"date":"2020-01-23T14:12:07","date_gmt":"2020-01-23T07:12:07","guid":{"rendered":"https:\/\/gulfthai.com\/?p=2325"},"modified":"2020-08-07T15:39:01","modified_gmt":"2020-08-07T08:39:01","slug":"%e0%b8%ad%e0%b8%9a%e0%b8%a3%e0%b8%a1-open-cv","status":"publish","type":"post","link":"https:\/\/gulfthai.com\/?p=2325","title":{"rendered":"\u0e2d\u0e1a\u0e23\u0e21\u0e2a\u0e2d\u0e19 Visual studio \u0e41\u0e25\u0e30\u0e1b\u0e23\u0e30\u0e21\u0e27\u0e25\u0e1c\u0e25\u0e20\u0e32\u0e1e\u0e14\u0e49\u0e27\u0e22 Open CV \u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48 2"},"content":{"rendered":"\n<p> \u0e2d\u0e1a\u0e23\u0e21 open CV Visual studio<br>CV_WINDOW_NORMAL <br>\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25\u0e20\u0e32\u0e1e\u0e43\u0e19\u0e02\u0e19\u0e32\u0e14\u0e15\u0e48\u0e32\u0e07\u0e46<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> example 1 : open image file with image conversion\n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\nint main()\n{\n\tMat image;\n\timage = imread(\"Lena.png\", IMREAD_COLOR); \/\/ IMREAD_GRAYSCALE\n\timage = imread(\"Lena.png\", IMREAD_GRAYSCALE); \/\/ IMREAD_GRAYSCALE\n\tnamedWindow(\"My image\", CV_WINDOW_NORMAL); \/\/ CV_WINDOW_AUTOSIZE\n\tnamedWindow(\"My image\", CV_WINDOW_AUTOSIZE); \/\/ CV_WINDOW_AUTOSIZE\n\timshow(\"My image\", image);\n\twaitKey(0);\n\treturn 0;\n}\n ========================================================\n<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/www.facebook.com\/GulfThai\/posts\/1019142128459808\">https:\/\/www.facebook.com\/GulfThai\/posts\/1019142128459808<\/a><br>\u0e20\u0e32\u0e1e\u0e2a\u0e35\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e02\u0e32\u0e27\u0e14\u0e33 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e32\u0e07\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e17\u0e35\u0e48\u0e23\u0e31\u0e1a\u0e44\u0e14\u0e49\u0e41\u0e15\u0e48\u0e02\u0e32\u0e27\u0e14\u0e33<br>image = imread(&#8220;Lena.png&#8221;, IMREAD_GRAYSCALE<br><code>cvtColor(image, gray_image, CV_BGR2GRAY);<\/code><br>\u0e0a\u0e37\u0e48\u0e2d\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 \u0e15\u0e31\u0e27\u0e41\u0e1b\u0e231 \u0e15\u0e31\u0e27\u0e41\u0e1b\u0e232 \u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e41\u0e1b\u0e25\u0e07\u0e2a\u0e35<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example 2 : open image file with image conversion\n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\n\nint main()\n{\n\tMat image;\n\tMat gray_image;\n\timage = imread(\"Lena.png\");\n\tcvtColor(image, gray_image, CV_BGR2GRAY);\n\n\tMat color_image;\n\tcvtColor(gray_image, color_image, CV_GRAY2BGR);\n\n\t\/\/namedWindow(\"My image\", CV_WINDOW_NORMAL); \/\/ CV_WINDOW_AUTOSIZE\n\tnamedWindow(\"My image\", CV_WINDOW_AUTOSIZE); \/\/ CV_WINDOW_AUTOSIZE\n\tnamedWindow(\"My grayscale image\", CV_WINDOW_AUTOSIZE); \/\/ CV_WINDOW_AUTOSIZE\n\tnamedWindow(\"My color image\", CV_WINDOW_AUTOSIZE); \/\/ CV_WINDOW_AUTOSIZE\n\t\n\timshow(\"My image\", image);\n\timshow(\"My grayscale image\", gray_image);\n\timshow(\"My color image\", color_image);\n\t\t\n\twaitKey(0);\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<p>using namespace cv; <br>\u0e04\u0e37\u0e2d scope \u0e08\u0e30\u0e21\u0e35\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e43\u0e19\u0e20\u0e32\u0e29\u0e32 C++ \u0e2b\u0e32\u0e01\u0e21\u0e35\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e0a\u0e37\u0e48\u0e2d\u0e0b\u0e49\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e41\u0e1a\u0e1a Global \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e08\u0e31\u0e14\u0e01\u0e25\u0e38\u0e48\u0e21 <br><code>Mat image<\/code> \u0e04\u0e37\u0e2d CV::Mat image;<\/p>\n\n\n\n<p>example 3 : save image file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example 3 : save image file\n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\n\nint main()\n{\n\tMat image;\n\tMat gray_image;\n\timage = imread(\"Lena.png\");\n\tcvtColor(image, gray_image, CV_BGR2GRAY);\n\n\t\/\/namedWindow(\"My image\", CV_WINDOW_NORMAL); \/\/ CV_WINDOW_AUTOSIZE\n\tnamedWindow(\"My image\", CV_WINDOW_AUTOSIZE); \/\/ CV_WINDOW_AUTOSIZE\n\tnamedWindow(\"My grayscale image\", CV_WINDOW_AUTOSIZE); \/\/ CV_WINDOW_AUTOSIZE\n\timshow(\"My image\", image);\n\timshow(\"My grayscale image\", gray_image);\n\t\n\timwrite(\"my_image.png\", gray_image);\n\n\t\/\/ file size checking for color image\n\t\/\/Mat color_image;\n\t\/\/cvtColor(gray_image, color_image, CV_GRAY2BGR);\n\t\/\/imwrite(\"my_image_rgb.png\", color_image);\n\n\twaitKey(0);\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e20\u0e32\u0e1e\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e08\u0e32\u0e01\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 \u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 imwrite<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : negative image\n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\nint main()\n{\n\tMat image = imread(\"histogram.png\");\n\t\/\/Mat image = imread(\"stopsign.jpg\");\n\t\n\t\/\/Mat image = Mat::zeros(Size(200, 200), CV_8U);\n\t\/\/Mat image(200, 200, CV_8U, Scalar(255)); \/\/ white image\n\t\/\/Mat image(200, 200, CV_8U, Scalar(0)); \/\/ black image\n\tnamedWindow(\"Image\", CV_WINDOW_AUTOSIZE);\n\timshow(\"Image\", image);\n\n\t\/\/Negative Effect\n\tMat inv_image;\n\tbitwise_not(image, inv_image);\n\tnamedWindow(\"NegativeEffect\", CV_WINDOW_AUTOSIZE);\n\timshow(\"NegativeEffect\", inv_image);\n\twaitKey(0);\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : pseudo color image \n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\nint main() {\n\t\/\/Mat input_image = imread(\"lena.png\", IMREAD_GRAYSCALE);\n\tMat input_image = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\tMat processed_image;\n\n\tapplyColorMap(input_image, processed_image, COLORMAP_RAINBOW); \/\/COLORMAP_JET);\n\timshow(\"Input image\", input_image);\n\timshow(\"Processed Image\", processed_image);\n\twaitKey(0);\n\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<!--nextpage-->\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : noise generated\n#include &lt;opencv2\/opencv.hpp>\n#include &lt;random>\nusing namespace cv;\nusing namespace std;\nvoid salt(Mat image, int n)\n{\n\tdefault_random_engine generator;\n\tuniform_int_distribution&lt;int> randomRow(0, image.rows - 1);\n\tuniform_int_distribution&lt;int> randomCol(0, image.cols - 1);\n\tint i, j;\n\tfor (int k = 0; k &lt; n; k++)\n\t{\n\t\ti = randomCol(generator);\n\t\tj = randomRow(generator);\n\t\tif (image.type() == CV_8UC1)\n\t\t{\n\t\t\timage.at&lt;uchar>(j, i) = 255;\n\t\t}\n\t\telse if (image.type() == CV_8UC3)\n\t\t{\n\t\t\timage.at&lt;Vec3b>(j, i)[0] = 255;\n\t\t\timage.at&lt;Vec3b>(j, i)[1] = 255;\n\t\t\timage.at&lt;Vec3b>(j, i)[2] = 255;\n\t\t}\n\t}\n}\n\nvoid pepper(Mat image, int n)\n{\n\tdefault_random_engine generator;\n\tuniform_int_distribution&lt;int> randomRow(0, image.rows - 1);\n\tuniform_int_distribution&lt;int> randomCol(0, image.cols - 1);\n\tint i, j;\n\tfor (int k = 0; k &lt; n; k++)\n\t{\n\t\ti = randomCol(generator);\n\t\tj = randomRow(generator);\n\t\tif (image.type() == CV_8UC1)\n\t\t{\n\t\t\timage.at&lt;uchar>(j, i) = 0;\n\t\t}\n\t\telse if (image.type() == CV_8UC3)\n\t\t{\n\t\t\timage.at&lt;Vec3b>(j, i)[0] = 0;\n\t\t\timage.at&lt;Vec3b>(j, i)[1] = 0;\n\t\t\timage.at&lt;Vec3b>(j, i)[2] = 0;\n\t\t}\n\t}\n}\n\n\nint main() {\n\tMat image = imread(\"lena.png\", IMREAD_GRAYSCALE);\n\t\/\/Mat input_image = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\t\n\timshow(\"Input image\", image);\n\t\n\t\/\/pepper(image, 3000);\n\tsalt(image, 3000);\n\n\timshow(\"Processed Image\", image);\n\twaitKey(0);\n\n\treturn 0;\n}\n\/\/\/\/ ========================================================<\/code><\/pre>\n\n\n\n<!--nextpage-->\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : averaging filter \n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\nint main() {\n\tMat input_image = imread(\"lena.png\", IMREAD_GRAYSCALE);\n\t\/\/Mat input_image = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\tMat processed_image;\n\n\t\/\/blur(input_image, processed_image, Size(5, 5));\n\tblur(input_image, processed_image, Size(4, 4));\n\timshow(\"Input image\", input_image);\n\timshow(\"Processed Image\", processed_image);\n\twaitKey(0);\n\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : median filter\n#include &lt;opencv2\/opencv.hpp>\n#include &lt;random>\nusing namespace cv;\nusing namespace std;\nvoid salt(Mat image, int n)\n{\n\tdefault_random_engine generator;\n\tuniform_int_distribution&lt;int> randomRow(0, image.rows - 1);\n\tuniform_int_distribution&lt;int> randomCol(0, image.cols - 1);\n\tint i, j;\n\tfor (int k = 0; k &lt; n; k++)\n\t{\n\t\ti = randomCol(generator);\n\t\tj = randomRow(generator);\n\t\tif (image.type() == CV_8UC1)\n\t\t{\n\t\t\timage.at&lt;uchar>(j, i) = 255;\n\t\t}\n\t\telse if (image.type() == CV_8UC3)\n\t\t{\n\t\t\timage.at&lt;Vec3b>(j, i)[0] = 255;\n\t\t\timage.at&lt;Vec3b>(j, i)[1] = 255;\n\t\t\timage.at&lt;Vec3b>(j, i)[2] = 255;\n\t\t}\n\t}\n}\nint main() {\n\tMat image = imread(\"lena.png\", IMREAD_GRAYSCALE);\n\t\/\/Mat input_image = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\tMat processed_image;\n\n\timshow(\"Input image\", image);\n\t\n\tsalt(image, 30000);\n\t\n\timshow(\"Noisy Image\", image);\n\t\n\t\/\/medianBlur(image, processed_image, 3);\n\t\n\t\/\/Mat processed_image2;\n\t\/\/medianBlur(processed_image, processed_image2, 5);\n\tblur(image, processed_image, Size(3, 3));\n\n\timshow(\"Processed Image\", processed_image);\n\t\/\/imshow(\"Processed Image2\", processed_image2);\n\twaitKey(0);\n\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<!--nextpage-->\n\n\n\n<p>\u0e2e\u0e34\u0e2a\u0e42\u0e15\u0e41\u0e01\u0e23\u0e21<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : histogram plot\n#include &lt;opencv2\/opencv.hpp>\nusing namespace std;\nusing namespace cv;\nint main(int argc, char** argv)\n{\n\t\/\/Mat src = imread(\"histogram.png\", IMREAD_COLOR);\n\tMat src = imread(\"Lena.png\", IMREAD_COLOR);\n\t\/\/Mat src = imread(\"rgb.png\", IMREAD_COLOR);\n\tif (src.empty())\n\t{\n\t\treturn EXIT_FAILURE;\n\t}\n\tvector&lt;Mat> bgr_planes;\n\tsplit(src, bgr_planes);\n\tint histSize = 256;\n\tfloat range[] = { 0, 256 }; \/\/the upper boundary is exclusive\n\tconst float* histRange = { range };\n\tbool uniform = true, accumulate = false;\n\tMat b_hist, g_hist, r_hist;\n\tcalcHist(&amp;bgr_planes[0], 1, 0, Mat(), b_hist, 1, &amp;histSize, &amp;histRange, uniform, accumulate);\n\tcalcHist(&amp;bgr_planes[1], 1, 0, Mat(), g_hist, 1, &amp;histSize, &amp;histRange, uniform, accumulate);\n\tcalcHist(&amp;bgr_planes[2], 1, 0, Mat(), r_hist, 1, &amp;histSize, &amp;histRange, uniform, accumulate);\n\tint hist_w = 512, hist_h = 400;\n\tint bin_w = cvRound((double)hist_w \/ histSize);\n\tMat histImage(hist_h, hist_w, CV_8UC3, Scalar(0, 0, 0));\n\tnormalize(b_hist, b_hist, 0, histImage.rows, NORM_MINMAX, -1, Mat());\n\tnormalize(g_hist, g_hist, 0, histImage.rows, NORM_MINMAX, -1, Mat());\n\tnormalize(r_hist, r_hist, 0, histImage.rows, NORM_MINMAX, -1, Mat());\n\tfor (int i = 1; i &lt; histSize; i++)\n\t{\n\t\tline(histImage, Point(bin_w*(i - 1), hist_h - cvRound(b_hist.at&lt;float>(i - 1))),\n\t\t\tPoint(bin_w*(i), hist_h - cvRound(b_hist.at&lt;float>(i))),\n\t\t\tScalar(255, 0, 0), 2, 8, 0);\n\t\tline(histImage, Point(bin_w*(i - 1), hist_h - cvRound(g_hist.at&lt;float>(i - 1))),\n\t\t\tPoint(bin_w*(i), hist_h - cvRound(g_hist.at&lt;float>(i))),\n\t\t\tScalar(0, 255, 0), 2, 8, 0);\n\t\tline(histImage, Point(bin_w*(i - 1), hist_h - cvRound(r_hist.at&lt;float>(i - 1))),\n\t\t\tPoint(bin_w*(i), hist_h - cvRound(r_hist.at&lt;float>(i))),\n\t\t\tScalar(0, 0, 255), 2, 8, 0);\n\t}\n\timshow(\"Source image\", src);\n\timshow(\"calcHist Demo\", histImage);\n\twaitKey();\n\treturn EXIT_SUCCESS;\n}\n\/\/ ========================<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : histogram equalization\n#include &lt;opencv2\/opencv.hpp>\nusing namespace std;\nusing namespace cv;\nint main(int argc, char** argv)\n{\n\tMat src = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\tif (src.empty())\n\t{\n\t\treturn EXIT_FAILURE;\n\t}\n\tMat dst;\n\tequalizeHist(src, dst);\n\timshow(\"Source image\", src);\n\timshow(\"Equalized image\", dst);\n\twaitKey();\n\treturn EXIT_SUCCESS;\n}<\/code><\/pre>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e27\u0e48\u0e32\u0e07 \u0e14\u0e49\u0e27\u0e22 Log Transformation \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32 \u0e40\u0e0a\u0e48\u0e19\u0e15\u0e31\u0e14\u0e2b\u0e21\u0e2d\u0e01<\/p>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32\u0e43\u0e2b\u0e49\u0e40\u0e17\u0e48\u0e32\u0e01\u0e31\u0e19<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> example : logarithmic transformation\n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\nint main() {\n\t\/\/Mat input_image = imread(\"lena.png\", IMREAD_GRAYSCALE);\n\tMat input_image = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\tMat processed_image;\n\n\tinput_image.convertTo(processed_image, CV_32F);\n\tprocessed_image = processed_image + 1;\n\tlog(processed_image, processed_image);\n\tnormalize(processed_image, processed_image, 0, 255, NORM_MINMAX);\n\tconvertScaleAbs(processed_image, processed_image);\n\t\/\/applyColorMap(processed_image, processed_image, COLORMAP_RAINBOW); \/\/COLORMAP_JET);\n\n\timshow(\"Input image\", input_image);\n\timshow(\"Processed Image\", processed_image);\n\twaitKey(0);\n\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<!--nextpage-->\n\n\n\n<p>\u0e3aBit Slicing \u0e41\u0e15\u0e48\u0e25\u0e30\u0e1a\u0e34\u0e15\u0e17\u0e35\u0e48\u0e21\u0e35\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ example : reduce image size with pyramid \n#include &lt;opencv2\/opencv.hpp>\nusing namespace cv;\nint main() {\n\tMat input_image = imread(\"lena.png\", IMREAD_GRAYSCALE);\n\t\/\/Mat input_image = imread(\"histogram.png\", IMREAD_GRAYSCALE);\n\tMat processed_image;\n\n\tpyrDown(input_image, processed_image);\n\n\timshow(\"Input image\", input_image);\n\timshow(\"Processed Image\", processed_image);\n\twaitKey(0);\n\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/gulfthai.com\/?page_id=1201\">\u0e1c\u0e39\u0e49\u0e0a\u0e48\u0e27\u0e22\u0e28\u0e32\u0e2a\u0e15\u0e23\u0e32\u0e08\u0e32\u0e23\u0e22\u0e4c \u0e14\u0e23.\u0e01\u0e34\u0e15\u0e15\u0e34\u0e1e\u0e07\u0e29\u0e4c \u0e40\u0e22\u0e32\u0e27\u0e32\u0e08\u0e32<\/a>&nbsp;\u0e2b\u0e31\u0e27\u0e2b\u0e19\u0e49\u0e32\u0e01\u0e25\u0e38\u0e48\u0e21\u0e27\u0e34\u0e08\u0e31\u0e22\u0e27\u0e34\u0e17\u0e22\u0e32\u0e01\u0e32\u0e23\u0e2b\u0e38\u0e48\u0e19\u0e22\u0e19\u0e15\u0e4c\u0e41\u0e25\u0e30\u0e23\u0e30\u0e1a\u0e1a\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07 \u0e41\u0e25\u0e30\u0e1c\u0e39\u0e49\u0e23\u0e31\u0e1a\u0e1c\u0e34\u0e14\u0e0a\u0e2d\u0e1a\u0e2b\u0e25\u0e31\u0e01\u0e2a\u0e39\u0e15\u0e23\u0e2b\u0e38\u0e48\u0e19\u0e22\u0e19\u0e15\u0e4c\u0e41\u0e25\u0e30\u0e23\u0e30\u0e1a\u0e1a\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34 (\u0e19\u0e32\u0e19\u0e32\u0e0a\u0e32\u0e15\u0e34)\u200b \u0e21.\u0e40\u0e01\u0e29\u0e15\u0e23\u0e28\u0e32\u0e2a\u0e15\u0e23\u0e4c \u0e27\u0e34\u0e17\u0e22\u0e32\u0e40\u0e02\u0e15\u0e28\u0e23\u0e35\u0e23\u0e32\u0e0a\u0e32 \u0e04\u0e13\u0e30\u0e27\u0e34\u0e28\u0e27\u0e01\u0e23\u0e23\u0e21\u0e28\u0e32\u0e2a\u0e15\u0e23\u0e4c\u0e28\u0e23\u0e35\u0e23\u0e32\u0e0a\u0e32 \n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e2d\u0e1a\u0e23\u0e21 open CV Visual studioCV_WINDOW_NORMAL \u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25\u0e20\u0e32\u0e1e\u0e43\u0e19\u0e02\u0e19\u0e32\u0e14\u0e15\u0e48\u0e32\u0e07\u0e46 https:\/\/www.facebook.com\/GulfThai\/posts\/1019142128459808\u0e20\u0e32\u0e1e\u0e2a\u0e35\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e02\u0e32\u0e27\u0e14\u0e33 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e32\u0e07\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e17\u0e35\u0e48\u0e23\u0e31\u0e1a\u0e44\u0e14\u0e49\u0e41\u0e15\u0e48\u0e02\u0e32\u0e27\u0e14\u0e33image = imread(&#8220;Lena.png&#8221;, IMREAD_GRAYSCALEcvtColor(image, gray_image, CV_BGR2GRAY);\u0e0a\u0e37\u0e48\u0e2d\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 \u0e15\u0e31\u0e27\u0e41\u0e1b\u0e231 \u0e15\u0e31\u0e27\u0e41\u0e1b\u0e232 \u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e41\u0e1b\u0e25\u0e07\u0e2a\u0e35 using namespace cv; \u0e04\u0e37\u0e2d scope \u0e08\u0e30\u0e21\u0e35\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e43\u0e19\u0e20\u0e32\u0e29\u0e32 C++ \u0e2b\u0e32\u0e01\u0e21\u0e35\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e0a\u0e37\u0e48\u0e2d\u0e0b\u0e49\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e41\u0e1a\u0e1a Global \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e08\u0e31\u0e14\u0e01\u0e25\u0e38\u0e48\u0e21 Mat image \u0e04\u0e37\u0e2d CV::Mat image; example 3 : save image file \u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e20\u0e32\u0e1e\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e08\u0e32\u0e01\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 \u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 imwrite<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,12,3],"tags":[],"class_list":["post-2325","post","type-post","status-publish","format-standard","hentry","category-engineering","category-research-innovation","category-robotics-automation"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/gulfthai.com\/index.php?rest_route=\/wp\/v2\/posts\/2325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulfthai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulfthai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulfthai.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gulfthai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2325"}],"version-history":[{"count":7,"href":"https:\/\/gulfthai.com\/index.php?rest_route=\/wp\/v2\/posts\/2325\/revisions"}],"predecessor-version":[{"id":2796,"href":"https:\/\/gulfthai.com\/index.php?rest_route=\/wp\/v2\/posts\/2325\/revisions\/2796"}],"wp:attachment":[{"href":"https:\/\/gulfthai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulfthai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulfthai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}