BIPS/Examples/C++ to Python: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
Line 47: Line 47:
</syntaxhighlight>
</syntaxhighlight>


3. In terminal 2, execute the consumer:
3. In terminal 2, execute the consumer (be sure of being in the <code>python/examples/one-to-one</code> directory:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>

Revision as of 22:02, 23 December 2022



  Index  





Introduction

BIPS was conceived with the idea of communicating C++-based video capture applications communicating with AI algorithms in Python. For instance, using GStreamer to capture video from a sensor in a Jetson platform and consuming the video feed in a PyTorch application.

Considering the examples provided in C++ and Python, the use case will be

  • One-to-one communication

The example binaries are compiled after building. If the build directory is build:

├── python
|   └── examples
|       └── one-to-one
|           ├── consumer.py
|           └── producer.py
└── src
    └── examples
        └── one-to-one
            ├── consumer
            └── producer

Executable options

Consider the examples provided before:

Running the examples

One-to-one example

1. Open two different terminals: one for producer and another for consumer.

2. In terminal 1, execute the producer:

./producer

3. In terminal 2, execute the consumer (be sure of being in the python/examples/one-to-one directory:

python3 consumer.py



  Index