Code example for cornerHarris

asked 2015-02-10 05:02:48 -0500

aries gravatar image

updated 2015-02-10 08:14:18 -0500

I am new to opencv, I working on detecting the corners of colored squares from an image. I came across this function which seems to work for my problem "ocl::cornerHarris". Could someone please provide me a example of how to use this function?

edit retag flag offensive close merge delete

Comments

title does no more match question ?

berak gravatar imageberak ( 2015-02-10 05:44:05 -0500 )edit
1

Sorry I just edited it.

aries gravatar imagearies ( 2015-02-10 08:14:34 -0500 )edit
1

Hi,

Are you sure you want to use the OCL (OpenCL) version of cornerHarris ? If no, use the CPU version and you can look at this tutorial: http://docs.opencv.org/doc/tutorials/...

If yes, I have never used the OpenCL or CUDA functions in OpenCV but you can look at this tutorial: http://docs.opencv.org/doc/tutorials/...

The only thing that differs from the CPU version is the use of oclMat:

Mat img;
img = imread("path_to_the_image");
oclMat oclImg;
oclImg.upload(img);
Eduardo gravatar imageEduardo ( 2015-02-10 11:47:11 -0500 )edit