当前位置:网站首页>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
边栏推荐
- Markdown formula editing tutorial
- Xcode Revoke certificate
- Record the migration process of a project
- 谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题
- Communication mode between application program and MATLAB
- Spark Tuning (III): persistence reduces secondary queries
- [Android -- data storage] use SQLite to store data
- laravel 是怎么做到运行 composer dump-autoload 不清空 classmap 映射关系的呢?
- torch.numel作用
- Cesium(3):ThirdParty/zip. js
猜你喜欢

Personal notes of graphics (4)

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

Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!

【Vulnhub靶场】THALES:1

Personal notes of graphics (3)

Mysql database basic operation DQL basic query

记一次项目的迁移过程

AutoLISP series (3): function function 3

pycharm 终端部启用虚拟环境

Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
随机推荐
torch. Numel action
Prediction - Grey Prediction
Detailed explanation of several ideas for implementing timed tasks in PHP
js中复选框checkbox如何判定为被选中
【Android -- 数据存储】使用 SQLite 存储数据
【DesignMode】外观模式 (facade patterns)
PHP实现微信小程序人脸识别刷脸登录功能
Imitate the choice of enterprise wechat conference room
【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
模仿企业微信会议室选择
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
Three. JS series (1): API structure diagram-1
【C 语言】 题集 of Ⅹ
23. 合并K个升序链表-c语言
Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
Cesium(3):ThirdParty/zip. js
Laravel changed the session from file saving to database saving
php 自带过滤和转义函数
The inevitable trend of the intelligent development of ankerui power grid is that microcomputer protection devices are used in power systems
Rongyun won the 2022 China Xinchuang digital office portal excellence product award!