Real-time video processing
Show older comments
Hi, I have just made a GUI of artificial vision. I have managed to do several operations but only in "fixed" images and I have three questions. I want to know what would be the best option to perform in "real time"? 1.- The timer function (a clear example of how it could be used?) 2.- The while function in infinite loop (How do you disable a while in infinite loop?) 3.- Any other function that you know? (I need to apply filters, masks and generate RGB / BW histograms) Thanks in advance
TIMER FUNCTION
https://www.mathworks.com/help/matlab/matlab_external/timerfcn.html?searchHighlight=timerfcn&s_tid=doc_srchtitle
I want to apply filters, masks and make histograms in "real time"
Answers (2)
John D'Errico
on 23 Jun 2017
I have no idea what you want in terms of an example for a timer. I'd start by reading
doc timer
You will find examples there.
A while is trivial though.
iter = 0;
while 1
iter = iter + 1;
if rand(1) < 0.00001
break
end
end
iter
iter =
230491
Or use a condition in the while statement itself.
iter = 0;
while rand(1) > 0.00001
iter = iter + 1;
end
iter
iter =
19420
1 Comment
Guillermo Gutiérrez
on 23 Jun 2017
Edited: Guillermo Gutiérrez
on 23 Jun 2017
Image Analyst
on 28 Jun 2017
0 votes
My example of using a while loop to do stuff until you press a pushbutton is attached.
Categories
Find more on Computer Vision Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!