当前位置:网站首页>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
边栏推荐
- laravel 是怎么做到运行 composer dump-autoload 不清空 classmap 映射关系的呢?
- Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()
- 分类模型评价标准(performance measure)
- 【DesignMode】模板方法模式(Template method pattern)
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
- pycharm 终端部启用虚拟环境
- 【Android -- 数据存储】使用 SQLite 存储数据
- Personal notes of graphics (2)
- 【DesignMode】外观模式 (facade patterns)
- 23. 合并K个升序链表-c语言
猜你喜欢
Opencv configuration 2019vs
You Yuxi, coming!
Record the migration process of a project
Three. JS series (1): API structure diagram-1
Performance comparison of tidb for PostgreSQL and yugabytedb on sysbench
Spark Tuning (III): persistence reduces secondary queries
Plate - forme de surveillance par étapes zabbix
Notification uses full resolution
Continuous creation depends on it!
【DesignMode】外观模式 (facade patterns)
随机推荐
hellogolang
Description of vs common shortcut keys
Personal notes of graphics (4)
Iptables only allows the specified IP address to access the specified port
47_Opencv中的轮廓查找 cv::findContours()
PHP中exit,exit(0),exit(1),exit(‘0’),exit(‘1’),die,return的区别
[Android -- data storage] use SQLite to store data
Laravel 服务提供者实例教程 —— 创建 Service Provider 测试实例
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
What about the pointer in neural network C language
二叉搜索树(基操篇)
JS中null NaN undefined这三个值有什么区别
Prediction - Grey Prediction
laravel post提交数据时显示异常
Laravel5.1 路由 -路由分组
PHP实现微信小程序人脸识别刷脸登录功能
【DesignMode】模板方法模式(Template method pattern)
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
Personal notes of graphics (3)
How does laravel run composer dump autoload without emptying the classmap mapping relationship?