当前位置:网站首页>Opencv scalar passes in three parameters, which can only be displayed in black, white and gray. Solve the problem
Opencv scalar passes in three parameters, which can only be displayed in black, white and gray. Solve the problem
2022-07-07 23:15:00 【Wang Bai ~】
The error code is :
cv::Mat img2(h, w, CV_8UC1, cv::Scalar(0, 255, 0));
scalar The three parameters passed in are BGR, The above function I want to generate is a green picture , However, what is actually produced is white .
The problem lies in the third parameter , Parameter is CV_8UC1 It means that the black-and-white gray pattern is generated . You need to change the parameter to CV_8UC3, This time can produce the correct results .
cv::Mat img2(h, w, CV_8UC3, cv::Scalar(0, 255, 0));
边栏推荐
- Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020
- When copying something from the USB flash disk, an error volume error is reported. Please run CHKDSK
- 网络安全-beef
- U盘拷贝东西时,报错卷错误,请运行chkdsk
- Wechat forum exchange applet system graduation design completion (7) Interim inspection report
- Gee (IV): calculate the correlation between two variables (images) and draw a scatter diagram
- Unity3D学习笔记5——创建子Mesh
- The 19th Zhejiang Provincial Collegiate Programming Contest VP记录+补题
- Technology at home and abroad people "see" the future of audio and video technology
- USB (十八)2022-04-17
猜你喜欢
How to operate DTC community?
JMeter-接口自动化测试读取用例,执行并结果回写
聊聊 Dart 的空安全 (null safety) 特性
十三、系统优化
数据库每日一题---第22天:最后一次登录
Oracle-数据库的备份与恢复
ArcGIS:字段赋值_属性表字段计算器(Field Calculator)依据条件为字段赋值
Cases of agile innovation and transformation of consumer goods enterprises
Talk about DART's null safety feature
Matlab 信号处理【问答随笔·2】
随机推荐
UE4_UE5全景相机
Wechat forum exchange applet system graduation design (2) applet function
Comparison of various development methods of applets - cross end? Low code? Native? Or cloud development?
OC variable parameter transfer
Unity dynamically merges mesh textures
USB(十四)2022-04-12
Unity3D学习笔记5——创建子Mesh
2021-01-12
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
Gbu1510-asemi power supply special 15A rectifier bridge gbu1510
Introduction to redis and jedis and redis things
微信论坛交流小程序系统毕业设计毕设(6)开题答辩PPT
Solution: prompt "unsupported video format" when inserting avi format video into the message
Kubernetes' simplified data storage storageclass (creation, deletion and initial use)
嵌入式音频开发中的两种曲线
网络安全-beef
USB(十六)2022-04-28
Cases of agile innovation and transformation of consumer goods enterprises
Clean C disk
2022 words for yourself