URL polling as a simple streaming mechanism in Matlab (or in general) -
i stream images between 2 computers storing images on 1 computer , reading them on internet url on computer using matlabs imread
function.
i doing creating stream of png images webcam on 1 of computers. connected network drive available through public webadress.
on other computer running loop such:
while 1 = imread('http://mywebaddress.blah/image.png'); imshow(i); drawnow end
the problem works 3 or 4 frames , crashes matlab. doesnt throw exception, crashes.
im guessing because there synchronization error isnt being accounted in matlab's imread code url based images. guess if image half available when being streamed , stops being available because been overwritten on other side matlab hasnt accounted , bombs.
i need simple mechanism synchronization. second computer can read information. cannot send information. synchronization wont perfect id method result in absolutely minimal crashing... have ideas?
i think need solve problem @ server side. see how can have, say, 10 recent images named image00.png
through image09.png
. instead of overwriting image that's being served up, instead serve "currentimage.png" link points recent image. update link whenever new image created, , have 10x longer read image before gets overwritten. can create deeper 'buffer' depending on frequency updating images, , latency of reading.
if isn't clear let me know , can try elaborate.
Comments
Post a Comment