166 m_vals.resize( im.rows() * im.cols() );
167 m_pixs.resize( im.rows() * im.cols() );
170 for(
int cc = 0; cc < im.cols(); ++cc )
172 for(
int rr = 0; rr < im.rows(); ++rr )
174 m_vals[p] = im( rr, cc );
175 m_pixs[p] = { rr, cc };
190 for(
size_t n = 0; n < m_vals.size(); ++n )
192 if( ( m_vals[n] - mm ) / std >= m_threshold )
194 m_snr.push_back( n );
199 realT mms2 = m_minsep * m_minsep;
200 for(
long n = 0; n < m_snr.size(); ++n )
202 for(
long m = 0; m < m_snr.size(); ++m )
208 realT d2 = pow( m_pixs[m_snr[n]].first - m_pixs[m_snr[m]].first, 2 ) +
209 pow( m_pixs[m_snr[n]].second - m_pixs[m_snr[m]].second, 2 );
213 if( m_vals[m_snr[n]] < m_vals[m_snr[m]] )
215 m_snr.erase( m_snr.begin() + n );
221 m_snr.erase( m_snr.begin() + m );
231 std::vector<pixelT> found( m_snr.size() );
233 for(
size_t n = 0; n < m_snr.size(); ++n )
235 found[n] = m_pixs[m_snr[n]];