Giter Club home page Giter Club logo

picam's People

Contributors

maxmousee avatar

Stargazers

 avatar  avatar

Watchers

 avatar

picam's Issues

Snap on run

Test camera by running a python script

`import time
import RPi.GPIO as GPIO
from picamera import PiCamera
from picamera import camera
from time import sleep

def setup_gpio():
GPIO.setwarnings(False) # Ignore warning for now
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
GPIO.setup(10, GPIO.IN,
pull_up_down=GPIO.PUD_DOWN) # Set pin 10 to be an input pin and set initial value to be pulled low (off)

def setup_camera(the_camera):
the_camera.brightness = 50
the_camera.sharpness = 0
the_camera.contrast = 0
the_camera.saturation = 0
the_camera.iso = 0
the_camera.exposure_compensation = 0
the_camera.exposure_mode = 'auto'
the_camera.meter_mode = 'average'
the_camera.awb_mode = 'auto'
the_camera.rotation = 0
the_camera.hflip = False
the_camera.vflip = False
the_camera.crop = (0.0, 0.0, 1.0, 1.0)
the_camera.resolution = (2000, 1500)
# you may need to increase gpu_mem in /boot/config.txt to achieve full resolution with the Camera Module v2.

if name == 'main':
setup_gpio()
the_camera = PiCamera()
setup_camera(the_camera)
filename = "/home/pi/Pictures/image_" + str(int(time.time())) + ".jpg"
the_camera.capture(filename)
print("Saved image as " + filename)
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.