{"id":618,"date":"2017-03-12T10:37:07","date_gmt":"2017-03-12T01:37:07","guid":{"rendered":"https:\/\/prg.waou.biz\/?p=618"},"modified":"2017-03-12T10:49:31","modified_gmt":"2017-03-12T01:49:31","slug":"opencv3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"https:\/\/prg.waou.biz\/?p=618","title":{"rendered":"opencv3\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>\u3007\uff11\u8aac\u660e <br \/>\n  \u4ee5\u4e0b\u306f\uff13\uff12\u30d3\u30c3\u30c8\u7248 <\/p>\n<p> $(OPENCV_DIR)\\x86\\vc14\\lib \u3068(OPENCV_DIR)\u3092\u5b9a\u7fa9\u3057\u305f\u5834\u5408\u306f <br \/>\n  C:\\opencv-3.2\\mybuild\\install\\x86\\vc14\\bin \u3068\u3044\u3046\u3075\u3046\u306b\u306f\u3067\u304d\u306a\u3044\u306e\u3067\u6ce8\u610f\u3002<br \/>\n  %OPENCV_DIR%\u306fC:\\opencv-3.2\\mybuild\\install <br \/>\n  \u300e\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u300f\uff08\u62e1\u5f35\u5b50.hpp\uff09\u3068\u300e\u30e9\u30a4\u30d6\u30e9\u30ea\u30d5\u30a1\u30a4\u30eb\u300f\uff08\u62e1\u5f35\u5b50.lib\uff09\u3068\u300e\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30ea\u30f3\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u300f\uff08\u62e1\u5f35\u5b50.dll\uff09\u306e3\u3064\u3092\u9069\u5207\u306b\u914d\u7f6e\u3059\u308b\u3053\u3068\u304c\u5fc5\u8981\u3002<\/p>\n<p>contrib\u306f\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5165\u308c\u308b\u3082\u306e\u3002 \n<\/p>\n<p> \uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\uff0a\u5b9f\u969b\u306e\u64cd\u4f5c<\/p>\n<h3> <strong>\u3007\uff12\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30ea\u30f3\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d1\u30b9\u3092\u901a\u3059\u3002<\/strong><\/h3>\n<p>\n  \u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30ea\u30f3\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u306fOpenCV\u3067\u30d3\u30eb\u30c9\u3055\u308c\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u304d\u306b\u4e00\u7dd2\u306b\u5b9f\u884c\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3053\u308c\u3092\u767b\u9332\u3002 \u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30ea\u30f3\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u306f%OPENCV_DIR%\\x86\\vc14\\bin;\u306e\u4e2d\u306b\u6709\u308a\u307e\u3059<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u306e\u306fWindows\u306a\u306e\u3067\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u3092Windows\u306b\u6559\u3048\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <br \/>\n  Windows\u306e\u30b9\u30bf\u30fc\u30c8\u30dc\u30bf\u30f3\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>\n  \u5de6\u306e\u6b04\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u8a73\u7d30\u8a2d\u5b9a\u3092\u30af\u30ea\u30c3\u30af\u3002\u8a73\u7d30\u8a2d\u5b9a\u306e\u30bf\u30d6\u306e\u4e00\u756a\u4e0b\u306e\u74b0\u5883\u5909\u6570\u3092\u30af\u30ea\u30c3\u30af\u3002<br \/>\n\u30b7\u30b9\u30c6\u30e0\u306e\u74b0\u5883\u5909\u6570\u306e\u4e2d\u306ePath\u3092\u9078\u629e\u3057\u3066\u7de8\u96c6\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p>\u5fc5\u305a\u30d1\u30bd\u30b3\u30f3\u3092\u518d\u8d77\u52d5\u3059\u308b\u3053\u3068\u3002 <\/p>\n<p><a href=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image31.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image31-300x147.png\" alt=\"image3\" width=\"300\" height=\"147\" class=\"alignnone size-medium wp-image-626\" srcset=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image31-300x147.png 300w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image31-1024x503.png 1024w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image31-200x98.png 200w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image31.png 1093w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3><strong>\u3007\uff13\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u5b9a <\/strong><\/h3>\n<p>\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306fC:\\opencv-3.2\\mybuild\\install\\include\u306e\u4e2d\u306b\u6709\u308a\u307e\u3059\u3002<br \/>\n  \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306e\u306fVisual Studio\u306a\u306e\u3067\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u3092Visual Studio\u306b\u6559\u3048\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <br \/>\n  \u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u306e\u6b04\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>\n  \u69cb\u6210\u30d7\u30ed\u30d1\u30c6\u30a3\u2192C\/C++\u2192\u5168\u822c\u306e\u8ffd\u52a0\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bOpenCV3.2\u306einclude\u3092\u30d5\u30a9\u30eb\u30c0\u3092\u8ffd\u52a0 \n<\/p>\n<p><a href=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image4-300x179.png\" alt=\"image4\" width=\"300\" height=\"179\" class=\"alignnone size-medium wp-image-627\" srcset=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image4-300x179.png 300w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image4-1024x609.png 1024w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image4-200x119.png 200w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image4.png 1166w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3> <strong>\u3007\uff14\u30e9\u30a4\u30d6\u30e9\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u5b9a <\/strong><\/h3>\n<p>\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306e\u6642\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u958b\u304d\u30ea\u30f3\u30ab\u30fc\u306e\u8ffd\u52a0\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b <br \/>\n$(OPENCV_DIR)\\x86\\vc14\\lib <\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image5.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image5-300x177.png\" alt=\"image5\" width=\"300\" height=\"177\" class=\"alignnone size-medium wp-image-628\" srcset=\"https:\/\/prg.waou.biz\/wp-content\/uploads\/image5-300x177.png 300w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image5-1024x605.png 1024w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image5-200x118.png 200w, https:\/\/prg.waou.biz\/wp-content\/uploads\/image5.png 1175w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3><strong>\u3007\uff15\u30d5\u30a1\u30a4\u30eb\u306b\u6b21\u3092\u8a18\u8f09 <\/strong><\/h3>\n<p>#pragma once<br \/>\n  #include &quot;opencv2\\opencv.hpp&quot;<br \/>\n#include&lt;windows.h&gt;<\/p>\n<p>#include &lt;stdio.h&gt;<br \/>\n  #include &lt;tchar.h&gt;<br \/>\n  #include &lt;iostream&gt;<\/p>\n<p>\/\/#include &lt;opencv2\/core.hpp&gt;<br \/>\n  \/\/#include &lt;opencv2\/highgui.hpp&gt;<br \/>\n  \/\/#include &lt;opencv2\/imgcodecs.hpp&gt;\n<\/p>\n<p>#pragma comment(lib,&quot;comctl32.lib&quot;)<br \/>\n  #pragma comment(lib,&quot;vfw32.lib&quot;)<\/p>\n<p>#define CV_VERSION_STR CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION)<\/p>\n<p>#ifdef _DEBUG<br \/>\n  #define CV_EXT_STR &quot;d.lib&quot;<br \/>\n  #else<br \/>\n  #define CV_EXT_STR &quot;.lib&quot;<br \/>\n  #endif<\/p>\n<p>#pragma comment(lib,&quot;opencv_calib3d&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_features2d&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_flann&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_core&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;opencv_hal&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_highgui&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_imgcodecs&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_imgproc&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_ml&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_objdetect&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_photo&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_shape&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_stitching&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_superres&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;opencv_ts&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_video&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_videoio&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  #pragma comment(lib,&quot;opencv_videostab&quot; CV_VERSION_STR CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;IlmImf&quot; CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;ippicvmt.lib&quot;)<br \/>\n  \/\/#pragma comment(lib,&quot;libjasper&quot; CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;libjpeg&quot; CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;libpng&quot; CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;libtiff&quot; CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;libwebp&quot; CV_EXT_STR)<br \/>\n  \/\/#pragma comment(lib,&quot;zlib&quot; CV_EXT_STR)\n<\/p>\n<p>\/\/ OpenCV\u30d8\u30c3\u30c0<\/p>\n<p>using namespace cv;<br \/>\n  using namespace std;\n<\/p>\n<h5>\n<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>\u3007\uff11\u8aac\u660e \u4ee5\u4e0b\u306f\uff13\uff12\u30d3\u30c3\u30c8\u7248 $(OPENCV_DIR)\\x86\\vc14\\lib \u3068(OPENCV_DIR)\u3092\u5b9a\u7fa9\u3057\u305f\u5834\u5408\u306f C:\\opencv-3.2\\mybuild\\install\\x86\\vc14\\bin \u3068\u3044\u3046 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_lightning_design_setting":[],"footnotes":""},"categories":[26],"tags":[],"class_list":["post-618","post","type-post","status-publish","format-standard","hentry","category-c-2"],"_links":{"self":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=618"}],"version-history":[{"count":6,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/618\/revisions"}],"predecessor-version":[{"id":657,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/618\/revisions\/657"}],"wp:attachment":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}