当前位置:网站首页>Get pictures through opencv, change channels and save them
Get pictures through opencv, change channels and save them
2022-07-07 10:49:00 【HCC2017】
#include<opencv2/opencv.hpp>
#include<iostream>
#include<math.h>
using namespace cv;
int main() {
Mat m = imread("C:/Users/Administrator/Desktop/2.jpg"); // Get photo imread("C:/Users/Administrator/Desktop/2.jpg",2); It can be obtained directly in the form of gray image
if (m.empty()) {
printf("could notload image...\n");
return -1;
}
namedWindow("test opencv setup", CV_WINDOW_AUTOSIZE); // Create a , Auto fit window
imshow("test opencv setup", m); // Display the loaded pictures
namedWindow("output windows", CV_WINDOW_AUTOSIZE);
Mat output_image;
cvtColor(m, output_image,CV_BGR2HLS); // Modify picture type
imshow("output windows", output_image);
//imwrite("D:/2.jpg", output_image); // Store the modified picture
waitKey(0);
return 0;
}
边栏推荐
- Trajectory planning for multi robot systems: methods and Applications Overview reading notes
- 2022.7.4DAY596
- 2022.7.3DAY595
- 成为优秀的TS体操高手 之 TS 类型体操前置知识储备
- 1323: [example 6.5] activity selection
- ADB utility commands (network package, log, tuning related)
- Jump to the mobile terminal page or PC terminal page according to the device information
- [detailed explanation of Huawei machine test] tall and short people queue up
- 原型与原型链
- [machine learning 03] Lagrange multiplier method
猜你喜欢
软考中级有用吗??
南航 PA3.1
[recommendation system 02] deepfm, youtubednn, DSSM, MMOE
【推荐系统 02】DeepFM、YoutubeDNN、DSSM、MMOE
CSAPP Bomb Lab 解析
Mendeley -- a free document management tool that automatically inserts references into papers
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
[machine learning 03] Lagrange multiplier method
随机推荐
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
[牛客网刷题 Day5] JZ77 按之字形顺序打印二叉树
MySQL insert data create trigger fill UUID field value
ArrayList线程不安全和解决方案
leetcode-304:二维区域和检索 - 矩阵不可变
那些易混淆的概念(三):function和class
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
Online hard core tools
无法打开内核设备“\\.\VMCIDev\VMX”: 操作成功完成。是否在安装 VMware Workstation 后重新引导? 模块“DevicePowerOn”启动失败。 未能启动虚拟机。
2022.7.6DAY598
【推薦系統 01】Rechub
How much review time does it usually take to take the intermediate soft exam?
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
Deep understanding of Apache Hudi asynchronous indexing mechanism
Unable to open kernel device '\.\vmcidev\vmx': operation completed successfully. Reboot after installing vmware workstation? Module "devicepoweron" failed to start. Failed to start the virtual machine
优雅的 Controller 层代码
SQL Server knowledge collection 11: Constraints
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
Gym installation pit records