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
60019422
Commit
60019422
authored
May 21, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gftt wrapper, update testdata
parent
33447e0b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
39 deletions
+7
-39
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+0
-33
detectors.cpp
modules/features2d/src/detectors.cpp
+3
-2
sift.cpp
modules/features2d/src/sift.cpp
+2
-2
adetectordescriptor_evaluation.cpp
tests/cv/src/adetectordescriptor_evaluation.cpp
+2
-2
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
60019422
...
...
@@ -1323,39 +1323,6 @@ protected:
SURF
surf
;
};
/*template<typename T>
class CV_EXPORTS CalonderDescriptorExtractor : public DescriptorExtractor
{
public:
CalonderDescriptorExtractor( const string& classifierFile )
{
classifier.read(classifierFile.c_str());
}
virtual void compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors) const
{
// Cannot compute descriptors for keypoints on the image border.
removeBorderKeypoints(keypoints, image.size(), BORDER_SIZE);
// TODO Check 16-byte aligned
descriptors.create( keypoints.size(), classifier.classes(), DataType<T>::type );
PatchGenerator patchGen;
RNG rng;
for( size_t i = 0; i < keypoints.size(); i++ )
{
Mat patch;
patchGen( image, keypoints[i].pt, patch, Size(PATCH_SIZE, PATCH_SIZE), rng );
IplImage ipl = patch;
classifier.getSignature( &ipl, descriptors.ptr<T>(i));
}
}
protected:
static const int BORDER_SIZE = 16;
RTreeClassifier classifier;
};*/
/****************************************************************************************\
* Distance *
\****************************************************************************************/
...
...
modules/features2d/src/detectors.cpp
View file @
60019422
...
...
@@ -102,7 +102,7 @@ void GoodFeaturesToTrackDetector::detectImpl( const Mat& image, const Mat& mask,
vector
<
KeyPoint
>::
iterator
keypoint_it
=
keypoints
.
begin
();
for
(
;
corner_it
!=
corners
.
end
();
++
corner_it
,
++
keypoint_it
)
{
*
keypoint_it
=
KeyPoint
(
*
corner_it
,
1.
f
);
*
keypoint_it
=
KeyPoint
(
*
corner_it
,
blockSize
);
}
}
...
...
@@ -127,8 +127,9 @@ void MserFeatureDetector::detectImpl( const Mat& image, const Mat& mask, vector<
vector
<
KeyPoint
>::
iterator
keypoint_it
=
keypoints
.
begin
();
for
(
;
contour_it
!=
msers
.
end
();
++
contour_it
,
++
keypoint_it
)
{
// TODO check transformation from MSER region to KeyPoint
RotatedRect
rect
=
fitEllipse
(
Mat
(
*
contour_it
));
*
keypoint_it
=
KeyPoint
(
rect
.
center
,
min
(
rect
.
size
.
height
,
rect
.
size
.
width
),
rect
.
angle
);
*
keypoint_it
=
KeyPoint
(
rect
.
center
,
sqrt
(
rect
.
size
.
height
*
rect
.
size
.
width
),
rect
.
angle
);
}
}
...
...
modules/features2d/src/sift.cpp
View file @
60019422
...
...
@@ -2006,13 +2006,13 @@ SIFT::SIFT( const CommonParams& _commParams,
inline
KeyPoint
vlKeypointToOcv
(
const
VL
::
Sift
::
Keypoint
&
vlKeypoint
,
float
angle
)
{
return
KeyPoint
(
vlKeypoint
.
x
,
vlKeypoint
.
y
,
vlKeypoint
.
sigma
,
angle
,
0
,
vlKeypoint
.
o
,
0
);
return
KeyPoint
(
vlKeypoint
.
x
,
vlKeypoint
.
y
,
3
*
vlKeypoint
.
sigma
,
angle
,
0
,
vlKeypoint
.
o
,
0
);
}
inline
void
ocvKeypointToVl
(
const
KeyPoint
&
ocvKeypoint
,
const
VL
::
Sift
&
vlSift
,
VL
::
Sift
::
Keypoint
&
vlKeypoint
)
{
vlKeypoint
=
vlSift
.
getKeypoint
(
ocvKeypoint
.
pt
.
x
,
ocvKeypoint
.
pt
.
y
,
ocvKeypoint
.
size
);
vlKeypoint
=
vlSift
.
getKeypoint
(
ocvKeypoint
.
pt
.
x
,
ocvKeypoint
.
pt
.
y
,
ocvKeypoint
.
size
/
3
);
}
float
computeKeypointOrientations
(
VL
::
Sift
&
sift
,
const
VL
::
Sift
::
Keypoint
&
keypoint
,
int
angleMode
)
...
...
tests/cv/src/adetectordescriptor_evaluation.cpp
View file @
60019422
...
...
@@ -278,7 +278,7 @@ void transformToEllipticKeyPoints( const vector<KeyPoint>& src, vector<EllipticK
dst
.
resize
(
src
.
size
());
for
(
size_t
i
=
0
;
i
<
src
.
size
();
i
++
)
{
float
rad
=
src
[
i
].
size
;
float
rad
=
src
[
i
].
size
/
2
;
assert
(
rad
);
float
fac
=
1.
f
/
(
rad
*
rad
);
dst
[
i
]
=
EllipticKeyPoint
(
src
[
i
].
pt
,
Scalar
(
fac
,
0
,
fac
)
);
...
...
@@ -295,7 +295,7 @@ void transformToKeyPoints( const vector<EllipticKeyPoint>& src, vector<KeyPoint>
{
Size_
<
float
>
axes
=
src
[
i
].
axes
;
float
rad
=
sqrt
(
axes
.
height
*
axes
.
width
);
dst
[
i
]
=
KeyPoint
(
src
[
i
].
center
,
rad
);
dst
[
i
]
=
KeyPoint
(
src
[
i
].
center
,
2
*
rad
);
}
}
}
...
...
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