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
8fa8fa80
Commit
8fa8fa80
authored
May 22, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #233 from vpisarev/features2d_fixes
Features2d fixes
parents
c9fb3913
0f38313f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
13 deletions
+41
-13
retina_ocl.cpp
modules/bioinspired/src/retina_ocl.cpp
+1
-1
saliencyBaseClasses.hpp
...saliency/include/opencv2/saliency/saliencyBaseClasses.hpp
+5
-5
saliencySpecializedClasses.hpp
...y/include/opencv2/saliency/saliencySpecializedClasses.hpp
+3
-3
objectnessBING.cpp
modules/saliency/src/BING/objectnessBING.cpp
+1
-1
motionSaliencyBinWangApr2014.cpp
modules/saliency/src/motionSaliencyBinWangApr2014.cpp
+1
-1
saliency.cpp
modules/saliency/src/saliency.cpp
+1
-1
staticSaliencySpectralResidual.cpp
modules/saliency/src/staticSaliencySpectralResidual.cpp
+1
-1
test_features2d.cpp
modules/xfeatures2d/test/test_features2d.cpp
+28
-0
No files found.
modules/bioinspired/src/retina_ocl.cpp
View file @
8fa8fa80
...
...
@@ -351,7 +351,7 @@ void RetinaOCLImpl::setupIPLMagnoChannel(const bool normaliseOutput, const float
_retinaParameters
.
IplMagno
.
localAdaptintegration_k
=
localAdaptintegration_k
;
}
void
RetinaOCLImpl
::
run
(
const
InputArray
input
)
void
RetinaOCLImpl
::
run
(
InputArray
input
)
{
oclMat
&
inputMatToConvert
=
getOclMatRef
(
input
);
bool
colorMode
=
convertToColorPlanes
(
inputMatToConvert
,
_inputBuffer
);
...
...
modules/saliency/include/opencv2/saliency/saliencyBaseClasses.hpp
View file @
8fa8fa80
...
...
@@ -78,7 +78,7 @@ class CV_EXPORTS Saliency : public virtual Algorithm
* \param saliencyMap The computed saliency map.
* \return true if the saliency map is computed, false otherwise
*/
bool
computeSaliency
(
const
InputArray
image
,
OutputArray
saliencyMap
);
bool
computeSaliency
(
InputArray
image
,
OutputArray
saliencyMap
);
/**
* \brief Get the name of the specific saliency type
...
...
@@ -88,7 +88,7 @@ class CV_EXPORTS Saliency : public virtual Algorithm
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
virtual
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
String
className
;
};
...
...
@@ -114,7 +114,7 @@ class CV_EXPORTS StaticSaliency : public virtual Saliency
*/
bool
computeBinaryMap
(
const
Mat
&
saliencyMap
,
Mat
&
binaryMap
);
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
virtual
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
};
...
...
@@ -123,7 +123,7 @@ class CV_EXPORTS MotionSaliency : public virtual Saliency
{
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
virtual
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
};
...
...
@@ -132,7 +132,7 @@ class CV_EXPORTS Objectness : public virtual Saliency
{
protected
:
virtual
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
virtual
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
)
=
0
;
};
...
...
modules/saliency/include/opencv2/saliency/saliencySpecializedClasses.hpp
View file @
8fa8fa80
...
...
@@ -94,7 +94,7 @@ public:
}
protected
:
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
);
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
);
int
resImWidth
;
int
resImHeight
;
...
...
@@ -154,7 +154,7 @@ protected:
The saliency map is given by a single *Mat* (one for each frame of an hypothetical video
stream).
*/
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
);
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
);
private
:
...
...
@@ -268,7 +268,7 @@ protected:
specialized algorithm, the objectnessBoundingBox is a *vector\<Vec4i\>*. Each bounding box is
represented by a *Vec4i* for (minX, minY, maxX, maxY).
*/
bool
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
objectnessBoundingBox
);
bool
computeSaliencyImpl
(
InputArray
image
,
OutputArray
objectnessBoundingBox
);
private
:
...
...
modules/saliency/src/BING/objectnessBING.cpp
View file @
8fa8fa80
...
...
@@ -460,7 +460,7 @@ void ObjectnessBING::write() const
}
bool
ObjectnessBING
::
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
objectnessBoundingBox
)
bool
ObjectnessBING
::
computeSaliencyImpl
(
InputArray
image
,
OutputArray
objectnessBoundingBox
)
{
ValStructVec
<
float
,
Vec4i
>
finalBoxes
;
getObjBndBoxesForSingleImage
(
image
.
getMat
(),
finalBoxes
,
250
);
...
...
modules/saliency/src/motionSaliencyBinWangApr2014.cpp
View file @
8fa8fa80
...
...
@@ -501,7 +501,7 @@ bool MotionSaliencyBinWangApr2014::templateReplacement( const Mat& finalBFMask,
return
true
;
}
bool
MotionSaliencyBinWangApr2014
::
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
bool
MotionSaliencyBinWangApr2014
::
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
)
{
Mat
highResBFMask
;
Mat
lowResBFMask
;
...
...
modules/saliency/src/saliency.cpp
View file @
8fa8fa80
...
...
@@ -62,7 +62,7 @@ Ptr<Saliency> Saliency::create( const String& saliencyType )
return
Ptr
<
Saliency
>
();
}
bool
Saliency
::
computeSaliency
(
const
InputArray
image
,
OutputArray
saliencyMap
)
bool
Saliency
::
computeSaliency
(
InputArray
image
,
OutputArray
saliencyMap
)
{
if
(
image
.
empty
()
)
return
false
;
...
...
modules/saliency/src/staticSaliencySpectralResidual.cpp
View file @
8fa8fa80
...
...
@@ -73,7 +73,7 @@ void StaticSaliencySpectralResidual::write( cv::FileStorage& /*fs*/) const
//params.write( fs );
}
bool
StaticSaliencySpectralResidual
::
computeSaliencyImpl
(
const
InputArray
image
,
OutputArray
saliencyMap
)
bool
StaticSaliencySpectralResidual
::
computeSaliencyImpl
(
InputArray
image
,
OutputArray
saliencyMap
)
{
Mat
grayTemp
,
grayDown
;
std
::
vector
<
Mat
>
mv
;
...
...
modules/xfeatures2d/test/test_features2d.cpp
View file @
8fa8fa80
...
...
@@ -1240,3 +1240,31 @@ TEST(DISABLED_Features2d_SURF_using_mask, regression)
FeatureDetectorUsingMaskTest
test
(
SURF
::
create
());
test
.
safe_run
();
}
TEST
(
XFeatures2d_DescriptorExtractor
,
batch
)
{
string
path
=
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"detectors_descriptors_evaluation/images_datasets/graf"
);
vector
<
Mat
>
imgs
,
descriptors
;
vector
<
vector
<
KeyPoint
>
>
keypoints
;
int
i
,
n
=
6
;
Ptr
<
SIFT
>
sift
=
SIFT
::
create
();
for
(
i
=
0
;
i
<
n
;
i
++
)
{
string
imgname
=
format
(
"%s/img%d.png"
,
path
.
c_str
(),
i
+
1
);
Mat
img
=
imread
(
imgname
,
0
);
imgs
.
push_back
(
img
);
}
sift
->
detect
(
imgs
,
keypoints
);
sift
->
compute
(
imgs
,
keypoints
,
descriptors
);
ASSERT_EQ
((
int
)
keypoints
.
size
(),
n
);
ASSERT_EQ
((
int
)
descriptors
.
size
(),
n
);
for
(
i
=
0
;
i
<
n
;
i
++
)
{
EXPECT_GT
((
int
)
keypoints
[
i
].
size
(),
100
);
EXPECT_GT
(
descriptors
[
i
].
rows
,
100
);
}
}
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