当前位置:网站首页>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
边栏推荐
- MySQL数据库基本操作-DQL-基本查询
- 【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
- The differences between exit, exit (0), exit (1), exit ('0 '), exit ('1'), die and return in PHP
- 95. (cesium chapter) cesium dynamic monomer-3d building (building)
- Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
- 【PHP】PHP接口继承及接口多继承原理与实现方法
- pycharm 终端部启用虚拟环境
- Common training data set formats for target tracking
- Geoserver2.18 series (5): connect to SQLSERVER database
- 统计学习方法——感知机
猜你喜欢

Spark Tuning (III): persistence reduces secondary queries

Logback日志框架第三方jar包 免费获取

pycharm 终端部启用虚拟环境

AutoLISP series (2): function function 2

Sysom case analysis: where is the missing memory| Dragon lizard Technology

PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()

Record the migration process of a project

【Android -- 数据存储】使用 SQLite 存储数据

MySQL数据库基本操作-DQL-基本查询

平衡二叉树(AVL)
随机推荐
【PHP】PHP接口继承及接口多继承原理与实现方法
[Android -- data storage] use SQLite to store data
Balanced binary tree (AVL)
AutoLISP series (3): function function 3
Performance measure of classification model
Statistical learning method -- perceptron
How does laravel run composer dump autoload without emptying the classmap mapping relationship?
Continuous creation depends on it!
Usage of config in laravel
记录Servlet学习时的一次乱码
JS中null NaN undefined这三个值有什么区别
[C language] question set of X
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
URL和URI的关系
How to query the data of a certain day, a certain month, and a certain year in MySQL
PHP中exit,exit(0),exit(1),exit(‘0’),exit(‘1’),die,return的区别
1亿单身男女“在线相亲”,撑起130亿IPO
Opportunity interview experience summary
Leetcode-136- number that appears only once (solve with XOR)
three.js打造酷炫下雪效果