I post more details of my problem
this is what I have in my kernel in .cl file
[codebox]__kernel void findPairs( __global const CvSeq* objectKeypoints, __global const CvSeq* objectDescriptors,
__global const CvSeq* imageKeypoints, __global const CvSeq* imageDescriptors, __global int* ptpairs )
{
int i; int j;
CvSeqReader reader, kreader;
cvStartReadSeq( objectKeypoints, &kreader, 0);
cvStartReadSeq( objectDescriptors, &reader, 0);
//ptpairs.clear();
ptpairs = 0; // ptpairs.clear()?
for( i = 0; i < objectDescriptors->total; i++ )
{
const CvSURFPoint* kp = (const CvSURFPoint*)kreader.ptr;
const float* descriptor = (const float*)reader.ptr;
CV_NEXT_SEQ_ELEM( kreader.seq->elem_size, kreader );
CV_NEXT_SEQ_ELEM( reader.seq->elem_size, reader );
int nearest_neighbor = naiveNearestNeighbor( descriptor, kp->laplacian, imageKeypoints, imageDescriptors );
if( nearest_neighbor >= 0 )
{
for( j = 0; i < 2*objectDescriptors->total; j++ )
{
//ptpairs.push_back(i);
ptpairs[j] = i; //ptpairs.push_back(i)?
//ptpairs.push_back(nearest_neighbor);
ptpairs[j+1] = nearest_neighbor; //ptpairs.push_back(nearest_neighbor);
j=j+1;
}
}
}
} [/codebox]
I got an error because it doesn’t recognise CvSeq structure in argument, the structure is defined in header file
so I include the file .h and add the path to clbuildprogram like this
[codebox]const char* cvinclude = “cv.h”;
const char* cvinclude_path = shrFindFilePath(cvinclude, argv[0]);
ciErrNum = clBuildProgram(cpProgram, 0, NULL, "-Icvinclude_path", NULL, NULL);[/codebox]
But I still get cv.h not found
please help, I hope I made my problem clear enough,