Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Pointer to image producing different results

$
0
0
I'm doing the following: image = image.clone(); // ensure continuous memory double *im = (double *) calloc(image.total() *image.elemSize(), sizeof (double)); im = (double *)image.data; What I thought this was doing was giving me a pointer to the image data, however when i print out the memory in a debugger I get different values after I add the same offset to both (i.e. x/100 image.data+100 != x/100 im+100). Is my pointing not doing what I think it is and if so why? The reason I'm doing this is because I'm trying to port some mex stuff, and the whole function relies on a pointer to an rgb image and address offsetting.

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>