Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
3efca965
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3efca965
编写于
3月 06, 2020
作者:
H
huzhiqiang
提交者:
GitHub
3月 06, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CV Lib] Fix the issue that tiny_publish dynamic lib can not link to cv_lib
上级
56a3e8d2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
51 addition
and
40 deletion
+51
-40
lite/utils/cv/paddle_image_preprocess.cc
lite/utils/cv/paddle_image_preprocess.cc
+51
-40
未找到文件。
lite/utils/cv/paddle_image_preprocess.cc
浏览文件 @
3efca965
...
...
@@ -30,6 +30,7 @@ namespace cv {
#define Radians2Degrees(radians) ((radians) * (180 / SK_ScalarPI))
#define ScalarNearlyZero (1.0f / (1 << 12))
// init
__attribute__
((
visibility
(
"default"
)))
ImagePreprocess
::
ImagePreprocess
(
ImageFormat
srcFormat
,
ImageFormat
dstFormat
,
TransParam
param
)
{
...
...
@@ -37,7 +38,8 @@ ImagePreprocess::ImagePreprocess(ImageFormat srcFormat,
this
->
dstFormat_
=
dstFormat
;
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
;
img_convert
.
choose
(
src
,
dst
,
...
...
@@ -47,10 +49,11 @@ void ImagePreprocess::imageConvert(const uint8_t* src, uint8_t* dst) {
this
->
transParam_
.
ih
);
}
void
ImagePreprocess
::
imageConvert
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
ImageFormat
dstFormat
)
{
__attribute__
((
visibility
(
"default"
)))
void
ImagePreprocess
::
imageConvert
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
ImageFormat
dstFormat
)
{
ImageConvert
img_convert
;
img_convert
.
choose
(
src
,
dst
,
...
...
@@ -60,18 +63,20 @@ void ImagePreprocess::imageConvert(const uint8_t* src,
this
->
transParam_
.
ih
);
}
void
ImagePreprocess
::
imageResize
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
int
dstw
,
int
dsth
)
{
__attribute__
((
visibility
(
"default"
)))
void
ImagePreprocess
::
imageResize
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
int
dstw
,
int
dsth
)
{
ImageResize
img_resize
;
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
srch
=
this
->
transParam_
.
ih
;
int
dstw
=
this
->
transParam_
.
ow
;
...
...
@@ -81,17 +86,19 @@ void ImagePreprocess::imageResize(const uint8_t* src, uint8_t* dst) {
img_resize
.
choose
(
src
,
dst
,
srcFormat
,
srcw
,
srch
,
dstw
,
dsth
);
}
void
ImagePreprocess
::
imageRotate
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
float
degree
)
{
__attribute__
((
visibility
(
"default"
)))
void
ImagePreprocess
::
imageRotate
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
float
degree
)
{
ImageRotate
img_rotate
;
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
srch
=
this
->
transParam_
.
oh
;
auto
srcFormat
=
this
->
dstFormat_
;
...
...
@@ -100,17 +107,19 @@ void ImagePreprocess::imageRotate(const uint8_t* src, uint8_t* dst) {
img_rotate
.
choose
(
src
,
dst
,
srcFormat
,
srcw
,
srch
,
degree
);
}
void
ImagePreprocess
::
imageFlip
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
FlipParam
flip_param
)
{
__attribute__
((
visibility
(
"default"
)))
void
ImagePreprocess
::
imageFlip
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
FlipParam
flip_param
)
{
ImageFlip
img_flip
;
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
srch
=
this
->
transParam_
.
oh
;
auto
srcFormat
=
this
->
dstFormat_
;
...
...
@@ -119,24 +128,26 @@ void ImagePreprocess::imageFlip(const uint8_t* src, uint8_t* dst) {
img_flip
.
choose
(
src
,
dst
,
srcFormat
,
srcw
,
srch
,
flip_param
);
}
void
ImagePreprocess
::
image2Tensor
(
const
uint8_t
*
src
,
Tensor
*
dstTensor
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
LayoutType
layout
,
float
*
means
,
float
*
scales
)
{
__attribute__
((
visibility
(
"default"
)))
void
ImagePreprocess
::
image2Tensor
(
const
uint8_t
*
src
,
Tensor
*
dstTensor
,
ImageFormat
srcFormat
,
int
srcw
,
int
srch
,
LayoutType
layout
,
float
*
means
,
float
*
scales
)
{
Image2Tensor
img2tensor
;
img2tensor
.
choose
(
src
,
dstTensor
,
srcFormat
,
layout
,
srcw
,
srch
,
means
,
scales
);
}
void
ImagePreprocess
::
image2Tensor
(
const
uint8_t
*
src
,
Tensor
*
dstTensor
,
LayoutType
layout
,
float
*
means
,
float
*
scales
)
{
__attribute__
((
visibility
(
"default"
)))
void
ImagePreprocess
::
image2Tensor
(
const
uint8_t
*
src
,
Tensor
*
dstTensor
,
LayoutType
layout
,
float
*
means
,
float
*
scales
)
{
Image2Tensor
img2tensor
;
img2tensor
.
choose
(
src
,
dstTensor
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录