QCamera has strange blue tint
-
Ok, that's pretty much what I expected. The output from the camera is probably RGB but a lot of windows drivers are expecting BGR. Or it's possible (but less likely) that your camera is putting out BGR and the driver expects RGB. You might be able to change this by examining the QImageEncoderSettings to see if there is a pixel format and changing it. Or you can try intercepting the buffers and building a QImage based on the correct orientation.
-
You can check to see what the camera is supporting with
QList<QVideoFrame::PixelFormat> formats = m_camera->supportedViewfinderPixelFormats(); qDebug() << "supported formats " << formats;
Then you might be able to do something like:
viewFinderSettings.setPixelFormat(QVideoFrame::Format_RGB24);
You might also want to check with some other application. As I recall, on windows the QCamera stuff is a rather thin layer over DirectShow so you might want to play with that to get a clear idea of whats coming off the camera.
If worse comes to worst you may want to use something like OpenCV which will give you more control over the capture buffers and how to format them. -
The list returns (Format_RGB24, Format_YUV420P), its default set to the RGB24, and changing it to YUV420p does nothing.
As for testing it elsewhere, it works flawlessly everywhere else. The default camera app on windows works, a webcam testing website works, skype works.
-
@SolaVitae,
Just a shot in the dark. Have you tried explicitly setting the pixel format to QVideoFrame::Format_RGB24? Just in case some other app changed its mode? -
@fcarney
yes, it does not change anythingThe issue does not occur on my laptop, or a friend's PC. So im guessing it has something to do with my pc. What it is I can't figure out, but I guess it's not that big of a deal if it's only on my PC. It will subconciously bother me to no ender, but oh well
-
Hi,
Since you are talking about a virtual camera, it might be generating BGR images. And since it's virtual you might be able to configure that.
In any case, you can use QImage::rgbSwapped to convert to the right order.
-
Same here. Maybe after Windows-Update (Win10).
Viewfinder and Image of QCamera in blue.
People look like smurfs.
Different webcams, same result.
QML-Camera is OK. Any other Cam-Apps in Windows (Skype,..) are OK.
I hope of a solution, most of my apps base on that.Someone with more information? Thank You.
-
Hi,
From the description you are giving, there might be something like a switch from RGB to BGR.
-
I don't think there's an easy way to do that except by going lower level.