Porting Stereoscopic people counter application from Apalis TK1 opencv/cuda to Apalis imx8 opencv/opencl

[Apalis iMX8 QuadMax 4GB IT] or [Apalis iMX8 QuadPlus 2GB] engine
Yocto Linux Multimedia start image

Hi We developed in last years a stereoscopic people counter application with Apalis TK1.
We have an own embedded carrier board Apalis compatible and a usb stereocamera.
Our application made a stereo map with libSGM cuda and implement a blob opencv tracking with 15fps average.

Unfortunately TK1 is at the end of life and we are working in desktop environement with opencl instead of cuda.
We of course don’t know if performance will be the same or worse; imx8 are not here yet to try on target, but in that way the question is:

“doas it exist a setup which can maximize performance in opencl, in special mode to stereo opencl matching?”

for example with TK1 we used this boot setup:

BASE_PATH=$(dirname $(readlink -f $0))
export BASE_PATH
echo 234 > /sys/class/gpio/export
echo 237 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio237/direction
echo 1 > /sys/class/gpio/gpio237/value
echo “7” > /sys/class/backlight/backlight.3/brightness
export LD_LIBRARY_PATH=/data/lib
export LD_LIBRARY_PATH=/usr/local/cuda/lib:/data/lib

echo “Disabling USB autosuspend…”
echo -1 > /sys/module/usbcore/parameters/autosuspend

echo “Reset Cuda device…”
python -c ‘import ctypes; ctypes.cdll.LoadLibrary("/usr/local/cuda-6.5/lib/libcudart.so").cudaDeviceReset()’

echo “tegra_cpuquiet/enable = 0”
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
echo “cpu0/online = 1”
echo 1 > /sys/devices/system/cpu/cpu0/online
echo “cpu1/online = 1”
echo 1 > /sys/devices/system/cpu/cpu1/online
echo “cpu2/online = 1”
echo 1 > /sys/devices/system/cpu/cpu2/online
echo “cpu3/online = 1”
echo 1 > /sys/devices/system/cpu/cpu3/online
echo “cpufreq/scaling_governor = performance”
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo “rate = 852000000”
echo 852000000 > /sys/kernel/debug/clock/override.gbus/rate
#cat /sys/kernel/debug/clock/override.gbus/max > /sys/kernel/debug/clock/override.gbus/rate
echo “clock/override.gbus/state = 1”
echo 1 > /sys/kernel/debug/clock/override.gbus/state

echo “ip addr flush dev eth0”
echo “ifdown eth0 > /dev/null 2>&1”
echo “ip addr flush dev eth0”
echo “ifdown eth0 > /dev/null 2>&1”

echo “start PeopleCounter…”

Any kind of suggestions?

Hi @gianpiero.dicataldo .

Thanks for sharing so much detailed information. We’re looking into it to find the best possible way forward.

We come back to you as soon as possible.

Best Regards