当前位置:网站首页>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;
}
边栏推荐
- Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
- 原型与原型链
- How much review time does it usually take to take the intermediate soft exam?
- CSAPP Bomb Lab 解析
- Leetcode-304: two dimensional area and retrieval - matrix immutable
- 多线程-异步编排
- The gun startles the dragon, and the crowd "locks" Zhou Zhi
- [OneNote] can't connect to the network and can't sync the problem
- Multisim -- software related skills
- Multithreaded asynchronous orchestration
猜你喜欢

How to successfully pass the senior system architecture designer in the second half of the year?

What does intermediate software evaluator test
![[OneNote] can't connect to the network and can't sync the problem](/img/28/9a02b1da0f43889989a9539c9fb6b6.png)
[OneNote] can't connect to the network and can't sync the problem

南航 PA3.1

openinstall与虎扑达成合作,挖掘体育文化产业数据价值

在线硬核工具

使用Tansformer分割三维腹部多器官--UNETR实战

Using U2 net deep network to realize -- certificate photo generation program

BUUCTF---Reverse---reverse1

CSAPP bomb lab parsing
随机推荐
CAS mechanism
Typescript interface inheritance
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
那些易混淆的概念(三):function和class
gym安装踩坑记录
路由器开发知识汇总
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
Application of OpenGL gllightfv function and related knowledge of light source
施努卡:机器视觉定位技术 机器视觉定位原理
5个chrome简单实用的日常开发功能详解,赶快解锁让你提升更多效率!
[pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version
宁愿把简单的问题说一百遍,也不把复杂的问题做一遍
Online hard core tools
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
The gun startles the dragon, and the crowd "locks" Zhou Zhi
2022.7.4DAY596
The width of table is 4PX larger than that of tbody
软考中级有用吗??
【推薦系統 01】Rechub
TypeScript 接口继承