Tuesday, 15 March 2011

c++ - Access violation occurs using tbb::allocator.allocate -


I'm trying to use Tibibi to boost the performance of a computer vision project which uses Opansivi is. Here's the part of the code that provides entry violation.

  #include & lt; Opencv / cv.h & gt; #include "opencv2 / objdetect / objdetect.hpp" #include "opencv2 / highgui / highgui.hpp" #include "opencv2 / imgproc / imgproc.hpp" # include "tbb / pipeline.h" #include "tbb / tick_count.h "#include" Tbb / Task_scheduler_initkh "#include" Tbb / Tbb_allokatorkh "#include & lt; Iostream & gt; Using namespace cv; using namespace std; Int main () {string file = "myimage.jpg"; Mat * mats2 = tbb :: tbb_allocator & lt; Mat & gt; (). Allocation (100); For (Int i = 0; i & lt; 100; ++ i) {Mats 2 [i] = reader (file); & Lt; ===== Imshow access violation ("temp", mats3 [i]); WaitKey (1); }}   

Why is this an admission violation? Mats2 is not 0 and is definitely assigned to an address in the memory. I know the other functions that use it, but I do Tibibi_oloketr that would like to know which leads to this error if used with malloc or scalable_malloc the code does not error < / div>

sounds like

, it provides C-C ++ issue new and deleted but still violate access scalable allocation is. Now sound like the only option for OpenCV users

No comments:

Post a Comment