aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Sun <jsun@sightmachine.com>2014-04-04 15:49:14 -0700
committerJohn Sun <jsun@sightmachine.com>2014-04-04 15:49:14 -0700
commit3c1ca240eb7d90e7c7e925c06712a59a4063cb7e (patch)
treea16466e168fd42f7f184fe5f96947e918c9a4c74
parentf71223d809af8cb749f6a3b37b3a29a022322d02 (diff)
downloadpymba-3c1ca240eb7d90e7c7e925c06712a59a4063cb7e.tar.gz
pymba-3c1ca240eb7d90e7c7e925c06712a59a4063cb7e.zip
Rename directory to pymba instead of pyvimba.
Fix test_systemfeatures.py
-rw-r--r--README.md8
-rw-r--r--README.txt8
-rw-r--r--pymba/__init__.py (renamed from pyvimba/__init__.py)0
-rw-r--r--pymba/tests/__init__.py (renamed from pyvimba/tests/__init__.py)0
-rw-r--r--pymba/tests/opencv_example.py (renamed from pyvimba/tests/opencv_example.py)34
-rw-r--r--pymba/tests/test_cameras.py (renamed from pyvimba/tests/test_cameras.py)2
-rw-r--r--pymba/tests/test_installation.py (renamed from pyvimba/tests/test_installation.py)2
-rw-r--r--pymba/tests/test_interfaces.py (renamed from pyvimba/tests/test_interfaces.py)2
-rw-r--r--pymba/tests/test_systemfeature.py (renamed from pyvimba/tests/test_systemfeature.py)11
-rw-r--r--pymba/vimba.py (renamed from pyvimba/vimba.py)0
-rw-r--r--pymba/vimbacamera.py (renamed from pyvimba/vimbacamera.py)0
-rw-r--r--pymba/vimbadll.py (renamed from pyvimba/vimbadll.py)0
-rw-r--r--pymba/vimbaexception.py (renamed from pyvimba/vimbaexception.py)0
-rw-r--r--pymba/vimbafeature.py (renamed from pyvimba/vimbafeature.py)0
-rw-r--r--pymba/vimbaframe.py (renamed from pyvimba/vimbaframe.py)0
-rw-r--r--pymba/vimbainterface.py (renamed from pyvimba/vimbainterface.py)0
-rw-r--r--pymba/vimbaobject.py (renamed from pyvimba/vimbaobject.py)0
-rw-r--r--pymba/vimbastructure.py (renamed from pyvimba/vimbastructure.py)0
-rw-r--r--pymba/vimbasystem.py (renamed from pyvimba/vimbasystem.py)0
-rw-r--r--setup.py8
20 files changed, 51 insertions, 24 deletions
diff --git a/README.md b/README.md
index 4fca83f..a6bef6d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# pyvimba
+# pymba
-pyvimba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API. It wraps the VimbaC.dll file included in the AVT Vimba installation to provide a simple Python interface for AVT cameras. It currently supports most of the functionality provided by VimbaC.dll.
+pymba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API. It wraps the VimbaC.dll file included in the AVT Vimba installation to provide a simple Python interface for AVT cameras. It currently supports most of the functionality provided by VimbaC.dll.
## Installation
@@ -8,13 +8,13 @@ Install the Vimba SDK from AVT to the default directory.
Run the AVTDriverInstaller tool and install the AVT Vimba SDK drivers.
-Install pyvimba.
+Install pymba.
## Usage
### Testing installation
-If Vimba and pyvimba are installed correctly, then the following code should give the installed Vimba version. No camera is needed.
+If Vimba and pymba are installed correctly, then the following code should give the installed Vimba version. No camera is needed.
from vimba import *
diff --git a/README.txt b/README.txt
index 49a0ed1..f7f9dda 100644
--- a/README.txt
+++ b/README.txt
@@ -1,8 +1,8 @@
=======
-pyvimba
+pymba
=======
-pyvimba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API. It wraps the VimbaC.dll file included in the AVT Vimba installation to provide a simple Python interface for AVT cameras. It currently supports most of the functionality provided by VimbaC.dll.
+pymba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API. It wraps the VimbaC.dll file included in the AVT Vimba installation to provide a simple Python interface for AVT cameras. It currently supports most of the functionality provided by VimbaC.dll.
Installation
============
@@ -11,7 +11,7 @@ Installation
* Run the AVTDriverInstaller tool and install the AVT Vimba SDK drivers.
-* Install pyvimba.
+* Install pymba.
Usage
=====
@@ -19,7 +19,7 @@ Usage
Testing installation
--------------------
-If Vimba and pyvimba are installed correctly, then the following code should give the installed Vimba version. No camera is needed.
+If Vimba SDK and pymba are installed correctly, then the following code should give the installed Vimba version. No camera is needed.
from vimba import *
diff --git a/pyvimba/__init__.py b/pymba/__init__.py
index 96a931e..96a931e 100644
--- a/pyvimba/__init__.py
+++ b/pymba/__init__.py
diff --git a/pyvimba/tests/__init__.py b/pymba/tests/__init__.py
index e69de29..e69de29 100644
--- a/pyvimba/tests/__init__.py
+++ b/pymba/tests/__init__.py
diff --git a/pyvimba/tests/opencv_example.py b/pymba/tests/opencv_example.py
index a1d7269..ddd0c8d 100644
--- a/pyvimba/tests/opencv_example.py
+++ b/pymba/tests/opencv_example.py
@@ -1,4 +1,4 @@
-from pyvimba.vimba import *
+from pymba import *
import numpy as np
import cv2
import time
@@ -14,8 +14,11 @@ system = vimba.getSystem()
# list available cameras (after enabling discovery for GigE cameras)
if system.GeVTLIsPresent:
+ print("GeVTLIsPresent")
system.runFeatureCommand("GeVDiscoveryAllOnce")
time.sleep(0.2)
+else:
+ print ("No GeVTL")
cameraIds = vimba.getCameraIds()
for cameraId in cameraIds:
print 'Camera ID:', cameraId
@@ -27,7 +30,12 @@ camera0.openCamera()
# list camera features
cameraFeatureNames = camera0.getFeatureNames()
for name in cameraFeatureNames:
- print 'Camera feature:', name
+ try:
+ print 'Camera feature:%s=%s' % (name, camera0.__getattr__(name))
+ pass
+ except VimbaException:
+ print "%s Not yet implemented" % name
+ pass
# read info of a camera feature
#featureInfo = camera0.getFeatureInfo('AcquisitionMode')
@@ -35,12 +43,24 @@ for name in cameraFeatureNames:
# print field, '--', getattr(featInfo, field)
# get the value of a feature
+print "AcquisitionMode is"
print camera0.AcquisitionMode
+print camera0.ExposureMode
# set the value of a feature
-camera0.AcquisitionMode = 'SingleFrame'
+print "Setting acquisition mode"
+
+#camera0.AcquisitionMode = 'Continuous'
+camera0.__setattr__("AcquisitionModeCCC", 'SingleFrame')
+try:
+ camera0.AcquisitionModeJJJ = 'JJJ'
+ print "Got in here"
+except Exception:
+ print "Failed to set JJJ"
+print camera0.AcquisitionMode
# create new frames for the camera
+
frame0 = camera0.getFrame() # creates a frame
frame1 = camera0.getFrame() # creates a second frame
@@ -51,11 +71,13 @@ frame0.announceFrame()
count = 0
while count < 10:
camera0.startCapture()
- frame0.queueFrameCapture()
camera0.runFeatureCommand('AcquisitionStart')
- camera0.runFeatureCommand('AcquisitionStop')
+
+ frame0.queueFrameCapture()
frame0.waitFrameCapture()
-
+
+ camera0.runFeatureCommand('AcquisitionStop')
+
# get image data...
imgData = frame0.getBufferByteData()
diff --git a/pyvimba/tests/test_cameras.py b/pymba/tests/test_cameras.py
index b9f42d4..527109f 100644
--- a/pyvimba/tests/test_cameras.py
+++ b/pymba/tests/test_cameras.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-from pyvimba.vimba import *
+from pymba import *
import time
def test_cameras():
diff --git a/pyvimba/tests/test_installation.py b/pymba/tests/test_installation.py
index 060f453..782bc56 100644
--- a/pyvimba/tests/test_installation.py
+++ b/pymba/tests/test_installation.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-from pyvimba.vimba import *
+from pymba import Vimba
def test_installation():
vimba = Vimba()
diff --git a/pyvimba/tests/test_interfaces.py b/pymba/tests/test_interfaces.py
index 2620289..3294715 100644
--- a/pyvimba/tests/test_interfaces.py
+++ b/pymba/tests/test_interfaces.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-from pyvimba.vimba import *
+from pymba import *
import time
def test_interfaces():
diff --git a/pyvimba/tests/test_systemfeature.py b/pymba/tests/test_systemfeature.py
index 49a2d3e..0f926d4 100644
--- a/pyvimba/tests/test_systemfeature.py
+++ b/pymba/tests/test_systemfeature.py
@@ -1,16 +1,21 @@
#!/usr/bin/python
-from pyvimba.vimba import *
+from pymba import *
def test_systemfeature():
# get system object
vimba = Vimba()
+ vimba.startup()
+
system = vimba.getSystem()
-
+
# list system features
for featureName in system.getFeatureNames():
print 'System feature:', featureName
-
+ fInfo = system.getFeatureInfo(featureName)
+ for field in fInfo.getFieldNames():
+ print "\t", featureName, ":", field, getattr(fInfo, field)
+
# shutdown Vimba
vimba.shutdown()
diff --git a/pyvimba/vimba.py b/pymba/vimba.py
index 0add297..0add297 100644
--- a/pyvimba/vimba.py
+++ b/pymba/vimba.py
diff --git a/pyvimba/vimbacamera.py b/pymba/vimbacamera.py
index 747eb4c..747eb4c 100644
--- a/pyvimba/vimbacamera.py
+++ b/pymba/vimbacamera.py
diff --git a/pyvimba/vimbadll.py b/pymba/vimbadll.py
index f21f7f6..f21f7f6 100644
--- a/pyvimba/vimbadll.py
+++ b/pymba/vimbadll.py
diff --git a/pyvimba/vimbaexception.py b/pymba/vimbaexception.py
index 034f194..034f194 100644
--- a/pyvimba/vimbaexception.py
+++ b/pymba/vimbaexception.py
diff --git a/pyvimba/vimbafeature.py b/pymba/vimbafeature.py
index c1d7e60..c1d7e60 100644
--- a/pyvimba/vimbafeature.py
+++ b/pymba/vimbafeature.py
diff --git a/pyvimba/vimbaframe.py b/pymba/vimbaframe.py
index e97360e..e97360e 100644
--- a/pyvimba/vimbaframe.py
+++ b/pymba/vimbaframe.py
diff --git a/pyvimba/vimbainterface.py b/pymba/vimbainterface.py
index 03a5f80..03a5f80 100644
--- a/pyvimba/vimbainterface.py
+++ b/pymba/vimbainterface.py
diff --git a/pyvimba/vimbaobject.py b/pymba/vimbaobject.py
index 8e2f812..8e2f812 100644
--- a/pyvimba/vimbaobject.py
+++ b/pymba/vimbaobject.py
diff --git a/pyvimba/vimbastructure.py b/pymba/vimbastructure.py
index 7b1e65c..7b1e65c 100644
--- a/pyvimba/vimbastructure.py
+++ b/pymba/vimbastructure.py
diff --git a/pyvimba/vimbasystem.py b/pymba/vimbasystem.py
index 1e04755..1e04755 100644
--- a/pyvimba/vimbasystem.py
+++ b/pymba/vimbasystem.py
diff --git a/setup.py b/setup.py
index b25f47f..8875240 100644
--- a/setup.py
+++ b/setup.py
@@ -1,10 +1,10 @@
from setuptools import setup, find_packages
import os, sys, glob, fnmatch
-setup(name="pyvimba",
+setup(name="pymba",
version=0.1,
- description="pyvimba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API.",
- long_description="""pyvimba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API. It wraps the VimbaC.dll file included in the AVT Vimba installation to provide a simple Python interface for AVT cameras. It currently supports most of the functionality provided by VimbaC.dll.""",
+ description="pymba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API.",
+ long_description="""pymba is a Python wrapper for the Allied Vision Technologies (AVT) Vimba C API. It wraps the VimbaC.dll file included in the AVT Vimba installation to provide a simple Python interface for AVT cameras. It currently supports most of the functionality provided by VimbaC.dll.""",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
@@ -22,7 +22,7 @@ setup(name="pyvimba",
author_email='support@sightmachine.com',
url='http://simplecv.org',
license='BSD',
- packages = ['pyvimba', 'pyvimba.tests'],
+ packages = ['pymba', 'pymba.tests'],
zip_safe = False,
requires=['cv2','cv', 'numpy', 'scipy', 'pygame', 'pil', 'svgwrite'],