Ask Your Question

Jaheen's profile - activity

2015-10-21 15:20:00 -0600 commented question TLD causes nvcompiler.dll access violation

I managed to make the algorithm work by completely disabling the NVIDIA GeForce. I am still trying to find out the reason why it's not working even though I disable things at runtime. Thanks you very much for the help. I will post updates if I manage to make it work.

2015-10-21 08:26:54 -0600 commented question TLD causes nvcompiler.dll access violation

I appended the output of getBuildInformation() to my question

2015-10-21 08:25:55 -0600 received badge  Editor (source)
2015-10-21 05:05:38 -0600 commented question TLD causes nvcompiler.dll access violation

I did not use CUDA, I only followed those instructions. I kept the sources in a distinct folder though (opencv/sources instead of opencv), while building in opencv/build. I also did not build opencv_world. Should I?

2015-10-21 05:03:29 -0600 commented question TLD causes nvcompiler.dll access violation

Actually all other algorithms are working perfectly, this problem only arises with TLD.

2015-10-21 01:10:20 -0600 asked a question TLD causes nvcompiler.dll access violation

I am trying to run the TLD tracking algorithm with the following code, giving the following input: TLD path 1 I edited the code to use the computer cam (i.e: the input "path" is irrelevant).

The code gives the following message:

Unhandled exception at 0x00000001804B2084 (nvcompiler.dll) in TestOpenCV.exe: 0xC0000005: Access violation reading location 0x00000000FB191450.

The TLD algorithm is the only one to cause this to happen. This happens when the update function is called. Here is the code:

#include <opencv2/core/utility.hpp>
#include <opencv2/tracking.hpp>
#include <opencv2/tracking/tracker.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#include <cstring>

using namespace std;
using namespace cv;

static Mat image;
static Rect2d boundingBox;
static bool paused;
static bool selectObject = false;
static bool startSelection = false;

static const char* keys =
{ "{@tracker_algorithm | | Tracker algorithm }"
    "{@video_name      | | video name        }"
    "{@start_frame     |0| Start frame       }" 
    "{@bounding_frame  |0,0,0,0| Initial bounding frame}"};

static void onMouse( int event, int x, int y, int, void* )
{
  if( !selectObject )
  {
    switch ( event )
    {
      case EVENT_LBUTTONDOWN:
        //set origin of the bounding box
        startSelection = true;
        boundingBox.x = x;
        boundingBox.y = y;
        break;
      case EVENT_LBUTTONUP:
        //sei with and height of the bounding box
        boundingBox.width = std::abs( x - boundingBox.x );
        boundingBox.height = std::abs( y - boundingBox.y );
        paused = false;
        selectObject = true;
        break;
      case EVENT_MOUSEMOVE:

        if( startSelection && !selectObject )
        {
          //draw the bounding box
          Mat currentFrame;
          image.copyTo( currentFrame );
          rectangle( currentFrame, Point((int) boundingBox.x, (int)boundingBox.y ), Point( x, y ), Scalar( 255, 0, 0 ), 2, 1 );
          imshow( "Tracking API", currentFrame );
        }
        break;
    }
  }
}

static void help()
{
  cout << "\nThis example shows the functionality of \"Long-term optical tracking API\""
       "-- pause video [p] and draw a bounding box around the target to start the tracker\n"
       "Example of <video_name> is in opencv_extra/testdata/cv/tracking/\n"
       "Call:\n"
       "./tracker <tracker_algorithm> <video_name> <start_frame> [<bounding_frame>]\n"
       << endl;

  cout << "\n\nHot keys: \n"
       "\tq - quit the program\n"
       "\tp - pause video\n";
}

int main( int argc, char** argv ){
  CommandLineParser parser( argc, argv, keys );

  String tracker_algorithm = parser.get<String>( 0 );
  String video_name = parser.get<String>( 1 );
  int start_frame = parser.get<int>( 2 );

  if( tracker_algorithm.empty() || video_name.empty() )
  {
    help();
    return -1;
  }

  int coords[4]={0,0,0,0};
  bool initBoxWasGivenInCommandLine=false;
  if (initBoxWasGivenInCommandLine)
  {
      String initBoundingBox=parser.get<String>(3);
      for(size_t npos=0,pos=0,ctr=0;ctr<4;ctr++){
        npos=initBoundingBox.find_first_of(',',pos);
        if(npos==string::npos && ctr<3){
           printf("bounding box should be given in format \"x1,y1,x2,y2\",where x's and y's are integer cordinates of opposed corners of bdd box\n");
           printf("got: %s\n",initBoundingBox.substr(pos,string::npos).c_str());
           printf("manual selection of bounding box will be employed\n");
           break;
        }
        int num=atoi(initBoundingBox.substr(pos,(ctr==3)?(string::npos):(npos-pos)).c_str());
        if(num<=0){
           printf("bounding box should be given in format \"x1,y1,x2,y2\",where x's and y's are integer cordinates of opposed corners of bdd box\n");
           printf("got: %s\n",initBoundingBox.substr(pos,npos-pos).c_str());
           printf("manual selection of bounding box will be employed\n ...
(more)