AKAZE Giving Error

asked 2015-05-13 06:49:37 -0500

Anubhav gravatar image

updated 2015-05-13 12:41:16 -0500

AKAZE is giving errors. Please help.

This is the code that I used ->

#include <opencv2\opencv.hpp>
#include <opencv2\features2d.hpp>
#include <iostream>
#include <opencv2\opencv_modules.hpp>

const float inlier_threshold = 2.5f; // Distance threshold to identify inliers
const float nn_match_ratio = 0.8f;   // Nearest neighbor matching ratio

int main(void)
    cv::Mat img1 = cv::imread("g:/Me.png", cv::IMREAD_GRAYSCALE);
    cv::Mat img2 = cv::imread("g:/Me1.png", cv::IMREAD_GRAYSCALE);


    std::vector<cv::KeyPoint> kpts1,kpts2;
        cv::Mat desc1, desc2;

    cv::Ptr<cv::AKAZE> akaze = cv::AKAZE::create();

    akaze->detectAndCompute(img1, cv::noArray(), kpts1, desc1);
        akaze->detectAndCompute(img2, cv::noArray(), kpts2, desc2);



    return 0;

image description

I am using OPENCV 3.0 Beta x64.

The error is related to some freeing memory.

Windows has triggered a breakpoint in Test64Opencv.exe.

This may be due to a corruption of the heap, which indicates a bug in Test64Opencv.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while Test64Opencv.exe has focus.

The output window may have more diagnostic information.

edit retag flag offensive close merge delete


Post the error message, no screenshots please..

boaz001 gravatar imageboaz001 ( 2015-05-13 07:54:23 -0500 )edit

Updated the Question with the error message.

Anubhav gravatar imageAnubhav ( 2015-05-13 12:43:39 -0500 )edit

Ptr' destructor already calls release() so you can remove akaze.release();.

boaz001 gravatar imageboaz001 ( 2015-05-18 05:03:55 -0500 )edit