image processing - ram keeps on filling when program is abruptly closed in matlab -


mat-lab keeps on acquiring images form video object when program closed abruptly,is there way know whether program has been stopped abruptly?

it stops when type stop(vid), condition: vid object must there in work space if have cleared vid object clear , mat-lab keeps on acquiring image camera

i think mean this: have matlab code acquires data camera. if code exits before getting point @ order camera stop acquiring data, camera keeps going until ram full please correct me if i'm wrong. if i'm right, i'd advise use try/catch statements follows:

start(vid); try     %some code use video data     stop(vid); catch     stop(vid); end 

everything inside 'try' run, , when has finished, video capture terminated. if goes wrong , throws error before has got far stop(vid); command, rather stalling program display error in matlab prompt, , jump execute code inside 'catch'. means if code ends suddenly, stop(vid); command still run, , don't run out of ram.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -