{"id":1601,"date":"2013-04-28T23:53:41","date_gmt":"2013-04-28T14:53:41","guid":{"rendered":"http:\/\/www.atinfinity.info\/blog\/?p=1601"},"modified":"2014-10-16T21:13:32","modified_gmt":"2014-10-16T12:13:32","slug":"image-watch%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"http:\/\/www.atinfinity.info\/blog\/archives\/1601","title":{"rendered":"Image Watch\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>OpenCV 2.4.5\u30ea\u30ea\u30fc\u30b9\u3068\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067MS\u88fd\u306eMat\u306e\u4e2d\u8eab\u3092\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u304d\u308b\u30d7\u30e9\u30b0\u30a4\u30f3<a href=\"http:\/\/opencv.org\/image-debugger-plug-in-for-visual-studio.html\" title=\"Image Watch\" target=\"_blank\">Image Watch<\/a>\u304c\u767a\u8868\u3055\u308c\u307e\u3057\u305f\uff0eMS\u88fd\u3068\u3044\u3046\u3053\u3068\u3067\u7c21\u5358\u306b\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<p>\u4ee5\u964d\u306e\u8aac\u660e\u306fVisual Studio 2012\u3092\u4f7f\u3063\u3066\u8aac\u660e\u3057\u307e\u3059\uff08\u30d7\u30e9\u30b0\u30a4\u30f3\u30822012\u7248\u306e\u307f\u306e\u914d\u5e03\u3067\u3059\uff09\uff0e<br \/>\n<font color=\"#ff0000\"><strong>\u203b\u6ce8\u610f\uff1aVisual Studio Professional\u4ee5\u4e0a\u306e\u30a8\u30c7\u30a3\u30b7\u30e7\u30f3\u3067\u3057\u304b\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u4f7f\u3048\u306a\u3044\u3088\u3046\u3067\u3059\uff0e<\/strong><\/font><\/p>\n<p><strong>\u25a0\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/strong><br \/>\n<a href=\"http:\/\/visualstudiogallery.msdn.microsoft.com\/e682d542-7ef3-402c-b857-bbfba714f78d\" title=\"\u914d\u5e03\u30da\u30fc\u30b8\" target=\"_blank\">\u914d\u5e03\u30da\u30fc\u30b8<\/a>\u304b\u3089<strong>ImageWatch.vsix<\/strong>\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff0e<\/p>\n<p><strong>\u25a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f<strong>ImageWatch.vsix<\/strong>\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff0e\u3053\u3053\u3067<strong>\u300c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d<\/strong>\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b8c\u4e86\u3067\u3059\uff0e<\/p>\n<tbody>\n<tr>\n<td><img loading=\"lazy\" title=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\" src=\"http:\/\/www.atinfinity.info\/img\/opencv\/ImageWatch\/ImageWatch01.png\" alt=\"\" width=\"450\" height=\"350\" \/><\/td>\n<\/tr>\n<\/tbody>\n<p><strong>\u25a0\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/strong><br \/>\n\u306a\u3093\u3066\u3053\u3068\u3082\u306a\u30442\u5024\u5316\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u3059\uff0e\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u7528\u3044\u3066\u4f7f\u3044\u65b9\u306e\u8aac\u660e\u3092\u884c\u3044\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:c++ decode:true \" >#include &lt;iostream&gt;\r\n#include &lt;opencv2\/core\/core.hpp&gt;\r\n#include &lt;opencv2\/imgproc\/imgproc.hpp&gt;\r\n#include &lt;opencv2\/highgui\/highgui.hpp&gt;\r\n\r\nusing namespace cv;\r\n\r\n#ifdef _DEBUG\r\n#pragma comment(lib, \"opencv_core245d.lib\")\r\n#pragma comment(lib, \"opencv_imgproc245d.lib\")\r\n#pragma comment(lib, \"opencv_highgui245d.lib\")\r\n#else\r\n#pragma comment(lib, \"opencv_core245.lib\")\r\n#pragma comment(lib, \"opencv_imgproc245.lib\")\r\n#pragma comment(lib, \"opencv_highgui245.lib\")\r\n#endif\r\n\r\nint main( int argc, char** argv)\r\n{\r\n\tMat image;\r\n\tMat gray;\r\n\tMat bin;\r\n\r\n\t\/\/(1)\u753b\u50cf\u8aad\u307f\u8fbc\u307f\r\n\timage = imread(argv[1], 1);\r\n\r\n\t\/\/(2)\u30b0\u30ec\u30fc\u30b9\u30b1\u30fc\u30eb\u5316\r\n\tcvtColor(image, gray, CV_BGR2GRAY);\r\n\r\n\t\/\/(3)2\u5024\u5316\r\n\tthreshold(gray, bin, 100, 255, THRESH_BINARY);\r\n\r\n\t\/\/(4)2\u5024\u5316\u753b\u50cf\u306e\u8868\u793a\r\n\tnamedWindow(\"bin\", 1);\r\n\timshow(\"bin\", bin);\r\n\r\n\twaitKey(0);\r\n\r\n\treturn 0;\r\n}<\/pre>\n<p><strong>\u25a0\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u307f\u308b<\/strong><br \/>\n\u4f8b\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3067\u6b62\u3081\u3066\u3044\u308b\u5834\u5408\u306e\u4f8b\u3092\u793a\u3057\u307e\u3059\uff0e<\/p>\n<tbody>\n<tr>\n<td><img loading=\"lazy\" title=\"\u30c7\u30d0\u30c3\u30b0\" src=\"http:\/\/www.atinfinity.info\/img\/opencv\/ImageWatch\/ImageWatch02.png\" alt=\"\" width=\"429\" height=\"339\" \/><\/td>\n<\/tr>\n<\/tbody>\n<p>\u30c7\u30d0\u30c3\u30b0\u72b6\u614b\u3092\u898b\u308b\u305f\u3081\u306b\u306fVS2012\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u3010\u8868\u793a\u3011\u2015\u3010\u305d\u306e\u4ed6\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3011\u2015\u3010Image Watch\u3011\u3092\u9078\u629e\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff0e\u305d\u3057\u3066\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3059\u308b\u3068\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306eMat\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff0e<\/p>\n<p>\u30a6\u30a3\u30f3\u30c9\u30a6\u53f3\u5074\u306b\u30d7\u30ec\u30d3\u30e5\u30fc\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\u30de\u30a6\u30b9\u306e\u30db\u30a4\u30fc\u30eb\u64cd\u4f5c\u3067\u62e1\u5927\u7e2e\u5c0f\u3082\u53ef\u80fd\u3067\u3059\uff0e\u307e\u305f\uff0c\u4ee5\u524d\u7d39\u4ecb\u3057\u305f<a href=\"http:\/\/www.atinfinity.info\/blog\/archives\/1447\" title=NativeViewer\" target=\"_blank\">NativeViewer<\/a>\u306b\u6bd4\u3079\u3066\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u304c\u4e00\u89a7\u3067\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u304d\u305f\u308a\uff0c\u30a2\u30eb\u30d5\u30a1\u30c1\u30e3\u30f3\u30cd\u30eb\u306b\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u306e\u306f\u30e1\u30ea\u30c3\u30c8\u3060\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<tbody>\n<tr>\n<td><img loading=\"lazy\" title=\"\u30d7\u30ec\u30d3\u30e5\u30fc\" src=\"http:\/\/www.atinfinity.info\/img\/opencv\/ImageWatch\/ImageWatch03.png\" alt=\"\" width=\"450\" height=\"450\" \/><\/td>\n<\/tr>\n<\/tbody>\n<p><strong>\u25a0\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><br \/>\n\u300c\u62e1\u5f35\u6a5f\u80fd\u3068\u66f4\u65b0\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u753b\u9762\u304b\u3089\u300cImage Watch\u300d\u3092\u9078\u629e\u3057\u3066\uff0c\u300c\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3053\u3068\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff0e<\/p>\n<tbody>\n<tr>\n<td><img loading=\"lazy\" title=\"\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\" src=\"http:\/\/www.atinfinity.info\/img\/opencv\/ImageWatch\/ImageWatch04.png\" alt=\"\" width=\"600\" height=\"338\" \/><\/td>\n<\/tr>\n<\/tbody>\n<p><strong>\u25a0\u304a\u308f\u308a\u306b<\/strong><br \/>\n\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u3092\u77e5\u308a\u305f\u3044\u5834\u5408\u306f<a href=\"http:\/\/research.microsoft.com\/en-us\/um\/redmond\/groups\/ivm\/imagewatchhelp\/imagewatchhelp.htm\" title=\"Image Watch\u516c\u5f0f\u30d8\u30eb\u30d7\" target=\"_blank\">Image Watch\u516c\u5f0f\u30d8\u30eb\u30d7<\/a>\u3092\u8aad\u3080\u3068\u826f\u3044\u3067\u3057\u3087\u3046\uff0e\u307e\u305f\uff0cOpenCV\u306e\u30b5\u30a4\u30c8\u306b\u3082<a href=\"http:\/\/docs.opencv.org\/doc\/tutorials\/introduction\/windows_visual_studio_image_watch\/windows_visual_studio_image_watch.html#windows-visual-studio-image-watch\" title=\"\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30da\u30fc\u30b8\" target=\"_blank\">\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30da\u30fc\u30b8<\/a>\u304c\u3042\u308b\u305f\u3081\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\uff0e\u30c4\u30fc\u30eb\u3092\u3046\u307e\u304f\u6d3b\u7528\u3057\u3066\u3088\u308a\u826f\u3044\u30c7\u30d0\u30c3\u30b0\u30e9\u30a4\u30d5\u3092\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenCV 2.4.5\u30ea\u30ea\u30fc\u30b9\u3068\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067MS\u88fd\u306eMat\u306e\u4e2d\u8eab\u3092\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u304d\u308b\u30d7\u30e9\u30b0\u30a4\u30f3Image Watch\u304c\u767a\u8868\u3055\u308c\u307e\u3057\u305f\uff0eMS\u88fd\u3068\u3044\u3046\u3053\u3068\u3067\u7c21\u5358\u306b\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\uff0e \u4ee5\u964d\u306e\u8aac\u660e\u306fVisual Studio  &hellip; <a href=\"http:\/\/www.atinfinity.info\/blog\/archives\/1601\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a>&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,6,3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/posts\/1601"}],"collection":[{"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/comments?post=1601"}],"version-history":[{"count":35,"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/posts\/1601\/revisions"}],"predecessor-version":[{"id":1672,"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/posts\/1601\/revisions\/1672"}],"wp:attachment":[{"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/media?parent=1601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/categories?post=1601"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.atinfinity.info\/blog\/wp-json\/wp\/v2\/tags?post=1601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}