当前位置:网站首页>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
边栏推荐
- 47_Opencv中的轮廓查找 cv::findContours()
- Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
- 无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称
- Laravel constructor and middleware execution order
- 一个普通人除了去工厂上班赚钱,还能干什么工作?
- [vulnhub range] thales:1
- Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
- three.js打造酷炫下雪效果
- How to determine whether the checkbox in JS is selected
- prometheus api删除某个指定job的所有数据
猜你喜欢

Enterprise log analysis system elk
![[vulnhub range] thales:1](/img/fb/721d08697afe9b26c94fede628c4d1.png)
[vulnhub range] thales:1
![[C language] question set of X](/img/17/bfa57de183c44cf0a3c6637bb65a9d.jpg)
[C language] question set of X

【医学分割】attention-unet

Personal notes of graphics (3)

TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比

二叉搜索树(基操篇)

AutoLISP series (3): function function 3

The difference and working principle between compiler and interpreter

华东师大团队提出,具有DNA调控电路的卷积神经网络的系统分子实现
随机推荐
hellogolang
Opencv configuration 2019vs
Leetcode-136- number that appears only once (solve with XOR)
分步式監控平臺zabbix
47_Opencv中的轮廓查找 cv::findContours()
Cesium (4): the reason why gltf model is very dark after loading
Laravel5.1 Routing - routing packets
平衡二叉树(AVL)
[hcsd celebrity live broadcast] teach the interview tips of big companies in person - brief notes
markdown公式编辑教程
企业级日志分析系统ELK
Imitate the choice of enterprise wechat conference room
Laravel changed the session from file saving to database saving
Tidb cannot start after modifying the configuration file
Set the route and optimize the URL in thinkphp3.2.3
Prediction - Grey Prediction
【DesignMode】模板方法模式(Template method pattern)
应用程序和matlab的通信方式
leetcode 241. Different ways to add parentheses design priority for operational expressions (medium)
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo