8000 OpenCV · embox/embox Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Adithya Shetty edited this page Jul 18, 2024 · 5 revisions

Using OpenCV on Embox

There is OpenCV port on Embox. It is tested on qemu-system-arm with 'integrator-cp' platform and some STM32F7 boards OpenCV on STM32: STM32F746GDISCOVERY and STM32F769IDISCOVERY.

'Canny' filter example to detect edges (source code is project/opencv/cmds/edges.cpp in Embox) is used by default for all platform. So you should run

	edges fruits.png 20

in Embox console if the command is not started automaticaly.

qemu-system-arm

Use project/opencv/arm-qemu template for testing opencv on qemu

  1. Compile this template (it requires a few minutes as it builds libstdc++ and opencv from source)
 	make confload-platform/opencv/arm-qemu
 	make

There is a building trouble command 'make' first time fails. Error message looks like:

-o /home/anton/embox/build/base/obj/embox.o
EMBOX_GCC_LINK=full /home/anton/embox/mk/extbld/arch-embox-gcc /home/anton/embox/mk/extbld/toolchain_test.c -o /home/anton/embox/build/base/obj/toolchain_test
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[4]: *** [mk/extbld/toolchain.mk:77: /home/anton/embox/build/base/obj/toolchain_test] Error 1
make[3]: *** [mk/build.mk:25: build] Error 2
make[2]: *** [mk/load.mk:41: build] Error 2
make[1]: *** [mk/main.mk:30: build] Error 2
make: *** [Makefile:40: all] Error 2

For fixing just call 'make' ones again

	make
  1. Run Embox through auto_qemu script
 	./scripts/qemu/auto_qemu
  1. Run edges fruits.png 20 in Embox console If everythings is all right you will see
root@embox:/#edges fruits.png 20 
Framebuffer: 640x480 32bpp
Image: 512x480; Threshold=20
root@embox:/#

And also you will see borders in qemu graphic screen

  1. To play a video file, run imagecapture sample.avi in Embox console If everythings is all right you will see
root@embox:/#imagecapture sample.avi
[ INFO:0] VIDEOIO: Enabled backends(3, sorted by priority): FFMPEG(1000); CV_IMAGES(990); CV_MJPEG(980)
Video file opened successfully
root@embox:/#

Note:

To run video player demo, ffmpeg must be enabled in the build. Go to mods.conf and change:

	include third_party.lib.opencv.opencv_with_ffmpeg
	include third_party.lib.opencv.all
	//include third_party.lib.opencv.opencv_without_ffmpeg

Here you can see how to run OpenCV on STM32

Overview

GSoC

Demos

Supported platforms

Examples

Development

Libraries

Subsystems

Misc

Mybuild - build system

Contributing

Clone this wiki locally
0