Real time Barcode and QR Code scanner Edit
Project description
XCamera: Android-optimized camera widget
XCamera is a widget which extends the standard Kivy Camera widget with more functionality. In particular:
-
it displays a "shoot button", which the user can press to take pictures
-
on Android, it uses the native APIs to take high-quality pictures, including features such as auto-focus, high resolution, etc.
-
it includes a method to force landscape mode. On Android, it is often desirable to switch to landscape mode when taking pictures: you can easily do it by calling
camera.force_landscape()
, and latercamera.resource_orientation()
to restore the orientation to whatever it was before.
Screenshot:
Notes:
-
On Android, the
resolution
property of theXCamera
(and also of the plainCamera
) widget controls the preview size: in other words, it only affects the quality of the preview, not the size of the pictures taken. -
As it is now, the camera will shoot using the default setting for the picture size, which seems to be what the camera think it is "the best". In theory, we could add a method to retrieve the list of all possible picture sizes, and add a property to control it. It would also be nice to add a new button to allow the user to manually select the preferred size. Pull requests are welcome :)
Install & Usage
xcamera is available on PyPI.
Therefore it can be installed via pip
.
pip3 install xcamera
Once installed, the demo should be available in your PATH
and can be ran from the command line.
xcamera
And the widget can be imported via:
from kivy_garden.xcamera import XCamera
Demo
A full working demo is available in src/kivy_garden/xcamera/main.py. You can run it via:
make run
Develop & Contribute
To play with the project, install system dependencies and Python requirements using the Makefile.
make
Then verify everything is OK by running tests.
make test
If you're familiar with Docker
, the project can also run in a fully isolated container.
First build the image.
make docker/build
Then you can run tests within the container.
make docker/run/test
Or the application itself.
make docker/run/app
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kivy_garden.xcamera-2020.613.tar.gz
.
File metadata
- Download URL: kivy_garden.xcamera-2020.613.tar.gz
- Upload date:
- Size: 45.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75053eeaf8b0a1d6b13bde512f66e7a5031fbecd59e7190833a74189c4ff0f40 |
|
MD5 | 9563838274dc26769fa0f2d2d3708878 |
|
BLAKE2b-256 | ff8b55b5a72317518617f6a1188fc66877fa0f4e4d73dde41cd44594d1c26484 |
File details
Details for the file kivy_garden.xcamera-2020.613-py3-none-any.whl
.
File metadata
- Download URL: kivy_garden.xcamera-2020.613-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f706bad0366badd9b8e07442072673bfd41960ac004e54160f374c1ff0322f9 |
|
MD5 | a2843f1bf4f0ac34a576a11869fc366b |
|
BLAKE2b-256 | 460758fc26ed36362b54513b70eda679d2addcaaacba63d774618b8535524eb2 |