mirror of
https://github.com/thead-yocto-mirror/csi_hal
synced 2026-06-22 01:04:54 +02:00
25 lines
567 B
C++
25 lines
567 B
C++
#include <opencv2/opencv.hpp>
|
|
#include <opencv2/core/core.hpp>
|
|
#include <opencv2/highgui/highgui.hpp>
|
|
#include <opencv2/imgproc/imgproc.hpp>
|
|
#include <iostream>
|
|
#include <fstream>
|
|
using namespace cv;
|
|
using namespace std;
|
|
|
|
#include "apputilities.h"
|
|
|
|
int show_frame_image(void *mat, int height, int width)
|
|
{
|
|
Mat dis_mat;
|
|
dis_mat.create(height * 3 / 2, width, CV_8UC1);
|
|
dis_mat.data = (uchar *)mat;
|
|
cvtColor(dis_mat, dis_mat, CV_YUV2BGRA_I420);
|
|
namedWindow("camera local i420");
|
|
imshow("camera local i420", dis_mat);
|
|
waitKey(1);
|
|
dis_mat.release();
|
|
return 0;
|
|
}
|
|
|