Newer
Older
CasicBioRecNew / utils / ImageUtil.h
Tan Yue on 5 Jun 2022 513 bytes 20220605 虹膜注册过程优化
#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 QImageToMat(QImage image);
    static QString QImageToBase64(QImage image);

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

#endif // IMAGEUTIL_H