opencv


opencv has triggered a breakpoint Invalid address specified to RtlValidateHeap


I wrote some code in C++ and OpenCV 2.49 in Visual Studio 2013:
cv::Mat mask = Mat::zeros(tmp.size(), CV_8UC1);
modify mask that some elements are zeros and some elements are 255's
cv::vector<cv::vector<cv::Point> > contours;
cv::vector<cv::Vec4i> hierarchy;
cv:findContours(mask, contours, CV_RETR_CCOMP, CV_CHAIN_APPROX_NONE);
cv::imshow("Mask", mask);
When the method ends, following error appears:
Invalid address specified to RtlValidateHeap( 004D0000, 02EBD9D8 )
Project.exe has triggered a breakpoint.
I searched at stackoverflow and other platforms but can't find an answer!
I added the correct opencv path to the "path" environment variable: C:\opencv\build\x86\vc12\bin
and also to the project configurations:
C:\opencv\build\x86\vc12\lib
If I use merge/split from the opencv api it causes the same error, but in this case it is possible to allocate ther vector before going into the method. Then it works. In this case it's not possible to allocate the vector before, because i don't now the size.
I think the problem is that opencv allocates the memory and that's not in the correct heap, but i checked all dll's and paths. Do you have any other ideas?
Thanks in advance!
EDIT:
I replaced the opencv folder with a new downloaded opencv and it works, don't ask me why!
Is the cv::vector declaration valid? You should try std::vector instead of them.
Based on the given code, it is hard to decide what is causing the trouble. Could you provide more details?
Also note that this "function modifies the image while extracting the contours".
You should also check the properties below:
Right click on the Project
Properties - Configurational Properties - General: set Plattform Toolset to Visual Studio 2013 (v120)
Configurational Properties - C/C++ - Code Generation - set Runtime Library:
Multi-threaded Debug DLL (/MDd) for debug builds or Multi-threaded
DLL (/MD) for release build

Related Links

Find longevity of contours in opencv
When using SVD how do I unsort the scale factors along Sigma's diagonal?
Javacv Face Recognition
Unabe to create samples using opencv_createsamples.exe
Face recognition Using EigenObjectRecognizer
Facing an error in program of image capturing and processing using opencv(cv2) and python
OpenCV 2.4.6 crash at program runtime
opencv 2.4.5 unable to load tif image file properly in windows
What is the best method to template match a image with noise?
how to track object in scene from far to near in opencv
detect and follow a face by opencv
Can OpenCV .vec files be used by scikit-learn?
Detect objects similar to circles
what are the values in haarcascade frontalface .xml
Web RTC and open CV
OpenCV compare similar hand drawn images

Categories

HOME
regex
printing
music
office-js
orbeon
afp
styling
twitter-digits
streaming
robot
httpbuilder-ng
build.gradle
plotly
wav
librsvg
openframeworks
proftpd
rebus
plots.jl
partitioning
afnetworking-2
round-robin
formio
freetype
ghost-blog
italic
padding
icloud-drive
dapper-fastcrud
charts.js
evercookie
react-redux-form
reed-solomon
ose
spring-websocket
gosublime
lifecycle
codeskulptor
pdfstamper
sieve-of-eratosthenes
executorservice
ubuntu-server
bits
apartment-gem
cookiestore
ibm-wcm
google-slides
sweet.js
uifont
catalina
mapr
configuration-profile
ispconfig
sound-synthesis
ultratree
kernighan-and-ritchie
pager
dms
pypyodbc
jongo
accounts
viewengine
facebook-comments
schematiq
google-api-ruby-client
multiple-files
java-gstreamer
thinktecture-ident-server
keypad
llvm-gcc
sigkill
excel-charts
liferay-hook
laravel-validation
iqueryable
django-supervisor
magic-unipaas
antisamy
scala-pickling
jflow
mosek
java-ee-5
mixing
rgba
httpconnection
stumbleupon
ssao
blackberry-jde
blackberry-os-v5
sharepoint-timer-job
myisam
custom-protocol
sloc
sqlitemanager
stsadm

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App