vendor: OpenCV 5.0.0 snapshot at 40738fb16ceddb5fb3fea747585f7ce6abb0605b

This commit is contained in:
Gitea Mirror Bot
2026-08-22 00:10:33 +08:00
commit f7f077da11
6933 changed files with 2335208 additions and 0 deletions
@@ -0,0 +1,39 @@
//! [includes]
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
using namespace cv;
//! [includes]
int main()
{
//! [imread]
std::string image_path = samples::findFile("starry_night.jpg");
Mat img = imread(image_path, IMREAD_COLOR);
//! [imread]
//! [empty]
if(img.empty())
{
std::cout << "Could not read the image: " << image_path << std::endl;
return 1;
}
//! [empty]
//! [imshow]
imshow("Display window", img);
int k = waitKey(0); // Wait for a keystroke in the window
//! [imshow]
//! [imsave]
if(k == 's')
{
imwrite("starry_night.png", img);
}
//! [imsave]
return 0;
}