Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
21d563c0
Commit
21d563c0
authored
Jul 29, 2014
by
jaco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip compile error fixing
parent
8a8302aa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
26 deletions
+19
-26
FilterTIG.h
modules/saliency/include/opencv2/saliency/FilterTIG.h
+12
-12
saliencyBaseClasses.hpp
...saliency/include/opencv2/saliency/saliencyBaseClasses.hpp
+5
-9
motionSaliency.cpp
modules/saliency/src/motionSaliency.cpp
+0
-1
objectness.cpp
modules/saliency/src/objectness.cpp
+0
-1
saliency_init.cpp
modules/saliency/src/saliency_init.cpp
+1
-1
staticSaliency.cpp
modules/saliency/src/staticSaliency.cpp
+1
-2
No files found.
modules/saliency/include/opencv2/saliency/FilterTIG.h
View file @
21d563c0
...
@@ -67,20 +67,20 @@ private:
...
@@ -67,20 +67,20 @@ private:
inline
float
FilterTIG
::
dot
(
const
INT64
tig1
,
const
INT64
tig2
,
const
INT64
tig4
,
const
INT64
tig8
)
inline
float
FilterTIG
::
dot
(
const
INT64
tig1
,
const
INT64
tig2
,
const
INT64
tig4
,
const
INT64
tig8
)
{
{
INT64
bcT1
=
POPCNT64
(
tig1
);
INT64
bcT1
=
(
INT64
)
POPCNT64
(
tig1
);
INT64
bcT2
=
POPCNT64
(
tig2
);
INT64
bcT2
=
(
INT64
)
POPCNT64
(
tig2
);
INT64
bcT4
=
POPCNT64
(
tig4
);
INT64
bcT4
=
(
INT64
)
POPCNT64
(
tig4
);
INT64
bcT8
=
POPCNT64
(
tig8
);
INT64
bcT8
=
(
INT64
)
POPCNT64
(
tig8
);
INT64
bc01
=
(
POPCNT64
(
_bTIGs
[
0
]
&
tig1
)
<<
1
)
-
bcT1
;
INT64
bc01
=
(
INT64
)(
POPCNT64
(
_bTIGs
[
0
]
&
tig1
)
<<
1
)
-
bcT1
;
INT64
bc02
=
((
POPCNT64
(
_bTIGs
[
0
]
&
tig2
)
<<
1
)
-
bcT2
)
<<
1
;
INT64
bc02
=
(
INT64
)(
(
POPCNT64
(
_bTIGs
[
0
]
&
tig2
)
<<
1
)
-
bcT2
)
<<
1
;
INT64
bc04
=
((
POPCNT64
(
_bTIGs
[
0
]
&
tig4
)
<<
1
)
-
bcT4
)
<<
2
;
INT64
bc04
=
(
INT64
)(
(
POPCNT64
(
_bTIGs
[
0
]
&
tig4
)
<<
1
)
-
bcT4
)
<<
2
;
INT64
bc08
=
((
POPCNT64
(
_bTIGs
[
0
]
&
tig8
)
<<
1
)
-
bcT8
)
<<
3
;
INT64
bc08
=
(
INT64
)(
(
POPCNT64
(
_bTIGs
[
0
]
&
tig8
)
<<
1
)
-
bcT8
)
<<
3
;
INT64
bc11
=
(
POPCNT64
(
_bTIGs
[
1
]
&
tig1
)
<<
1
)
-
bcT1
;
INT64
bc11
=
(
INT64
)(
POPCNT64
(
_bTIGs
[
1
]
&
tig1
)
<<
1
)
-
bcT1
;
INT64
bc12
=
((
POPCNT64
(
_bTIGs
[
1
]
&
tig2
)
<<
1
)
-
bcT2
)
<<
1
;
INT64
bc12
=
(
INT64
)(
(
POPCNT64
(
_bTIGs
[
1
]
&
tig2
)
<<
1
)
-
bcT2
)
<<
1
;
INT64
bc14
=
((
POPCNT64
(
_bTIGs
[
1
]
&
tig4
)
<<
1
)
-
bcT4
)
<<
2
;
INT64
bc14
=
(
INT64
)(
(
POPCNT64
(
_bTIGs
[
1
]
&
tig4
)
<<
1
)
-
bcT4
)
<<
2
;
INT64
bc18
=
((
POPCNT64
(
_bTIGs
[
1
]
&
tig8
)
<<
1
)
-
bcT8
)
<<
3
;
INT64
bc18
=
(
INT64
)(
(
POPCNT64
(
_bTIGs
[
1
]
&
tig8
)
<<
1
)
-
bcT8
)
<<
3
;
return
_coeffs1
[
0
]
*
(
bc01
+
bc02
+
bc04
+
bc08
)
+
_coeffs1
[
1
]
*
(
bc11
+
bc12
+
bc14
+
bc18
);
return
_coeffs1
[
0
]
*
(
bc01
+
bc02
+
bc04
+
bc08
)
+
_coeffs1
[
1
]
*
(
bc11
+
bc12
+
bc14
+
bc18
);
}
}
modules/saliency/include/opencv2/saliency/saliencyBaseClasses.hpp
View file @
21d563c0
...
@@ -94,30 +94,26 @@ class CV_EXPORTS_W StaticSaliency : public virtual Saliency
...
@@ -94,30 +94,26 @@ class CV_EXPORTS_W StaticSaliency : public virtual Saliency
public
:
public
:
bool
computeBinaryMap
(
const
Mat
&
saliencyMap
,
Mat
&
binaryMap
);
bool
computeBinaryMap
(
const
Mat
&
saliencyMap
,
Mat
&
binaryMap
);
AlgorithmInfo
*
info
()
const
=
0
;
protected
:
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
};
};
/************************************ Motion Saliency Base Class ************************************/
/************************************ Motion Saliency Base Class ************************************/
class
CV_EXPORTS_W
MotionSaliency
:
public
virtual
Saliency
class
CV_EXPORTS_W
MotionSaliency
:
public
virtual
Saliency
{
{
public
:
AlgorithmInfo
*
info
()
const
=
0
;
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
};
};
/************************************ Objectness Base Class ************************************/
/************************************ Objectness Base Class ************************************/
class
CV_EXPORTS_W
Objectness
:
public
virtual
Saliency
class
CV_EXPORTS_W
Objectness
:
public
virtual
Saliency
{
{
public
:
AlgorithmInfo
*
info
()
const
=
0
;
protected
:
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
};
};
...
...
modules/saliency/src/motionSaliency.cpp
View file @
21d563c0
...
@@ -48,5 +48,4 @@ namespace cv
...
@@ -48,5 +48,4 @@ namespace cv
* Motion Saliency
* Motion Saliency
*/
*/
}
/* namespace cv */
}
/* namespace cv */
modules/saliency/src/objectness.cpp
View file @
21d563c0
...
@@ -48,5 +48,4 @@ namespace cv
...
@@ -48,5 +48,4 @@ namespace cv
* Objectness
* Objectness
*/
*/
}
/* namespace cv */
}
/* namespace cv */
modules/saliency/src/saliency_init.cpp
View file @
21d563c0
...
@@ -58,11 +58,11 @@ CV_INIT_ALGORITHM(
...
@@ -58,11 +58,11 @@ CV_INIT_ALGORITHM(
ObjectnessBING
,
"SALIENCY.BING"
,
ObjectnessBING
,
"SALIENCY.BING"
,
obj
.
info
()
->
addParam
(
obj
,
"_base"
,
obj
.
_base
);
obj
.
info
()
->
addParam
(
obj
,
"_NSS"
,
obj
.
_NSS
);
obj
.
info
()
->
addParam
(
obj
,
"_W"
,
obj
.
_W
)
);
obj
.
info
()
->
addParam
(
obj
,
"_base"
,
obj
.
_base
);
obj
.
info
()
->
addParam
(
obj
,
"_NSS"
,
obj
.
_NSS
);
obj
.
info
()
->
addParam
(
obj
,
"_W"
,
obj
.
_W
)
);
bool
initModule_saliency
(
void
)
bool
initModule_saliency
(
void
)
{
{
bool
all
=
true
;
bool
all
=
true
;
all
&=
!
StaticSaliencySpectralResidual_info_auto
.
name
().
empty
();
all
&=
!
StaticSaliencySpectralResidual_info_auto
.
name
().
empty
();
//all &= !MotionSaliencySuBSENSE_info_auto.name().empty();
all
&=
!
ObjectnessBING_info_auto
.
name
().
empty
();
all
&=
!
ObjectnessBING_info_auto
.
name
().
empty
();
return
all
;
return
all
;
...
...
modules/saliency/src/staticSaliency.cpp
View file @
21d563c0
...
@@ -48,7 +48,6 @@ namespace cv
...
@@ -48,7 +48,6 @@ namespace cv
* StaticSaliency
* StaticSaliency
*/
*/
bool
StaticSaliency
::
computeBinaryMap
(
const
Mat
&
saliencyMap
,
Mat
&
BinaryMap
)
bool
StaticSaliency
::
computeBinaryMap
(
const
Mat
&
saliencyMap
,
Mat
&
BinaryMap
)
{
{
...
@@ -87,7 +86,7 @@ bool StaticSaliency::computeBinaryMap( const Mat& saliencyMap, Mat& BinaryMap )
...
@@ -87,7 +86,7 @@ bool StaticSaliency::computeBinaryMap( const Mat& saliencyMap, Mat& BinaryMap )
//Convert
//Convert
outputMat
=
outputMat
*
255
;
outputMat
=
outputMat
*
255
;
outputMat
.
convertTo
(
outputMat
,
CV_8U
);
outputMat
.
convertTo
(
outputMat
,
CV_8U
);
//saliencyMap = outputMat;
//saliencyMap = outputMat;
// adaptative thresholding using Otsu's method, to make saliency map binary
// adaptative thresholding using Otsu's method, to make saliency map binary
threshold
(
outputMat
,
BinaryMap
,
0
,
255
,
THRESH_BINARY
|
THRESH_OTSU
);
threshold
(
outputMat
,
BinaryMap
,
0
,
255
,
THRESH_BINARY
|
THRESH_OTSU
);
...
...
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