Harris corner detector and openCL

Moderator: dar

Harris corner detector and openCL

Postby Nader_Jendoubi » Wed Apr 08, 2015 9:09 pm

Hi

I'm very new in using openCL for Parallella
I expoited the sobel filter project available at the link https://github.com/sclukey/parallella-o ... 148f196f1b

and i write a kernel to realise a harris corner detector application : https://www.dropbox.com/s/64jjr76v2ulxd ... l.txt?dl=0

and i write the host code : https://www.dropbox.com/s/dv6nowou201v06p/host.txt?dl=0

in the kernel code i traduct the harris algorithm and i return the coordinates of a number of pixels used with the function cvcircle to draw circles around the harris points


when i compile the kernel with clcc, get this message : clmesg error: clcc.c(668) : clccl returned non-zero exit status
but i didn't get the .o file
i still don't know what is my fault.

Please i need some help with this code. Can anyone suggest to me any solutions??

Thanks
Nader_Jendoubi
 
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: Harris corner detector and openCL

Postby nickoppen » Thu Apr 09, 2015 10:41 am

Please post the whole of the clcc call and the compiler output please. There could be lot's of things wrong.
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: Harris corner detector and openCL

Postby Nader_Jendoubi » Thu Apr 09, 2015 2:09 pm

there was a lot of problems in the syntax of the code and i correct them all
i remember that some message with the kind of : e32-elf : no such file e32-objcopy : no such file but when i correct the syntax problems it disappears

when i compile, only that message shows and no file was generated.
Nader_Jendoubi
 
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: Harris corner detector and openCL

Postby Nader_Jendoubi » Thu Apr 09, 2015 4:25 pm

the clcc command is:

clcc -o device/bin/kernel.o -c device/src/kernel.c


Thanks for your help
Nader_Jendoubi
 
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: Harris corner detector and openCL

Postby nickoppen » Fri Apr 10, 2015 12:33 am

The coprthr_primer-1.6.0.pdf shows the syntax of clcc as:

clcc [options] file1.cl file2.cl ... [-o output.o]

Try putting the kernel files first and the output second.

Otherwise, see if the JIT compiler works.
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: Harris corner detector and openCL

Postby Nader_Jendoubi » Fri Apr 10, 2015 6:07 pm

I change the compile command but the same problem persists : Nothing generated
How can i know what kind of problem i made when nothing shows except the same problem??
Nader_Jendoubi
 
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: Harris corner detector and openCL

Postby Nader_Jendoubi » Fri Apr 10, 2015 6:09 pm

Can you please try to compile the code in your device and tell me what results do you get and what problems do you expect??
Nader_Jendoubi
 
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: Harris corner detector and openCL

Postby nickoppen » Sat Apr 11, 2015 12:05 am

Please provide working code. I get 16 syntax errors compiling the kernel downloaded from your dropbox.
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: Harris corner detector and openCL

Postby Nader_Jendoubi » Tue Apr 14, 2015 1:19 pm

Sorry for that friend


Here is the version of code without any syntax errors but the same problem is present, providing no bin file

https://www.dropbox.com/s/lgd50j3olq07t ... nel.c?dl=0

I can't figure out where the problem is, so please try to compile it and tell me your opinion


Thanks

Nader
Nader_Jendoubi
 
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: Harris corner detector and openCL

Postby nickoppen » Thu Apr 16, 2015 12:04 pm

Don't ask me why but the following verbatim translation of your gauss function works:

Code: Select all
char gauss(char * x, char * y, int ii, int line)
{
     int g;
     g = (int)(0.0625 * ((float)(x[ii-line-1] + (2*x[ii-1]) +   x[ii+line-1] + (2*x[ii-line]) + (4*x[ii]) + (2*x[ii+line]) + x[ii-line+1] + (2*x[ii+1]) + x[ii+line+1])));

     y[ii] = (g > 255) ? 255 : g;
     return y[ii];
}


I also put it up the top of the file but I don't think that made any difference.

After compilation I get a libelf.so file not found error. I'm working on that trying to install version 1.6.1 but this will get you an object file that can be lined to your executable.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Next

Return to OpenCL

Who is online

Users browsing this forum: No registered users and 2 guests