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
5777689f
Commit
5777689f
authored
Mar 25, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed build errors & warnings on VS2010
parent
8991d323
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
colormap.cpp
modules/contrib/src/colormap.cpp
+5
-1
facerec.cpp
modules/contrib/src/facerec.cpp
+3
-3
No files found.
modules/contrib/src/colormap.cpp
View file @
5777689f
...
...
@@ -18,13 +18,17 @@
#include "precomp.hpp"
#include <iostream>
#if defined _MSC_VER && _MSC_VER >= 1400
#pragma warning( disable: 4305 )
#endif
namespace
cv
{
static
Mat
linspace
(
float
x0
,
float
x1
,
int
n
)
{
Mat
pts
(
n
,
1
,
CV_32FC1
);
float
step
=
(
x1
-
x0
)
/
floor
(
n
-
1
);
float
step
=
(
x1
-
x0
)
/
(
n
-
1
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
pts
.
at
<
float
>
(
i
,
0
)
=
x0
+
i
*
step
;
return
pts
;
...
...
modules/contrib/src/facerec.cpp
View file @
5777689f
...
...
@@ -57,7 +57,7 @@ static Mat asRowMatrix(InputArrayOfArrays src, int rtype, double alpha=1, double
if
(
n
==
0
)
return
Mat
();
// dimensionality of samples
int
d
=
src
.
getMat
(
0
).
total
();
int
d
=
(
int
)
src
.
getMat
(
0
).
total
();
// create data matrix
Mat
data
(
n
,
d
,
rtype
);
// copy data
...
...
@@ -588,8 +588,8 @@ static Mat spatial_histogram(InputArray _src, int numPatterns,
{
Mat
src
=
_src
.
getMat
();
// calculate LBP patch size
int
width
=
s
tatic_cast
<
int
>
(
floor
(
src
.
cols
/
grid_x
))
;
int
height
=
s
tatic_cast
<
int
>
(
floor
(
src
.
rows
/
grid_y
))
;
int
width
=
s
rc
.
cols
/
grid_x
;
int
height
=
s
rc
.
rows
/
grid_y
;
// allocate memory for the spatial histogram
Mat
result
=
Mat
::
zeros
(
grid_x
*
grid_y
,
numPatterns
,
CV_32FC1
);
// return matrix with zeros if no data was given
...
...
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