Capturing Lossless Images with USB Webcam Package
Afficher commentaires plus anciens
Hi everyone,
I am using Matlab to capture images from a USB camera. I want to save in bitmap to avoid any compression but the images appear to have compression artefacts. Below is a simple version of the routine I am using to capture and save images:
aa=webcam('Camera_name_here');
aa.Resolution='1920x1080';
img=snapshot(aa);
img=imcrop(img,[1219 300 600 200]);
filename='test2.bmp';
imwrite(img,filename);
Might there be any hidden compression in these steps? The file size is large as expected from bitmap images but the image itself is not bitmap quality. Are there any settings that I can change to ensure that there is no compression during the capture? Is using the webcam package functions causing issues? Should I use functions from the Image Acquisition Toolbox? I know webcams do compress images but what I am using is a camera with USB connection, not a simple webcam.
6 commentaires
Walter Roberson
le 13 Déc 2024
It is common for webcam with usb connection to make compressed images available.
Hakan Caldag
le 13 Déc 2024
Modifié(e) : Hakan Caldag
le 13 Déc 2024
Walter Roberson
le 13 Déc 2024
According to that page, the camera supports
- H.264 (which is lossy compression)
- MJPEG (which is lossy compression)
- YUY2 (which is a different kind of lossy compression)
Activating the YUY2 would probably require using the Image Acquisition Toolbox
Hakan Caldag
le 16 Déc 2024
Swastik Sarkar
le 18 Déc 2024
The following documentation can help configure the format for Image Acquisition toolbox:
Hakan Caldag
le 18 Déc 2024
Réponses (0)
Catégories
En savoir plus sur Image Acquisition Toolbox Supported Hardware dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!