changed the calculation of grayscale since there is a very slight persentage increment of succeeded tests. To be reviewed.

This commit is contained in:
favoritas37 2016-02-20 16:17:28 +02:00
parent 66ef3add5a
commit 5de6bf853f

View File

@ -73,7 +73,9 @@ QImage* CameraImageWrapper::grayScaleImage(const QImage *origin)
{
for(int j=0; j<origin->height(); j++)
{
int pix = qGray(origin->pixel(QPoint(i,j)));
QRgb pixel = origin->pixel(QPoint(i,j));
QRgb pix = (qRed(pixel) + qGreen(pixel) + qBlue(pixel)) / 3;
//qGray(origin->pixel(QPoint(i,j)));
tmp->setPixel(i,j, qRgb(pix ,pix,pix));
}
}