
130
CONTENTS
16.2.2
Linux
On Linux systems running
/mvIMPACT_Python/setup.py
can be used to build and install the Python API in the
site-packages
sub-folder of your Python installation providing a matching compiler could be found. However one
must be familiar with Pythons
distutils
package.
Note
It is mandatory that the
python-dev
package is installed on the target Linux system, otherwise the binaries
cannot be built!
The invoking user of the script must have the rights to install the generated binaries in the python directory of
his system. If this is not the case, a recommended way to call the installation script is:
sudo -E python setup.py install
The building process may take literally a few minutes, so please be patient!
Attention
The
SWIG
generated wrapper code source file is very large! On some embedded systems or on 32-bit
systems gcc might have trouble to digest this file as it is known to consume a lot of memory per source line in
a given translation unit. When you encounter such a situation please get in touch with us!
16.3
Using
The actual API is almost the same as in C++ thus for now the C++ manual can be used as a reference and function
description. There are just some minor differences between the C++ and the Python API which shall be explained
here briefly:
• Stuff that has been declared deprecated at the time of publishing the Python API will not be available
• Simple
getter
functions may be wrapped as Python properties to have a more
Python-like
interface.
So e.g. the function
Component::isValid()
will be a property in Python
• Code that in C++ resides in sub-namespaces like e.g.
mvIMPACT::acquire::GenICam
will all end up in
acquire
in Python(this is likely to change in future versions!)
• Some functions that use Python style built-in names like
mvIMPACT::acquire::Component::type()
will use
a slightly different name in Python like
getType
in order to avoid confusion
Apart from that if someone is familiar with the C++ interface it shouldn't be too difficult to use the API. This is how
an acquisition from a user selectable device can be done:
from __future__
import
print_function
import
os
import
platform
import
string
import
sys
# import all the stuff from mvIMPACT Acquire into the current scope
from mvIMPACT
import
acquire
# import all the mvIMPACT Acquire related helper function such as ’conditionalSetProperty’ into the current
scope
# If you want to use this module in your code feel free to do so but make sure the ’Common’ folder resides
in a sub-folder of your project then
from Common
import
*
# For systems with NO mvDisplay library support
#import ctypes
#import Image
MATRIX VISION GmbH
Summary of Contents for mvBlueFOX
Page 1: ...mvBlueFOX Technical Manual...
Page 22: ...5 2 European Union Declaration of Conformity statement 15 MATRIX VISION GmbH...
Page 23: ...16 CONTENTS MATRIX VISION GmbH...
Page 24: ...5 3 Legal notice 17 5 3 Legal notice 5 3 1 For customers in the U S A MATRIX VISION GmbH...
Page 53: ...46 CONTENTS Figure 3 D Sub 9 pin male digital I O MATRIX VISION GmbH...
Page 117: ...110 CONTENTS MATRIX VISION GmbH...
Page 201: ...194 CONTENTS 20 1 5 2 Color version MATRIX VISION GmbH...
Page 202: ...20 1 mvBlueFOX Model 220 0 3 Mpix 640 x 480 195 20 1 5 3 Gray scale version MATRIX VISION GmbH...
Page 203: ...196 CONTENTS MATRIX VISION GmbH...
Page 211: ...204 CONTENTS MATRIX VISION GmbH...
Page 217: ...210 CONTENTS 20 3 5 2 Color version MATRIX VISION GmbH...
Page 219: ...212 CONTENTS MATRIX VISION GmbH...
Page 220: ...20 3 mvBlueFOX Model 221 0 8 Mpix 1024 x 768 213 MATRIX VISION GmbH...
Page 225: ...218 CONTENTS 20 4 5 2 Color version MATRIX VISION GmbH...
Page 227: ...220 CONTENTS MATRIX VISION GmbH...
Page 235: ...228 CONTENTS MATRIX VISION GmbH...