当前位置:网站首页>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
边栏推荐
- php 自带过滤和转义函数
- 一个普通人除了去工厂上班赚钱,还能干什么工作?
- Laravel changed the session from file saving to database saving
- Laravel5.1 路由 -路由分组
- How to implement backspace in shell
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
- JS modularization
- [vulnhub range] thales:1
- PHP realizes wechat applet face recognition and face brushing login function
- Introduction to ThinkPHP URL routing
猜你喜欢
记录Servlet学习时的一次乱码
You Yuxi, coming!
Spark Tuning (III): persistence reduces secondary queries
Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
Xcode Revoke certificate
【C 语言】 题集 of Ⅹ
The difference and working principle between compiler and interpreter
Mysql database basic operation DQL basic query
预测——灰色预测
华东师大团队提出,具有DNA调控电路的卷积神经网络的系统分子实现
随机推荐
SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
Enterprise log analysis system elk
Cesium(3):ThirdParty/zip. js
Performance comparison of tidb for PostgreSQL and yugabytedb on sysbench
Geoserver2.18 series (5): connect to SQLSERVER database
记录Servlet学习时的一次乱码
How can laravel get the public path
Unity3d click events added to 3D objects in the scene
面试题 01.02. 判定是否互为字符重排-辅助数组算法
企业级日志分析系统ELK
hellogolang
Record the migration process of a project
华东师大团队提出,具有DNA调控电路的卷积神经网络的系统分子实现
Cesium (4): the reason why gltf model is very dark after loading
如何快速检查钢网开口面积比是否符合 IPC7525
laravel中将session由文件保存改为数据库保存
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
laravel 是怎么做到运行 composer dump-autoload 不清空 classmap 映射关系的呢?
iptables只允许指定ip地址访问指定端口