Newer
Older
CasicIrisIdentify / utils / ImageUtil.h
tanyue on 16 Dec 2023 614 bytes 20231216 debug on ubuntu arm
#ifndef IMAGEUTIL_H
#define IMAGEUTIL_H

#include <QImage>
#include <QBuffer>
#include "opencv2/opencv.hpp"

class ImageUtil
{
public:
    ImageUtil();

    static QImage MatImageToQImage(const cv::Mat &src);
//    static QImage UcharToQImage(unsigned char* data, int width, int height, QImage::Format format);

    static cv::Mat ucharToMat(unsigned char * data, int row, int col);
    static cv::Mat QImageToMat(QImage image);
//    static QString QImageToBase64(QImage image);

//    static cv::Mat MatImageRect(const cv::Mat &src, cv::Rect rect, int delta);
};

#endif // IMAGEUTIL_H