当前位置:网站首页>通道的分离与合并
通道的分离与合并
2022-07-24 17:05:00 【什么时候上岸?】
示例代码:
void demo::channels_demo(Mat& image)
{
vector<Mat> mv;
split(image, mv);
//imshow("red", mv[2]);
//imshow("green", mv[1]);
//imshow("blue", mv[0]);Mat dsc;
//mv[0] = 0;
mv[1] = 0;
merge(mv, dsc);
imshow("通道混合", dsc);int fromto[] = { 0,2,1,1,2,0 };
mixChannels(&image,1, &dsc,1, fromto,3);
}
mixChannels声明:
CV_EXPORTS void mixChannels(const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts,
const int* fromTo, size_t npairs);
第一个参数:输入矩阵
第二个参数:输入矩阵的数量
第三个参数:输出矩阵
第四个参数:输出矩阵的数量
第五个参数:复制列表
第六个参数:复制列表的数量
通道分离结果:

通道合并结果:

通道混合结果:

over!!!
边栏推荐
- Cross server, insert, search
- portfwd 端口转发
- Qsqldatabase: solution of qmmysql driver not loaded
- 查数据库实际数据增长情况
- ArcGIS pixel size changed from 0.00025 to meters
- Xxx.pro learning in QT
- GDB online debugging of work notes
- SS-Paper【1】:Fully Convolutional Networks for Semantic Segmentation
- 荣耀CEO赵明:单一厂商很难实现全场景产品覆盖
- Sword finger offer 22. the penultimate node in the linked list
猜你喜欢

PS pull out logo

Axi protocol (3): handshake mechanism and implementation details of Axi architecture

安全:如何为行人提供更多保护

一个实际使用SwiftUI 4.0中ViewThatFits自适应视图的例子

SS-Paper【1】:Fully Convolutional Networks for Semantic Segmentation

Template method mode

别再到处乱放配置文件了!试试我司使用 7 年的这套解决方案,稳的一秕

Check the actual data growth of the database

Axi protocol (2): five channels and two transactions of Axi architecture

Cann training camp learns the animation stylization and AOE ATC tuning of the second season of 2022 model series
随机推荐
Programming language exercises (I)
1184. Distance between bus stops
ZCMU--5023: 家庭划分(C语言)
Canvas 从入门到劝朋友放弃(图解版)
代码随想录笔记_链表_707设计链表
双亲委派机制
Digital transformation must have digital thinking
Transformer structure analysis -- learning notes
[technology] online seat selection demo of uniapp
什么是模糊理论,基础,流程
Custom types: Enumeration
EF combined with sqlbulkcopy batch insert data
Zcmu--5023: family division (C language)
Microsoft Visio professional 2013 cannot be opened or uninstalled. Solution
Rare earth Developer Conference | Apache pulsar committee Liu Dezhi shares the way of cloud native technology transformation
MySQL addition, deletion, modification, retrieval and constraint (detailed teaching)
Axi protocol (1): introduction to AMBA bus, introduction to Axi concept and background, characteristics and functions of Axi protocol
jvm类加载子系统
1309. Decode letter to integer mapping
Envi grid resampling