02-23-2019 12:17 PM
Hi,
I'm wondering how can I run optical flow demo without any hardware acceleration. That is, I want to run optical flow on software and still integrate it with capture and display pipelines. Would that be possible?
Thanks,
Venky
02-27-2019 01:58 AM
Hi @kodukulav
I am assuming that you are using reVISION platform.
If you follow below steps you can import gstdemo and gstopticalflow applications in your workspace. Then you can create a optical flow library with the help of below document.
https://github.com/Xilinx/reVISION-Getting-Started-Guide/blob/master/Docs/tool-flow-tutorials.md
When you create a lib project using a template Dense Optical Flow, your SDx window will show accelerated functions as shown below
you can navigate to the location and right click on that function. You can see below window
Click on "Toggle HW/SW"
Then that function will be a software function.
Repeat the same for other functions too. When you give build you can get the optical flow shared library.
And you can follow remaining procedure as mentioned in reVISION flow.
02-24-2019 10:40 PM
Hi @kodukulav
It should be possible without hardware acceleration.
Please give it a try.
02-24-2019 10:48 PM
Like should I write the opencv code and compile in SDSoC?
02-26-2019 06:26 PM
@nutang Can you provide some detailed set of directions on how to do it? I'm not able to get it.
02-27-2019 01:58 AM
Hi @kodukulav
I am assuming that you are using reVISION platform.
If you follow below steps you can import gstdemo and gstopticalflow applications in your workspace. Then you can create a optical flow library with the help of below document.
https://github.com/Xilinx/reVISION-Getting-Started-Guide/blob/master/Docs/tool-flow-tutorials.md
When you create a lib project using a template Dense Optical Flow, your SDx window will show accelerated functions as shown below
you can navigate to the location and right click on that function. You can see below window
Click on "Toggle HW/SW"
Then that function will be a software function.
Repeat the same for other functions too. When you give build you can get the optical flow shared library.
And you can follow remaining procedure as mentioned in reVISION flow.
03-22-2019 01:40 AM
Hi @nutang
I am also trying to run filter2d completely software, but I got a few issues. I’m using 2018.3 reVision platform and SDx 2018.3. When I flow the instruction on the “https://github.com/Xilinx/reVISION-Getting-Started-Guide/blob/master/Docs/tool-flow-tutorials.md” purely (with hardware accelerated) the output can run without problem on zcu104 using USB camera (See3Cam) as a source and HDMI as a sink.
However, when I try to run on SW with removing the hardware functions, application built done without error. [Also I realize that the “filter2D” function which is located in the reVision, can’t go declaration if I right click and Declaration.] But program won’t work and give this error:
Setting console loglevel to 0 ...
root@xilinx:~# cd /media/card
root@xilinx:/media/card# cp libfilter2d.so /usr/lib
root@xilinx:/media/card# cp libgstsdxfilter2d.so /usr/lib/gstreamer-1.0
root@xilinx:/media/card# gst-launch-1.0 \
> xlnxvideosrc src-type="usbcam" ! \
> "video/x-raw, width=1920, height=1080, format=UYVY" ! \
> sdxfilter2d filter-preset=4 filter-mode=0 ! queue ! \
> kmssink bus-id=b00c0000.v_mix plane-id=31
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
Caught SIGSEGV
#0 0x0000007fb3c47af4 in poll () from /lib/libc.so.6
#1 0x0000007fb3d4da80 in ?? () from /usr/lib/libglib-2.0.so.0
#2 0x00000000217e33c0 in ?? ()
Spinning. Please run 'gdb gst-launch-1.0 2503' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
How can I solve that problem?
Thank you in advance.
03-22-2019 03:16 AM
Hi @yasin.kagan
Please let me know if you have tried to debug further
gdb gst-launch-1.0 2503
03-25-2019 06:58 PM
Hi,@nutang ,
I also got the same problem when I try to apply the 'filte2d' example merely by software, I change the input command filter-mode=1', got the same error as @yasin.kagan ,the prompt show:
when I run 'gdb gst-launch-1.0 2710' ,I got the message as follow:
if there are some mistakes in the commands that I input? Or some other mistakes? I don't know how to solve it , hope you can help me ,thanks,
Best Regards,
hcyhanson
04-17-2019 10:29 PM
I think the problem is caused by 2018.3 reVision platform. When I trace the code, the split function in the gstsdxfilter2d/filter2d_cv.cpp/ can't be done somehow.
After that, I try the prebuilt (in sd_card/filter2d) project in the reVision 2018.2, it works fine. Then I switch the 2018.2 SDSoC, and I currently work with that version.