mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
minor changes: removed trailing spaces in some files
This commit is contained in:
parent
dd45fe13d1
commit
8e7768379f
@ -184,7 +184,7 @@ icvCalcLayerDetAndTrace( const CvMat* sum, int size, int sampleStep, CvMat *det,
|
||||
/* Ignore pixels where some of the kernel is outside the image */
|
||||
margin = (size/2)/sampleStep;
|
||||
|
||||
for( i=0; i<samples_i; i++ )
|
||||
for( i = 0; i < samples_i; i++ )
|
||||
{
|
||||
sum_ptr = sum->data.i + (i*sampleStep)*sum->cols;
|
||||
det_ptr = det->data.fl + (i+margin)*det->cols + margin;
|
||||
@ -514,8 +514,8 @@ namespace cv
|
||||
{
|
||||
|
||||
/* Methods to free data allocated in SURFInvoker constructor */
|
||||
template<> inline void Ptr<float>::delete_obj(){ cvFree(&obj); }
|
||||
template<> inline void Ptr<CvPoint>::delete_obj(){ cvFree(&obj); }
|
||||
template<> inline void Ptr<float>::delete_obj() { cvFree(&obj); }
|
||||
template<> inline void Ptr<CvPoint>::delete_obj() { cvFree(&obj); }
|
||||
|
||||
struct SURFInvoker
|
||||
{
|
||||
@ -567,6 +567,7 @@ struct SURFInvoker
|
||||
DW[i*PATCH_SZ+j] = G_desc.at<float>(i,0) * G_desc.at<float>(j,0);
|
||||
}
|
||||
}
|
||||
|
||||
void operator()(const BlockedRange& range) const
|
||||
{
|
||||
/* X and Y gradient wavelet data */
|
||||
|
@ -10,7 +10,8 @@
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
static inline int sign(float r){
|
||||
static inline int sign(float r)
|
||||
{
|
||||
if(r > 0.0001f) return 1;
|
||||
if(r < -0.0001f) return -1;
|
||||
return 0;
|
||||
@ -29,7 +30,7 @@ static inline int sign(float r){
|
||||
// RESULT
|
||||
// Error status
|
||||
*/
|
||||
int getFeatureMaps_dp(const IplImage * image,const int k, CvLSVMFeatureMap **map)
|
||||
int getFeatureMaps_dp(const IplImage* image,const int k, CvLSVMFeatureMap **map)
|
||||
{
|
||||
int sizeX, sizeY;
|
||||
int p, px, strsz;
|
||||
|
@ -221,8 +221,8 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
|
||||
#ifdef HAVE_IPP
|
||||
Mat lutimg(img.rows,img.cols,CV_MAKETYPE(CV_32F,cn));
|
||||
Mat hidxs(1, width, CV_32F);
|
||||
Ipp32f *pHidxs = (Ipp32f*)hidxs.data;
|
||||
Ipp32f *pAngles = (Ipp32f*)Angle.data;
|
||||
Ipp32f* pHidxs = (Ipp32f*)hidxs.data;
|
||||
Ipp32f* pAngles = (Ipp32f*)Angle.data;
|
||||
|
||||
IppiSize roiSize;
|
||||
roiSize.width = img.cols;
|
||||
@ -334,10 +334,10 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
|
||||
ippsCartToPolar_32f((const Ipp32f*)Dx.data, (const Ipp32f*)Dy.data, (Ipp32f*)Mag.data, pAngles, width);
|
||||
for( x = 0; x < width; x++ )
|
||||
{
|
||||
if(pAngles[x] < 0.f) pAngles[x]+=(Ipp32f)(CV_PI*2.);
|
||||
if(pAngles[x] < 0.f)
|
||||
pAngles[x] += (Ipp32f)(CV_PI*2.);
|
||||
}
|
||||
|
||||
|
||||
ippsNormalize_32f(pAngles, pAngles, width, 0.5f/angleScale, 1.f/angleScale);
|
||||
ippsFloor_32f(pAngles,(Ipp32f*)hidxs.data,width);
|
||||
ippsSub_32f_I((Ipp32f*)hidxs.data,pAngles,width);
|
||||
|
@ -4,8 +4,9 @@
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
IplImage * resize_opencv (IplImage * img, float scale){
|
||||
IplImage * imgTmp;
|
||||
IplImage* resize_opencv(IplImage* img, float scale)
|
||||
{
|
||||
IplImage* imgTmp;
|
||||
|
||||
int W, H, tW, tH;
|
||||
|
||||
@ -16,11 +17,7 @@ IplImage * resize_opencv (IplImage * img, float scale){
|
||||
tH = (int)(((float)H) * scale + 0.5);
|
||||
|
||||
imgTmp = cvCreateImage(cvSize(tW , tH), img->depth, img->nChannels);
|
||||
cvResize(
|
||||
img,
|
||||
imgTmp,
|
||||
CV_INTER_AREA
|
||||
);
|
||||
cvResize(img, imgTmp, CV_INTER_AREA);
|
||||
|
||||
return imgTmp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user