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
0936ddad
Commit
0936ddad
authored
Aug 06, 2014
by
jaco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows reinterpret_cast error fixed
parent
cd9b8da8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
saliencySpecializedClasses.hpp
...y/include/opencv2/saliency/saliencySpecializedClasses.hpp
+7
-5
saliency_init.cpp
modules/saliency/src/saliency_init.cpp
+2
-3
staticSaliencySpectralResidual.cpp
modules/saliency/src/staticSaliencySpectralResidual.cpp
+14
-10
No files found.
modules/saliency/include/opencv2/saliency/saliencySpecializedClasses.hpp
View file @
0936ddad
...
...
@@ -66,11 +66,11 @@ class CV_EXPORTS_W StaticSaliencySpectralResidual : public StaticSaliency
StaticSaliencySpectralResidual
();
~
StaticSaliencySpectralResidual
();
typedef
Ptr
<
Size
>
(
Algorithm
::*
SizeGetter
)();
typedef
void
(
Algorithm
::*
SizeSetter
)(
const
Ptr
<
Size
>
&
);
//
typedef Ptr<Size> (Algorithm::*SizeGetter)();
//
typedef void (Algorithm::*SizeSetter)( const Ptr<Size> & );
Ptr
<
Size
>
getWsize
();
void
setWsize
(
const
Ptr
<
Size
>
&
newSize
);
//
Ptr<Size> getWsize();
//
void setWsize( const Ptr<Size> &newSize );
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
...
...
@@ -78,7 +78,9 @@ class CV_EXPORTS_W StaticSaliencySpectralResidual : public StaticSaliency
protected
:
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
);
AlgorithmInfo
*
info
()
const
;
CV_PROP_RW
Ptr
<
Size
>
resizedImageSize
;
int
resImWidth
;
int
resImHeight
;
//Ptr<Size> resizedImageSize;
};
...
...
modules/saliency/src/saliency_init.cpp
View file @
0936ddad
...
...
@@ -48,9 +48,8 @@ namespace cv
CV_INIT_ALGORITHM
(
StaticSaliencySpectralResidual
,
"SALIENCY.SPECTRAL_RESIDUAL"
,
obj
.
info
()
->
addParam
(
obj
,
"resizedImageSize"
,
obj
.
resizedImageSize
,
false
,
reinterpret_cast
<
SizeGetter
>
(
&
StaticSaliencySpectralResidual
::
getWsize
),
reinterpret_cast
<
SizeSetter
>
(
&
StaticSaliencySpectralResidual
::
setWsize
)
)
);
obj
.
info
()
->
addParam
(
obj
,
"resImWidth"
,
obj
.
resImWidth
);
obj
.
info
()
->
addParam
(
obj
,
"resImHeight"
,
obj
.
resImHeight
));
//CV_INIT_ALGORITHM( MotionSaliencySuBSENSE, "SALIENCY.SuBSENSE", );
...
...
modules/saliency/src/staticSaliencySpectralResidual.cpp
View file @
0936ddad
...
...
@@ -48,19 +48,21 @@ namespace cv
* SaliencySpectralResidual
*/
cv
::
Ptr
<
Size
>
StaticSaliencySpectralResidual
::
getWsize
()
/*
cv::Ptr<Size> StaticSaliencySpectralResidual::getWsize()
{
return resizedImageSize;
}
void StaticSaliencySpectralResidual::setWsize( const cv::Ptr<Size>& newSize )
{
resizedImageSize = newSize;
}
}
*/
StaticSaliencySpectralResidual
::
StaticSaliencySpectralResidual
()
{
className
=
"SPECTRAL_RESIDUAL"
;
resizedImageSize
=
Ptr
<
Size
>
(
new
Size
(
64
,
64
)
);
resImWidth
=
64
;
resImHeight
=
64
;
//resizedImageSize = Ptr<Size>( new Size( 64, 64 ) );
}
StaticSaliencySpectralResidual
::~
StaticSaliencySpectralResidual
()
...
...
@@ -82,24 +84,26 @@ bool StaticSaliencySpectralResidual::computeSaliencyImpl( const InputArray image
{
Mat
grayTemp
,
grayDown
;
std
::
vector
<
Mat
>
mv
;
Mat
realImage
(
*
resizedImageSize
,
CV_64F
);
Mat
imaginaryImage
(
*
resizedImageSize
,
CV_64F
);
Size
resizedImageSize
(
resImWidth
,
resImHeight
);
Mat
realImage
(
resizedImageSize
,
CV_64F
);
Mat
imaginaryImage
(
resizedImageSize
,
CV_64F
);
imaginaryImage
.
setTo
(
0
);
Mat
combinedImage
(
*
resizedImageSize
,
CV_64FC2
);
Mat
combinedImage
(
resizedImageSize
,
CV_64FC2
);
Mat
imageDFT
;
Mat
logAmplitude
;
Mat
angle
(
*
resizedImageSize
,
CV_64F
);
Mat
magnitude
(
*
resizedImageSize
,
CV_64F
);
Mat
angle
(
resizedImageSize
,
CV_64F
);
Mat
magnitude
(
resizedImageSize
,
CV_64F
);
Mat
logAmplitude_blur
,
imageGR
;
if
(
image
.
channels
()
==
3
)
{
cvtColor
(
image
,
imageGR
,
COLOR_BGR2GRAY
);
resize
(
imageGR
,
grayDown
,
*
resizedImageSize
,
0
,
0
,
INTER_LINEAR
);
resize
(
imageGR
,
grayDown
,
resizedImageSize
,
0
,
0
,
INTER_LINEAR
);
}
else
{
resize
(
image
,
grayDown
,
*
resizedImageSize
,
0
,
0
,
INTER_LINEAR
);
resize
(
image
,
grayDown
,
resizedImageSize
,
0
,
0
,
INTER_LINEAR
);
}
grayDown
.
convertTo
(
realImage
,
CV_64F
);
...
...
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