{"blog_url":"https://gya-ia.hatenablog.com/","categories":["C++","OpenCV"],"url":"https://gya-ia.hatenablog.com/entry/20180716/1531751956","title":"OpenCV USB\u30ab\u30e1\u30e9\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u52d5\u753b\u3092\u4f5c\u6210\u3059\u308b(C++)","description":"C++\u3067USB\u30ab\u30e9\u30e1\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066AVI\u3092\u4f5c\u6210\u3059\u308b\u3002 OpenCV 3.4.1 #include <opencv2/opencv.hpp> int main() { using std::cout; using std::endl; int camera_id = 0; double fps = 30.0; double width = 640.0; double height = 480.0; // DirectShow\u3067\u30ad\u30e3\u30d7\u30c1\u30e3 cv::VideoCapture cap(cv::CAP_DSHOW + camera_id); if (!cap.isOpened()) { cout <<\u2026","width":"100%","type":"rich","blog_title":"\u5099\u5fd8\u9332\u3063\u3066\u5927\u4e8b\u3060\u306d(\u00b4\u30fb\u03c9\u30fb\uff40)","published":"2018-07-16 23:39:16","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgya-ia.hatenablog.com%2Fentry%2F20180716%2F1531751956\" title=\"OpenCV USB\u30ab\u30e1\u30e9\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u52d5\u753b\u3092\u4f5c\u6210\u3059\u308b(C++) - \u5099\u5fd8\u9332\u3063\u3066\u5927\u4e8b\u3060\u306d(\u00b4\u30fb\u03c9\u30fb\uff40)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","version":"1.0","author_url":"https://blog.hatena.ne.jp/gya-ia/","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","image_url":null,"author_name":"gya-ia"}