Get rid of QPixmap

This commit is contained in:
2021-04-20 23:28:52 +02:00
parent 1ba6a0ff19
commit f173e48a26
7 changed files with 38 additions and 57 deletions
+9
View File
@@ -65,6 +65,15 @@ RawImage::RawImage(const RawImage &d)
d.m_img.copyTo(m_img);
}
RawImage::RawImage(const QImage &img)
{
QImage tmp = img.convertToFormat(QImage::Format_RGB888);
m_img.create(img.height(), img.width(), CV_8UC3);
for(int i=0; i<tmp.height(); i++)
std::memcpy(m_img.ptr(i), tmp.scanLine(i), tmp.width()*3);
}
bool RawImage::imageStats(double *mean, double *stdDev, double *median, double *min, double *max) const
{
cv::Scalar meanS, stdDevS;