Ask Your Question

quark's profile - activity

2017-01-22 10:02:50 -0500 commented question Stack Around The Variable 'hashKey' was corrupted

yes you give an answer but your answer did not solve my problems In addition I cant understand where is the problem I did your advise but ı cant a good result

2017-01-22 09:51:19 -0500 asked a question Stack Around The Variable 'hashKey' was corrupted

Hello ; I want to work this code:

#include "opencv2/surface_matching.hpp"
#include <iostream>
#include "opencv2/surface_matching/ppf_helpers.hpp"
#include "opencv2/core/utility.hpp"

using namespace std;
using namespace cv;
using namespace ppf_match_3d;

static void help(const string& errorMessage)
{
    cout << "Program init error : "<< errorMessage << endl;
    cout << "\nUsage : ppf_matching [input model file] [input scene file]"<< endl;
    cout << "\nPlease start again with new parameters"<< endl;
}

int main(int argc, char** argv)
{
    // welcome message
    cout << "****************************************************" << endl;
    cout << "* Surface Matching demonstration : demonstrates the use of surface matching"
             " using point pair features." << endl;
    cout << "* The sample loads a model and a scene, where the model lies in a different"
             " pose than the training.\n* It then trains the model and searches for it in the"
             " input scene. The detected poses are further refined by ICP\n* and printed to the "
             " standard output." << endl;
    cout << "****************************************************" << endl;

  /*  if (argc < 3)
    {
        help("Not enough input arguments");
        exit(1);
    }*/

#if (defined __x86_64__ || defined _M_X64)
    cout << "Running on 64 bits" << endl;
#else
    cout << "Running on 32 bits" << endl;
#endif

#ifdef _OPENMP
    cout << "Running with OpenMP" << endl;
#else
    cout << "Running without OpenMP and without TBB" << endl;
#endif

    string modelFileName = "C://Users//Documents//Visual Studio 2013//Projects//opencv//x64//Debug//parasaurolophus_low_normals2.ply";

string sceneFileName = "C://Users//Documents//Visual Studio 2013//Projects//opencv//x64//Debug//parasaurolophus_6700.ply";

    Mat pc = loadPLYSimple(modelFileName.c_str(), 1);

    // Now train the model
    cout << "Training..." << endl;
    int64 tick1 = cv::getTickCount();
    ppf_match_3d::PPF3DDetector detector(0.025, 0.05);
    detector.trainModel(pc);
    int64 tick2 = cv::getTickCount();
    cout << endl << "Training complete in "
         << (double)(tick2-tick1)/ cv::getTickFrequency()
         << " sec" << endl << "Loading model..." << endl;

    // Read the scene
    Mat pcTest = loadPLYSimple(sceneFileName.c_str(), 1);

    // Match the model to the scene and get the pose
    cout << endl << "Starting matching..." << endl;
    vector<Pose3DPtr> results;
    tick1 = cv::getTickCount();
    detector.match(pcTest, results, 1.0/40.0, 0.05);
    tick2 = cv::getTickCount();
    cout << endl << "PPF Elapsed Time " <<
         (tick2-tick1)/cv::getTickFrequency() << " sec" << endl;

    // Get only first N results
    int N = 2;
    vector<Pose3DPtr> resultsSub(results.begin(),results.begin()+N);

    // Create an instance of ICP
    ICP icp(100, 0.005f, 2.5f, 8);
    int64 t1 = cv::getTickCount();

    // Register for all selected poses
    cout << endl << "Performing ICP on " << N << " poses..." << endl;
    icp.registerModelToScene(pc, pcTest, resultsSub);
    int64 t2 = cv::getTickCount();

    cout << endl << "ICP Elapsed Time " <<
         (t2-t1)/cv::getTickFrequency() << " sec" << endl;

    cout << "Poses: " << endl;
    // debug first five poses
    for (size_t i=0; i<resultsSub.size(); i++)
    {
        Pose3DPtr result = resultsSub[i];
        cout << "Pose Result " << i << endl;
        result->printPose();
        if (i==0)
        {
            Mat pct = transformPCPose(pc, result->pose);
            writePLY(pct, "para6700PCTrans.ply");
        }
    }

    return 0;

}

But I have hasKey error So I opened t_hash_int.hpp file and replaced typedef unsigned int KeyType; with

