当前位置:网站首页>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
边栏推荐
- ThinkPHP URL 路由简介
- iptables只允许指定ip地址访问指定端口
- 平衡二叉树(AVL)
- Statistical learning method -- perceptron
- Logback logging framework third-party jar package is available for free
- 121. The best time to buy and sell stocks
- 47_Opencv中的轮廓查找 cv::findContours()
- PHP中exit,exit(0),exit(1),exit(‘0’),exit(‘1’),die,return的区别
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
- Asyncio concept and usage
猜你喜欢

Odoo集成Plausible埋码监控平台

Three. JS series (1): API structure diagram-1

Continuous creation depends on it!

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

Opencv configuration 2019vs

二叉搜索树(基操篇)

Rongyun won the 2022 China Xinchuang digital office portal excellence product award!

The difference and working principle between compiler and interpreter

Three. JS series (2): API structure diagram-2

Plate - forme de surveillance par étapes zabbix
随机推荐
Personal notes of graphics (1)
prometheus api删除某个指定job的所有数据
【DesignMode】享元模式(Flyweight Pattern)
Laravel service provider instance tutorial - create a service provider test instance
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
【C 语言】 题集 of Ⅹ
hellogolang
Asyncio concept and usage
全网“追杀”钟薛高
AutoLISP series (2): function function 2
[vulnhub range] thales:1
1亿单身男女“在线相亲”,撑起130亿IPO
How to determine whether the checkbox in JS is selected
HAVE FUN | “飞船计划”活动最新进展
hellogolang
Record the migration process of a project
URL和URI的关系
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3