remove const definition on process function
This commit is contained in:
parent
88daa18a1f
commit
363fbf5517
|
@ -59,7 +59,7 @@ void hole_filler::enable(const char* name, bool able)
|
||||||
{
|
{
|
||||||
enabled_ = able;
|
enabled_ = able;
|
||||||
}
|
}
|
||||||
int hole_filler::process(const std::vector<PROCIMGINFO>& in, std::vector<PROCIMGINFO>& out)
|
int hole_filler::process(std::vector<PROCIMGINFO>& in, std::vector<PROCIMGINFO>& out)
|
||||||
{
|
{
|
||||||
int ret = SCANNER_ERR_OK;
|
int ret = SCANNER_ERR_OK;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
virtual int set_value(const char* name, void* val) override;
|
virtual int set_value(const char* name, void* val) override;
|
||||||
virtual void enable(const char* name, bool able) override;
|
virtual void enable(const char* name, bool able) override;
|
||||||
virtual int process(const std::vector<PROCIMGINFO>& in, std::vector<PROCIMGINFO>& out) override;
|
virtual int process(std::vector<PROCIMGINFO>& in, std::vector<PROCIMGINFO>& out) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -79,6 +79,6 @@ public:
|
||||||
int get_version(void) { return ver_; }
|
int get_version(void) { return ver_; }
|
||||||
int get_position(void) { return pos_; }
|
int get_position(void) { return pos_; }
|
||||||
|
|
||||||
virtual int process(const std::vector<PROCIMGINFO>& in, std::vector<PROCIMGINFO>& out) = 0;
|
virtual int process(std::vector<PROCIMGINFO>& in, std::vector<PROCIMGINFO>& out) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <huagaoxxx_warraper_ex.h>
|
#include <huagaoxxx_warraper_ex.h>
|
||||||
|
|
||||||
#include <imgproc-pak/fill_hole.h>
|
#include <imgproc-pak/fill_hole.h>
|
||||||
|
#include <imgproc-pak/multi_out.h>
|
||||||
|
|
||||||
|
|
||||||
static std::string device_opt_json[] = {
|
static std::string device_opt_json[] = {
|
||||||
|
@ -306,10 +307,16 @@ int imgproc_mgr::set_value(const char* name, void* val)
|
||||||
int imgproc_mgr::load_processor(const char* path)
|
int imgproc_mgr::load_processor(const char* path)
|
||||||
{
|
{
|
||||||
int ret = SCANNER_ERR_OK;
|
int ret = SCANNER_ERR_OK;
|
||||||
hole_filler* holer = new hole_filler();
|
|
||||||
|
|
||||||
opts_->add(holer);
|
#define ADD_IMG_PROCESSOR(cls) \
|
||||||
holer->release();
|
{ \
|
||||||
|
cls *obj = new cls(); \
|
||||||
|
opts_->add(obj); \
|
||||||
|
obj->release(); \
|
||||||
|
}
|
||||||
|
|
||||||
|
ADD_IMG_PROCESSOR(hole_filler);
|
||||||
|
ADD_IMG_PROCESSOR(multi_outer);
|
||||||
|
|
||||||
std::sort(processors_.begin(), processors_.end(), &imgproc_mgr::sort_processor_by_pos);
|
std::sort(processors_.begin(), processors_.end(), &imgproc_mgr::sort_processor_by_pos);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue