Giter Site home page Giter Site logo

chinmoym2004 / showmewebcam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from showmewebcam/showmewebcam

0.0 1.0 0.0 94 KB

Raspberry Pi 0 + High Quality Camera = High-quality USB Webcam!

License: GNU General Public License v3.0

Shell 73.49% Makefile 26.51%

showmewebcam's Introduction

Show-me webcam: An open source, trustable, and high quality webcam

This firmware transforms your Raspberry Pi 0 W to a high quality webcam for all your Zooming needs.

It works reliably, boots quickly, and gets out of your way.

Wiki & Documentation | Discord Chat | Introduction video | Hackaday Project

Show-me webcam is proudly powered by peterbay's uvc-gadget.

What you need

  • Raspberry Pi 0 with or without Wifi.
  • Pi 0 Camera Ribbon (comes with the Pi 0 camera case or you can buy somewhere else, the stock one that comes with the camera may not fit).
  • Raspberry Pi Camera or Raspberry Pi High-Quality Camera
  • A compatible lens if you use the HQ Camera sensor.
  • Micro SD card

What works and what doesn't

  • The camera is known to work on Linux, Windows 10 and macOS Mojave.
  • You can use the normal camera of the Pi, it will work too, of course it won't look too good. Some were tested as table below:
Raspberry Pi\Camera version v1 5MP v2 8MP High quality 12MP
Pi Zero v1.3 (without Wi-Fi)
Pi Zero W (with Wi-Fi)
Pi 4+

Directions

  • Assemble the camera to the Pi.
  • Download the binary release (down below).
  • Download and use Etcher to write the image to the SD card.
  • Use the USB data port (the one in the middle of the Pi, not the one on the edge) to connect to a computer.
  • Enjoy!

Streaming indicator

When camera is streaming the build-in LED will be lit. In addition, GPIO 21 pin is set to HIGH, so an external LED or another payload can be triggered with this pin to indicate that the camera is in use.

Binary releases

Occasionally I release binary snapshots at the release tab: https://github.com/showmewebcam/showmewebcam/releases

Debugging

For debugging, a 115200 baud serial interface is provided as a ttyACM device:

  • Please use screen, minicom, or the included smwc-expect script to connect to it.
  • Use username: root, password root.

Also, there is a serial interface on the 40-pin header: https://pinout.xyz/pinout/uart

Ubuntu example:

$ ll /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 sep 25 14:03 /dev/ttyACM0
$ sudo screen /dev/ttyACM0 115200

If the terminal get blank try pressing enter to see the login prompt.

This interface is perhaps more helpful if you can't get the Pi to boot fully, because the serial-over-usb interface will not come up if the uvc-webcam startup script fails.

If you want to modify the image content the quick-and-dirty way (not recommended):

Customizing camera settings

Automatic

Log in to the debug interface and execute

/usr/bin/camera-ctl

This tool will allow you to show and tweak all available camera parameters. Additionally it will save your settings to /boot/camera.txt if you choose to do so. This will handle remounting /boot automatically.

Manual

Override camera settings temporarily:

Log in to the debug interface. Then list all tweakable parameters:

/usr/bin/v4l2-ctl -L | less

Then you can directly apply parameters on the fly:

/usr/bin/v4l2-ctl -c auto_exposure_bias=15
/usr/bin/v4l2-ctl -c contrast=0

Override camera settings permanently:

Mount the SD card on your computer, and create a file called camera.txt in /boot and put all parameters you want overridden, e.g:

#Tweak the auto exposure bias
auto_exposure_bias=15
#Tweak the contrast
contrast=0

You can edit camera.txt on-target by remounting /boot read-write:

mount -o remount,rw /boot

Building

Make a directory in your home: develop.

  • In develop, untar the buildroot-2020.2.3 tar package and rename buildroot-2020.02.3 to buildroot.
  • Get out back to develop.
  • In develop, git clone this repo https://github.com/showmewebcam/showmewebcam to it.
  • Run build command:
    • BUILDROOT_DIR=../buildroot ./build-showmewebcam.sh raspberrypi0w to build Raspberry Pi Zero W (with Wi-Fi) image.
    • BUILDROOT_DIR=../buildroot ./build-showmewebcam.sh raspberrypi0 to build Raspberry Pi Zero (without Wi-Fi) image.
  • The resulting image will be at the output/ folder in the showmewebcam directory.
  • If you add a camera.txt file to the root of this repository, the contents will be automatically added to /boot/camera.txt

Credits

showmewebcam's People

Contributors

dgsiegel avatar htruong avatar leonti avatar towolf avatar tuyenld avatar volfyd avatar

Watchers

 avatar

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.