Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenCV cvCanny memory exception
    primarykey
    data
    text
    <p>I am trying to do the examples in the OpenCV book and I got to the part regarding cvCanny. I am trying to use it, but I keep getting a memory exception error of </p> <p><code>Unhandled exception at 0x75d8b760 in Image_Transform.exe: Microsoft C++ exception: cv::Exception at memory location 0x0011e7a4..</code></p> <p>I have also looked at another post that was similar to this question, but it did not help for me as I got the same error each time. Any help is greatly appreciated and the source code for the function is located below.</p> <pre><code>void example2_4(IplImage* img) { // Create windows to show input and ouput images cvNamedWindow("Example 2-4 IN", CV_WINDOW_AUTOSIZE); cvNamedWindow("Example 2-4 OUT", CV_WINDOW_AUTOSIZE); // Display out input image cvShowImage("Example 2-4 IN", img); // Create an image to hold our modified input image IplImage* out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3); // Do some smoothing //cvSmooth(img, out, CV_GAUSSIAN, 3, 3); // Do some Edge detection cvCanny(img, out, 10, 20, 3); // Show the results cvShowImage("Example 2-4 OUT", out); // Release the memory used by the transformed image cvReleaseImage(&amp;out); // Wait for user to hit a key then clean up the windows cvWaitKey(0); cvDestroyWindow("Example 2-4 IN"); cvDestroyWindow("Example 2-4 OUT"); } int main() { // Load in an image IplImage* img = cvLoadImage("images/00000038.jpg"); // Run the transform example2_4(img); // clean the image from memory cvReleaseImage(&amp;img); return 0; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload