Including libs in rti makefile & using octetseq

2 posts / 0 new
Last post
Last seen: 2 years 10 months ago
Joined: 02/15/2021
Posts: 2
Including libs in rti makefile & using octetseq

I'm trying to connect opencv with rtidds to send video from pub to sub.

Need to compile but im having a hard time including opencv libraries in rtidds makefile.
Actually I cross-compiled in ubuntu to use the program in raspberry pi .

I have to include cflags and libs(for opencv) to rtidds makefile.

please needs some help.
(also if you know how to use octetset please let me know.
How to put video data in octetseq and get it out from it)

thank you

from megan

Last seen: 1 year 10 months ago
Joined: 06/13/2013
Posts: 16


 A simple IDL for publishing video data could be the following. Make sure that the sequence size is long enough to accommodate for a full frame from the camera.

struct Frame {
 long myID; //@key
 sequence<octet,1000000> FrameSeq;

You can then use rtiddsgen with the -example option to generate a sample publisher and subscriber. For example: rtiddsgen -example armv8Linux4.4gcc5.4.0 -language C++ <idl-file>

In the generated makefile add the OpenCV libraries to the LIBS define. Make sure you include all the OpenCV libraries you need in the right order. For example:

 -lnddscpp$(SHAREDLIB_SFX)$(DEBUG_SFX) \
 -lnddscore$(SHAREDLIB_SFX)$(DEBUG_SFX) \
 -lopencv_highgui \
 -lopencv_videoio \
 -lopencv_imgcodecs \
 -lopencv_imgproc \
 -lopencv_core \

Since you are cross compiling you may need to add a -L<path> which specifies the library path. If you compile native on Ubuntu the openCV include files and libraries should found as part of the normal system include paths.

In the case of cross compiling you may also need to specify the location of SYSROOT


What issues are you having with adding the OpenCV libraries?