{"id":329,"date":"2022-08-30T14:59:32","date_gmt":"2022-08-30T14:59:32","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/06\/opencv2-4-2-unhandled-exception-on-videocapture-collection-of-common-programming-errors\/"},"modified":"2022-08-30T14:59:32","modified_gmt":"2022-08-30T14:59:32","slug":"opencv2-4-2-unhandled-exception-on-videocapture-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/opencv2-4-2-unhandled-exception-on-videocapture-collection-of-common-programming-errors\/","title":{"rendered":"OpenCV2.4.2 unhandled exception on VideoCapture-Collection of common programming errors"},"content":{"rendered":"<p>I just installed OpenCV2.4.2 and created an OpenCV project using CMake. I don&#8217;t get any compilation errors. I have several functions for processing images and I have 2 applications:<\/p>\n<p>1- Processes data from a video<\/p>\n<p>2- Processes simulated data.<\/p>\n<p>Both applications are identical except from the data extraction from the video.<\/p>\n<p><strong>PROBLEM<\/strong>: The application processing video crashes with<\/p>\n<blockquote>\n<p>Unhandled exception at 0x75d8a048 in program.exe Access violation reading location 0x049f08c0.<\/p>\n<\/blockquote>\n<p>It crashes in this part of the code, when reading frames:<\/p>\n<pre><code>cv::VideoCapture _video;\nwhile(1) \n{       \n        \/\/ grab the frame\n        _video &gt;&gt; frame;  = 2) in unknown function, file ..\\..\\..\\\nsrc\\opencv\\modules\\core\\src\\matrix.cpp, line 268\nOpenCV Error: Assertion failed (0<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-06 03:08:16. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I just installed OpenCV2.4.2 and created an OpenCV project using CMake. I don&#8217;t get any compilation errors. I have several functions for processing images and I have 2 applications: 1- Processes data from a video 2- Processes simulated data. Both applications are identical except from the data extraction from the video. PROBLEM: The application processing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-329","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}