Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Converting CV::Mat to double *

Hi,

I am using C++ openCV-3.2.0 version.

I am also using a library for line segment detection,which takes only .pgm image of data type double *. I used

cv::Mat pgm_image;

pgm_image = cv::imread("image.pgm");

double *I = pgm_image.ptr<double>(0);

to read the image and to for getting pointer. And i tried parsing double * into the library that i am using. Is there any way around this? or Is there a way read .pgm file directly as double* ?