Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
27eb5d07
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27eb5d07
编写于
8月 13, 2012
作者:
A
Alexey Spizhevoy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added getScale/setScale for image warpers (stitching module)
上级
87737c20
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
23 deletion
+32
-23
modules/stitching/include/opencv2/stitching/detail/warpers.hpp
...es/stitching/include/opencv2/stitching/detail/warpers.hpp
+15
-12
modules/stitching/include/opencv2/stitching/stitcher.hpp
modules/stitching/include/opencv2/stitching/stitcher.hpp
+13
-9
samples/cpp/CMakeLists.txt
samples/cpp/CMakeLists.txt
+4
-2
未找到文件。
modules/stitching/include/opencv2/stitching/detail/warpers.hpp
浏览文件 @
27eb5d07
...
...
@@ -65,11 +65,13 @@ public:
virtual
Point
warp
(
const
Mat
&
src
,
const
Mat
&
K
,
const
Mat
&
R
,
int
interp_mode
,
int
border_mode
,
Mat
&
dst
)
=
0
;
// TODO add other backward functions for consistency or move this into a separated interface
virtual
void
warpBackward
(
const
Mat
&
src
,
const
Mat
&
K
,
const
Mat
&
R
,
int
interp_mode
,
int
border_mode
,
Size
dst_size
,
Mat
&
dst
)
=
0
;
virtual
Rect
warpRoi
(
Size
src_size
,
const
Mat
&
K
,
const
Mat
&
R
)
=
0
;
virtual
float
getScale
()
const
{
return
1.
f
;
}
virtual
void
setScale
(
float
)
{}
};
...
...
@@ -104,6 +106,9 @@ public:
Rect
warpRoi
(
Size
src_size
,
const
Mat
&
K
,
const
Mat
&
R
);
float
getScale
()
const
{
return
projector_
.
scale
;
}
void
setScale
(
float
val
)
{
projector_
.
scale
=
val
;
}
protected:
// Detects ROI of the destination image. It's correct for any projection.
...
...
@@ -129,8 +134,6 @@ class CV_EXPORTS PlaneWarper : public RotationWarperBase<PlaneProjector>
public:
PlaneWarper
(
float
scale
=
1.
f
)
{
projector_
.
scale
=
scale
;
}
void
setScale
(
float
scale
)
{
projector_
.
scale
=
scale
;
}
Point2f
warpPoint
(
const
Point2f
&
pt
,
const
Mat
&
K
,
const
Mat
&
R
,
const
Mat
&
T
);
Rect
buildMaps
(
Size
src_size
,
const
Mat
&
K
,
const
Mat
&
R
,
const
Mat
&
T
,
Mat
&
xmap
,
Mat
&
ymap
);
...
...
@@ -225,12 +228,12 @@ struct CV_EXPORTS CompressedRectilinearProjector : ProjectorBase
class
CV_EXPORTS
CompressedRectilinearWarper
:
public
RotationWarperBase
<
CompressedRectilinearProjector
>
{
public:
CompressedRectilinearWarper
(
float
scale
,
float
A
=
1
,
float
B
=
1
)
{
projector_
.
a
=
A
;
projector_
.
b
=
B
;
projector_
.
scale
=
scale
;
}
CompressedRectilinearWarper
(
float
scale
,
float
A
=
1
,
float
B
=
1
)
{
projector_
.
a
=
A
;
projector_
.
b
=
B
;
projector_
.
scale
=
scale
;
}
};
...
...
@@ -250,7 +253,7 @@ public:
{
projector_
.
a
=
A
;
projector_
.
b
=
B
;
projector_
.
scale
=
scale
;
projector_
.
scale
=
scale
;
}
};
...
...
@@ -271,7 +274,7 @@ public:
{
projector_
.
a
=
A
;
projector_
.
b
=
B
;
projector_
.
scale
=
scale
;
projector_
.
scale
=
scale
;
}
};
...
...
@@ -292,7 +295,7 @@ public:
{
projector_
.
a
=
A
;
projector_
.
b
=
B
;
projector_
.
scale
=
scale
;
projector_
.
scale
=
scale
;
}
};
...
...
modules/stitching/include/opencv2/stitching/stitcher.hpp
浏览文件 @
27eb5d07
...
...
@@ -64,15 +64,6 @@ public:
// Creates stitcher with default parameters
static
Stitcher
createDefault
(
bool
try_use_gpu
=
false
);
Status
estimateTransform
(
InputArray
images
);
Status
estimateTransform
(
InputArray
images
,
const
std
::
vector
<
std
::
vector
<
Rect
>
>
&
rois
);
Status
composePanorama
(
OutputArray
pano
);
Status
composePanorama
(
InputArray
images
,
OutputArray
pano
);
Status
stitch
(
InputArray
images
,
OutputArray
pano
);
Status
stitch
(
InputArray
images
,
const
std
::
vector
<
std
::
vector
<
Rect
>
>
&
rois
,
OutputArray
pano
);
double
registrationResol
()
const
{
return
registr_resol_
;
}
void
setRegistrationResol
(
double
resol_mpx
)
{
registr_resol_
=
resol_mpx
;
}
...
...
@@ -130,6 +121,19 @@ public:
const
Ptr
<
detail
::
Blender
>
blender
()
const
{
return
blender_
;
}
void
setBlender
(
Ptr
<
detail
::
Blender
>
b
)
{
blender_
=
b
;
}
Status
estimateTransform
(
InputArray
images
);
Status
estimateTransform
(
InputArray
images
,
const
std
::
vector
<
std
::
vector
<
Rect
>
>
&
rois
);
Status
composePanorama
(
OutputArray
pano
);
Status
composePanorama
(
InputArray
images
,
OutputArray
pano
);
Status
stitch
(
InputArray
images
,
OutputArray
pano
);
Status
stitch
(
InputArray
images
,
const
std
::
vector
<
std
::
vector
<
Rect
>
>
&
rois
,
OutputArray
pano
);
std
::
vector
<
int
>
component
()
const
{
return
indices_
;
}
std
::
vector
<
detail
::
CameraParams
>
cameras
()
const
{
return
cameras_
;
}
double
workScale
()
const
{
return
work_scale_
;
}
private:
Stitcher
()
{}
...
...
samples/cpp/CMakeLists.txt
浏览文件 @
27eb5d07
...
...
@@ -5,13 +5,15 @@
SET
(
OPENCV_CPP_SAMPLES_REQUIRED_DEPS opencv_core opencv_flann opencv_imgproc
opencv_highgui opencv_ml opencv_video opencv_objdetect opencv_photo opencv_nonfree
opencv_features2d opencv_calib3d opencv_legacy opencv_contrib opencv_stitching opencv_videostab
)
opencv_features2d opencv_calib3d opencv_legacy opencv_contrib opencv_stitching opencv_videostab
opencv_core_vision_api
)
ocv_check_dependencies
(
${
OPENCV_CPP_SAMPLES_REQUIRED_DEPS
}
)
add_definitions
(
-DENABLE_LOG
)
if
(
BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND
)
project
(
c
pp
_samples
)
project
(
c
ore_vision_api
_samples
)
ocv_include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/include"
)
#for opencv.hpp
ocv_include_modules
(
${
OPENCV_CPP_SAMPLES_REQUIRED_DEPS
}
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录