Skip to content

Commit 879163f

Browse files
author
Nor Eply
committed
initial commit
0 parents  commit 879163f

6 files changed

+655
-0
lines changed

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# USB Camera on Linux
2+
3+
This repository provides Python code to connect a microscope, or another USB camera, to Linux and show its picture, take photos and record videos. It looks like this:
4+
5+
![GUI](/images/gui.png)
6+
7+
## Dependencies
8+
9+
This code has been written in Python3. It relies on OpenCV to connect to the camera and to save pictures and videos. The gui is written in `PyQt5`. Both necessary packages can be installed on Ubuntu Linux with this command:
10+
```
11+
sudo apt install python3-pyqt5 python3-opencv
12+
```
13+
14+
On other platforms `PyQt5` and `opencv` can be installed with this command
15+
```
16+
pip install opencv-python PyQt5
17+
```
18+
where `pip3` should be called instead of `pip` when appropriate to avoid accidentally installing packages for Python 2.
19+
20+
## Command-line
21+
22+
Command-line arguments are supported. Command-line arguments are the camaras to present. They are checked for validity and presented in a drop-down box. When `usb-camera` is called without arguments, it searches for connected cameras and presents them in a drop-down box. The video stream from the first camera is shown.
23+
24+
## Acknowledgements
25+
26+
The icons were obtained from [publicdomainvectors.org](https://publicdomainvectors.org).

icons/mono-camera-mount.svg

+127
Loading
Loading

icons/rodentia-icons_media-record.svg

+26
Loading

images/gui.png

2.17 MB
Loading

0 commit comments

Comments
 (0)