Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vision Library in Vitis 2021.1 on Linux #135

Closed
nrllhclb opened this issue Jun 2, 2022 · 4 comments
Closed

Vision Library in Vitis 2021.1 on Linux #135

nrllhclb opened this issue Jun 2, 2022 · 4 comments

Comments

@nrllhclb
Copy link

nrllhclb commented Jun 2, 2022

Hello everyone,

I have been working on "vision library" in Vitis 2021.1 on Linux, but I got some errors while compiling. I had tried many methods for solving the problem, hovever they is not worked.

If you have any scripts which consists of some setup line such as include path, lib path, flags, linker, etc.. could you share me?

Thanks all.

@kumarkaushal3
Copy link

What type of errors you are facing?

@nrllhclb
Copy link
Author

nrllhclb commented Jun 3, 2022

I have tried to run the example meanshift tracker in L1 in vision library, i got some errors in attached file;
vitis_hls

Following is tools and their versions;
Vitis 2021.1
Ubuntu 18.04
.so files in lib in opencv is 4.6.0 Note: Name of library in script have been written as 4.1.0, but it has been compiled as 4.6.0

Following is script to run;

# ------------------------------------------------------------------------------
# Vitis Vision and OpenCV Libary Path Information
# ------------------------------------------------------------------------------	
set XF_PROJ_ROOT "/home/ihocek/Documents/vision21.1/vision" 	
set OPENCV_INCLUDE  "/home/ihocek/Documents/opencv4.1.0_dll/include"
set OPENCV_LIB "/home/ihocek/Documents/opencv4.1.0/lib" 
# ------------------------------------------------------------------------------
# Vitis HLS Project Information
# ------------------------------------------------------------------------------
set PROJ_DIR "$XF_PROJ_ROOT/L1/examples/meanshifttracking"
set SOURCE_DIR "$PROJ_DIR/"
set PROJ_NAME "hls_example"
set PROJ_TOP "mean_shift_accel"
set SOLUTION_NAME "sol1"
set SOLUTION_PART "xcvu11p-flgb2104-1-e"
set SOLUTION_CLKP 5 

# ------------------------------------------------------------------------------
# OpenCV C Simulation / CoSimulation Library References
#------------------------------------------------------------------------------
set VISION_INC_FLAGS "-I$XF_PROJ_ROOT/L1/include -std=c++0x"
#set VISION_INC_FLAGS "-I$XF_PROJ_ROOT/L1/include -std=c\+\+14"
set OPENCV_INC_FLAGS "-I$OPENCV_INCLUDE"
set OPENCV_LIB_FLAGS "-L $OPENCV_LIB"

# Windows OpenCV Include Style:
#set OPENCV_LIB_REF   "-llibopencv_imgcodecs410 -llibopencv_imgproc410 -llibopencv_core410 -llibopencv_highgui410 -llibopencv_flann410 -llibopencv_features2d410"

# Linux OpenCV Include Style:
set OPENCV_LIB_REF   "-lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lopencv_highgui -lopencv_flann -lopencv_features2d"

# ------------------------------------------------------------------------------
# Create Project
# ------------------------------------------------------------------------------
open_project -reset $PROJ_NAME

# ------------------------------------------------------------------------------
# Add C++ source and Testbench files with Vision and OpenCV includes
# ------------------------------------------------------------------------------
add_files "${PROJ_DIR}/xf_mean_shift_accel.cpp" -cflags "${VISION_INC_FLAGS} -I${PROJ_DIR}/build" -csimflags "${VISION_INC_FLAGS} -I${PROJ_DIR}/build"
add_files -tb "${PROJ_DIR}/xf_mean_shift_tb.cpp" -cflags "${OPENCV_INC_FLAGS} ${VISION_INC_FLAGS} -I${PROJ_DIR}/build" -csimflags "${OPENCV_INC_FLAGS} ${VISION_INC_FLAGS} -I${PROJ_DIR}/build"

# ------------------------------------------------------------------------------
# Create Project and Solution
# ------------------------------------------------------------------------------
set_top $PROJ_TOP
open_solution -reset $SOLUTION_NAME
set_part $SOLUTION_PART
create_clock -period $SOLUTION_CLKP

# ------------------------------------------------------------------------------
# Run Vitis HLS Stages
# Note: CSim and CoSim require datafiles to be included 
# ------------------------------------------------------------------------------
csim_design -ldflags "-L ${OPENCV_LIB} ${OPENCV_LIB_REF}" -argv "${XF_PROJ_ROOT}/data/mst_imgs 3 "
csynth_design
cosim_design -ldflags "-L ${OPENCV_LIB} ${OPENCV_LIB_REF}" -argv "${XF_PROJ_ROOT}/data/mst_imgs 3 "
export_design -flow syn -rtl verilog
#  export_design -flow impl -rtl verilog

@vt-lib-support
Copy link
Collaborator

Hi @nrllhclb ,

Please compile the OpenCV libs freshly with gcc available in the Vitis and do not use your existing libs.
You can check the steps in the OpenCV Installation Guidance section of the README.

@vt-lib-support
Copy link
Collaborator

@nrllhclb Closing this issue because of no response. Please reopen if needed.

vt-lib-support pushed a commit that referenced this issue Oct 19, 2023
79b3894 Merge pull request #135 from liyuanz/next
e639f58 update
fa6edcc Merge pull request #134 from liyuanz/next
5094012 update makefile and add config file
1a827c4 Merge pull request #133 from changg/fix_target_domain
9fe7379 update
e1427d8 update target domain
73e5719 change 2023.1_stable_latest to 2023.2_stable_latest

Co-authored-by: sdausr <sdausr@xilinx.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants