How to unpack mono12packed data images from preview
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I am using the image acquisition tool to control a camera and I would like to know how to use preview properly when the camera is streaming mono12packed data.
For exemple if I set the camera to 8 bit with the following code I get nice images as shown here :
main_cam = videoinput('gige','1','Mono8');
preview(main_cam)
stoppreview(main_cam)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1161693/image.png)
But if I set the camera to mono12packed I get data that seems unpacked too me :
delete(main_cam)
main_cam = videoinput('gige','1','Mono12Packed');
preview(main_cam)
stoppreview(main_cam)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1161698/image.png)
I have the same unpacked data issue when using getdata like this :
main_cam = videoinput('gige','1','Mono12Packed');
start(main_cam)
[img,time_main] = getdata(main_cam,1,'double','cell');
imagesc(img{1})
Do you have ideas on how to get unpacked data from preview and getdata ?
Thank you very much !
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Grey Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!