How to preview a binary webcam video in MATLAB

1 visualizzazione (ultimi 30 giorni)
Afrena Azman
Afrena Azman il 18 Nov 2021
Commentato: Afrena Azman il 19 Nov 2021
Good day everyone, my name is Afrena. I am doing my final year project about detecting 2D defect using image processing. I have created my coding. It all work just fine. But i would like to have a preview of my webcam video of the binary coding that i have made, instead of just showing the captured image as my output. Below are my coding:
I'm also quite new with MATLAB and its function. If I made a mistake please let me know. Thank you for your help

Risposte (1)

yanqi liu
yanqi liu il 18 Nov 2021
sir,may be can not use preview to get the processed image
so,use your method,and display image in one figure,use while to loop,such as
while 1
im=snapshot(cam);
process……
figure(1); imshow()
pause(1)
end
  1 Commento
Afrena Azman
Afrena Azman il 19 Nov 2021
Hello, thank youn for replying. I'm not sure if you get what I mean. I would like to have a preview webcam like this:
but at the same time i want it to preview the black and white version that i have created like this:
But my problem is that my outcome is these image, I want it to be in a form of binary video preview. Anyway, I tried the coding you shared but it does not work the way that i want :(
Thank you for your help.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by