SourceXtractorPlusPlus
0.16
Please provide a description of the project.
SEImplementation
SEImplementation
Segmentation
MLSegmentation.h
Go to the documentation of this file.
1
19
#ifndef _SEIMPLEMENTATION_SEGMENTATION_MLSEGMENTATION_H_
20
#define _SEIMPLEMENTATION_SEGMENTATION_MLSEGMENTATION_H_
21
22
#include "
SEFramework/Source/SourceFactory.h
"
23
#include "
SEFramework/Pipeline/Segmentation.h
"
24
25
namespace
SourceXtractor
{
26
27
32
class
MLSegmentation
:
public
Segmentation::Labelling
{
33
public
:
34
35
virtual
~MLSegmentation
() =
default
;
36
37
MLSegmentation
(
std::shared_ptr<SourceFactory>
source_factory,
std::string
model_path,
double
ml_threshold)
38
:
m_source_factory
(source_factory),
m_model_path
(model_path),
m_ml_threshold
(ml_threshold) {
39
assert(source_factory !=
nullptr
);
40
}
41
42
void
labelImage
(
Segmentation::LabellingListener
& listener,
std::shared_ptr<const DetectionImageFrame>
frame)
override
;
43
44
private
:
45
struct
Tile
{
46
PixelCoordinate
offset
;
47
int
width
,
height
;
48
};
49
50
std::vector<MLSegmentation::Tile>
getTiles
(
const
DetectionImage
& image)
const
;
51
52
53
std::shared_ptr<SourceFactory>
m_source_factory
;
54
55
std::string
m_model_path
;
56
double
m_ml_threshold
;
57
58
};
59
60
}
61
62
#endif
/* _SEIMPLEMENTATION_SEGMENTATION_MLSEGMENTATION_H_ */
Segmentation.h
SourceFactory.h
std::string
SourceXtractor::Image
Interface representing an image.
Definition:
Image.h:43
SourceXtractor::MLSegmentation
Implements a Segmentation based on CNN.
Definition:
MLSegmentation.h:32
SourceXtractor::MLSegmentation::~MLSegmentation
virtual ~MLSegmentation()=default
SourceXtractor::MLSegmentation::m_ml_threshold
double m_ml_threshold
Definition:
MLSegmentation.h:56
SourceXtractor::MLSegmentation::m_model_path
std::string m_model_path
Definition:
MLSegmentation.h:55
SourceXtractor::MLSegmentation::getTiles
std::vector< MLSegmentation::Tile > getTiles(const DetectionImage &image) const
SourceXtractor::MLSegmentation::labelImage
void labelImage(Segmentation::LabellingListener &listener, std::shared_ptr< const DetectionImageFrame > frame) override
Definition:
MLSegmentation.cpp:93
SourceXtractor::MLSegmentation::m_source_factory
std::shared_ptr< SourceFactory > m_source_factory
Definition:
MLSegmentation.h:53
SourceXtractor::MLSegmentation::MLSegmentation
MLSegmentation(std::shared_ptr< SourceFactory > source_factory, std::string model_path, double ml_threshold)
Definition:
MLSegmentation.h:37
SourceXtractor::Segmentation::LabellingListener
Definition:
Segmentation.h:94
SourceXtractor::Segmentation::Labelling
Definition:
Segmentation.h:118
SourceXtractor
Definition:
Aperture.h:30
std::shared_ptr< SourceFactory >
SourceXtractor::MLSegmentation::Tile
Definition:
MLSegmentation.h:45
SourceXtractor::MLSegmentation::Tile::height
int height
Definition:
MLSegmentation.h:47
SourceXtractor::MLSegmentation::Tile::width
int width
Definition:
MLSegmentation.h:47
SourceXtractor::MLSegmentation::Tile::offset
PixelCoordinate offset
Definition:
MLSegmentation.h:46
SourceXtractor::PixelCoordinate
A pixel coordinate made of two integers m_x and m_y.
Definition:
PixelCoordinate.h:37
std::vector
Generated by
1.9.1