fixed a few problems detected by Xcode 4.2.1
This commit is contained in:
20
3rdparty/libtiff/tif_getimage.c
vendored
20
3rdparty/libtiff/tif_getimage.c
vendored
@@ -604,7 +604,7 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
for (col = 0; col < w; col += tw)
|
for (col = 0; col < w; col += tw)
|
||||||
{
|
{
|
||||||
if (TIFFReadTile(tif, buf, col+img->col_offset,
|
if ((int)TIFFReadTile(tif, buf, col+img->col_offset,
|
||||||
row+img->row_offset, 0, 0) < 0 && img->stoponerr)
|
row+img->row_offset, 0, 0) < 0 && img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@@ -708,19 +708,19 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
for (col = 0; col < w; col += tw)
|
for (col = 0; col < w; col += tw)
|
||||||
{
|
{
|
||||||
if (TIFFReadTile(tif, p0, col+img->col_offset,
|
if ((int)TIFFReadTile(tif, p0, col+img->col_offset,
|
||||||
row+img->row_offset,0,0) < 0 && img->stoponerr)
|
row+img->row_offset,0,0) < 0 && img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (TIFFReadTile(tif, p1, col+img->col_offset,
|
if ((int)TIFFReadTile(tif, p1, col+img->col_offset,
|
||||||
row+img->row_offset,0,1) < 0 && img->stoponerr)
|
row+img->row_offset,0,1) < 0 && img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (TIFFReadTile(tif, p2, col+img->col_offset,
|
if ((int)TIFFReadTile(tif, p2, col+img->col_offset,
|
||||||
row+img->row_offset,0,2) < 0 && img->stoponerr)
|
row+img->row_offset,0,2) < 0 && img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@@ -728,7 +728,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
}
|
}
|
||||||
if (alpha)
|
if (alpha)
|
||||||
{
|
{
|
||||||
if (TIFFReadTile(tif,pa,col+img->col_offset,
|
if ((int)TIFFReadTile(tif,pa,col+img->col_offset,
|
||||||
row+img->row_offset,0,3) < 0 && img->stoponerr)
|
row+img->row_offset,0,3) < 0 && img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@@ -826,7 +826,7 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
nrowsub = nrow;
|
nrowsub = nrow;
|
||||||
if ((nrowsub%subsamplingver)!=0)
|
if ((nrowsub%subsamplingver)!=0)
|
||||||
nrowsub+=subsamplingver-nrowsub%subsamplingver;
|
nrowsub+=subsamplingver-nrowsub%subsamplingver;
|
||||||
if (TIFFReadEncodedStrip(tif,
|
if ((int)TIFFReadEncodedStrip(tif,
|
||||||
TIFFComputeStrip(tif,row+img->row_offset, 0),
|
TIFFComputeStrip(tif,row+img->row_offset, 0),
|
||||||
buf,
|
buf,
|
||||||
((row + img->row_offset)%rowsperstrip + nrowsub) * scanline) < 0
|
((row + img->row_offset)%rowsperstrip + nrowsub) * scanline) < 0
|
||||||
@@ -913,21 +913,21 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
||||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||||
offset_row = row + img->row_offset;
|
offset_row = row + img->row_offset;
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
|
if ((int)TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
|
||||||
p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
|
if ((int)TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
|
||||||
p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
|
if ((int)TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
|
||||||
p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
@@ -936,7 +936,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
}
|
}
|
||||||
if (alpha)
|
if (alpha)
|
||||||
{
|
{
|
||||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
|
if ((int)TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
|
||||||
pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
|
||||||
&& img->stoponerr)
|
&& img->stoponerr)
|
||||||
{
|
{
|
||||||
|
@@ -72,6 +72,7 @@ private:
|
|||||||
class ImageIterator
|
class ImageIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~ImageIterator() {}
|
||||||
virtual bool hasNext() const = 0;
|
virtual bool hasNext() const = 0;
|
||||||
virtual location_scale_t next() = 0;
|
virtual location_scale_t next() = 0;
|
||||||
};
|
};
|
||||||
|
@@ -304,7 +304,11 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @return the input image sampled by the photoreceptors spatial sampling
|
* @return the input image sampled by the photoreceptors spatial sampling
|
||||||
*/
|
*/
|
||||||
inline const std::valarray<float> &getPhotoreceptorsSampledFrame() const {if (_photoreceptorsLogSampling)return _photoreceptorsLogSampling->getSampledFrame();};
|
inline const std::valarray<float> &getPhotoreceptorsSampledFrame() const
|
||||||
|
{
|
||||||
|
CV_Assert(_photoreceptorsLogSampling);
|
||||||
|
return _photoreceptorsLogSampling->getSampledFrame();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return photoreceptors output, locally adapted luminance only, no high frequency spatio-temporal noise reduction at the next retina processing stages, use getPhotoreceptors method to get complete photoreceptors output
|
* @return photoreceptors output, locally adapted luminance only, no high frequency spatio-temporal noise reduction at the next retina processing stages, use getPhotoreceptors method to get complete photoreceptors output
|
||||||
|
@@ -1089,7 +1089,6 @@ template<typename T1, typename T2, typename Op> inline void
|
|||||||
process( const Mat_<T1>& m1, Mat_<T2>& m2, Op op )
|
process( const Mat_<T1>& m1, Mat_<T2>& m2, Op op )
|
||||||
{
|
{
|
||||||
int y, x, rows = m1.rows, cols = m1.cols;
|
int y, x, rows = m1.rows, cols = m1.cols;
|
||||||
int c1 = m1.channels(), c2 = m2.channels();
|
|
||||||
|
|
||||||
CV_DbgAssert( m1.size() == m2.size() );
|
CV_DbgAssert( m1.size() == m2.size() );
|
||||||
|
|
||||||
|
@@ -103,13 +103,13 @@ namespace cv
|
|||||||
|
|
||||||
inline Usage usage() const { return usage_; }
|
inline Usage usage() const { return usage_; }
|
||||||
|
|
||||||
|
class Impl;
|
||||||
private:
|
private:
|
||||||
int rows_;
|
int rows_;
|
||||||
int cols_;
|
int cols_;
|
||||||
int type_;
|
int type_;
|
||||||
Usage usage_;
|
Usage usage_;
|
||||||
|
|
||||||
class Impl;
|
|
||||||
Ptr<Impl> impl_;
|
Ptr<Impl> impl_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,12 +150,12 @@ namespace cv
|
|||||||
inline int elemSize() const { return CV_ELEM_SIZE(type_); }
|
inline int elemSize() const { return CV_ELEM_SIZE(type_); }
|
||||||
inline int elemSize1() const { return CV_ELEM_SIZE1(type_); }
|
inline int elemSize1() const { return CV_ELEM_SIZE1(type_); }
|
||||||
|
|
||||||
|
class Impl;
|
||||||
private:
|
private:
|
||||||
int rows_;
|
int rows_;
|
||||||
int cols_;
|
int cols_;
|
||||||
int type_;
|
int type_;
|
||||||
|
|
||||||
class Impl;
|
|
||||||
Ptr<Impl> impl_;
|
Ptr<Impl> impl_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -544,7 +544,7 @@ CV_IMPL int cvWaitKey (int maxWait)
|
|||||||
- (void)cvSendMouseEvent:(NSEvent *)event type:(int)type flags:(int)flags {
|
- (void)cvSendMouseEvent:(NSEvent *)event type:(int)type flags:(int)flags {
|
||||||
//cout << "cvSendMouseEvent" << endl;
|
//cout << "cvSendMouseEvent" << endl;
|
||||||
NSPoint mp = [NSEvent mouseLocation];
|
NSPoint mp = [NSEvent mouseLocation];
|
||||||
NSRect visible = [[self contentView] frame];
|
//NSRect visible = [[self contentView] frame];
|
||||||
mp = [self convertScreenToBase: mp];
|
mp = [self convertScreenToBase: mp];
|
||||||
double viewHeight = [self contentView].frame.size.height;
|
double viewHeight = [self contentView].frame.size.height;
|
||||||
double viewWidth = [self contentView].frame.size.width;
|
double viewWidth = [self contentView].frame.size.width;
|
||||||
|
@@ -345,7 +345,7 @@ void prefix##remove_at_##type(_CVLIST* l, CVPOS pos)\
|
|||||||
void prefix##set_##type(CVPOS pos, type* data)\
|
void prefix##set_##type(CVPOS pos, type* data)\
|
||||||
{\
|
{\
|
||||||
ELEMENT_##type* element = ((ELEMENT_##type*)(pos.m_pos));\
|
ELEMENT_##type* element = ((ELEMENT_##type*)(pos.m_pos));\
|
||||||
memcpy(&(element->m_data), data, sizeof(data));\
|
memcpy(&(element->m_data), data, sizeof(*data));\
|
||||||
}\
|
}\
|
||||||
type* prefix##get_##type(CVPOS pos)\
|
type* prefix##get_##type(CVPOS pos)\
|
||||||
{\
|
{\
|
||||||
|
@@ -1045,7 +1045,7 @@ public:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetFileName(const char* DataBaseName)
|
virtual void SetFileName(char* DataBaseName)
|
||||||
{
|
{
|
||||||
if(m_HistMat.m_Volume!=m_HistVolumeSaved)SaveHist();
|
if(m_HistMat.m_Volume!=m_HistVolumeSaved)SaveHist();
|
||||||
m_DataFileName[0] = 0;
|
m_DataFileName[0] = 0;
|
||||||
|
@@ -2179,9 +2179,8 @@ icvCvt_64d_32f( double *src, float *dst, int size )
|
|||||||
void FindLineForEpiline( CvSize imageSize,
|
void FindLineForEpiline( CvSize imageSize,
|
||||||
float a,float b,float c,
|
float a,float b,float c,
|
||||||
CvPoint2D32f *start,CvPoint2D32f *end,
|
CvPoint2D32f *start,CvPoint2D32f *end,
|
||||||
int* result)
|
int*)
|
||||||
{
|
{
|
||||||
result = result;
|
|
||||||
CvPoint2D32f frameBeg;
|
CvPoint2D32f frameBeg;
|
||||||
|
|
||||||
CvPoint2D32f frameEnd;
|
CvPoint2D32f frameEnd;
|
||||||
|
@@ -1590,86 +1590,6 @@ icvGaussMxN( double *A, double *B, int M, int N, double **solutions )
|
|||||||
|
|
||||||
} /* icvGaussMxN */
|
} /* icvGaussMxN */
|
||||||
|
|
||||||
/*=====================================================================================*/
|
|
||||||
/*
|
|
||||||
static CvStatus
|
|
||||||
icvGetCoof( double *f1, double *f2, double *a2, double *a1, double *a0 )
|
|
||||||
{
|
|
||||||
double G[9], a3;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if( !f1 || !f2 || !a0 || !a1 || !a2 )
|
|
||||||
return CV_BADFACTOR_ERR;
|
|
||||||
|
|
||||||
for( i = 0; i < 9; i++ )
|
|
||||||
{
|
|
||||||
|
|
||||||
G[i] = f1[i] - f2[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
a3 = icvDet( G );
|
|
||||||
|
|
||||||
if( REAL_ZERO( a3 ))
|
|
||||||
return CV_BADFACTOR_ERR;
|
|
||||||
|
|
||||||
*a2 = 0;
|
|
||||||
*a1 = 0;
|
|
||||||
*a0 = icvDet( f2 );
|
|
||||||
|
|
||||||
for( i = 0; i < 9; i++ )
|
|
||||||
{
|
|
||||||
|
|
||||||
*a2 += f2[i] * icvMinor( G, (int) (i % 3), (int) (i / 3) );
|
|
||||||
*a1 += G[i] * icvMinor( f2, (int) (i % 3), (int) (i / 3) );
|
|
||||||
}
|
|
||||||
|
|
||||||
*a0 /= a3;
|
|
||||||
*a1 /= a3;
|
|
||||||
*a2 /= a3;
|
|
||||||
|
|
||||||
return CV_NO_ERR;
|
|
||||||
|
|
||||||
}*/ /* icvGetCoof */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*======================================================================================*/
|
|
||||||
|
|
||||||
/*F///////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: icvLMedS7
|
|
||||||
// Purpose:
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Context:
|
|
||||||
// Parameters:
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Returns:
|
|
||||||
// CV_NO_ERR if all Ok or error code
|
|
||||||
// Notes:
|
|
||||||
//F*/
|
|
||||||
|
|
||||||
CvStatus
|
|
||||||
icvLMedS7( int *points1, int *points2, CvMatrix3 * matrix )
|
|
||||||
{ /* Incorrect realization */
|
|
||||||
CvStatus error = CV_NO_ERR;
|
|
||||||
|
|
||||||
/* int amount; */
|
|
||||||
matrix = matrix;
|
|
||||||
points1 = points1;
|
|
||||||
points2 = points2;
|
|
||||||
|
|
||||||
/* error = cs_Point7( points1, points2, matrix ); */
|
|
||||||
/* error = icvPoint7 ( points1, points2, matrix,&amount ); */
|
|
||||||
return error;
|
|
||||||
|
|
||||||
} /* icvLMedS7 */
|
|
||||||
|
|
||||||
|
|
||||||
/*======================================================================================*/
|
/*======================================================================================*/
|
||||||
/*F///////////////////////////////////////////////////////////////////////////////////////
|
/*F///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -154,23 +154,16 @@ icvMakeScanlines( CvMatrix3 * matrix,
|
|||||||
int *scanlines_1, int *scanlines_2, int *lens_1, int *lens_2, int *numlines )
|
int *scanlines_1, int *scanlines_2, int *lens_1, int *lens_2, int *numlines )
|
||||||
{
|
{
|
||||||
|
|
||||||
CvStatus error;
|
CvStatus error = icvGetCoefficient( matrix, imgSize, scanlines_2, scanlines_1, numlines );
|
||||||
|
|
||||||
error = icvGetCoefficient( matrix, imgSize, scanlines_2, scanlines_1, numlines );
|
|
||||||
|
|
||||||
/* Make Length of scanlines */
|
/* Make Length of scanlines */
|
||||||
|
|
||||||
if( scanlines_1 == 0 && scanlines_2 == 0 )
|
if( scanlines_1 == 0 && scanlines_2 == 0 )
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
icvMakeScanlinesLengths( scanlines_1, *numlines, lens_1 );
|
icvMakeScanlinesLengths( scanlines_1, *numlines, lens_1 );
|
||||||
|
|
||||||
icvMakeScanlinesLengths( scanlines_2, *numlines, lens_2 );
|
icvMakeScanlinesLengths( scanlines_2, *numlines, lens_2 );
|
||||||
|
|
||||||
matrix = matrix;
|
|
||||||
return CV_NO_ERR;
|
return CV_NO_ERR;
|
||||||
|
|
||||||
|
|
||||||
} /* icvMakeScanlines */
|
} /* icvMakeScanlines */
|
||||||
|
|
||||||
|
|
||||||
@@ -332,7 +325,7 @@ icvGetCoefficient( CvMatrix3 * matrix,
|
|||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
CvStatus
|
CvStatus
|
||||||
icvGetCoefficientDefault( CvMatrix3 * matrix,
|
icvGetCoefficientDefault( CvMatrix3 *,
|
||||||
CvSize imgSize, int *scanlines_1, int *scanlines_2, int *numlines )
|
CvSize imgSize, int *scanlines_1, int *scanlines_2, int *numlines )
|
||||||
{
|
{
|
||||||
int curr;
|
int curr;
|
||||||
@@ -359,7 +352,6 @@ icvGetCoefficientDefault( CvMatrix3 * matrix,
|
|||||||
curr += 4;
|
curr += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix = matrix;
|
|
||||||
return CV_NO_ERR;
|
return CV_NO_ERR;
|
||||||
|
|
||||||
} /* icvlGetCoefficientDefault */
|
} /* icvlGetCoefficientDefault */
|
||||||
|
@@ -135,7 +135,7 @@ cvCreateGLCM( const IplImage* srcImage,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CV_CALL( newGLCM = (CvGLCM*)cvAlloc(sizeof(newGLCM)));
|
CV_CALL( newGLCM = (CvGLCM*)cvAlloc(sizeof(newGLCM)));
|
||||||
memset( newGLCM, 0, sizeof(newGLCM) );
|
memset( newGLCM, 0, sizeof(*newGLCM) );
|
||||||
|
|
||||||
newGLCM->matrices = 0;
|
newGLCM->matrices = 0;
|
||||||
newGLCM->numMatrices = numStepDirections;
|
newGLCM->numMatrices = numStepDirections;
|
||||||
@@ -515,8 +515,8 @@ icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex )
|
|||||||
correlationStdDeviation += (actualSideLoop1-correlationMean) * (actualSideLoop1-correlationMean) * sideEntryValueSum;
|
correlationStdDeviation += (actualSideLoop1-correlationMean) * (actualSideLoop1-correlationMean) * sideEntryValueSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
HXY1 =- HXY1;
|
HXY1 = -HXY1;
|
||||||
HXY2 =- HXY2;
|
HXY2 = -HXY2;
|
||||||
|
|
||||||
descriptors[ CV_GLCMDESC_CORRELATIONINFO1 ] = ( HXY - HXY1 ) / ( correlationMean );
|
descriptors[ CV_GLCMDESC_CORRELATIONINFO1 ] = ( HXY - HXY1 ) / ( correlationMean );
|
||||||
descriptors[ CV_GLCMDESC_CORRELATIONINFO2 ] = sqrt( 1.0 - exp( -2.0 * (HXY2 - HXY ) ) );
|
descriptors[ CV_GLCMDESC_CORRELATIONINFO2 ] = sqrt( 1.0 - exp( -2.0 * (HXY2 - HXY ) ) );
|
||||||
|
@@ -470,11 +470,12 @@ protected:
|
|||||||
Ptr<CvHaarClassifierCascade> oldCascade;
|
Ptr<CvHaarClassifierCascade> oldCascade;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class MaskGenerator
|
class CV_EXPORTS MaskGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual cv::Mat generateMask(const cv::Mat& src)=0;
|
virtual ~MaskGenerator() {}
|
||||||
virtual void initializeMask(const cv::Mat& /*src*/) {};
|
virtual cv::Mat generateMask(const cv::Mat& src)=0;
|
||||||
|
virtual void initializeMask(const cv::Mat& /*src*/) {};
|
||||||
};
|
};
|
||||||
void setMaskGenerator(Ptr<MaskGenerator> maskGenerator);
|
void setMaskGenerator(Ptr<MaskGenerator> maskGenerator);
|
||||||
Ptr<MaskGenerator> getMaskGenerator();
|
Ptr<MaskGenerator> getMaskGenerator();
|
||||||
|
@@ -170,7 +170,7 @@ class MeanshiftGrouping
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MeanshiftGrouping(const Point3d& densKer, const vector<Point3d>& posV,
|
MeanshiftGrouping(const Point3d& densKer, const vector<Point3d>& posV,
|
||||||
const vector<double>& wV, double modeEps = 1e-4, int maxIter = 20)
|
const vector<double>& wV, double, int maxIter = 20)
|
||||||
{
|
{
|
||||||
densityKernel = densKer;
|
densityKernel = densKer;
|
||||||
weightsV = wV;
|
weightsV = wV;
|
||||||
@@ -178,15 +178,12 @@ public:
|
|||||||
positionsCount = (int)posV.size();
|
positionsCount = (int)posV.size();
|
||||||
meanshiftV.resize(positionsCount);
|
meanshiftV.resize(positionsCount);
|
||||||
distanceV.resize(positionsCount);
|
distanceV.resize(positionsCount);
|
||||||
modeEps = modeEps;
|
|
||||||
iterMax = maxIter;
|
iterMax = maxIter;
|
||||||
|
|
||||||
for (unsigned i = 0; i<positionsV.size(); i++)
|
for (unsigned i = 0; i<positionsV.size(); i++)
|
||||||
{
|
{
|
||||||
meanshiftV[i] = getNewValue(positionsV[i]);
|
meanshiftV[i] = getNewValue(positionsV[i]);
|
||||||
|
|
||||||
distanceV[i] = moveToMode(meanshiftV[i]);
|
distanceV[i] = moveToMode(meanshiftV[i]);
|
||||||
|
|
||||||
meanshiftV[i] -= positionsV[i];
|
meanshiftV[i] -= positionsV[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -177,7 +177,7 @@ icvCalcOpticalFlowHS_8u32fR( uchar* imgA,
|
|||||||
BufferSize = imageHeight * imageWidth;
|
BufferSize = imageHeight * imageWidth;
|
||||||
|
|
||||||
II = (icvDerProductEx *) cvAlloc( BufferSize * sizeof( icvDerProductEx ));
|
II = (icvDerProductEx *) cvAlloc( BufferSize * sizeof( icvDerProductEx ));
|
||||||
if( (II == NULL) )
|
if( II == NULL )
|
||||||
NoMem = 1;
|
NoMem = 1;
|
||||||
|
|
||||||
if( NoMem )
|
if( NoMem )
|
||||||
|
Reference in New Issue
Block a user