webcamExampleMATLAB output image has a green mask and cannot detect the blue color

1 回表示 (過去 30 日間)
I 'm running the webcamExampleMATLAB from this package
as shown in this tutorial
but the image from the camera has a green mask as shown and cannot detect the blue color
compared to the tutorial output
The changes i did to run my code was mandatory to run the code in my machine
first detect the camera name
using:
dev_info=imaqhwinfo('linuxvideo', 1)
the output:
dev_info =
struct with fields:
DefaultFormat: 'YUY2_1280x720'
DeviceFileSupported: 0
DeviceName: '/dev/video0'
DeviceID: 1
VideoInputConstructor: 'videoinput('linuxvideo', 1)'
VideoDeviceConstructor: 'imaq.VideoDevice('linuxvideo', 1)'
SupportedFormats: {1×45 cell}
and edit the webcamExampleMATLAB.m line 7 as
myCam = imaq.VideoDevice('linuxvideo',1,'YUY2_1280x720','ReturnedDataType','uint16');
Also i test the camera using matlab to be sure that it's working fine using this comands
mycam = webcam
then
preview(mycam)
and it works fine as shown

採用された回答

Image Analyst
Image Analyst 2023 年 3 月 22 日
Rather than YUV, is RGB available as a format?
  1 件のコメント
Ahmed Magdy
Ahmed Magdy 2023 年 3 月 22 日
Thanks for this note
I follow this tutorial to get the available RGB format for my laptop intergrated camera and now the code works well.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Support Package for IP Cameras についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by