├── .gitignore
├── CMakeLists.txt
├── Doxyfile.in
├── LICENSE
├── NOTICE
├── README.markdown
├── cmake
└── modules
│ ├── COPYING-CMAKE-SCRIPTS
│ ├── FindCppUnit.cmake
│ ├── FindLibZip.cmake
│ ├── FindXercesC.cmake
│ ├── GetGitRevisionDescription.cmake
│ ├── GetGitRevisionDescription.cmake.in
│ └── UseDoxygen.cmake
├── debian
├── changelog
├── compat
├── control
├── copyright
├── libstromx-dev.install
├── libstromx.install
├── python3-stromx.install
├── rules
├── source
│ └── format
└── stromx-doc.install
├── doc
├── CMakeLists.txt
├── cvimgproc.xml
├── cvwrapper.vpp
├── mainpage.dox
├── parameters.xml
├── runtime.xml
├── stream.xml
├── stromx-doc.xsl
├── stromx.vpp
└── stromx.xsd
├── example
├── CMakeLists.txt
├── camera
│ ├── CMakeLists.txt
│ ├── camera.cpp
│ ├── camera.dot
│ ├── camera.dox
│ ├── camera.png
│ ├── camera.xml
│ └── lenna.jpg
├── file
│ ├── CMakeLists.txt
│ ├── file.cpp
│ ├── file.dox
│ └── file.xml
├── operator
│ ├── CMakeLists.txt
│ ├── math
│ │ ├── Add.cpp
│ │ └── Add.h
│ ├── operator.cpp
│ ├── operator.dot
│ ├── operator.dox
│ ├── operator.png
│ └── operator.xml
└── simple
│ ├── CMakeLists.txt
│ ├── simple.cpp
│ ├── simple.dot
│ ├── simple.dox
│ └── simple.png
├── logo
├── stromx-logo-black-text.svg
├── stromx-logo-gray-text.svg
├── stromx-logo-rgb-64x64.png
├── stromx-logo-rgb-text-64x64.png
├── stromx-logo-rgb-text-69x100.png
└── stromx-logo-rgb-text.svg
├── python
├── CMakeLists.txt
├── example
│ ├── CMakeLists.txt
│ ├── camera.py
│ ├── camera.xml
│ ├── file.py
│ ├── file.xml
│ ├── lenna.jpg
│ ├── observer.py
│ └── simple.py
├── stromx
│ ├── CMakeLists.txt
│ ├── __init__.py
│ ├── cvsupport
│ │ ├── CMakeLists.txt
│ │ ├── Cvsupport.cpp
│ │ ├── Image.cpp
│ │ ├── Matrix.cpp
│ │ └── __init__.py
│ ├── runtime
│ │ ├── AbstractFactory.cpp
│ │ ├── AllowThreads.h
│ │ ├── AssignThreadsAlgorithm.cpp
│ │ ├── CMakeLists.txt
│ │ ├── Color.cpp
│ │ ├── Connector.cpp
│ │ ├── ConnectorDescription.cpp
│ │ ├── ConnectorObserver.cpp
│ │ ├── Data.cpp
│ │ ├── DataCast.h
│ │ ├── DataContainer.cpp
│ │ ├── Description.cpp
│ │ ├── Equality.h
│ │ ├── Exception.cpp
│ │ ├── ExceptionObserver.cpp
│ │ ├── ExportOperatorKernel.h
│ │ ├── ExportVector.h
│ │ ├── Factory.cpp
│ │ ├── File.cpp
│ │ ├── Image.cpp
│ │ ├── InputProvider.cpp
│ │ ├── List.cpp
│ │ ├── Matrix.cpp
│ │ ├── None.cpp
│ │ ├── Operator.cpp
│ │ ├── OperatorInfo.cpp
│ │ ├── OperatorKernel.cpp
│ │ ├── OutputProvider.cpp
│ │ ├── Parameter.cpp
│ │ ├── Position.cpp
│ │ ├── Primitive.cpp
│ │ ├── ReadAccess.cpp
│ │ ├── Registry.cpp
│ │ ├── Runtime.cpp
│ │ ├── SortInputsAlgorithm.cpp
│ │ ├── Stream.cpp
│ │ ├── String.cpp
│ │ ├── Thread.cpp
│ │ ├── ThreadUtilities.h
│ │ ├── Tribool.cpp
│ │ ├── TriggerData.cpp
│ │ ├── Variant.cpp
│ │ ├── VariantHandle.cpp
│ │ ├── VariantInterface.cpp
│ │ ├── Version.cpp
│ │ ├── Visualization.cpp
│ │ ├── WriteAccess.cpp
│ │ ├── XmlReader.cpp
│ │ ├── XmlWriter.cpp
│ │ └── __init__.py
│ └── test
│ │ ├── CMakeLists.txt
│ │ ├── Test.cpp
│ │ └── __init__.py
└── test
│ ├── CMakeLists.txt
│ ├── data_cast.py
│ ├── exceptions.py
│ ├── factory.py
│ ├── observer.py
│ ├── providers.py
│ └── tribool.py
├── rpm
├── stromx.changes
└── stromx.spec
├── stromx.kdev4
├── stromx
├── CMakeLists.txt
├── cvsupport
│ ├── AdjustRgbChannels.cpp
│ ├── AdjustRgbChannels.h
│ ├── Buffer.cpp
│ ├── Buffer.h
│ ├── CMakeLists.txt
│ ├── Clip.cpp
│ ├── Clip.h
│ ├── Config.h.in
│ ├── ConstImage.cpp
│ ├── ConstImage.h
│ ├── ConvertPixelType.cpp
│ ├── ConvertPixelType.h
│ ├── Cvsupport.cpp
│ ├── Cvsupport.h
│ ├── DummyCamera.cpp
│ ├── DummyCamera.h
│ ├── Flicker.cpp
│ ├── Flicker.h
│ ├── Image.cpp
│ ├── Image.h
│ ├── Locale.h
│ ├── Matrix.cpp
│ ├── Matrix.h
│ ├── ReadDirectory.cpp
│ ├── ReadDirectory.h
│ ├── Utilities.cpp
│ ├── Utilities.h
│ ├── cvsupport.dox
│ ├── impl
│ │ ├── CameraBuffer.cpp
│ │ └── CameraBuffer.h
│ └── test
│ │ ├── AdjustRgbChannelsTest.cpp
│ │ ├── AdjustRgbChannelsTest.h
│ │ ├── BufferTest.cpp
│ │ ├── BufferTest.h
│ │ ├── CMakeLists.txt
│ │ ├── CameraBufferTest.cpp
│ │ ├── CameraBufferTest.h
│ │ ├── ClipTest.cpp
│ │ ├── ClipTest.h
│ │ ├── ConstImageTest.cpp
│ │ ├── ConstImageTest.h
│ │ ├── ConvertPixelTypeTest.cpp
│ │ ├── ConvertPixelTypeTest.h
│ │ ├── CvsupportTest.cpp
│ │ ├── CvsupportTest.h
│ │ ├── DummyCameraTest.cpp
│ │ ├── DummyCameraTest.h
│ │ ├── FlickerTest.cpp
│ │ ├── FlickerTest.h
│ │ ├── ImageTest.cpp
│ │ ├── ImageTest.h
│ │ ├── MatrixTest.cpp
│ │ ├── MatrixTest.h
│ │ ├── ReadDirectoryTest.cpp
│ │ ├── ReadDirectoryTest.h
│ │ ├── SendReceiveTest.cpp
│ │ ├── SendReceiveTest.h
│ │ ├── UtilitiesTest.cpp
│ │ ├── UtilitiesTest.h
│ │ ├── double_matrix.npy
│ │ ├── edges.png
│ │ ├── empty_float_matrix.npy
│ │ ├── lenna.jpg
│ │ ├── lenna_bw.jpg
│ │ ├── main.cpp
│ │ └── uint16_matrix.npy
├── runtime
│ ├── AbstractFactory.h
│ ├── AssignThreadsAlgorithm.cpp
│ ├── AssignThreadsAlgorithm.h
│ ├── Block.cpp
│ ├── Block.h
│ ├── CMakeLists.txt
│ ├── Color.cpp
│ ├── Color.h
│ ├── Compare.cpp
│ ├── Compare.h
│ ├── Config.h.in
│ ├── Connector.cpp
│ ├── Connector.h
│ ├── ConnectorDescription.h
│ ├── ConnectorObserver.h
│ ├── ConstData.cpp
│ ├── ConstData.h
│ ├── ConstDataRef.cpp
│ ├── ConstDataRef.h
│ ├── Counter.cpp
│ ├── Counter.h
│ ├── Data.cpp
│ ├── Data.h
│ ├── DataContainer.cpp
│ ├── DataContainer.h
│ ├── DataInterface.h
│ ├── DataOperatorBase.cpp
│ ├── DataOperatorBase.h
│ ├── DataProvider.h
│ ├── DataRef.cpp
│ ├── DataRef.h
│ ├── Description.cpp
│ ├── Description.h
│ ├── DirectoryFileInput.cpp
│ ├── DirectoryFileInput.h
│ ├── DirectoryFileOutput.cpp
│ ├── DirectoryFileOutput.h
│ ├── Dump.cpp
│ ├── Dump.h
│ ├── Enum.cpp
│ ├── Enum.h
│ ├── EnumParameter.cpp
│ ├── EnumParameter.h
│ ├── Exception.cpp
│ ├── Exception.h
│ ├── ExceptionObserver.h
│ ├── Factory.cpp
│ ├── Factory.h
│ ├── File.cpp
│ ├── File.h
│ ├── FileInput.h
│ ├── FileOutput.h
│ ├── Filter.cpp
│ ├── Filter.h
│ ├── Fork.cpp
│ ├── Fork.h
│ ├── Id2DataComposite.cpp
│ ├── Id2DataComposite.h
│ ├── Id2DataMapper.h
│ ├── Id2DataPair.cpp
│ ├── Id2DataPair.h
│ ├── Image.cpp
│ ├── Image.h
│ ├── ImageWrapper.cpp
│ ├── ImageWrapper.h
│ ├── Input.h
│ ├── InputConnector.h
│ ├── InputProvider.h
│ ├── IsEmpty.cpp
│ ├── IsEmpty.h
│ ├── IsNotEmpty.cpp
│ ├── IsNotEmpty.h
│ ├── Join.cpp
│ ├── Join.h
│ ├── List.cpp
│ ├── List.h
│ ├── Locale.cpp
│ ├── Locale.h
│ ├── Matrix.cpp
│ ├── Matrix.h
│ ├── MatrixParameter.cpp
│ ├── MatrixParameter.h
│ ├── MatrixPropertyBase.cpp
│ ├── MatrixPropertyBase.h
│ ├── MatrixWrapper.cpp
│ ├── MatrixWrapper.h
│ ├── Merge.cpp
│ ├── Merge.h
│ ├── None.cpp
│ ├── None.h
│ ├── NumericParameter.h
│ ├── Operator.cpp
│ ├── Operator.h
│ ├── OperatorException.h
│ ├── OperatorInfo.h
│ ├── OperatorKernel.cpp
│ ├── OperatorKernel.h
│ ├── OperatorTester.h
│ ├── Output.h
│ ├── OutputConnector.h
│ ├── OutputProvider.h
│ ├── Parameter.cpp
│ ├── Parameter.h
│ ├── ParameterGroup.cpp
│ ├── ParameterGroup.h
│ ├── PeriodicDelay.cpp
│ ├── PeriodicDelay.h
│ ├── Position.h
│ ├── Primitive.cpp
│ ├── Primitive.h
│ ├── Push.cpp
│ ├── Push.h
│ ├── Queue.cpp
│ ├── Queue.h
│ ├── ReadAccess.cpp
│ ├── ReadAccess.h
│ ├── Receive.cpp
│ ├── Receive.h
│ ├── RecycleAccess.cpp
│ ├── RecycleAccess.h
│ ├── Recycler.h
│ ├── Registry.h
│ ├── Repeat.cpp
│ ├── Repeat.h
│ ├── Runtime.cpp
│ ├── Runtime.h
│ ├── Send.cpp
│ ├── Send.h
│ ├── SortInputsAlgorithm.cpp
│ ├── SortInputsAlgorithm.h
│ ├── Split.cpp
│ ├── Split.h
│ ├── Stream.cpp
│ ├── Stream.h
│ ├── String.cpp
│ ├── String.h
│ ├── Thread.cpp
│ ├── Thread.h
│ ├── Tribool.cpp
│ ├── Tribool.h
│ ├── TriggerData.cpp
│ ├── TriggerData.h
│ ├── Try.cpp
│ ├── Try.h
│ ├── Variant.cpp
│ ├── Variant.h
│ ├── VariantComposite.cpp
│ ├── VariantComposite.h
│ ├── VariantHandle.cpp
│ ├── VariantHandle.h
│ ├── VariantInterface.cpp
│ ├── VariantInterface.h
│ ├── Version.cpp
│ ├── Version.h
│ ├── Visualization.cpp
│ ├── Visualization.h
│ ├── WriteAccess.cpp
│ ├── WriteAccess.h
│ ├── XmlReader.cpp
│ ├── XmlReader.h
│ ├── XmlWriter.cpp
│ ├── XmlWriter.h
│ ├── ZipFileInput.cpp
│ ├── ZipFileInput.h
│ ├── ZipFileOutput.cpp
│ ├── ZipFileOutput.h
│ ├── impl
│ │ ├── Client.cpp
│ │ ├── Client.h
│ │ ├── ConnectorParameter.cpp
│ │ ├── ConnectorParameter.h
│ │ ├── DataContainerImpl.cpp
│ │ ├── DataContainerImpl.h
│ │ ├── Id2DataMap.cpp
│ │ ├── Id2DataMap.h
│ │ ├── InputNode.cpp
│ │ ├── InputNode.h
│ │ ├── MutexHandle.h
│ │ ├── Network.cpp
│ │ ├── Network.h
│ │ ├── OutputNode.cpp
│ │ ├── OutputNode.h
│ │ ├── ReadAccessImpl.cpp
│ │ ├── ReadAccessImpl.h
│ │ ├── RecycleAccessImpl.cpp
│ │ ├── RecycleAccessImpl.h
│ │ ├── SerializationHeader.cpp
│ │ ├── SerializationHeader.h
│ │ ├── Server.cpp
│ │ ├── Server.h
│ │ ├── SynchronizedOperatorKernel.cpp
│ │ ├── SynchronizedOperatorKernel.h
│ │ ├── ThreadImpl.cpp
│ │ ├── ThreadImpl.h
│ │ ├── ThreadImplObserver.h
│ │ ├── WriteAccessImpl.cpp
│ │ ├── WriteAccessImpl.h
│ │ ├── XmlReaderImpl.cpp
│ │ ├── XmlReaderImpl.h
│ │ ├── XmlUtilities.cpp
│ │ ├── XmlUtilities.h
│ │ ├── XmlWriterImpl.cpp
│ │ └── XmlWriterImpl.h
│ ├── runtime.dox
│ └── test
│ │ ├── AssignThreadsAlgorithmTest.cpp
│ │ ├── AssignThreadsAlgorithmTest.h
│ │ ├── BlockTest.cpp
│ │ ├── BlockTest.h
│ │ ├── BoolTest.cpp
│ │ ├── BoolTest.h
│ │ ├── CMakeLists.txt
│ │ ├── ClientTest.cpp
│ │ ├── ClientTest.h
│ │ ├── CompareTest.cpp
│ │ ├── CompareTest.h
│ │ ├── ConstDataTest.cpp
│ │ ├── ConstDataTest.h
│ │ ├── CounterTest.cpp
│ │ ├── CounterTest.h
│ │ ├── DataContainerTest.cpp
│ │ ├── DataContainerTest.h
│ │ ├── DataRefTest.cpp
│ │ ├── DataRefTest.h
│ │ ├── DataTest.cpp
│ │ ├── DataTest.h
│ │ ├── DirectoryFileInputTest.cpp
│ │ ├── DirectoryFileInputTest.h
│ │ ├── DirectoryFileOutputTest.cpp
│ │ ├── DirectoryFileOutputTest.h
│ │ ├── DummyInput.h
│ │ ├── DummyOutput.h
│ │ ├── DumpTest.cpp
│ │ ├── DumpTest.h
│ │ ├── EnumTest.cpp
│ │ ├── EnumTest.h
│ │ ├── ExceptionOperator.cpp
│ │ ├── ExceptionOperator.h
│ │ ├── ExceptionTest.cpp
│ │ ├── ExceptionTest.h
│ │ ├── FactoryTest.cpp
│ │ ├── FactoryTest.h
│ │ ├── FileTest.cpp
│ │ ├── FileTest.h
│ │ ├── FilterTest.cpp
│ │ ├── FilterTest.h
│ │ ├── Float64Test.cpp
│ │ ├── Float64Test.h
│ │ ├── ForkTest.cpp
│ │ ├── ForkTest.h
│ │ ├── Id2DataCompositeTest.cpp
│ │ ├── Id2DataCompositeTest.h
│ │ ├── Id2DataMapTest.cpp
│ │ ├── Id2DataMapTest.h
│ │ ├── Id2DataPairTest.cpp
│ │ ├── Id2DataPairTest.h
│ │ ├── ImageWrapperTest.cpp
│ │ ├── ImageWrapperTest.h
│ │ ├── InputNodeTest.cpp
│ │ ├── InputNodeTest.h
│ │ ├── Int32Test.cpp
│ │ ├── Int32Test.h
│ │ ├── IsEmptyTest.cpp
│ │ ├── IsNotEmptyTest.cpp
│ │ ├── JoinTest.cpp
│ │ ├── JoinTest.h
│ │ ├── ListTest.cpp
│ │ ├── ListTest.h
│ │ ├── MatrixImpl.cpp
│ │ ├── MatrixImpl.h
│ │ ├── MatrixWrapperTest.cpp
│ │ ├── MatrixWrapperTest.h
│ │ ├── MergeTest.cpp
│ │ ├── MergeTest.h
│ │ ├── NetworkTest.cpp
│ │ ├── NetworkTest.h
│ │ ├── OperatorKernelTest.cpp
│ │ ├── OperatorKernelTest.h
│ │ ├── OperatorTest.cpp
│ │ ├── OperatorTest.h
│ │ ├── OutputNodeTest.cpp
│ │ ├── OutputNodeTest.h
│ │ ├── ParameterTest.cpp
│ │ ├── ParameterTest.h
│ │ ├── PeriodicDelayTest.cpp
│ │ ├── PeriodicDelayTest.h
│ │ ├── PrimitiveTest.h
│ │ ├── PushTest.cpp
│ │ ├── PushTest.h
│ │ ├── QueueTest.cpp
│ │ ├── QueueTest.h
│ │ ├── ReadAccessTest.cpp
│ │ ├── ReadAccessTest.h
│ │ ├── RecycleAccessTest.cpp
│ │ ├── RecycleAccessTest.h
│ │ ├── RepeatTest.cpp
│ │ ├── RepeatTest.h
│ │ ├── RuntimeTest.cpp
│ │ ├── RuntimeTest.h
│ │ ├── SendReceiveTest.cpp
│ │ ├── SendReceiveTest.h
│ │ ├── ServerTest.cpp
│ │ ├── ServerTest.h
│ │ ├── SortInputsAlgorithmTest.cpp
│ │ ├── SortInputsAlgorithmTest.h
│ │ ├── SplitTest.cpp
│ │ ├── SplitTest.h
│ │ ├── StreamTest.cpp
│ │ ├── StreamTest.h
│ │ ├── StringTest.cpp
│ │ ├── StringTest.h
│ │ ├── SynchronizedOperatorKernelTest.cpp
│ │ ├── TestData.cpp
│ │ ├── TestData.h
│ │ ├── TestOperator.cpp
│ │ ├── TestOperator.h
│ │ ├── TestUtilities.cpp
│ │ ├── TestUtilities.h
│ │ ├── ThreadImplTest.cpp
│ │ ├── ThreadImplTest.h
│ │ ├── ThreadTest.cpp
│ │ ├── ThreadTest.h
│ │ ├── TriboolTest.cpp
│ │ ├── TriboolTest.h
│ │ ├── TryTest.cpp
│ │ ├── TryTest.h
│ │ ├── UInt8Test.cpp
│ │ ├── UInt8Test.h
│ │ ├── VariantTest.cpp
│ │ ├── VariantTest.h
│ │ ├── VersionTest.cpp
│ │ ├── VersionTest.h
│ │ ├── VisualizationTest.cpp
│ │ ├── VisualizationTest.h
│ │ ├── WriteAccessTest.cpp
│ │ ├── WriteAccessTest.h
│ │ ├── XmlReaderTest.cpp
│ │ ├── XmlReaderTest.h
│ │ ├── XmlUtilitiesTest.cpp
│ │ ├── XmlUtilitiesTest.h
│ │ ├── XmlWriterTest.cpp
│ │ ├── XmlWriterTest.h
│ │ ├── ZipFileInputTest.cpp
│ │ ├── ZipFileInputTest.h
│ │ ├── ZipFileOutputTest.cpp
│ │ ├── ZipFileOutputTest.h
│ │ ├── archive.zip
│ │ ├── data.txt
│ │ ├── double_matrix.npy
│ │ ├── dtd.xml
│ │ ├── empty.xml
│ │ ├── empty_float_matrix.npy
│ │ ├── fortran_order.npy
│ │ ├── invalid.xml
│ │ ├── invalid.zip
│ │ ├── main.cpp
│ │ ├── nonsense.stromx
│ │ ├── parameters.stromx
│ │ ├── parameters.xml
│ │ ├── parameters.zip
│ │ ├── persistent_parameter.xml
│ │ ├── pull_parameter.xml
│ │ ├── push_parameter.xml
│ │ ├── stream.stromx
│ │ ├── stream.xml
│ │ ├── stream.zip
│ │ └── uint16_matrix.npy
├── stromx.dox
└── test
│ ├── CMakeLists.txt
│ ├── Config.h.in
│ ├── DeadlockOperator.cpp
│ ├── DeadlockOperator.h
│ ├── ExceptionOperator.cpp
│ ├── ExceptionOperator.h
│ ├── ParameterOperator.cpp
│ ├── ParameterOperator.h
│ ├── RandomDataOperator.cpp
│ ├── RandomDataOperator.h
│ ├── Test.cpp
│ ├── Test.h
│ ├── TestDataOperator.cpp
│ └── TestDataOperator.h
├── stromxConfig.cmake.in
└── util
├── archives.py
├── stream.stromx
├── stream.zip
└── testdata.stromx
/.gitignore:
--------------------------------------------------------------------------------
1 | .kdev4
2 | .project
3 | .pydevproject
4 | .settings
5 | *.vpp~*
6 | *.vpp.*
7 | *~
8 | *.pyc
9 | build
10 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/NOTICE
--------------------------------------------------------------------------------
/README.markdown:
--------------------------------------------------------------------------------
1 | 
Welcome to stromx!
2 | ================
3 | [](https://jenkins.stromx.org/job/stromx/)
4 |
5 | The stromx project provides tools for near real time processing of data with a focus on industrial imaging.
6 | Further information can be found on the project homepage.
7 |
--------------------------------------------------------------------------------
/cmake/modules/COPYING-CMAKE-SCRIPTS:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without
2 | modification, are permitted provided that the following conditions
3 | are met:
4 |
5 | 1. Redistributions of source code must retain the copyright
6 | notice, this list of conditions and the following disclaimer.
7 | 2. Redistributions in binary form must reproduce the copyright
8 | notice, this list of conditions and the following disclaimer in the
9 | documentation and/or other materials provided with the distribution.
10 | 3. The name of the author may not be used to endorse or promote products
11 | derived from this software without specific prior written permission.
12 |
13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 |
--------------------------------------------------------------------------------
/cmake/modules/FindCppUnit.cmake:
--------------------------------------------------------------------------------
1 | # 2011-05-28
2 | # Copied from http://root.cern.ch/viewvc/trunk/cint/reflex/cmake/modules/FindCppUnit.cmake
3 |
4 | # - Find CppUnit
5 | # This module finds an installed CppUnit package.
6 | #
7 | # It sets the following variables:
8 | # CPPUNIT_FOUND - Set to false, or undefined, if CppUnit isn't found.
9 | # CPPUNIT_INCLUDE_DIR - The CppUnit include directory.
10 | # CPPUNIT_LIBRARY - The CppUnit library to link against.
11 |
12 | FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h)
13 | FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit)
14 |
15 | IF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY)
16 | SET(CPPUNIT_FOUND TRUE)
17 | ENDIF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY)
18 |
19 | IF (CPPUNIT_FOUND)
20 |
21 | # show which CppUnit was found only if not quiet
22 | IF (NOT CppUnit_FIND_QUIETLY)
23 | MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}")
24 | ENDIF (NOT CppUnit_FIND_QUIETLY)
25 |
26 | ELSE (CPPUNIT_FOUND)
27 |
28 | # fatal error if CppUnit is required but not found
29 | IF (CppUnit_FIND_REQUIRED)
30 | MESSAGE(FATAL_ERROR "Could not find CppUnit")
31 | ENDIF (CppUnit_FIND_REQUIRED)
32 |
33 | ENDIF (CPPUNIT_FOUND)
34 |
--------------------------------------------------------------------------------
/cmake/modules/FindLibZip.cmake:
--------------------------------------------------------------------------------
1 | # Sets the following variables:
2 | # LIBZIP_FOUND - Set to false, or undefined, if libzip isn't found.
3 | # LIBZIP_INCLUDE_DIR - The libzip include directory.
4 | # LIBZIP_LIBRARY - The libzip library to link against.
5 |
6 |
7 | find_path(LIBZIP_INCLUDE_DIR
8 | NAMES zip.h
9 | )
10 |
11 | find_library(LIBZIP_LIBRARY
12 | NAMES zip
13 | )
14 |
15 |
16 | if (LIBZIP_INCLUDE_DIR AND LIBZIP_LIBRARY)
17 | set(LIBZIP_FOUND TRUE)
18 | endif (LIBZIP_INCLUDE_DIR AND LIBZIP_LIBRARY)
19 |
20 | if (LIBZIP_FOUND)
21 | if (NOT libzip_FIND_QUIETLY)
22 | message(STATUS "Found libzip: ${LIBZIP_LIBRARY}")
23 | endif (NOT libzip_FIND_QUIETLY)
24 | else (LIBZIP_FOUND)
25 | if (libzip_FIND_REQUIRED)
26 | message(FATAL_ERROR "Could not find libzip")
27 | endif (libzip_FIND_REQUIRED)
28 | endif (LIBZIP_FOUND)
29 |
--------------------------------------------------------------------------------
/cmake/modules/GetGitRevisionDescription.cmake.in:
--------------------------------------------------------------------------------
1 | #
2 | # Internal file for GetGitRevisionDescription.cmake
3 | #
4 | # Requires CMake 2.6 or newer (uses the 'function' command)
5 | #
6 | # Original Author:
7 | # 2009-2010 Ryan Pavlik
8 | # http://academic.cleardefinition.com
9 | # Iowa State University HCI Graduate Program/VRAC
10 | #
11 | # Copyright Iowa State University 2009-2010.
12 | # Distributed under the Boost Software License, Version 1.0.
13 | # (See accompanying file LICENSE_1_0.txt or copy at
14 | # http://www.boost.org/LICENSE_1_0.txt)
15 |
16 | set(HEAD_HASH)
17 |
18 | file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
19 |
20 | string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
21 | if(HEAD_CONTENTS MATCHES "ref")
22 | # named branch
23 | string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
24 | if(EXISTS "@GIT_DIR@/${HEAD_REF}")
25 | configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
26 | else()
27 | configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
28 | file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
29 | if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
30 | set(HEAD_HASH "${CMAKE_MATCH_1}")
31 | endif()
32 | endif()
33 | else()
34 | # detached HEAD
35 | configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
36 | endif()
37 |
38 | if(NOT HEAD_HASH)
39 | file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
40 | string(STRIP "${HEAD_HASH}" HEAD_HASH)
41 | endif()
42 |
--------------------------------------------------------------------------------
/debian/changelog:
--------------------------------------------------------------------------------
1 | stromx (0.8.0) unstable; urgency=low
2 |
3 | * Update to version 0.8.0
4 |
5 | -- Matthias Fuchs Sat, 14 May 2016 21:00:00 +0100
6 |
--------------------------------------------------------------------------------
/debian/compat:
--------------------------------------------------------------------------------
1 | 7
2 |
--------------------------------------------------------------------------------
/debian/control:
--------------------------------------------------------------------------------
1 | Source: stromx
2 | Priority: extra
3 | Maintainer: Matthias Fuchs
4 | Build-Depends: debhelper (>= 7.0.50~), cmake, cdbs, libboost-all-dev, doxygen, python-dev, libzip-dev, libxerces-c-dev, libopencv-dev, libcppunit-dev
5 | Standards-Version: 3.9.1
6 | Section: libs
7 | Homepage: http://www.stromx.org
8 |
9 | Package: libstromx-dev
10 | Section: libdevel
11 | Architecture: any
12 | Depends: ${misc:Depends}, ${shlibs:Depends}, libstromx (= ${binary:Version})
13 | Description: Development files for stromx
14 |
15 | Package: libstromx
16 | Section: libs
17 | Architecture: any
18 | Depends: ${shlibs:Depends}, ${misc:Depends}
19 | Description: Library for near real-time, parallel processing of data
20 |
21 | Package: python3-stromx
22 | Section: python
23 | Architecture: any
24 | Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, libstromx (= ${binary:Version})
25 | Description: Python bindings for stromx
26 |
27 | Package: stromx-doc
28 | Section: doc
29 | Architecture: any
30 | Depends: ${shlibs:Depends}, ${misc:Depends},
31 | Description: Documentation and examples for stromx
32 |
--------------------------------------------------------------------------------
/debian/copyright:
--------------------------------------------------------------------------------
1 | Format: http://dep.debian.net/deps/dep5
2 | Upstream-Name: stromx
3 | Source:
4 |
5 | Files: *
6 | Copyright:
7 |
8 | License:
9 |
10 |
11 | .
12 |
13 |
14 | # If you want to use GPL v2 or later for the /debian/* files use
15 | # the following clauses, or change it to suit. Delete these two lines
16 | Files: debian/*
17 | Copyright: 2012 roter_oktober
18 | License: GPL-2+
19 | This package is free software; you can redistribute it and/or modify
20 | it under the terms of the GNU General Public License as published by
21 | the Free Software Foundation; either version 2 of the License, or
22 | (at your option) any later version.
23 | .
24 | This package is distributed in the hope that it will be useful,
25 | but WITHOUT ANY WARRANTY; without even the implied warranty of
26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 | GNU General Public License for more details.
28 | .
29 | You should have received a copy of the GNU General Public License
30 | along with this program. If not, see
31 | .
32 | On Debian systems, the complete text of the GNU General
33 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
34 |
35 | # Please also look if there are files or directories which have a
36 | # different copyright/license attached and list them here.
37 |
--------------------------------------------------------------------------------
/debian/libstromx-dev.install:
--------------------------------------------------------------------------------
1 | usr/include/*
2 | usr/lib/lib*.so
3 | usr/share/stromx/stromxConfig.cmake
4 |
5 |
--------------------------------------------------------------------------------
/debian/libstromx.install:
--------------------------------------------------------------------------------
1 | usr/lib/*.so.*
--------------------------------------------------------------------------------
/debian/python3-stromx.install:
--------------------------------------------------------------------------------
1 | usr/lib/python3/dist-packages/stromx
2 |
--------------------------------------------------------------------------------
/debian/rules:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 |
3 | DEB_CMAKE_EXTRA_FLAGS = \
4 | -DPYTHON_INSTALL_DIR=lib/python3/dist-packages \
5 | -DPYTHON_EXECUTABLE=/usr/bin/python3 \
6 | -DDOC_INSTALL_DIR=share/doc
7 |
8 | include /usr/share/cdbs/1/rules/debhelper.mk
9 | include /usr/share/cdbs/1/class/cmake.mk
10 |
11 | build/libstromx::
12 | cd $(DEB_BUILDDIR) && $(MAKE) test ARGS="-V"
13 |
14 | build/stromx-doc::
15 | cd $(DEB_BUILDDIR) && $(MAKE) doc
16 |
--------------------------------------------------------------------------------
/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (native)
2 |
--------------------------------------------------------------------------------
/debian/stromx-doc.install:
--------------------------------------------------------------------------------
1 | usr/share/doc/stromx
--------------------------------------------------------------------------------
/doc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(DOXYGEN_FOUND AND DOC_INSTALL_DIR)
2 | install(DIRECTORY "${PROJECT_BINARY_DIR}/doc/html"
3 | DESTINATION "${DOC_INSTALL_DIR}/stromx"
4 | )
5 | endif()
6 |
--------------------------------------------------------------------------------
/doc/cvwrapper.vpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/doc/cvwrapper.vpp
--------------------------------------------------------------------------------
/doc/mainpage.dox:
--------------------------------------------------------------------------------
1 | /** \mainpage Welcome to stromx!
2 |
3 | \image html logo/stromx-logo-rgb-text-69x100.png
4 |
5 | \section tutorial Tutorials
6 |
7 | The main concepts of \em stromx are illustrated in four examples. \em Simple shows how to build and operate a stream using only library functions. In \em file instead of assembling the stream with multiple function calls in the code it is loaded from an XML file. The example \em operator shows how to implement and use a proprietary \em stromx operator. A slightly more real-world example is \em camera which shows how to process images orginating from a simulated camera.
8 |
9 | - \subpage simple
10 | - \subpage file
11 | - \subpage operator
12 | - \subpage camera
13 | */
14 |
--------------------------------------------------------------------------------
/doc/stromx.vpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/doc/stromx.vpp
--------------------------------------------------------------------------------
/example/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(EXAMPLE_ENVIRONMENT "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}")
2 |
3 | add_subdirectory(simple)
4 | add_subdirectory(file)
5 | add_subdirectory(operator)
6 | add_subdirectory(camera)
7 |
--------------------------------------------------------------------------------
/example/camera/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(
2 | ${CMAKE_SOURCE_DIR}
3 | ${CMAKE_BINARY_DIR}
4 | )
5 |
6 | add_executable(camera
7 | camera.cpp
8 | )
9 |
10 | set_target_properties(camera PROPERTIES FOLDER "example")
11 |
12 | target_link_libraries(camera
13 | stromx_runtime
14 | stromx_cvsupport
15 | )
16 |
17 | add_test(NAME example_camera COMMAND camera)
18 | set_tests_properties(example_camera PROPERTIES ENVIRONMENT "${EXAMPLE_ENVIRONMENT}")
19 |
20 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/camera.xml ${CMAKE_CURRENT_BINARY_DIR}/camera.xml COPYONLY)
21 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lenna.jpg ${CMAKE_CURRENT_BINARY_DIR}/lenna.jpg COPYONLY)
--------------------------------------------------------------------------------
/example/camera/camera.dot:
--------------------------------------------------------------------------------
1 | # dot camera.dot -Tpng -ocamera.png
2 |
3 | digraph stream
4 | {
5 | node [shape = box, fontname = Helvetica, style = "rounded"] "Camera" "ConvertPixelType" "BufferArray"
6 | node [shape=plaintext]
7 | "Camera" -> "ConvertPixelType" [headlabel = "SOURCE", taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
8 | "Camera" -> "" [taillabel = "INDEX", labelfontname = Helvetica, labelfontsize = "10pt"]
9 | "BufferArray" -> "ConvertPixelType" [headlabel = "DESTINATION", taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
10 | "ConvertPixelType" -> "" [taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
11 | }
--------------------------------------------------------------------------------
/example/camera/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/example/camera/camera.png
--------------------------------------------------------------------------------
/example/camera/lenna.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/example/camera/lenna.jpg
--------------------------------------------------------------------------------
/example/file/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(
2 | ${CMAKE_SOURCE_DIR}
3 | ${CMAKE_BINARY_DIR}
4 | )
5 |
6 | add_executable(file
7 | file.cpp
8 | )
9 |
10 | set_target_properties(file PROPERTIES FOLDER "example")
11 |
12 | target_link_libraries(file
13 | stromx_runtime
14 | )
15 |
16 | add_test(NAME example_file COMMAND file)
17 | set_tests_properties(example_file PROPERTIES ENVIRONMENT "${EXAMPLE_ENVIRONMENT}")
18 |
19 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/file.xml ${CMAKE_CURRENT_BINARY_DIR}/file.xml COPYONLY)
20 |
--------------------------------------------------------------------------------
/example/file/file.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Matthias Fuchs
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | #include
26 |
27 | using namespace stromx;
28 |
29 | int main (int, char**)
30 | {
31 | runtime::Factory factory;
32 |
33 | stromxRegisterRuntime(&factory);
34 |
35 | runtime::Stream* stream = runtime::XmlReader().readStream("file.xml", &factory);
36 |
37 | stream->start();
38 |
39 | runtime::Operator* timer = stream->operators()[1];
40 |
41 | for(unsigned int i = 0; i < 5; ++i)
42 | {
43 | runtime::DataContainer data = timer->getOutputData(1);
44 | runtime::ReadAccess count(data);
45 | std::cout << "Received "
46 | << (unsigned int)(count.get())
47 | << std::endl;
48 |
49 | timer->clearOutputData(1);
50 | }
51 |
52 | stream->stop();
53 | stream->join();
54 |
55 | delete stream;
56 | }
--------------------------------------------------------------------------------
/example/file/file.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 1000
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/example/operator/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(
2 | ${CMAKE_SOURCE_DIR}
3 | ${CMAKE_BINARY_DIR}
4 | )
5 |
6 | add_executable(operator
7 | operator.cpp
8 | math/Add.cpp
9 | )
10 |
11 | set_target_properties(operator PROPERTIES FOLDER "example")
12 |
13 | target_link_libraries(operator
14 | stromx_runtime
15 | )
16 |
17 | add_test(NAME example_operator COMMAND operator)
18 | set_tests_properties(example_operator PROPERTIES ENVIRONMENT "${EXAMPLE_ENVIRONMENT}")
19 |
20 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/operator.xml ${CMAKE_CURRENT_BINARY_DIR}/operator.xml COPYONLY)
21 |
--------------------------------------------------------------------------------
/example/operator/operator.dot:
--------------------------------------------------------------------------------
1 | # dot operator.dot -Tpng -ooperator.png
2 |
3 | digraph strom
4 | {
5 | node [shape = box, fontname = Helvetica, style = "rounded"] "Counter" "Add" "PeriodicDelay"
6 | node [shape=plaintext]
7 | "Counter" -> "Add" -> "PeriodicDelay" [headlabel = "INPUT", taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
8 | "PeriodicDelay" -> "" [taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
9 | }
--------------------------------------------------------------------------------
/example/operator/operator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/example/operator/operator.png
--------------------------------------------------------------------------------
/example/operator/operator.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 2
9 |
10 |
11 |
12 |
13 |
14 | 1000
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/example/simple/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(
2 | ${CMAKE_SOURCE_DIR}
3 | ${CMAKE_BINARY_DIR}
4 | )
5 |
6 | add_executable(simple
7 | simple.cpp
8 | )
9 |
10 | set_target_properties(simple PROPERTIES FOLDER "example")
11 |
12 | target_link_libraries(simple
13 | stromx_runtime
14 | )
15 |
16 | add_test(NAME example_simple COMMAND simple)
17 | set_tests_properties(example_simple PROPERTIES ENVIRONMENT "${EXAMPLE_ENVIRONMENT}")
--------------------------------------------------------------------------------
/example/simple/simple.dot:
--------------------------------------------------------------------------------
1 | # dot simple.dot -Tpng -osimple.png
2 |
3 | digraph stream
4 | {
5 | node [shape = box, fontname = Helvetica, style = "rounded"] "Counter" "PeriodicDelay"
6 | node [shape=plaintext]
7 | "Counter" -> "PeriodicDelay" [headlabel = "INPUT", taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
8 | "PeriodicDelay" -> "" [taillabel = "OUTPUT", labelfontname = Helvetica, labelfontsize = "10pt"]
9 | }
10 |
--------------------------------------------------------------------------------
/example/simple/simple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/example/simple/simple.png
--------------------------------------------------------------------------------
/logo/stromx-logo-rgb-64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/logo/stromx-logo-rgb-64x64.png
--------------------------------------------------------------------------------
/logo/stromx-logo-rgb-text-64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/logo/stromx-logo-rgb-text-64x64.png
--------------------------------------------------------------------------------
/logo/stromx-logo-rgb-text-69x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/logo/stromx-logo-rgb-text-69x100.png
--------------------------------------------------------------------------------
/python/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(MSVC)
2 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4172")
3 | endif(MSVC)
4 |
5 | add_definitions(-DBOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY)
6 |
7 | set(PYTHONPATH "${CMAKE_BINARY_DIR}/python")
8 | set(PYTHON_TEST_ENVIRONMENT "PYTHONPATH=${PYTHONPATH};LD_LIBRARY_PATH=${LD_LIBRARY_PATH}")
9 |
10 | add_subdirectory(stromx)
11 | add_subdirectory(example)
12 | add_subdirectory(test)
13 |
--------------------------------------------------------------------------------
/python/example/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/camera.py ${CMAKE_CURRENT_BINARY_DIR}/camera.py COPYONLY)
2 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/camera.xml ${CMAKE_CURRENT_BINARY_DIR}/camera.xml COPYONLY)
3 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/file.py ${CMAKE_CURRENT_BINARY_DIR}/file.py COPYONLY)
4 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/file.xml ${CMAKE_CURRENT_BINARY_DIR}/file.xml COPYONLY)
5 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lenna.jpg ${CMAKE_CURRENT_BINARY_DIR}/lenna.jpg COPYONLY)
6 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/observer.py ${CMAKE_CURRENT_BINARY_DIR}/observer.py COPYONLY)
7 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/simple.py ${CMAKE_CURRENT_BINARY_DIR}/simple.py COPYONLY)
8 |
9 | add_test(NAME python_example_camera COMMAND ${PYTHON_EXECUTABLE} camera.py)
10 | add_test(NAME python_example_file COMMAND ${PYTHON_EXECUTABLE} file.py)
11 | add_test(NAME python_example_observer COMMAND ${PYTHON_EXECUTABLE} observer.py)
12 | add_test(NAME python_example_simple COMMAND ${PYTHON_EXECUTABLE} simple.py)
13 |
14 | set_tests_properties(python_example_camera PROPERTIES ENVIRONMENT "${PYTHON_TEST_ENVIRONMENT}")
15 | set_tests_properties(python_example_file PROPERTIES ENVIRONMENT "${PYTHON_TEST_ENVIRONMENT}")
16 | set_tests_properties(python_example_observer PROPERTIES ENVIRONMENT "${PYTHON_TEST_ENVIRONMENT}")
17 | set_tests_properties(python_example_simple PROPERTIES ENVIRONMENT "${PYTHON_TEST_ENVIRONMENT}")
18 |
--------------------------------------------------------------------------------
/python/example/camera.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | #
4 | # Copyright 2011 Matthias Fuchs
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | from stromx import register, runtime, cvsupport
20 |
21 | factory = runtime.Factory()
22 | register("libstromx_runtime.so", factory)
23 | register("libstromx_cvsupport.so", factory)
24 |
25 | stream = runtime.XmlReader().readStream("camera.xml", factory)
26 |
27 | stream.start()
28 |
29 | camera = stream.operators()[0]
30 | convertPixelType = stream.operators()[2]
31 |
32 | for i in range(5):
33 | with convertPixelType.getOutputData(2) as data, runtime.ReadAccess(data) as image:
34 | print("Received image {0}x{1}, {2}".format(
35 | image.get().width(),
36 | image.get().height(),
37 | image.get().variant().title()))
38 |
39 | convertPixelType.clearOutputData(2)
40 | camera.clearOutputData(1)
41 |
42 | stream.stop()
43 | stream.join()
44 |
--------------------------------------------------------------------------------
/python/example/file.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | #
4 | # Copyright 2011 Matthias Fuchs
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | from stromx import register, runtime
20 |
21 | factory = runtime.Factory()
22 | register("libstromx_runtime.so", factory)
23 |
24 | stream = runtime.XmlReader().readStream("file.xml", factory)
25 |
26 | stream.start()
27 |
28 | timer = stream.operators()[1]
29 |
30 | for i in range(5):
31 | data = timer.getOutputData(1)
32 | count = runtime.ReadAccess(data)
33 | with runtime.ReadAccess(data) as count:
34 | print("Received {0}".format(count.get().get()))
35 |
36 | timer.clearOutputData(1)
37 |
38 | stream.stop()
39 | stream.join()
40 |
--------------------------------------------------------------------------------
/python/example/file.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 1000
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/python/example/lenna.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uboot/stromx/5aff42008c576ca4aa9dbb1fdd238dac1d875ece/python/example/lenna.jpg
--------------------------------------------------------------------------------
/python/example/simple.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Copyright 2011 Matthias Fuchs
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | from stromx import runtime
19 |
20 | stream = runtime.Stream()
21 |
22 | source = stream.addOperator(runtime.Counter())
23 | stream.initializeOperator(source)
24 |
25 | timer = stream.addOperator(runtime.PeriodicDelay())
26 | stream.initializeOperator(timer)
27 |
28 | timer.setParameter(2, runtime.UInt32(1000))
29 |
30 | stream.connect(source, 0, timer, 0)
31 |
32 | thread = stream.addThread()
33 | thread.addInput(timer, 0)
34 |
35 | stream.start()
36 |
37 | for i in range(5):
38 | data = timer.getOutputData(1)
39 | with runtime.ReadAccess(data) as count:
40 | print("Received {0}".format(count.get().get()))
41 |
42 | timer.clearOutputData(1)
43 |
44 | stream.stop()
45 | stream.join()
46 |
--------------------------------------------------------------------------------
/python/stromx/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(runtime)
2 |
3 | if(BUILD_OPENCV_WRAPPER)
4 | add_subdirectory(cvsupport)
5 | add_subdirectory(test)
6 | endif()
7 |
8 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/__init__.py COPYONLY)
9 |
10 | if(PYTHON_INSTALL_DIR)
11 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py
12 | DESTINATION ${PYTHON_INSTALL_DIR}/stromx
13 | )
14 | endif()
--------------------------------------------------------------------------------
/python/stromx/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | #
4 | # Copyright 2011 Matthias Fuchs
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | import ctypes
20 | import re
21 |
22 | def register(packageLib, factory):
23 | match = re.match('lib?stromx_(.+)\.(so.*|dll)', packageLib);
24 | if not match:
25 | print('Failed to derive package name from "{0}"'.format(packageLib))
26 | package = match.group(1)
27 |
28 | try:
29 | lib = ctypes.CDLL(packageLib)
30 | except OSError:
31 | print('Failed to load {0}'.format(packageLib))
32 | return 1
33 |
34 | functionName = 'stromxRegister{0}'.format(package.capitalize())
35 | try:
36 | function = lib[functionName]
37 | except AttributeError:
38 | print('{0}() is not defined'.format(functionName))
39 | return 1
40 |
41 | if function(ctypes.c_void_p(factory._this())):
42 | print('Failed to call {0}'.format(functionName))
43 | return 1
44 |
45 | return 0
46 |
47 |
--------------------------------------------------------------------------------
/python/stromx/cvsupport/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SOURCES
2 | Cvsupport.cpp
3 | Image.cpp
4 | Matrix.cpp
5 | )
6 |
7 | add_library(cvsupport SHARED ${SOURCES})
8 |
9 | set_target_properties(cvsupport PROPERTIES FOLDER "python")
10 |
11 | include_directories(
12 | ${CMAKE_SOURCE_DIR}
13 | ${CMAKE_BINARY_DIR}
14 | ${Boost_INCLUDE_DIRS}
15 | ${OpenCV2_INCLUDE_DIR}
16 | ${PYTHON_INCLUDE_DIRS}
17 | )
18 |
19 | target_link_libraries(cvsupport
20 | ${Boost_LIBRARIES}
21 | ${PYTHON_LIBRARY}
22 | stromx_runtime
23 | stromx_cvsupport
24 | )
25 |
26 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/__init__.py COPYONLY)
27 |
28 | if(PYTHON_INSTALL_DIR)
29 | install(DIRECTORY .
30 | DESTINATION ${PYTHON_INSTALL_DIR}/stromx/cvsupport
31 | FILES_MATCHING PATTERN "*.py"
32 | )
33 | install(TARGETS cvsupport
34 | DESTINATION ${PYTHON_INSTALL_DIR}/stromx/cvsupport
35 | )
36 | endif()
37 |
--------------------------------------------------------------------------------
/python/stromx/cvsupport/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | #
4 | # Copyright 2011 Matthias Fuchs
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | import stromx.runtime
20 |
21 | from stromx.cvsupport.libcvsupport import *
22 |
--------------------------------------------------------------------------------
/python/stromx/runtime/AllowThreads.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 Matthias Fuchs
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef STROMX_PYTHON_ALLOWTHREADS_H
18 | #define STROMX_PYTHON_ALLOWTHREADS_H
19 |
20 | #include
21 |
22 | using namespace boost::python;
23 |
24 | namespace stromx
25 | {
26 | namespace python
27 | {
28 | class AllowThreads
29 | {
30 | public:
31 | AllowThreads() : m_save(PyEval_SaveThread()) {}
32 | ~AllowThreads() { PyEval_RestoreThread(m_save); }
33 | private:
34 | PyThreadState *m_save;
35 | };
36 | }
37 | }
38 |
39 | #endif // STROMX_PYTHON_ALLOWTHREADS_H
40 |
--------------------------------------------------------------------------------
/python/stromx/runtime/AssignThreadsAlgorithm.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Matthias Fuchs
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include
19 |
20 | #include
21 |
22 | using namespace boost::python;
23 | using namespace stromx::runtime;
24 |
25 | void exportAssignThreadsAlgorithm()
26 | {
27 | class_("AssignThreadsAlgorithm")
28 | .def("apply", &AssignThreadsAlgorithm::apply)
29 | ;
30 | }
--------------------------------------------------------------------------------
/python/stromx/runtime/Color.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Matthias Fuchs
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 |
19 | #include
20 |
21 | #include "Equality.h"
22 |
23 | using namespace boost::python;
24 | using namespace stromx::runtime;
25 |
26 | void exportColor()
27 | {
28 | class_("Color", init())
29 | .def("r", &Color::r)
30 | .def("g", &Color::g)
31 | .def("b", &Color::b)
32 | .def(self == self)
33 | ;
34 | }
--------------------------------------------------------------------------------
/python/stromx/runtime/ConnectorDescription.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Matthias Fuchs
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | using namespace boost::python;
23 | using namespace stromx::runtime;
24 |
25 | void exportDescription()
26 | {
27 | class_ >("ConnectorDescription", no_init)
28 | .def("operatorThread", &ConnectorDescription::operatorThread)
29 | .def("defaultType", &ConnectorDescription::defaultType)
30 | ;
31 |
32 | class_ >("Input", no_init)
33 | ;
34 |
35 | class_