{"id":2748,"date":"2022-08-30T15:27:27","date_gmt":"2022-08-30T15:27:27","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/cvfindcontours-exception-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:27","modified_gmt":"2022-08-30T15:27:27","slug":"cvfindcontours-exception-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/cvfindcontours-exception-collection-of-common-programming-errors\/","title":{"rendered":"cvFindContours () exception?-Collection of common programming errors"},"content":{"rendered":"<p>Why don&#8217;t you try something as follows:<\/p>\n<pre><code>Mat black = Mat::zeros(Size(100, 100), CV_8UC1);\n\nvector&lt; vector &gt; contours;\n\nif(sum(black).val[0] &gt; 0.0)\n{\n    findContours(black, contours, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);\n}\nelse\n{\n    cout<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-02-08 15:56:01. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Why don&#8217;t you try something as follows: Mat black = Mat::zeros(Size(100, 100), CV_8UC1); vector&lt; vector &gt; contours; if(sum(black).val[0] &gt; 0.0) { findContours(black, contours, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE); } else { cout Originally posted 2014-02-08 15:56:01.<\/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-2748","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2748","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=2748"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2748\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}