当前位置:网站首页>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));
边栏推荐
- 海内外技术人们“看”音视频技术的未来
- Network security -burpsuit
- Digital collections accelerated out of the circle, and marsnft helped diversify the culture and tourism economy!
- Unity3D学习笔记4——创建Mesh高级接口
- 网络安全-CSRF
- Adults have only one main job, but they have to pay a price. I was persuaded to step back by personnel, and I cried all night
- GEE(四):计算两个变量(影像)之间的相关性并绘制散点图
- Wechat forum exchange applet system graduation design (5) assignment
- Txt file virus
- 高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
猜你喜欢

成年人只有一份主业是要付出代价的,被人事劝退后,我哭了一整晚

Are the microorganisms in the intestines the same as those on the skin?

七月第一周

The wonderful relationship between message queue and express cabinet

Database daily question --- day 22: last login

Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020

数据库每日一题---第22天:最后一次登录

Matlab 信号处理【问答随笔·2】

二叉树(Binary Tree)

Specific method example of V20 frequency converter manual automatic switching (local remote switching)
随机推荐
Wechat forum exchange applet system graduation design completion (4) opening report
Classification and prediction of heartbeat signal
When copying something from the USB flash disk, an error volume error is reported. Please run CHKDSK
U盘拷贝东西时,报错卷错误,请运行chkdsk
【微服务|SCG】gateway整合sentinel
STL标准模板库(Standard Template Library)一周学习总结
Statistical method for anomaly detection
Wechat forum exchange applet system graduation design completion (6) opening defense ppt
网络安全-CSRF
14、 Two methods of database export and import
七月第一周
oc 可变參数传递
JMeter interface automated test read case, execute and write back result
Install Fedora under RedHat
Software evaluation center ▏ what are the basic processes and precautions for automated testing?
Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?
Advantages and disadvantages of rest ful API
[record of question brushing] 3 Longest substring without duplicate characters
[network] Introduction to C language
【刷题记录】3. 无重复字符的最长子串