|
Re: Simulate a Webcam with Pictures (Or IP Camera)
It will depend on what you are using to open those images for processing on the Pi.
If you use OpenCV, it is as simple as using one command line to open an image vs another to grab a frame from a video stream.
I'm certain most other image processing code works almost identically.
For example, to grab a video frame, you could do this:
Code:
camera = cv2.VideoCapture(0)
# Later followed by this to grab the frame
(grabbed, frame) = camera.read()
To open a image file instead:
Code:
frame = cv2.imread(PathToImageFile)
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
|