|
|
|
@ -298,12 +298,13 @@ static inline void sacSub8x1 (float* Hout, |
|
|
|
|
* @return A pointer to the context if successful; NULL if an error occured. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
RHO_HEST_REFC* rhoRefCInit(void){ |
|
|
|
|
RHO_HEST_REFC* p = new RHO_HEST_REFC; |
|
|
|
|
Ptr<RHO_HEST_REFC> rhoRefCInit(void){ |
|
|
|
|
Ptr<RHO_HEST_REFC> p = Ptr<RHO_HEST_REFC>(new RHO_HEST_REFC); |
|
|
|
|
|
|
|
|
|
if(p){ |
|
|
|
|
if(!p->initialize()){ |
|
|
|
|
delete p; |
|
|
|
|
p = NULL; |
|
|
|
|
p = Ptr<RHO_HEST_REFC>((RHO_HEST_REFC*)NULL); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return p; |
|
|
|
@ -314,7 +315,7 @@ RHO_HEST_REFC* rhoRefCInit(void){ |
|
|
|
|
* External access to non-randomness table resize. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
int rhoRefCEnsureCapacity(RHO_HEST_REFC* p, unsigned N, double beta){ |
|
|
|
|
int rhoRefCEnsureCapacity(Ptr<RHO_HEST_REFC> p, unsigned N, double beta){ |
|
|
|
|
return p->sacEnsureCapacity(N, beta); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -323,22 +324,11 @@ int rhoRefCEnsureCapacity(RHO_HEST_REFC* p, unsigned N, double beta){ |
|
|
|
|
* Seeds the internal PRNG with the given seed. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
void rhoRefCSeed(RHO_HEST_REFC* p, unsigned long long seed){ |
|
|
|
|
void rhoRefCSeed(Ptr<RHO_HEST_REFC> p, unsigned long long seed){ |
|
|
|
|
p->fastSeed((uint64_t)seed); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* External access to context destructor. |
|
|
|
|
* |
|
|
|
|
* @param [in] p The initialized estimator context to finalize. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
void rhoRefCFini(RHO_HEST_REFC* p){ |
|
|
|
|
delete p; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Estimates the homography using the given context, matches and parameters to |
|
|
|
|
* PROSAC. |
|
|
|
@ -368,7 +358,7 @@ void rhoRefCFini(RHO_HEST_REFC* p){ |
|
|
|
|
* inliers for acceptance was reached; 0 otherwise. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
unsigned rhoRefC(RHO_HEST_REFC* p, /* Homography estimation context. */ |
|
|
|
|
unsigned rhoRefC(Ptr<RHO_HEST_REFC> p, /* Homography estimation context. */ |
|
|
|
|
const float* src, /* Source points */ |
|
|
|
|
const float* dst, /* Destination points */ |
|
|
|
|
char* inl, /* Inlier mask */ |
|
|
|
|