I am using Debian Linux and Python 2.7 with PIL. I want to capture an image from a webcam and store it in a file. What are the ways in which this can be done? Also,I want to covert the captured image for modification using Scipy. What is the procedure.for this. My code is intended to run on the raspberry Pi.
Subhradeep
Recommended Answers
Jump to PostI've done this sort of stuff before. To answer your second question, here's a code sub-snippet:
import copy import Image import numpy as np img = Image.open('E:\\JCH\\Snap.jpg') newx = img.size[0] newy = img.size[1] # Image is (newx,newy) pixels imga = np.asarray(img) # This is the secret; convert …
Jump to PostOops, you're right. VideoCapture is Win32 only. For Linux, break out your favorite search engine. I had no trouble finding the command:
uvccapture -d /dev/video0 -o outfile.jpg
... although if you want something more Pythonic I suggest opencv. At least TRY the above command. If it works then you've probably …
All 5 Replies
BearofNH
104
Posting Whiz
BearofNH
104
Posting Whiz
Subhradeep
BearofNH
104
Posting Whiz
Gribouillis
commented:
very interesting
+14
Gribouillis
1,391
Programming Explorer
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.