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
d5eeb91d
Commit
d5eeb91d
authored
May 30, 2014
by
biagio montesano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New line extraction method and OpenCV standards accomplished
parent
d79ae76a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
318 additions
and
14 deletions
+318
-14
CMakeLists.txt
modules/line_descriptor/CMakeLists.txt
+1
-2
CMakeLists.txt~
modules/line_descriptor/CMakeLists.txt~
+2
-1
line_descriptor.hpp
modules/line_descriptor/include/opencv2/line_descriptor.hpp
+54
-0
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+135
-0
line_detector.hpp~
...riptor/include/opencv2/line_descriptor/line_detector.hpp~
+59
-0
line_detector.hpp~
modules/line_descriptor/include/opencv2/line_detector.hpp~
+52
-0
BinaryDescriptor.cpp
modules/line_descriptor/src/BinaryDescriptor.cpp
+0
-0
line_descriptor_init.cpp
modules/line_descriptor/src/line_descriptor_init.cpp
+7
-7
precomp.hpp
modules/line_descriptor/src/precomp.hpp
+8
-4
No files found.
modules/line_descriptor/CMakeLists.txt
View file @
d5eeb91d
set
(
the_description
"Line descriptor"
)
ocv_define_module
(
line_descriptor opencv_imgproc opencv_optim
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
BIAS_CXX_FLAGS
}
-std=c++0x"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
BIAS_C_FLAGS
}
"
)
modules/line_descriptor/CMakeLists.txt~
View file @
d5eeb91d
set(the_description "Line descriptor")
ocv_define_module(line_descriptor opencv_imgproc opencv_optim)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIAS_CXX_FLAGS} -std=c++0x")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIAS_C_FLAGS}")
modules/line_descriptor/include/opencv2/line_descriptor.hpp
0 → 100644
View file @
d5eeb91d
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_LINE_DESCRIPTOR_HPP__
#define __OPENCV_LINE_DESCRIPTOR_HPP__
#include "opencv2/line_descriptor/descriptor.hpp"
#include "opencv2/core.hpp"
namespace
cv
{
CV_EXPORTS
bool
initModule_line_descriptor
(
void
);
}
#endif
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
0 → 100644
View file @
d5eeb91d
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//#ifdef __OPENCV_BUILD
//#error this is a compatibility header which should not be used inside the OpenCV library
//#endif
#ifndef __OPENCV_DESCRIPTOR_HPP__
#define __OPENCV_DESCRIPTOR_HPP__
#include "LineStructure.hpp"
#include "opencv2/core.hpp"
namespace
cv
{
class
CV_EXPORTS_W
LineDescriptor
:
public
virtual
Algorithm
{
public
:
virtual
~
LineDescriptor
();
void
getLineBinaryDescriptor
(
std
::
vector
<
cv
::
Mat
>
&
oct_binaryDescMat
);
protected
:
virtual
void
getLineBinaryDescriptorImpl
(
std
::
vector
<
cv
::
Mat
>
&
oct_binaryDescMat
,
ScaleLines
&
keyLines
);
};
class
CV_EXPORTS_W
BinaryDescriptor
:
public
LineDescriptor
{
public
:
struct
CV_EXPORTS_W_SIMPLE
Params
{
CV_WRAP
Params
();
/* global threshold for line descriptor distance, default is 0.35 */
CV_PROP_RW
float
LowestThreshold
;
/* the NNDR threshold for line descriptor distance, default is 0.6 */
CV_PROP_RW
float
NNDRThreshold
;
/* the size of Gaussian kernel: ksize X ksize, default value is 5 */
CV_PROP_RW
int
ksize_
;
/* the number of image octaves (default = 5) */
CV_PROP_RW
int
numOfOctave_
;
/* the number of bands used to compute line descriptor (default: 9) */
CV_PROP_RW
int
numOfBand_
;
/* the width of band; (default: 7) */
CV_PROP_RW
int
widthOfBand_
;
/* image's reduction ratio in construction of Gaussian pyramids */
CV_PROP_RW
int
reductionRatio
;
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
};
CV_WRAP
BinaryDescriptor
(
const
BinaryDescriptor
::
Params
&
parameters
=
BinaryDescriptor
::
Params
());
virtual
void
read
(
const
cv
::
FileNode
&
fn
);
virtual
void
write
(
cv
::
FileStorage
&
fs
)
const
;
void
getLineBinaryDescriptor
(
cv
::
Mat
&
oct_binaryDescMat
,
ScaleLines
&
keyLines
);
protected
:
virtual
void
getLineBinaryDescriptorImpl
(
std
::
vector
<
cv
::
Mat
>
&
oct_binaryDescMat
,
ScaleLines
&
keyLines
);
AlgorithmInfo
*
info
()
const
;
Params
params
;
private
:
unsigned
char
binaryTest
(
float
*
f1
,
float
*
f2
);
int
ComputeLBD_
(
ScaleLines
&
keyLines
);
/* the local gaussian coefficient apply to the orthogonal line direction within each band */
std
::
vector
<
float
>
gaussCoefL_
;
/* the global gaussian coefficient apply to each Row within line support region */
std
::
vector
<
float
>
gaussCoefG_
;
/* vector to store horizontal and vertical derivatives of octave images */
std
::
vector
<
cv
::
Mat
>
dxImg_vector
,
dyImg_vector
;
/* vectot to store sizes of octave images */
std
::
vector
<
cv
::
Size
>
images_sizes
;
};
}
#endif
modules/line_descriptor/include/opencv2/line_descriptor/line_detector.hpp~
0 → 100644
View file @
d5eeb91d
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//#ifdef __OPENCV_BUILD
//#error this is a compatibility header which should not be used inside the OpenCV library
//#endif
#ifndef __OPENCV_LINE_DETECTOR_HPP__
#define __OPENCV_LINE_DETECTOR_HPP__
#include <algorithm>
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "LineDescriptor.hpp"
#include "LineStructure.hpp"
#endif
modules/line_descriptor/include/opencv2/line_detector.hpp~
0 → 100644
View file @
d5eeb91d
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_TRACKING_HPP__
#define __OPENCV_TRACKING_HPP__
#include "opencv2/line_descriptor/line_detector.hpp"
namespace cv
{
CV_EXPORTS bool initModule_line_descriptor(void);
}
#endif //__OPENCV_TRACKING_HPP__
modules/line_descriptor/src/BinaryDescriptor.cpp
0 → 100644
View file @
d5eeb91d
This diff is collapsed.
Click to expand it.
modules/line_descriptor/src/line_descriptor_init.cpp
View file @
d5eeb91d
...
...
@@ -40,20 +40,20 @@
//M*/
#include "precomp.hpp"
#include "opencv2/line_detector.hpp"
//#include "opencv2/line_descriptor.hpp"
//class BinaryDescriptor;
namespace
cv
{
CV_INIT_ALGORITHM
(
EDLineDetector
,
"EDLINEDETECTOR"
,);
CV_INIT_ALGORITHM
(
LineDescriptor
,
"LINEDESCRIPTOR"
,);
CV_INIT_ALGORITHM
(
BinaryDescriptor
,
"BINARY.DESCRIPTOR"
,);
bool
initModule_
tracking
(
void
)
bool
initModule_
line_descriptor
(
void
)
{
bool
all
=
true
;
all
&=
!
EDLineDetector_info_auto
.
name
().
empty
();
all
&=
!
LineDescriptor_info_auto
.
name
().
empty
();
all
&=
!
BinaryDescriptor_info_auto
.
name
().
empty
();
return
all
;
}
...
...
modules/line_descriptor/src/precomp.hpp
View file @
d5eeb91d
...
...
@@ -42,13 +42,17 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#include "opencv2/line_descriptor/EDLineDetector.hpp"
#include "opencv2/line_descriptor/LineDescriptor.hpp"
#include "opencv2/line_descriptor/LineStructure.hpp"
#include <algorithm>
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include <algorithm>
#include <opencv2/imgproc.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/highgui.hpp>
#include "opencv2/line_descriptor.hpp"
#endif
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