Including libs in rti makefile & using octetseq

2 posts / 0 new
Last post
Offline
Last seen: 3 years 2 weeks 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

Organization:
Offline
Last seen: 1 month 1 week ago
Joined: 06/13/2013
Posts: 17

Megan,

 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:

LIBS = -L$(NDDSHOME)/lib/$(TARGET_ARCH) \
 -lnddscpp$(SHAREDLIB_SFX)$(DEBUG_SFX) \
 -lnddsc$(SHAREDLIB_SFX)$(DEBUG_SFX) \
 -lnddscore$(SHAREDLIB_SFX)$(DEBUG_SFX) \
 -lopencv_highgui \
 -lopencv_videoio \
 -lopencv_imgcodecs \
 -lopencv_imgproc \
 -lopencv_core \
  $(SYSLIBS)

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?

Andre