-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
58 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,4 @@ nosetests.xml | |
.cache/ | ||
|
||
venv* | ||
scrap/ | ||
|
||
notes.txt | ||
Pipfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
opencv-python = "*" | ||
pytest = "*" | ||
|
||
[packages] | ||
numpy = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
from pymba import Vimba | ||
|
||
|
||
FEATURE_NAME = 'PixelFormat' | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
with Vimba() as vimba: | ||
camera = vimba.camera(0) | ||
camera.open() | ||
|
||
# read a feature value | ||
feature = camera.feature('ExposureAuto') | ||
feature = camera.feature(FEATURE_NAME) | ||
value = feature.value | ||
|
||
# set the feature value | ||
# set the feature value (with the same value) | ||
feature.value = value | ||
|
||
print(feature.name, '=', feature.value) | ||
print('"{}" was set to "{}"'.format(feature.name, feature.value)) | ||
|
||
# alternatively the feature value can be set as an object attribute | ||
# note that this doesn't raise an error if the feature name doesn't exist | ||
camera.ExposureAuto = feature.value | ||
|
||
camera.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
from pymba import Vimba | ||
|
||
|
||
FEATURE_NAME = 'InterfacePingPace' | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
with Vimba() as vimba: | ||
interface = vimba.interface(0) | ||
interface.open() | ||
|
||
# set a feature value by feature name | ||
feature = interface.feature('InterfacePingPace') | ||
# read a feature value | ||
feature = interface.feature(FEATURE_NAME) | ||
value = feature.value | ||
|
||
# set the feature value | ||
# set the feature value (with the same value) | ||
feature.value = value | ||
|
||
print(feature.name, '=', feature.value) | ||
print('"{}" was set to "{}"'.format(feature.name, feature.value)) | ||
|
||
# alternatively the feature value can be set as an object attribute | ||
# note that this doesn't raise an error if the feature name doesn't exist | ||
interface.InterfacePingPace = 3 | ||
|
||
interface.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from pymba import Vimba, PYMBA_VERSION | ||
from pymba import Vimba, __version__ | ||
|
||
|
||
if __name__ == '__main__': | ||
print(f'Pymba version: {PYMBA_VERSION}') | ||
print(f'Vimba C API version: {Vimba.version()}') | ||
print('Pymba version: {}'.format(__version__)) | ||
print('Vimba C API version: {}'.format(Vimba.version())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
from .vimba import Vimba, VimbaException | ||
from .frame import Frame | ||
|
||
|
||
PYMBA_VERSION = '0.3.3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
from setuptools import setup | ||
|
||
from pymba import PYMBA_VERSION | ||
|
||
|
||
setup(name='pymba', | ||
version=PYMBA_VERSION, | ||
version='0.3.4', | ||
description="Pymba is a Python wrapper for Allied Vision's Vimba C API.", | ||
long_description="Pymba is a Python wrapper for Allied Vision's Vimba C API. It wraps the Vimba C library file " | ||
"included in the Vimba installation to provide a simple Python interface for Allied Vision " | ||
"cameras. It currently supports most of the functionality provided by Vimba.", | ||
long_description=( | ||
"Pymba is a Python wrapper for Allied Vision's Vimba C API. It wraps the Vimba C library " | ||
"file included in the Vimba installation to provide a simple Python interface for Allied " | ||
"Vision cameras. It currently supports most of the functionality provided by Vimba." | ||
), | ||
# https://pypi.org/pypi?%3Aaction=list_classifiers | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: End Users/Desktop', | ||
'Intended Audience :: Healthcare Industry', | ||
'Intended Audience :: Manufacturing', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', | ||
'License :: OSI Approved :: MIT License', | ||
'Natural Language :: English', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: POSIX :: Linux', | ||
|
@@ -26,13 +26,12 @@ | |
'Topic :: Multimedia :: Video :: Capture', | ||
'Topic :: Scientific/Engineering :: Image Recognition', | ||
'Topic :: Scientific/Engineering :: Visualization', | ||
'Topic :: Software Development :: Libraries :: Python Modules' | ||
], | ||
keywords='python, python3, opencv, cv, machine vision, computer vision, image recognition, vimba, allied vision', | ||
author='morefigs', | ||
author_email='[email protected]', | ||
url='https://github.com/morefigs/pymba', | ||
license='GPL-3.0', | ||
license='MIT', | ||
packages=[ | ||
'pymba', | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters