Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

HoughHash.cc

Go to the documentation of this file.
00001 #include "HoughHash.h"
00002 #include <cstdlib>
00003 
00004 bool HoughKeyEquals(HoughKey* k1, HoughKey* k2){
00005   return (k1->M           == k2->M
00006        && k1->x           == k2->x
00007        && k1->y           == k2->y
00008        && k1->scale       == k2->scale
00009        && k1->orientation == k2->orientation);
00010 }
00011 
00012 size_t hashHoughKey(HoughKey *k){
00013   size_t retval = std::abs((long)((((long)(k->x * k->y) % 1073741824) * ((long)(k->scale * k->orientation * 1024) % 1073741824)) % 1073741824 * 4096));
00014   //if (retval < 0) retval = 1;
00015 //  cout << k->x << " " << k->y << " " << k->scale << " " << k->orientation << " " << retval << endl;
00016   return retval;
00017 }

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:41 2016 by Doxygen 1.6.3