当前位置:网站首页>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
边栏推荐
- Three. JS series (2): API structure diagram-2
- Opportunity interview experience summary
- Step by step monitoring platform ZABBIX
- 全网“追杀”钟薛高
- Logback日志框架第三方jar包 免费获取
- AutoLISP series (3): function function 3
- Record the migration process of a project
- 121. The best time to buy and sell stocks
- Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
- 【DesignMode】模板方法模式(Template method pattern)
猜你喜欢

AutoLISP series (2): function function 2

You Yuxi, coming!

【Vulnhub靶场】THALES:1
![[C language] question set of X](/img/17/bfa57de183c44cf0a3c6637bb65a9d.jpg)
[C language] question set of X

SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术

Record the migration process of a project

Enterprise log analysis system elk

Continuous creation depends on it!

"The" "PIP" "entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program."
![[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3](/img/8f/ca9ab042916f68de7994d9f2124da9.jpg)
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
随机推荐
Opencv configuration 2019vs
The differences between exit, exit (0), exit (1), exit ('0 '), exit ('1'), die and return in PHP
Cesium(3):ThirdParty/zip. js
【C 语言】 题集 of Ⅹ
删除 console 语句引发的惨案
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()
prometheus api删除某个指定job的所有数据
Tragedy caused by deleting the console statement
121. The best time to buy and sell stocks
AutoLISP series (2): function function 2
Personal notes of graphics (2)
Have fun | latest progress of "spacecraft program" activities
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
laravel中将session由文件保存改为数据库保存
logback. XML configure logs of different levels and set color output
Leetcode-136-只出现一次的数(用异或来解答)
The difference and working principle between compiler and interpreter
Three. JS series (3): porting shaders in shadertoy