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
8e776837
Commit
8e776837
authored
Apr 18, 2011
by
Vladimir Dudnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes: removed trailing spaces in some files
parent
dd45fe13
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
16 deletions
+15
-16
surf.cpp
modules/features2d/src/surf.cpp
+4
-3
featurepyramid.cpp
modules/objdetect/src/featurepyramid.cpp
+3
-2
hog.cpp
modules/objdetect/src/hog.cpp
+4
-4
resizeimg.cpp
modules/objdetect/src/resizeimg.cpp
+4
-7
No files found.
modules/features2d/src/surf.cpp
View file @
8e776837
...
@@ -184,7 +184,7 @@ icvCalcLayerDetAndTrace( const CvMat* sum, int size, int sampleStep, CvMat *det,
...
@@ -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 */
/* Ignore pixels where some of the kernel is outside the image */
margin
=
(
size
/
2
)
/
sampleStep
;
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
;
sum_ptr
=
sum
->
data
.
i
+
(
i
*
sampleStep
)
*
sum
->
cols
;
det_ptr
=
det
->
data
.
fl
+
(
i
+
margin
)
*
det
->
cols
+
margin
;
det_ptr
=
det
->
data
.
fl
+
(
i
+
margin
)
*
det
->
cols
+
margin
;
...
@@ -514,8 +514,8 @@ namespace cv
...
@@ -514,8 +514,8 @@ namespace cv
{
{
/* Methods to free data allocated in SURFInvoker constructor */
/* Methods to free data allocated in SURFInvoker constructor */
template
<>
inline
void
Ptr
<
float
>::
delete_obj
(){
cvFree
(
&
obj
);
}
template
<>
inline
void
Ptr
<
float
>::
delete_obj
()
{
cvFree
(
&
obj
);
}
template
<>
inline
void
Ptr
<
CvPoint
>::
delete_obj
(){
cvFree
(
&
obj
);
}
template
<>
inline
void
Ptr
<
CvPoint
>::
delete_obj
()
{
cvFree
(
&
obj
);
}
struct
SURFInvoker
struct
SURFInvoker
{
{
...
@@ -567,6 +567,7 @@ 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
);
DW
[
i
*
PATCH_SZ
+
j
]
=
G_desc
.
at
<
float
>
(
i
,
0
)
*
G_desc
.
at
<
float
>
(
j
,
0
);
}
}
}
}
void
operator
()(
const
BlockedRange
&
range
)
const
void
operator
()(
const
BlockedRange
&
range
)
const
{
{
/* X and Y gradient wavelet data */
/* X and Y gradient wavelet data */
...
...
modules/objdetect/src/featurepyramid.cpp
View file @
8e776837
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif
static
inline
int
sign
(
float
r
){
static
inline
int
sign
(
float
r
)
{
if
(
r
>
0.0001
f
)
return
1
;
if
(
r
>
0.0001
f
)
return
1
;
if
(
r
<
-
0.0001
f
)
return
-
1
;
if
(
r
<
-
0.0001
f
)
return
-
1
;
return
0
;
return
0
;
...
@@ -29,7 +30,7 @@ static inline int sign(float r){
...
@@ -29,7 +30,7 @@ static inline int sign(float r){
// RESULT
// RESULT
// Error status
// 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
sizeX
,
sizeY
;
int
p
,
px
,
strsz
;
int
p
,
px
,
strsz
;
...
...
modules/objdetect/src/hog.cpp
View file @
8e776837
...
@@ -221,8 +221,8 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
...
@@ -221,8 +221,8 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
#ifdef HAVE_IPP
#ifdef HAVE_IPP
Mat
lutimg
(
img
.
rows
,
img
.
cols
,
CV_MAKETYPE
(
CV_32F
,
cn
));
Mat
lutimg
(
img
.
rows
,
img
.
cols
,
CV_MAKETYPE
(
CV_32F
,
cn
));
Mat
hidxs
(
1
,
width
,
CV_32F
);
Mat
hidxs
(
1
,
width
,
CV_32F
);
Ipp32f
*
pHidxs
=
(
Ipp32f
*
)
hidxs
.
data
;
Ipp32f
*
pHidxs
=
(
Ipp32f
*
)
hidxs
.
data
;
Ipp32f
*
pAngles
=
(
Ipp32f
*
)
Angle
.
data
;
Ipp32f
*
pAngles
=
(
Ipp32f
*
)
Angle
.
data
;
IppiSize
roiSize
;
IppiSize
roiSize
;
roiSize
.
width
=
img
.
cols
;
roiSize
.
width
=
img
.
cols
;
...
@@ -334,10 +334,10 @@ void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
...
@@ -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
);
ippsCartToPolar_32f
((
const
Ipp32f
*
)
Dx
.
data
,
(
const
Ipp32f
*
)
Dy
.
data
,
(
Ipp32f
*
)
Mag
.
data
,
pAngles
,
width
);
for
(
x
=
0
;
x
<
width
;
x
++
)
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.5
f
/
angleScale
,
1.
f
/
angleScale
);
ippsNormalize_32f
(
pAngles
,
pAngles
,
width
,
0.5
f
/
angleScale
,
1.
f
/
angleScale
);
ippsFloor_32f
(
pAngles
,(
Ipp32f
*
)
hidxs
.
data
,
width
);
ippsFloor_32f
(
pAngles
,(
Ipp32f
*
)
hidxs
.
data
,
width
);
ippsSub_32f_I
((
Ipp32f
*
)
hidxs
.
data
,
pAngles
,
width
);
ippsSub_32f_I
((
Ipp32f
*
)
hidxs
.
data
,
pAngles
,
width
);
...
...
modules/objdetect/src/resizeimg.cpp
View file @
8e776837
...
@@ -4,8 +4,9 @@
...
@@ -4,8 +4,9 @@
#include <assert.h>
#include <assert.h>
#include <math.h>
#include <math.h>
IplImage
*
resize_opencv
(
IplImage
*
img
,
float
scale
){
IplImage
*
resize_opencv
(
IplImage
*
img
,
float
scale
)
IplImage
*
imgTmp
;
{
IplImage
*
imgTmp
;
int
W
,
H
,
tW
,
tH
;
int
W
,
H
,
tW
,
tH
;
...
@@ -16,11 +17,7 @@ IplImage * resize_opencv (IplImage * img, float scale){
...
@@ -16,11 +17,7 @@ IplImage * resize_opencv (IplImage * img, float scale){
tH
=
(
int
)(((
float
)
H
)
*
scale
+
0.5
);
tH
=
(
int
)(((
float
)
H
)
*
scale
+
0.5
);
imgTmp
=
cvCreateImage
(
cvSize
(
tW
,
tH
),
img
->
depth
,
img
->
nChannels
);
imgTmp
=
cvCreateImage
(
cvSize
(
tW
,
tH
),
img
->
depth
,
img
->
nChannels
);
cvResize
(
cvResize
(
img
,
imgTmp
,
CV_INTER_AREA
);
img
,
imgTmp
,
CV_INTER_AREA
);
return
imgTmp
;
return
imgTmp
;
}
}
...
...
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