当前位置:网站首页>Opencv personal notes
Opencv personal notes
2022-07-07 16:30:00 【qq_ fifty-seven million two hundred and fifty-one thousand thre】
One 、 Show how to get a picture and display it on the window
#include <iostream>
#include<opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main() {
Mat src = imread("D:\\timg (1).jpg", IMREAD_GRAYSCALE);// Read in the data in the form of a matrix , The second parameter represents displaying a grayscale image .
if (src.empty())
{
printf("could not load image");// If the picture doesn't exist Will not be able to read , Print to terminal .
return -1;
}
// Call this function when the image beyond the screen cannot be displayed .
namedWindow(" Input window ", WINDOW_FREERATIO);// Created a new window , Parameters 1 Name , The second parameter represents a free scale
imshow(" Input window ", src);// Indicates that it is displayed on the newly created input window , The first parameter represents the window name ,src Represents a data object Mat
waitKey(0);// Execute to this sentence , Program blocking . The parameter represents the delay time . Company ms
destroyAllWindows();// Destroy the previously created display window
return 0;
}
Two 、 What is an image
The image is on the screen
边栏推荐
- JS中null NaN undefined这三个值有什么区别
- 分步式监控平台zabbix
- asyncio 概念和用法
- Opportunity interview experience summary
- Spark Tuning (III): persistence reduces secondary queries
- URL和URI的关系
- laravel中将session由文件保存改为数据库保存
- logback.xml配置不同级别日志,设置彩色输出
- PHP has its own filtering and escape functions
- Prometheus API deletes all data of a specified job
猜你喜欢
MySQL数据库基本操作-DQL-基本查询
预测——灰色预测
【DesignMode】代理模式(proxy pattern)
SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
spark调优(三):持久化减少二次查询
Talk about the cloud deployment of local projects created by SAP IRPA studio
pycharm 终端部启用虚拟环境
Have fun | latest progress of "spacecraft program" activities
"The" "PIP" "entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program."
Pycharm terminal enables virtual environment
随机推荐
Plate - forme de surveillance par étapes zabbix
PHP has its own filtering and escape functions
JS modularization
Laravel constructor and middleware execution order
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
Description of vs common shortcut keys
What else can an ordinary person do besides working in a factory to make money?
Xcode Revoke certificate
Tragedy caused by deleting the console statement
iptables只允许指定ip地址访问指定端口
Sysom case analysis: where is the missing memory| Dragon lizard Technology
Common training data set formats for target tracking
分步式监控平台zabbix
Talk about the cloud deployment of local projects created by SAP IRPA studio
Laravel 服务提供者实例教程 —— 创建 Service Provider 测试实例
Vs tool word highlight with margin
Laravel5.1 路由 -路由分组
Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
AutoLISP series (3): function function 3