Advertisement
Guest User

Untitled

a guest
Aug 16th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. # Code in C (due to memory-management requirements):
  2.  
  3. Allocate a huge buffer (1000 * sizeof(image))
  4. for i in [0..1000]:
  5.   tell camera it can use memory at buffer + i * sizeof(image)
  6.  
  7. getImage():
  8.   get address of buffer used by camera to store image
  9.   copy buffer data to new store
  10.   tell camera it can use buffer again
  11.   return data
  12.  
  13. # Code in Python
  14. while True:
  15.   image = getImage()
  16.   image = fixImage(image) # Do some work
  17.   self.client.receiveData(image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement