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
fba71a8e
Commit
fba71a8e
authored
Jun 08, 2014
by
biagio montesano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added methods for derivation from FeatureDetector
parent
0863960c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
14 deletions
+71
-14
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+71
-14
BinaryDescriptor.cpp
modules/line_descriptor/src/BinaryDescriptor.cpp
+0
-0
No files found.
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
View file @
fba71a8e
...
...
@@ -53,18 +53,32 @@
namespace
cv
{
class
CV_EXPORTS_W
LineDescriptor
:
public
virtual
Algorithm
class
CV_EXPORTS_W
KeyLine
:
public
KeyPoint
{
public
:
virtual
~
LineDescriptor
();
void
getLineBinaryDescriptors
(
cv
::
Mat
&
oct_binaryDescMat
);
/* lines's extremes in original image */
float
startPointX
;
float
startPointY
;
float
endPointX
;
float
endPointY
;
/* line's extremes in image it was extracted from */
float
sPointInOctaveX
;
float
sPointInOctaveY
;
float
ePointInOctaveX
;
float
ePointInOctaveY
;
/* the length of line */
float
lineLength
;
/* number of pixels covered by the line */
unsigned
int
numOfPixels
;
protected
:
virtual
void
getLineBinaryDescriptorsImpl
(
cv
::
Mat
&
oct_binaryDescMat
);
};
class
CV_EXPORTS_W
BinaryDescriptor
:
public
LineDescrip
tor
class
CV_EXPORTS_W
BinaryDescriptor
:
public
DescriptorExtrac
tor
{
public
:
...
...
@@ -92,7 +106,10 @@ namespace cv
/* image's reduction ratio in construction of Gaussian pyramids */
CV_PROP_RW
int
reductionRatio
;
/* read parameters from a FileNode object and store them (struct function) */
void
read
(
const
FileNode
&
fn
);
/* store parameters to a FileStorage object (struct function) */
void
write
(
FileStorage
&
fs
)
const
;
};
...
...
@@ -100,29 +117,63 @@ namespace cv
CV_WRAP
BinaryDescriptor
(
const
BinaryDescriptor
::
Params
&
parameters
=
BinaryDescriptor
::
Params
());
/* read parameters from a FileNode object and store them (class function ) */
virtual
void
read
(
const
cv
::
FileNode
&
fn
);
/* store parameters to a FileStorage object (class function) */
virtual
void
write
(
cv
::
FileStorage
&
fs
)
const
;
void
getLineBinaryDescriptors
(
cv
::
Mat
&
oct_binaryDescMat
);
/* requires line detection (only one image) */
CV_WRAP
void
detect
(
const
Mat
&
image
,
CV_OUT
std
::
vector
<
KeyPoint
>&
keypoints
,
const
Mat
&
mask
=
Mat
()
);
protected
:
virtual
void
getLineBinaryDescriptorsImpl
(
cv
::
Mat
&
oct_binaryDescMat
);
AlgorithmInfo
*
info
()
const
;
/* requires line detection (more than one image) */
void
detect
(
const
std
::
vector
<
Mat
>&
images
,
std
::
vector
<
std
::
vector
<
KeyPoint
>
>&
keypoints
,
const
std
::
vector
<
Mat
>&
masks
=
std
::
vector
<
Mat
>
()
)
const
;
Params
params
;
/*return descriptor size */
int
descriptorSize
()
const
=
0
;
/* return data type */
int
descriptorType
()
const
=
0
;
/* return norm mode */
int
defaultNorm
()
const
=
0
;
/* check whether Gaussian pyramids were created */
bool
empty
()
const
;
protected
:
virtual
void
detectImpl
(
const
Mat
&
image
,
std
::
vector
<
KeyPoint
>&
keypoints
,
const
Mat
&
mask
=
Mat
()
)
const
=
0
;
AlgorithmInfo
*
info
()
const
;
private
:
/* conversion of an LBD descriptor to the decimal equivalent of its binary representation */
unsigned
char
binaryTest
(
float
*
f1
,
float
*
f2
);
/* compute LBD descriptors */
int
ComputeLBD_
(
ScaleLines
&
keyLines
);
int
OctaveKeyLines
(
std
::
vector
<
cv
::
Mat
>
&
octaveImages
,
ScaleLines
&
keyLines
);
/* gather lines in groups.
Each group contains the same line, detected in different octaves */
int
OctaveKeyLines
(
ScaleLines
&
keyLines
);
/* get coefficients of line passing by two points (in line_extremes) */
void
getLineParameters
(
cv
::
Vec4i
&
line_extremes
,
cv
::
Vec3i
&
lineParams
);
/* compute the angle between line and X axis */
float
getLineDirection
(
cv
::
Vec3i
&
lineParams
);
/* the local gaussian coefficient appl
y
to the orthogonal line direction within each band */
/* the local gaussian coefficient appl
ied
to the orthogonal line direction within each band */
std
::
vector
<
float
>
gaussCoefL_
;
/* the global gaussian coefficient appl
y
to each Row within line support region */
/* the global gaussian coefficient appl
ied
to each Row within line support region */
std
::
vector
<
float
>
gaussCoefG_
;
/* vector to store horizontal and vertical derivatives of octave images */
...
...
@@ -134,6 +185,12 @@ namespace cv
/* structure to store lines extracted from each octave image */
std
::
vector
<
std
::
vector
<
cv
::
Vec4i
>
>
extractedLines
;
/* descriptor parameters */
Params
params
;
/* vector to store the Gaussian pyramid od an input image */
std
::
vector
<
cv
::
Mat
>
octaveImages
;
};
}
...
...
modules/line_descriptor/src/BinaryDescriptor.cpp
View file @
fba71a8e
This diff is collapsed.
Click to expand it.
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