# Revision history [back]

### OpenCV2.4.9 - OpenCL - oclMat

I am currently trying to make a program in c++ using OpenCV library. In order to accelerate my code I am trying to use OpenCV builtin ocl. In my code I'm trying to use oclMat and I need to take a specific cell's value. Ive tried addressing a specific cell like that:

oclMat ocl_image(image); //initializing the oclMat with image
ocl_image.row(i).col(j) //address the specific (i,j) cell in col_image


My problem now is that I couldn't find a way of convert the value I have (oclMat Header) to 'float'. What I did for now is

ocl_image.row(i).col(j).download(temp) //temp is of type cv::Mat


And the code takes too much time to run, Is there an other way of addressing a specific cell without the need to convert between cv::ocl::oclMat and cv::Mat types?

Thank you.

 2 retagged FooBar 2878 ●8 ●35 http://magazino.eu/

### OpenCV2.4.9 - OpenCL - oclMat

I am currently trying to make a program in c++ using OpenCV library. In order to accelerate my code I am trying to use OpenCV builtin ocl. In my code I'm trying to use oclMat and I need to take a specific cell's value. Ive tried addressing a specific cell like that:

oclMat ocl_image(image); //initializing the oclMat with image
ocl_image.row(i).col(j) //address the specific (i,j) cell in col_image


My problem now is that I couldn't find a way of convert the value I have (oclMat Header) to 'float'. What I did for now is

ocl_image.row(i).col(j).download(temp) //temp is of type cv::Mat


And the code takes too much time to run, Is there an other way of addressing a specific cell without the need to convert between cv::ocl::oclMat and cv::Mat types?

Thank you.