#if (defined x86_64 || defined _M_X64)
#if _MSC_VER <= 1800
    typedef __int64 int64_t;
    typedef unsigned __int64 uint64_t;
#endif
    typedef uint64_t KeyType;

#else
    typedef unsigned int KeyType;
#endif

But my problem is not solve (I use vs c++ 2013 64 bit)

2017-01-22 09:11:27 -0500 commented answer Surface_Matching Error Stack around the variable"hashKey"

I try I run sample ppf_load_match with arguments parasaurolophus_6700.ply parasaurolophus_low_normals2.ply but not workng "not enough input parameters" ??

2017-01-22 08:23:38 -0500 commented answer Surface_Matching Error Stack around the variable"hashKey"

I cant solve my problems I tried all ways Why ı have this error Any advise ??

2017-01-22 05:54:03 -0500 commented answer Surface_Matching Error Stack around the variable"hashKey"

I tried this

#if (defined x86_64 || defined _M_X64)
#if _MSC_VER <= 1800
    typedef __int64 int64_t;
    typedef unsigned __int64 uint64_t;
#endif
    typedef uint64_t KeyType;

#else
    typedef unsigned int KeyType;
#endif

but result did not change I have haskey error :(

2017-01-22 05:45:58 -0500 commented answer Surface_Matching Error Stack around the variable"hashKey"

I replaced typedef unsigned int KeyType; with your code

 #if (defined x86_64 || defined _M_X64)
#if _MSC_VER <= 1800
    typedef __int64 int64_t;
    typedef unsigned __int64 uint64_t;
#endif
    typedef uint64_t KeyType;

#else
    typedef unsigned int KeyType;
#endif

But again I have same error @LBenger

2017-01-22 04:06:04 -0500 commented question Surface_Matching Error Stack around the variable"hashKey"

I want to run this programm http://docs.opencv.org/3.0-beta/modul... and I opened t_hash_int.hpp .I found typedef unsigned int KeyType; I replace

  #if(defined _M_X64|| defined _M_IX86)
   #incldue <stdint.h>
typedef unint64_t KeyType;
#else 
typedef unsigned int KeyType;
#endif

But Ihave hashkey error again

2017-01-22 04:03:49 -0500 commented answer Surface_Matching Error Stack around the variable"hashKey"

I want to run this programm http://docs.opencv.org/3.0-beta/modules/surface_matching/doc/surface_matching.html (http://docs.opencv.org/3.0-beta/modul...) and I opened t_hash_int.hpp .I found typedef unsigned int KeyType; I replace

#if(defined _M_X64|| defined _M_IX86)
   #incldue <stdint.h>
typedef unint64_t KeyType;
#else 
typedef unsigned int KeyType;
#endif

But I have haskey error again @LBenger

2017-01-21 16:37:35 -0500 commented question Surface_Matching Error Stack around the variable"hashKey"

Any advice ??

2017-01-21 12:21:21 -0500 commented question Surface_Matching Error Stack around the variable"hashKey"

I sorry I cant understand (c++ ,console application, configaration manager -> x64 no win32)

2017-01-21 11:24:42 -0500 commented question Surface_Matching Error Stack around the variable"hashKey"

I m sorry I write false I use visual studio 2013 and opencv-3.2.0-vc14 and (for working code I click local windows Debugger )

2017-01-21 11:15:23 -0500 commented question Surface_Matching Error Stack around the variable"hashKey"

opencv-3.2.0-vc14 and error message is : Run-Time Check Failure#2 - Stack around the variable 'hashKey' was corrupted

2017-01-21 09:51:39 -0500 asked a question Surface_Matching Error Stack around the variable"hashKey"

Hello I am using visual studio 2013 and my computer 64 bit When I am compiling surface_matching I get this error "stac around the variable "hashKey" So I opened t_hash_int. hpp file and I replaced this

    #if(defined _M_X64|| defined _M_IX86)
   #incldue <stdint.h>
typedef unint64_t KeyType;
#else 
typedef unsigned int KeyType;
#endif

But result is not change I have this error

2016-04-27 09:06:55 -0500 asked a question Coordinate's gradient value

Hi I used sobel derivative for get derivative in my images I found min max value But I want to this For example my coordinates (162,0) and ı find this coordinates gradient value it could be -100,-250 or 120 but not nin or max value How can I find ?