Quantcast
Channel: LinkSprite Learning Center
Viewing all articles
Browse latest Browse all 562

Basic Camera function with SimpleCV on pcDuino3

$
0
0

SimpleCV is a powerful tool to capture and process image.  In this post, we will use it to implement a basic camera function with SimpleCV on pcDuino3. First, we will need to install SimpleCV on pcDuino3 following the instructions on a previous post.

After we install SimpleCV, we can copy and paste the following python code:

from SimpleCV import Camera, Display
from time import sleep
myCamera = Camera(prop_set={'width': 640, 'height': 480}) 
myDisplay = Display(resolution=(640, 480)) 
while not myDisplay.isDone(): 
    myCamera.getImage().save(myDisplay) 
    sleep(.1)

Save it to a file named ‘basic-cam.py’, run it using ‘$python basic-cam.py':

basiccam

 

We will see camera updated every one tenth of second.


Viewing all articles
Browse latest Browse all 562

Trending Articles