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
fd1f644e
Commit
fd1f644e
authored
Jan 31, 2011
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #772 (added empty implementation of SIFT class methods throwing exception if ARM)
parent
40f0b1c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
6 deletions
+48
-6
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+5
-4
sift.cpp
modules/features2d/src/sift.cpp
+43
-2
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
fd1f644e
...
...
@@ -326,7 +326,7 @@ public:
const
DescriptorParams
&
_descriptorParams
=
DescriptorParams
()
);
//! returns the descriptor size in floats (128)
int
descriptorSize
()
const
{
return
DescriptorParams
::
DESCRIPTOR_SIZE
;
}
int
descriptorSize
()
const
;
//! finds the keypoints using SIFT algorithm
void
operator
()(
const
Mat
&
img
,
const
Mat
&
mask
,
vector
<
KeyPoint
>&
keypoints
)
const
;
...
...
@@ -337,9 +337,10 @@ public:
Mat
&
descriptors
,
bool
useProvidedKeypoints
=
false
)
const
;
CommonParams
getCommonParams
()
const
{
return
commParams
;
}
DetectorParams
getDetectorParams
()
const
{
return
detectorParams
;
}
DescriptorParams
getDescriptorParams
()
const
{
return
descriptorParams
;
}
CommonParams
getCommonParams
()
const
;
DetectorParams
getDetectorParams
()
const
;
DescriptorParams
getDescriptorParams
()
const
;
protected
:
CommonParams
commParams
;
DetectorParams
detectorParams
;
...
...
modules/features2d/src/sift.cpp
View file @
fd1f644e
...
...
@@ -56,7 +56,28 @@
#undef ARM_NO_SIFT
#endif //ANDROID
#ifndef ARM_NO_SIFT
#ifdef ARM_NO_SIFT
static
inline
void
throw_nosift
()
{
CV_Error
(
CV_StsBadFunc
,
"The library is compiled under ARM without SIFT support"
);
}
cv
::
SIFT
::
CommonParams
::
CommonParams
()
{
}
cv
::
SIFT
::
CommonParams
::
CommonParams
(
int
,
int
,
int
,
int
)
{
throw_nosift
();
}
cv
::
SIFT
::
DetectorParams
::
DetectorParams
()
{
throw_nosift
();
}
cv
::
SIFT
::
DetectorParams
::
DetectorParams
(
double
,
double
)
{
throw_nosift
();
}
cv
::
SIFT
::
DescriptorParams
::
DescriptorParams
()
{
throw_nosift
();
}
cv
::
SIFT
::
DescriptorParams
::
DescriptorParams
(
double
,
bool
,
bool
)
{
throw_nosift
();
}
cv
::
SIFT
::
SIFT
()
{
throw_nosift
();
}
cv
::
SIFT
::
SIFT
(
double
,
double
,
int
,
int
,
int
,
int
)
{
throw_nosift
();
}
cv
::
SIFT
::
SIFT
(
double
,
bool
,
bool
,
int
,
int
,
int
,
int
)
{
throw_nosift
();
}
cv
::
SIFT
::
SIFT
(
const
CommonParams
&
,
const
DetectorParams
&
,
const
DescriptorParams
&
)
{
throw_nosift
();
}
int
cv
::
SIFT
::
descriptorSize
()
const
{
throw_nosift
();
return
0
;
}
void
cv
::
SIFT
::
operator
()(
const
Mat
&
,
const
Mat
&
,
vector
<
KeyPoint
>&
)
const
{
throw_nosift
();
}
void
cv
::
SIFT
::
operator
()(
const
Mat
&
,
const
Mat
&
,
vector
<
KeyPoint
>&
,
Mat
&
,
bool
)
const
{
throw_nosift
();
}
cv
::
SIFT
::
CommonParams
cv
::
SIFT
::
getCommonParams
()
const
{
throw_nosift
();
return
cv
::
SIFT
::
CommonParams
();
}
cv
::
SIFT
::
DetectorParams
cv
::
SIFT
::
getDetectorParams
()
const
{
throw_nosift
();
return
cv
::
SIFT
::
DetectorParams
();
}
cv
::
SIFT
::
DescriptorParams
cv
::
SIFT
::
getDescriptorParams
()
const
{
throw_nosift
();
return
cv
::
SIFT
::
DescriptorParams
();
}
#else // with SIFT
#include <iostream>
#include <limits>
...
...
@@ -2048,6 +2069,26 @@ SIFT::SIFT( const CommonParams& _commParams,
descriptorParams
=
_descriptorParams
;
}
int
SIFT
::
descriptorSize
()
const
{
return
DescriptorParams
::
DESCRIPTOR_SIZE
;
}
SIFT
::
CommonParams
SIFT
::
getCommonParams
()
const
{
return
commParams
;
}
SIFT
::
DetectorParams
SIFT
::
getDetectorParams
()
const
{
return
detectorParams
;
}
SIFT
::
DescriptorParams
SIFT
::
getDescriptorParams
()
const
{
return
descriptorParams
;
}
inline
KeyPoint
vlKeypointToOcv
(
const
VL
::
Sift
&
vlSift
,
const
VL
::
Sift
::
Keypoint
&
vlKeypoint
,
float
angle
)
{
float
size
=
vlKeypoint
.
sigma
*
SIFT
::
DescriptorParams
::
GET_DEFAULT_MAGNIFICATION
()
*
4
;
// 4==NBP
...
...
@@ -2189,4 +2230,4 @@ void SIFT::operator()(const Mat& img, const Mat& mask,
keypoints
.
erase
(
remove_if
(
keypoints
.
begin
(),
keypoints
.
end
(),
InvalidKeypoint
()),
keypoints
.
end
());
}
#endif
#endif
// ARM_NO_SIFT
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