当前位置:网站首页>Gocv split color channel
Gocv split color channel
2022-07-02 08:51:00 【Tutu is a cat】
gocv Split picture color channel
Open the window
window := gocv.NewWindow("Hello")
Set window mode adaptation
window.SetWindowProperty(gocv.WindowPropertyAutosize,gocv.WindowAutosize)
Read the picture
read := gocv.IMRead("image/front.jpg", gocv.IMReadColor)
View picture type
fmt.Println(read.Type())
Split color channel ( After the image is split 3 The channels are BGR)
var rgbChan1 []gocv.Mat
bgrChan := gocv.Split(read)
The color of each channel after image splitting
//blue:= bgrChan[0]
green := bgrChan[1]
//red := bgrChan[2]
New black picture
back_ch := gocv.Zeros(read.Rows(),read.Cols(),gocv.MatTypeCV8UC1)
Combine this channel with the black picture 3 Channel picture
rgbChan1 = append(rgbChan1,back_ch)
rgbChan1 = append(rgbChan1,green)
rgbChan1 = append(rgbChan1,back_ch)
establish 3 Channel new picture
image := gocv.NewMatWithSize(read.Rows(),read.Cols(),gocv.MatTypeCV8UC3)
Combine the above channels with pictures and show
gocv.Merge(rgbChan1,&image)
window.IMShow(image)
window.WaitKey(0)
边栏推荐
- C# 调用系统声音 嘀~
- gocv图片读取并展示
- OpenFeign 简单使用
- D interface and domain problems
- C Baidu map, Gaode map, Google map (GPS) longitude and latitude conversion
- Find the node with the smallest value range in the linked list and move it to the front of the linked list
- Sqli labs level 12
- Gateway is easy to use
- Hcia - Application Layer
- Viewing JS array through V8
猜你喜欢

IP协议与IP地址
![[blackmail virus data recovery] suffix Rook3 blackmail virus](/img/46/debc848d17767d021f3f41924cccfe.jpg)
[blackmail virus data recovery] suffix Rook3 blackmail virus

Linux二进制安装Oracle Database 19c

Sqli labs (post type injection)

Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)

Move a string of numbers backward in sequence

TCP/IP—传输层

Getting started with k8s: building MySQL with Helm

ICMP协议

C language replaces spaces in strings with%20
随机推荐
Aneng logistics' share price hit a new low: the market value evaporated by nearly 10 billion yuan, and it's useless for chairman Wang Yongjun to increase his holdings
选择排序和插入排序
Image transformation, transpose
Sentinel 简单使用
Synchronize files using unison
Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)
Dip1000 implicitly tagged with fields
Minecraft插件服开服
C#钉钉开发:取得所有员工通讯录和发送工作通知
Minecraft air Island service
Luogu greedy part of the backpack line segment covers the queue to receive water
HCIA - application layer
Shortcut key to comment code and cancel code in idea
Openshift deployment application
gocv opencv exit status 3221225785
sqli-labs第12关
Npoi export word font size correspondence
ARP及ARP欺骗
[blackmail virus data recovery] suffix Crylock blackmail virus
Call Stack