"Corrupt JPEG data" error while using camera
Unsolved
General and Desktop
-
Hello community,
I add a widget to my application that shows the camera view.
_mediaCaptureSession = new QMediaCaptureSession(); _currentCam = new QCamera(); _currentCam->setCameraDevice(QMediaDevices::defaultVideoInput()); _mediaCaptureSession->setCamera(_currentCam); _verticalLayout = new QVBoxLayout(_container); _videoWidget = new QVideoWidget(); _mediaCaptureSession->setVideoOutput(_videoWidget); _verticalLayout->addWidget(_videoWidget); _videoWidget->setAspectRatioMode(Qt::AspectRatioMode::KeepAspectRatio); _currentCam->start();
Camera works great but constantly giving error.
qt.gui.imageio.jpeg: Corrupt JPEG data: 2 extraneous bytes before marker 0xd5 qt.gui.imageio.jpeg: Corrupt JPEG data: 2 extraneous bytes before marker 0xd2 qt.gui.imageio.jpeg: Corrupt JPEG data: 5 extraneous bytes before marker 0xd0 qt.gui.imageio.jpeg: Corrupt JPEG data: 10 extraneous bytes before marker 0xd2 qt.gui.imageio.jpeg: Corrupt JPEG data: 2 extraneous bytes before marker 0xd3 qt.gui.imageio.jpeg: Corrupt JPEG data: 4 extraneous bytes before marker 0xd5 qt.gui.imageio.jpeg: Corrupt JPEG data: 2 extraneous bytes before marker 0xd0 qt.gui.imageio.jpeg: Corrupt JPEG data: 5 extraneous bytes before marker 0xd7 qt.gui.imageio.jpeg: Corrupt JPEG data: 3 extraneous bytes before marker 0xd1
How do I solve this error? Thanks!
I am using QT 6.6.0 on Ubuntu.
-
Hi,
Did you check the exact format of the images generate by your camera ?
There might be something off there. -
@SGaist said in "Corrupt JPEG data" error while using camera:
There might be something off there.
How can i check that?
-
The camera documentation should be a good start.
-
I did not find anything about on internet but model is "Samsung C505e HD BUSINESS WEBCAM"
-
Isn't that a Logi webcam ?
-
Two things I would do:
- Save an image using Qt on disk and analyze it
- Save an image with OpenCV on disk and analyze it
Check if there's something off in each image and also compare the two.