Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
716a5d04
Commit
716a5d04
authored
Feb 15, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a few problems detected by Xcode 4.2.1
parent
ada6ab37
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
34 additions
and
121 deletions
+34
-121
tif_getimage.c
3rdparty/libtiff/tif_getimage.c
+10
-10
chamfermatching.cpp
modules/contrib/src/chamfermatching.cpp
+1
-0
retinafilter.hpp
modules/contrib/src/retinafilter.hpp
+5
-1
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+0
-1
opengl_interop.hpp
modules/core/include/opencv2/core/opengl_interop.hpp
+2
-2
window_cocoa.mm
modules/highgui/src/window_cocoa.mm
+1
-1
_list.h
modules/imgproc/src/_list.h
+1
-1
blobtrackanalysishist.cpp
modules/legacy/src/blobtrackanalysishist.cpp
+1
-1
epilines.cpp
modules/legacy/src/epilines.cpp
+1
-2
lmeds.cpp
modules/legacy/src/lmeds.cpp
+0
-80
scanlines.cpp
modules/legacy/src/scanlines.cpp
+2
-10
texture.cpp
modules/legacy/src/texture.cpp
+3
-3
objdetect.hpp
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
+5
-4
cascadedetect.cpp
modules/objdetect/src/cascadedetect.cpp
+1
-4
optflowhs.cpp
modules/video/src/optflowhs.cpp
+1
-1
No files found.
3rdparty/libtiff/tif_getimage.c
View file @
716a5d04
...
...
@@ -604,7 +604,7 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
nrow
=
(
row
+
rowstoread
>
h
?
h
-
row
:
rowstoread
);
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
)
{
ret
=
0
;
...
...
@@ -708,19 +708,19 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
nrow
=
(
row
+
rowstoread
>
h
?
h
-
row
:
rowstoread
);
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
)
{
ret
=
0
;
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
)
{
ret
=
0
;
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
)
{
ret
=
0
;
...
...
@@ -728,7 +728,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
}
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
)
{
ret
=
0
;
...
...
@@ -826,7 +826,7 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
nrowsub
=
nrow
;
if
((
nrowsub
%
subsamplingver
)
!=
0
)
nrowsub
+=
subsamplingver
-
nrowsub
%
subsamplingver
;
if
(
TIFFReadEncodedStrip
(
tif
,
if
(
(
int
)
TIFFReadEncodedStrip
(
tif
,
TIFFComputeStrip
(
tif
,
row
+
img
->
row_offset
,
0
),
buf
,
((
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
;
nrow
=
(
row
+
rowstoread
>
h
?
h
-
row
:
rowstoread
);
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
&&
img
->
stoponerr
)
{
ret
=
0
;
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
&&
img
->
stoponerr
)
{
ret
=
0
;
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
&&
img
->
stoponerr
)
{
...
...
@@ -936,7 +936,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
}
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
&&
img
->
stoponerr
)
{
...
...
modules/contrib/src/chamfermatching.cpp
View file @
716a5d04
...
...
@@ -72,6 +72,7 @@ private:
class
ImageIterator
{
public
:
virtual
~
ImageIterator
()
{}
virtual
bool
hasNext
()
const
=
0
;
virtual
location_scale_t
next
()
=
0
;
};
...
...
modules/contrib/src/retinafilter.hpp
View file @
716a5d04
...
...
@@ -304,7 +304,11 @@ public:
/**
* @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
...
...
modules/core/include/opencv2/core/mat.hpp
View file @
716a5d04
...
...
@@ -1089,7 +1089,6 @@ template<typename T1, typename T2, typename Op> inline void
process
(
const
Mat_
<
T1
>&
m1
,
Mat_
<
T2
>&
m2
,
Op
op
)
{
int
y
,
x
,
rows
=
m1
.
rows
,
cols
=
m1
.
cols
;
int
c1
=
m1
.
channels
(),
c2
=
m2
.
channels
();
CV_DbgAssert
(
m1
.
size
()
==
m2
.
size
()
);
...
...
modules/core/include/opencv2/core/opengl_interop.hpp
View file @
716a5d04
...
...
@@ -103,13 +103,13 @@ namespace cv
inline
Usage
usage
()
const
{
return
usage_
;
}
class
Impl
;
private
:
int
rows_
;
int
cols_
;
int
type_
;
Usage
usage_
;
class
Impl
;
Ptr
<
Impl
>
impl_
;
};
...
...
@@ -150,12 +150,12 @@ namespace cv
inline
int
elemSize
()
const
{
return
CV_ELEM_SIZE
(
type_
);
}
inline
int
elemSize1
()
const
{
return
CV_ELEM_SIZE1
(
type_
);
}
class
Impl
;
private
:
int
rows_
;
int
cols_
;
int
type_
;
class
Impl
;
Ptr
<
Impl
>
impl_
;
};
...
...
modules/highgui/src/window_cocoa.mm
View file @
716a5d04
...
...
@@ -544,7 +544,7 @@ CV_IMPL int cvWaitKey (int maxWait)
- (void)cvSendMouseEvent:(NSEvent *)event type:(int)type flags:(int)flags {
//cout << "cvSendMouseEvent" << endl;
NSPoint mp = [NSEvent mouseLocation];
NSRect visible = [[self contentView] frame];
//
NSRect visible = [[self contentView] frame];
mp = [self convertScreenToBase: mp];
double viewHeight = [self contentView].frame.size.height;
double viewWidth = [self contentView].frame.size.width;
...
...
modules/imgproc/src/_list.h
View file @
716a5d04
...
...
@@ -345,7 +345,7 @@ void prefix##remove_at_##type(_CVLIST* l, CVPOS pos)\
void prefix##set_##type(CVPOS pos, type* data)\
{\
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)\
{\
...
...
modules/legacy/src/blobtrackanalysishist.cpp
View file @
716a5d04
...
...
@@ -1045,7 +1045,7 @@ public:
return
NULL
;
}
virtual
void
SetFileName
(
c
onst
c
har
*
DataBaseName
)
virtual
void
SetFileName
(
char
*
DataBaseName
)
{
if
(
m_HistMat
.
m_Volume
!=
m_HistVolumeSaved
)
SaveHist
();
m_DataFileName
[
0
]
=
0
;
...
...
modules/legacy/src/epilines.cpp
View file @
716a5d04
...
...
@@ -2179,9 +2179,8 @@ icvCvt_64d_32f( double *src, float *dst, int size )
void
FindLineForEpiline
(
CvSize
imageSize
,
float
a
,
float
b
,
float
c
,
CvPoint2D32f
*
start
,
CvPoint2D32f
*
end
,
int
*
result
)
int
*
)
{
result
=
result
;
CvPoint2D32f
frameBeg
;
CvPoint2D32f
frameEnd
;
...
...
modules/legacy/src/lmeds.cpp
View file @
716a5d04
...
...
@@ -1590,86 +1590,6 @@ icvGaussMxN( double *A, double *B, int M, int N, double **solutions )
}
/* 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///////////////////////////////////////////////////////////////////////////////////////
...
...
modules/legacy/src/scanlines.cpp
View file @
716a5d04
...
...
@@ -154,23 +154,16 @@ icvMakeScanlines( CvMatrix3 * matrix,
int
*
scanlines_1
,
int
*
scanlines_2
,
int
*
lens_1
,
int
*
lens_2
,
int
*
numlines
)
{
CvStatus
error
;
error
=
icvGetCoefficient
(
matrix
,
imgSize
,
scanlines_2
,
scanlines_1
,
numlines
);
CvStatus
error
=
icvGetCoefficient
(
matrix
,
imgSize
,
scanlines_2
,
scanlines_1
,
numlines
);
/* Make Length of scanlines */
if
(
scanlines_1
==
0
&&
scanlines_2
==
0
)
return
error
;
icvMakeScanlinesLengths
(
scanlines_1
,
*
numlines
,
lens_1
);
icvMakeScanlinesLengths
(
scanlines_2
,
*
numlines
,
lens_2
);
matrix
=
matrix
;
return
CV_NO_ERR
;
}
/* icvMakeScanlines */
...
...
@@ -332,7 +325,7 @@ icvGetCoefficient( CvMatrix3 * matrix,
/*===========================================================================*/
CvStatus
icvGetCoefficientDefault
(
CvMatrix3
*
matrix
,
icvGetCoefficientDefault
(
CvMatrix3
*
,
CvSize
imgSize
,
int
*
scanlines_1
,
int
*
scanlines_2
,
int
*
numlines
)
{
int
curr
;
...
...
@@ -359,7 +352,6 @@ icvGetCoefficientDefault( CvMatrix3 * matrix,
curr
+=
4
;
}
matrix
=
matrix
;
return
CV_NO_ERR
;
}
/* icvlGetCoefficientDefault */
...
...
modules/legacy/src/texture.cpp
View file @
716a5d04
...
...
@@ -135,7 +135,7 @@ cvCreateGLCM( const IplImage* srcImage,
}
CV_CALL
(
newGLCM
=
(
CvGLCM
*
)
cvAlloc
(
sizeof
(
newGLCM
)));
memset
(
newGLCM
,
0
,
sizeof
(
newGLCM
)
);
memset
(
newGLCM
,
0
,
sizeof
(
*
newGLCM
)
);
newGLCM
->
matrices
=
0
;
newGLCM
->
numMatrices
=
numStepDirections
;
...
...
@@ -515,8 +515,8 @@ icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex )
correlationStdDeviation
+=
(
actualSideLoop1
-
correlationMean
)
*
(
actualSideLoop1
-
correlationMean
)
*
sideEntryValueSum
;
}
HXY1
=
-
HXY1
;
HXY2
=
-
HXY2
;
HXY1
=
-
HXY1
;
HXY2
=
-
HXY2
;
descriptors
[
CV_GLCMDESC_CORRELATIONINFO1
]
=
(
HXY
-
HXY1
)
/
(
correlationMean
);
descriptors
[
CV_GLCMDESC_CORRELATIONINFO2
]
=
sqrt
(
1.0
-
exp
(
-
2.0
*
(
HXY2
-
HXY
)
)
);
...
...
modules/objdetect/include/opencv2/objdetect/objdetect.hpp
View file @
716a5d04
...
...
@@ -470,11 +470,12 @@ protected:
Ptr
<
CvHaarClassifierCascade
>
oldCascade
;
public
:
class
MaskGenerator
class
CV_EXPORTS
MaskGenerator
{
public
:
virtual
cv
::
Mat
generateMask
(
const
cv
::
Mat
&
src
)
=
0
;
virtual
void
initializeMask
(
const
cv
::
Mat
&
/*src*/
)
{};
public
:
virtual
~
MaskGenerator
()
{}
virtual
cv
::
Mat
generateMask
(
const
cv
::
Mat
&
src
)
=
0
;
virtual
void
initializeMask
(
const
cv
::
Mat
&
/*src*/
)
{};
};
void
setMaskGenerator
(
Ptr
<
MaskGenerator
>
maskGenerator
);
Ptr
<
MaskGenerator
>
getMaskGenerator
();
...
...
modules/objdetect/src/cascadedetect.cpp
View file @
716a5d04
...
...
@@ -170,7 +170,7 @@ class MeanshiftGrouping
{
public
:
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
;
weightsV
=
wV
;
...
...
@@ -178,15 +178,12 @@ public:
positionsCount
=
(
int
)
posV
.
size
();
meanshiftV
.
resize
(
positionsCount
);
distanceV
.
resize
(
positionsCount
);
modeEps
=
modeEps
;
iterMax
=
maxIter
;
for
(
unsigned
i
=
0
;
i
<
positionsV
.
size
();
i
++
)
{
meanshiftV
[
i
]
=
getNewValue
(
positionsV
[
i
]);
distanceV
[
i
]
=
moveToMode
(
meanshiftV
[
i
]);
meanshiftV
[
i
]
-=
positionsV
[
i
];
}
}
...
...
modules/video/src/optflowhs.cpp
View file @
716a5d04
...
...
@@ -177,7 +177,7 @@ icvCalcOpticalFlowHS_8u32fR( uchar* imgA,
BufferSize
=
imageHeight
*
imageWidth
;
II
=
(
icvDerProductEx
*
)
cvAlloc
(
BufferSize
*
sizeof
(
icvDerProductEx
));
if
(
(
II
==
NULL
)
)
if
(
II
==
NULL
)
NoMem
=
1
;
if
(
NoMem
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment