void Descriptor::hFlip(bool duplicate) { Matrixf *pm = m_vHistPtr[0]; if( duplicate ){ pm = new Matrixf( *m_vHistPtr[0] ); pm->clone(); m_vHistPtr.push_back(pm); } for( size_t z = 0; z < size_z(); ++z){ for( size_t a = 0; a < size_a()/2; ++a){ pm->swaprows(a * size_z() + z, ( size_a() - a -1 )* size_z() + z); } } }
void Descriptor::rotate( size_t i) { // we will rotate and duplicate the i-th histogram. i generally is 0 ~ 2; Matrixf* pm = new Matrixf(*m_vHistPtr[i] ); pm->clone(); pm->rshrows( size_z() ); m_vHistPtr.push_back( pm ); //k = 1 for( size_t k = 2; k < size_a(); ++k ){ Matrixf* pm = new Matrixf( *m_vHistPtr.back() ); pm->clone(); pm->rshrows( size_z() ); m_vHistPtr.push_back( pm ); } }
bool logical_world::is_zedge(int z) const { if(z >= 0 && z < size_z()) { return false; } return true; }