[FlyCV] optimize the integration of FlyCV (#492)

* [Backend] fix lite backend save model error

* [Backend] fixed typos

* [FlyCV] optimize the integration of FlyCV

* [cmake] close some tests options

* [cmake] close some test option

* [FlyCV] remove un-need warnings

* [FlyCV] remove un-need GetMat method

* [FlyCV] optimize FlyCV codes

* [cmake] remove un-need cmake function in examples/CMakelists

* [cmake] support gflags for Android
This commit is contained in:
DefTruth
2022-11-04 09:19:03 +08:00
committed by GitHub
parent 5b1fecd668
commit a36d49a973
56 changed files with 670 additions and 487 deletions
@@ -64,7 +64,7 @@ bool StridePad::ImplByOpenCV(Mat* mat) {
}
#ifdef ENABLE_FLYCV
bool StridePad::ImplByFalconCV(Mat* mat) {
bool StridePad::ImplByFlyCV(Mat* mat) {
if (mat->layout != Layout::HWC) {
FDERROR << "StridePad: The input data must be Layout::HWC format!"
<< std::endl;
@@ -92,7 +92,7 @@ bool StridePad::ImplByFalconCV(Mat* mat) {
if (pad_h == 0 && pad_w == 0) {
return true;
}
fcv::Mat* im = mat->GetFalconCVMat();
fcv::Mat* im = mat->GetFlyCVMat();
fcv::Scalar value;
if (value_.size() == 1) {
value = fcv::Scalar(value_[0]);
@@ -105,7 +105,8 @@ bool StridePad::ImplByFalconCV(Mat* mat) {
}
fcv::Mat new_im;
// top, bottom, left, right
fcv::copy_make_border(*im, new_im, 0, pad_h, 0, pad_w, fcv::BorderTypes::BORDER_CONSTANT, value);
fcv::copy_make_border(*im, new_im, 0, pad_h, 0, pad_w,
fcv::BorderTypes::BORDER_CONSTANT, value);
mat->SetMat(new_im);
mat->SetHeight(new_im.height());
mat->SetWidth(new_im.width());