Ask Your Question
0

Surface_Matching Error Stack around the variable"hashKey"

asked 2017-01-21 09:40:24 -0500

quark gravatar image

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

edit retag flag offensive close merge delete

Comments

Which opencv version do you use? What is exactly error message ?

LBerger gravatar imageLBerger ( 2017-01-21 11:10:30 -0500 )edit

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

quark gravatar imagequark ( 2017-01-21 11:15:23 -0500 )edit

"When I am compiling surface_matching" No when you run surface_matching. Which program do you run?

LBerger gravatar imageLBerger ( 2017-01-21 11:19:42 -0500 )edit

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 )

quark gravatar imagequark ( 2017-01-21 11:24:42 -0500 )edit

Which program did you execute?

LBerger gravatar imageLBerger ( 2017-01-21 11:51:56 -0500 )edit

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

quark gravatar imagequark ( 2017-01-21 12:21:21 -0500 )edit

Any advice ??

quark gravatar imagequark ( 2017-01-21 16:37:35 -0500 )edit

You don't really help me with your answer. I have to guess which example you tried to execute. I suppose it is ppf_load_match.exe but may be I'm wrong

LBerger gravatar imageLBerger ( 2017-01-22 02:30:33 -0500 )edit

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

quark gravatar imagequark ( 2017-01-22 04:06:04 -0500 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2017-01-22 02:42:33 -0500

LBerger gravatar image

updated 2017-01-22 07:14:39 -0500

First I know nothing about surface matching I try to reproduce your problem.

I run sample ppf_load_match with arguments parasaurolophus_6700.ply parasaurolophus_low_normals2.ply Of course you have to give good path before filename.

Then I found this issue As suggested I replaced this line 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

and it solves problem in my configuration : VS 2015 64 bits windows 10 opencv-3.2-dev. A Pull Request is in progress


  • Surface Matching demonstration : demonstrates the use of surface matching using point pair features.
  • The sample loads a model and a scene, where the model lies in a different pose than the training.
  • It then trains the model and searches for it in the input scene. The detected poses are further refined by ICP
  • and printed to the standard output. **************** Running on 64 bits Running without OpenMP and without TBB Training...

Training complete in 22.2127 sec Loading model...

Starting matching...

PPF Elapsed Time 1.06171 sec Number of matching poses: 19 Performing ICP on 2 poses...

ICP Elapsed Time 2.06349 sec Poses: Pose Result 0

-- Pose to Model Index 67: NumVotes = 954, Residual = 0.002821 1.000000 0.000050 -0.000090 -0.057548 -0.000050 1.000000 0.000039 0.027540 0.000090 -0.000039 1.000000 -0.007792 0.000000 0.000000 0.000000 1.000000

Pose Result 1

-- Pose to Model Index 225: NumVotes = 682, Residual = 0.002828 1.000000 0.000049 -0.000090 -0.057533 -0.000049 1.000000 0.000039 0.027463 0.000090 -0.000039 1.000000 -0.007803 0.000000 0.000000 0.000000 1.000000

Appuyez sur une touche pour continuer...

and with VS 2013 x64


  • Surface Matching demonstration : demonstrates the use of surface matching using point pair features.
  • The sample loads a model and a scene, where the model lies in a different pose than the training.
  • It then trains the model and searches for it in the input scene. The detected poses are further refined by ICP
  • and printed to the standard output.

Running on 64 bits Running without OpenMP and without TBB Training...

Training complete in 24.2451 sec Loading model...

Starting matching...

PPF Elapsed Time 1.01252 sec Number of matching poses: 19 Performing ICP on 2 poses...

ICP Elapsed Time 1.1942 sec Poses: Pose Result 0

-- Pose to Model Index 67: NumVotes = 954, Residual = 0.002821 1.000000 0.000050 -0.000090 -0.057547 -0.000050 1.000000 0.000039 0.027540 0.000090 -0.000039 1.000000 -0.007792 0.000000 0.000000 0.000000 1.000000

Pose Result 1

-- Pose to Model Index 225: NumVotes = 682, Residual = 0.002828 1.000000 0.000049 -0.000090 -0.057533 -0.000049 1.000000 0.000039 0.027463 0.000090 -0.000039 1.000000 -0.007803 0.000000 0.000000 0.000000 1.000000

Appuyez sur une touche pour continuer...

edit flag offensive delete link more

Comments

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

quark gravatar imagequark ( 2017-01-22 04:03:49 -0500 )edit

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

quark gravatar imagequark ( 2017-01-22 05:45:58 -0500 )edit

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 :(

quark gravatar imagequark ( 2017-01-22 05:54:03 -0500 )edit

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

quark gravatar imagequark ( 2017-01-22 08:23:38 -0500 )edit

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

quark gravatar imagequark ( 2017-01-22 09:11:27 -0500 )edit

Did you solve that problem?

Joy Mazumder gravatar imageJoy Mazumder ( 2018-10-19 19:24:05 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-01-21 09:40:24 -0500

Seen: 349 times

Last updated: Jan 22 '17