fixed kmeans center initialization in the case of huge matrices (ticket #1291); fixed warinings in libtiff.
This commit is contained in:
parent
1e6f1cc15c
commit
6942799669
4
3rdparty/libtiff/tif_dirread.c
vendored
4
3rdparty/libtiff/tif_dirread.c
vendored
@ -1450,14 +1450,14 @@ TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir)
|
||||
case TIFF_BYTE:
|
||||
case TIFF_SBYTE:
|
||||
{
|
||||
uint8 v[4];
|
||||
uint8 v[4]={0,0,0,0};
|
||||
return TIFFFetchByteArray(tif, dir, v)
|
||||
&& TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
|
||||
}
|
||||
case TIFF_SHORT:
|
||||
case TIFF_SSHORT:
|
||||
{
|
||||
uint16 v[2];
|
||||
uint16 v[2]={0,0};
|
||||
return TIFFFetchShortArray(tif, dir, v)
|
||||
&& TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
|
||||
}
|
||||
|
@ -2205,7 +2205,7 @@ static void generateCentersPP(const Mat& _data, Mat& _out_centers,
|
||||
{
|
||||
int i, j, k, dims = _data.cols, N = _data.rows;
|
||||
const float* data = _data.ptr<float>(0);
|
||||
int step = (int)(_data.step/sizeof(data[0]));
|
||||
size_t step = _data.step/sizeof(data[0]);
|
||||
vector<int> _centers(K);
|
||||
int* centers = &_centers[0];
|
||||
vector<float> _dist(N*3);
|
||||
|
Loading…
Reference in New Issue
Block a user