Search code examples
opencvdoubleexecutionpointers

opencv: execution halting at double pointer arithmetic for image pixel access


A single channel image is my input. ( defalut IPL_DEPTH_8U)

I am multiplying each pixel of my input image with scalar floating point numbers like 2.8085 (as a part of my algorithm).

So this needs me to increase the depth and change the image type to IPL_DEPTH_64F

But whenever I am trying to change my image datatype to IPL_DEPTH_64F and have a double* to access each pixel, my program execution stops abruptly, cribbing that "file.exe has stopped working. A problem caused the program to stop working."

Does it mean, my processor is not able to handle the double ptr arithmetic ???


Solution

  • You have to create a new image - I'd recommend making a new image of depth IPL_DEPTH_64F and setting each pixel to the appropriate value (2.8085*value).

    Also, can you post the code you used?