未验证 提交 3efca965 编写于 作者: H huzhiqiang 提交者: GitHub

[CV Lib] Fix the issue that tiny_publish dynamic lib can not link to cv_lib

上级 56a3e8d2
...@@ -30,6 +30,7 @@ namespace cv { ...@@ -30,6 +30,7 @@ namespace cv {
#define Radians2Degrees(radians) ((radians) * (180 / SK_ScalarPI)) #define Radians2Degrees(radians) ((radians) * (180 / SK_ScalarPI))
#define ScalarNearlyZero (1.0f / (1 << 12)) #define ScalarNearlyZero (1.0f / (1 << 12))
// init // init
__attribute__((visibility("default")))
ImagePreprocess::ImagePreprocess(ImageFormat srcFormat, ImagePreprocess::ImagePreprocess(ImageFormat srcFormat,
ImageFormat dstFormat, ImageFormat dstFormat,
TransParam param) { TransParam param) {
...@@ -37,7 +38,8 @@ ImagePreprocess::ImagePreprocess(ImageFormat srcFormat, ...@@ -37,7 +38,8 @@ ImagePreprocess::ImagePreprocess(ImageFormat srcFormat,
this->dstFormat_ = dstFormat; this->dstFormat_ = dstFormat;
this->transParam_ = param; this->transParam_ = param;
} }
void ImagePreprocess::imageConvert(const uint8_t* src, uint8_t* dst) { __attribute__((visibility("default"))) void ImagePreprocess::imageConvert(
const uint8_t* src, uint8_t* dst) {
ImageConvert img_convert; ImageConvert img_convert;
img_convert.choose(src, img_convert.choose(src,
dst, dst,
...@@ -47,10 +49,11 @@ void ImagePreprocess::imageConvert(const uint8_t* src, uint8_t* dst) { ...@@ -47,10 +49,11 @@ void ImagePreprocess::imageConvert(const uint8_t* src, uint8_t* dst) {
this->transParam_.ih); this->transParam_.ih);
} }
void ImagePreprocess::imageConvert(const uint8_t* src, __attribute__((visibility("default"))) void ImagePreprocess::imageConvert(
uint8_t* dst, const uint8_t* src,
ImageFormat srcFormat, uint8_t* dst,
ImageFormat dstFormat) { ImageFormat srcFormat,
ImageFormat dstFormat) {
ImageConvert img_convert; ImageConvert img_convert;
img_convert.choose(src, img_convert.choose(src,
dst, dst,
...@@ -60,18 +63,20 @@ void ImagePreprocess::imageConvert(const uint8_t* src, ...@@ -60,18 +63,20 @@ void ImagePreprocess::imageConvert(const uint8_t* src,
this->transParam_.ih); this->transParam_.ih);
} }
void ImagePreprocess::imageResize(const uint8_t* src, __attribute__((visibility("default"))) void ImagePreprocess::imageResize(
uint8_t* dst, const uint8_t* src,
ImageFormat srcFormat, uint8_t* dst,
int srcw, ImageFormat srcFormat,
int srch, int srcw,
int dstw, int srch,
int dsth) { int dstw,
int dsth) {
ImageResize img_resize; ImageResize img_resize;
img_resize.choose(src, dst, srcFormat, srcw, srch, dstw, dsth); img_resize.choose(src, dst, srcFormat, srcw, srch, dstw, dsth);
} }
void ImagePreprocess::imageResize(const uint8_t* src, uint8_t* dst) { __attribute__((visibility("default"))) void ImagePreprocess::imageResize(
const uint8_t* src, uint8_t* dst) {
int srcw = this->transParam_.iw; int srcw = this->transParam_.iw;
int srch = this->transParam_.ih; int srch = this->transParam_.ih;
int dstw = this->transParam_.ow; int dstw = this->transParam_.ow;
...@@ -81,17 +86,19 @@ void ImagePreprocess::imageResize(const uint8_t* src, uint8_t* dst) { ...@@ -81,17 +86,19 @@ void ImagePreprocess::imageResize(const uint8_t* src, uint8_t* dst) {
img_resize.choose(src, dst, srcFormat, srcw, srch, dstw, dsth); img_resize.choose(src, dst, srcFormat, srcw, srch, dstw, dsth);
} }
void ImagePreprocess::imageRotate(const uint8_t* src, __attribute__((visibility("default"))) void ImagePreprocess::imageRotate(
uint8_t* dst, const uint8_t* src,
ImageFormat srcFormat, uint8_t* dst,
int srcw, ImageFormat srcFormat,
int srch, int srcw,
float degree) { int srch,
float degree) {
ImageRotate img_rotate; ImageRotate img_rotate;
img_rotate.choose(src, dst, srcFormat, srcw, srch, degree); img_rotate.choose(src, dst, srcFormat, srcw, srch, degree);
} }
void ImagePreprocess::imageRotate(const uint8_t* src, uint8_t* dst) { __attribute__((visibility("default"))) void ImagePreprocess::imageRotate(
const uint8_t* src, uint8_t* dst) {
auto srcw = this->transParam_.ow; auto srcw = this->transParam_.ow;
auto srch = this->transParam_.oh; auto srch = this->transParam_.oh;
auto srcFormat = this->dstFormat_; auto srcFormat = this->dstFormat_;
...@@ -100,17 +107,19 @@ void ImagePreprocess::imageRotate(const uint8_t* src, uint8_t* dst) { ...@@ -100,17 +107,19 @@ void ImagePreprocess::imageRotate(const uint8_t* src, uint8_t* dst) {
img_rotate.choose(src, dst, srcFormat, srcw, srch, degree); img_rotate.choose(src, dst, srcFormat, srcw, srch, degree);
} }
void ImagePreprocess::imageFlip(const uint8_t* src, __attribute__((visibility("default"))) void ImagePreprocess::imageFlip(
uint8_t* dst, const uint8_t* src,
ImageFormat srcFormat, uint8_t* dst,
int srcw, ImageFormat srcFormat,
int srch, int srcw,
FlipParam flip_param) { int srch,
FlipParam flip_param) {
ImageFlip img_flip; ImageFlip img_flip;
img_flip.choose(src, dst, srcFormat, srcw, srch, flip_param); img_flip.choose(src, dst, srcFormat, srcw, srch, flip_param);
} }
void ImagePreprocess::imageFlip(const uint8_t* src, uint8_t* dst) { __attribute__((visibility("default"))) void ImagePreprocess::imageFlip(
const uint8_t* src, uint8_t* dst) {
auto srcw = this->transParam_.ow; auto srcw = this->transParam_.ow;
auto srch = this->transParam_.oh; auto srch = this->transParam_.oh;
auto srcFormat = this->dstFormat_; auto srcFormat = this->dstFormat_;
...@@ -119,24 +128,26 @@ void ImagePreprocess::imageFlip(const uint8_t* src, uint8_t* dst) { ...@@ -119,24 +128,26 @@ void ImagePreprocess::imageFlip(const uint8_t* src, uint8_t* dst) {
img_flip.choose(src, dst, srcFormat, srcw, srch, flip_param); img_flip.choose(src, dst, srcFormat, srcw, srch, flip_param);
} }
void ImagePreprocess::image2Tensor(const uint8_t* src, __attribute__((visibility("default"))) void ImagePreprocess::image2Tensor(
Tensor* dstTensor, const uint8_t* src,
ImageFormat srcFormat, Tensor* dstTensor,
int srcw, ImageFormat srcFormat,
int srch, int srcw,
LayoutType layout, int srch,
float* means, LayoutType layout,
float* scales) { float* means,
float* scales) {
Image2Tensor img2tensor; Image2Tensor img2tensor;
img2tensor.choose( img2tensor.choose(
src, dstTensor, srcFormat, layout, srcw, srch, means, scales); src, dstTensor, srcFormat, layout, srcw, srch, means, scales);
} }
void ImagePreprocess::image2Tensor(const uint8_t* src, __attribute__((visibility("default"))) void ImagePreprocess::image2Tensor(
Tensor* dstTensor, const uint8_t* src,
LayoutType layout, Tensor* dstTensor,
float* means, LayoutType layout,
float* scales) { float* means,
float* scales) {
Image2Tensor img2tensor; Image2Tensor img2tensor;
img2tensor.choose(src, img2tensor.choose(src,
dstTensor, dstTensor,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册