{"id":9572,"date":"2019-05-03T18:29:06","date_gmt":"2019-05-03T18:29:06","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=9572"},"modified":"2020-08-12T07:36:05","modified_gmt":"2020-08-12T07:36:05","slug":"qt-opencv","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=9572","title":{"rendered":"Qt OpenCV"},"content":{"rendered":"<p><!-- ------------------------------------------------------------------------------ --><\/p>\n<h1>YouTube<\/h1>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=fYBdwGpHQGw&#038;t=57s\">Tutorial Qt Creator &#8211; OpenCV<\/a><\/p>\n<p><!-- ------------------------------------------------------------------------------ --><\/p>\n<h1><code>Mat<\/code> to <code>QImage<\/code><\/h1>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/47090256\/qpixmap-fromimage-gives-segment-fault-on-image-converted-from-cvmat\">QPixmap fromImage gives segment fault on image converted from cv::mat<\/a><br \/>\n<a href=\"https:\/\/asmaloney.com\/2013\/11\/code\/converting-between-cvmat-and-qimage-or-qpixmap\/\">Converting Between cv::Mat and QImage or QPixmap<\/a><br \/>\n<a href=\"https:\/\/github.com\/asmaloney\/asmOpenCV\">github.com\/asmaloney\/asmOpenCV<\/a>, Simple methods to convert between OpenCV&#8217;s cv::Mat and Qt&#8217;s QImage and QPixmap<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nQImage image(cpy.data,\r\n             cpy.cols,\r\n             cpy.rows,\r\n             cpy.step,\r\n             QImage::Format_RGB888);\r\nimage = image.rgbSwapped();\r\n<\/pre>\n<p><!-- ------------------------------------------------------------------------------ --><\/p>\n<h1>Rest<\/h1>\n<h2>OpenCV Installation<\/h2>\n<h4>MingW<\/h4>\n<p><a href=\"https:\/\/wiki.qt.io\/How_to_setup_Qt_and_openCV_on_Windows\">How to setup Qt and openCV on Windows<\/a><br \/>\n<a href=\"https:\/\/github.com\/huihut\/OpenCV-MinGW-Build\">github.com\/huihut\/OpenCV-MinGW-Build<\/a>, MinGW 32bit and 64bit version of OpenCV compiled on Windows.<br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/49459395\/install-opencv-3-4-1-and-qt-5-10-with-cmake\">install opencv 3.4.1 and Qt 5.10 with CMAKE<\/a><\/p>\n<h2>CMake<\/h2>\n<p><a href=\"https:\/\/amin-ahmadi.com\/2018\/02\/23\/how-to-use-cmake-with-qt5-and-opencv-3-projects\/\">How to Use CMake with Qt5 and OpenCV 3 Projects<\/a><\/p>\n<h2>Off-Topic<\/h2>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/53906178\/how-opencv-4-x-api-is-different-from-previous-version\">How opencv 4.x API is different from previous version?<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/playlist?list=PLsdBEDj0ZlX-nOwojWIRiTVVCgVCxWFW6\">1- OpenCV 4, Deep Learning, Computer Vision<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=lj7AxKDoP9I\">3 &#8211; OpenCV 4 , Deep Learning for Computer Vision<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/28269406\/what-is-the-difference-of-shaders-with-extensions-shader-vsh-fsh\">What is the difference of shaders with extensions .Shader, .vsh, .fsh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>YouTube Tutorial Qt Creator &#8211; OpenCV Mat to QImage QPixmap fromImage gives segment fault on image converted from cv::mat Converting Between cv::Mat and QImage or QPixmap github.com\/asmaloney\/asmOpenCV, Simple methods to convert between OpenCV&#8217;s cv::Mat and Qt&#8217;s QImage and QPixmap QImage image(cpy.data, cpy.cols, cpy.rows, cpy.step, QImage::Format_RGB888); image = image.rgbSwapped(); Rest OpenCV Installation MingW How to setup [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9572","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9572"}],"version-history":[{"count":9,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9572\/revisions"}],"predecessor-version":[{"id":11281,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9572\/revisions\/11281"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}