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
49ec6642
Commit
49ec6642
authored
Jan 29, 2013
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add IntegralChannelComputer
parent
716a9ccb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
31 deletions
+113
-31
softcascade.hpp
...s/softcascade/include/opencv2/softcascade/softcascade.hpp
+50
-28
integral_channel_builder.cpp
modules/softcascade/src/integral_channel_builder.cpp
+56
-0
softcascade_init.cpp
modules/softcascade/src/softcascade_init.cpp
+7
-3
No files found.
modules/softcascade/include/opencv2/softcascade/softcascade.hpp
View file @
49ec6642
...
...
@@ -48,15 +48,6 @@
namespace
cv
{
class
CV_EXPORTS_W
ICFPreprocessor
{
public
:
CV_WRAP
ICFPreprocessor
();
CV_WRAP
void
apply
(
cv
::
InputArray
_frame
,
cv
::
OutputArray
_integrals
)
const
;
protected
:
enum
{
BINS
=
10
};
};
// Representation of detectors result.
struct
CV_EXPORTS
Detection
{
...
...
@@ -74,6 +65,51 @@ struct CV_EXPORTS Detection
int
kind
;
};
class
CV_EXPORTS
FeaturePool
{
public
:
virtual
int
size
()
const
=
0
;
virtual
float
apply
(
int
fi
,
int
si
,
const
Mat
&
integrals
)
const
=
0
;
virtual
void
write
(
cv
::
FileStorage
&
fs
,
int
index
)
const
=
0
;
virtual
void
preprocess
(
InputArray
frame
,
OutputArray
integrals
)
const
=
0
;
virtual
~
FeaturePool
();
};
class
CV_EXPORTS
Dataset
{
public
:
typedef
enum
{
POSITIVE
=
1
,
NEGATIVE
=
2
}
SampleType
;
virtual
cv
::
Mat
get
(
SampleType
type
,
int
idx
)
const
=
0
;
virtual
int
available
(
SampleType
type
)
const
=
0
;
virtual
~
Dataset
();
};
// ========================================================================== //
// Implementation of Integral Channel Feature.
// ========================================================================== //
class
CV_EXPORTS_W
IntegralChannelBuilder
:
public
Algorithm
{
public
:
CV_WRAP
IntegralChannelBuilder
();
CV_WRAP
virtual
~
IntegralChannelBuilder
();
cv
::
AlgorithmInfo
*
info
()
const
;
// Load channel builder config.
CV_WRAP
virtual
void
read
(
const
FileNode
&
fileNode
);
private
:
struct
Fields
;
cv
::
Ptr
<
Fields
>
fields
;
};
// Create channel integrals for Soft Cascade detector.
class
CV_EXPORTS
Channels
{
...
...
@@ -97,27 +133,13 @@ private:
int
shrinkage
;
};
class
CV_EXPORTS
FeaturePool
{
public
:
virtual
int
size
()
const
=
0
;
virtual
float
apply
(
int
fi
,
int
si
,
const
Mat
&
integrals
)
const
=
0
;
virtual
void
write
(
cv
::
FileStorage
&
fs
,
int
index
)
const
=
0
;
virtual
void
preprocess
(
InputArray
frame
,
OutputArray
integrals
)
const
=
0
;
virtual
~
FeaturePool
();
};
class
CV_EXPORTS
Dataset
class
CV_EXPORTS_W
ICFPreprocessor
{
public
:
typedef
enum
{
POSITIVE
=
1
,
NEGATIVE
=
2
}
SampleType
;
virtual
cv
::
Mat
get
(
SampleType
type
,
int
idx
)
const
=
0
;
virtual
int
available
(
SampleType
type
)
const
=
0
;
virtual
~
Dataset
();
CV_WRAP
ICFPreprocessor
();
CV_WRAP
void
apply
(
cv
::
InputArray
_frame
,
cv
::
OutputArray
_integrals
)
const
;
protected
:
enum
{
BINS
=
10
};
};
// ========================================================================== //
...
...
modules/softcascade/src/integral_channel_builder.cpp
0 → 100644
View file @
49ec6642
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2008-2013, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and / or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
struct
cv
::
IntegralChannelBuilder
::
Fields
{
};
cv
::
IntegralChannelBuilder
::
IntegralChannelBuilder
()
:
fields
(
new
Fields
())
{}
cv
::
IntegralChannelBuilder
::~
IntegralChannelBuilder
()
{}
void
cv
::
IntegralChannelBuilder
::
read
(
const
FileNode
&
fn
)
{
Algorithm
::
read
(
fn
);
}
\ No newline at end of file
modules/softcascade/src/softcascade_init.cpp
View file @
49ec6642
...
...
@@ -45,16 +45,19 @@
namespace
cv
{
CV_INIT_ALGORITHM
(
SoftCascadeDetector
,
"
CascadeDetector
.SoftCascadeDetector"
,
CV_INIT_ALGORITHM
(
SoftCascadeDetector
,
"
SoftCascade
.SoftCascadeDetector"
,
obj
.
info
()
->
addParam
(
obj
,
"minScale"
,
obj
.
minScale
);
obj
.
info
()
->
addParam
(
obj
,
"maxScale"
,
obj
.
maxScale
);
obj
.
info
()
->
addParam
(
obj
,
"scales"
,
obj
.
scales
);
obj
.
info
()
->
addParam
(
obj
,
"rejCriteria"
,
obj
.
rejCriteria
));
CV_INIT_ALGORITHM
(
IntegralChannelBuilder
,
"SoftCascade.IntegralChannelBuilder"
,
);
bool
initModule_softcascade
(
void
)
{
Ptr
<
Algorithm
>
sc
=
createSoftCascadeDetector
();
return
sc
->
info
()
!=
0
;
Ptr
<
Algorithm
>
sc1
=
createSoftCascadeDetector
();
Ptr
<
Algorithm
>
sc2
=
createIntegralChannelBuilder
();
return
(
sc1
->
info
()
!=
0
)
&&
(
sc2
->
info
()
!=
0
);
}
}
\ No newline at end of file
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