removed trailing backspaces, reduced number of warnings (under MSVC2010 x64) for size_t to int conversion, added handling of samples launch without parameters (should not have abnormal termination if there was no paramaters supplied)

This commit is contained in:
Vladimir Dudnik
2011-06-17 06:31:54 +00:00
parent 092beae2d5
commit 6e38b6aaed
12 changed files with 289 additions and 267 deletions

View File

@@ -1965,7 +1965,7 @@ public:
virtual bool empty() const;
protected:
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
virtual void computeImpl( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const;
RTreeClassifier classifier_;
static const int BORDER_SIZE = 16;

View File

@@ -376,13 +376,13 @@ void OpponentColorDescriptorExtractor::computeImpl( const Mat& bgrImage, vector<
channelKeypoints[ci].insert( channelKeypoints[ci].begin(), keypoints.begin(), keypoints.end() );
// Use class_id member to get indices into initial keypoints vector
for( size_t ki = 0; ki < channelKeypoints[ci].size(); ki++ )
channelKeypoints[ci][ki].class_id = ki;
channelKeypoints[ci][ki].class_id = (int)ki;
descriptorExtractor->compute( opponentChannels[ci], channelKeypoints[ci], channelDescriptors[ci] );
idxs[ci].resize( channelKeypoints[ci].size() );
for( size_t ki = 0; ki < channelKeypoints[ci].size(); ki++ )
{
idxs[ci][ki] = ki;
idxs[ci][ki] = (int)ki;
}
std::sort( idxs[ci].begin(), idxs[ci].end(), KP_LessThan(channelKeypoints[ci]) );
}

View File

@@ -127,7 +127,7 @@ HarrisResponse::HarrisResponse(const cv::Mat& image, double k) :
dX_offsets_.resize(7 * 9);
dY_offsets_.resize(7 * 9);
std::vector<int>::iterator dX_offsets = dX_offsets_.begin(), dY_offsets = dY_offsets_.begin();
unsigned int image_step = image.step1();
unsigned int image_step = (unsigned int)image.step1();
for (size_t y = 0; y <= 6 * image_step; y += image_step)
{
int dX_offset = y + 2, dY_offset = y + 2 * image_step;