{"id":8094,"date":"2023-05-08T23:28:00","date_gmt":"2023-05-08T17:58:00","guid":{"rendered":"https:\/\/nuclearrambo.com\/wordpress\/?p=8094"},"modified":"2024-10-03T15:02:47","modified_gmt":"2024-10-03T09:32:47","slug":"setup-vitis-hls-2022-2-and-opencv-on-windows-11-os","status":"publish","type":"post","link":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/","title":{"rendered":"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS"},"content":{"rendered":"\n<p class=\"has-drop-cap\">Primarily, there is plenty of support to operate Vitis HLS and OpenCV on the Linux environment. This is mainly because of the ease of use on Linux. On Windows operating system, however, the story isn&#8217;t straightforward. I struggled a lot to get the two to work together finally. The lack of a proper guide sets you back from using Vitis HLS + OpenCV setup on Windows environment. Prior to Vitis HLS 2020.x, OpenCV came bundled with the installation. One could use it right out of the box after installation and you did not need to carry out any other steps. I even wrote a post a long time back, demonstrating <a href=\"https:\/\/nuclearrambo.com\/wordpress\/a-basic-on-screen-display-with-vivado-hls-and-zynq-soc-part-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">Vivado HLS<\/a>. I intend for this article to help other struggling souls to find a relatively clear guide on installing OpenCV for Vitis HLS 2022. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing OpenCV from source code<\/h2>\n\n\n\n<p>It&#8217;s important we compile OpenCV on Windows from sources. Download the OpenCV sources from this<a href=\"https:\/\/webwerks.dl.sourceforge.net\/project\/opencvlibrary\/3.4.16\/opencv-3.4.16-vc14_vc15.exe\" target=\"_blank\" rel=\"noreferrer noopener\"> link<\/a>. This links to an executable file. If you happen to be behind a firewall, you may prefer to download the<a href=\"https:\/\/github.com\/opencv\/opencv\/archive\/refs\/tags\/3.4.16.zip\" target=\"_blank\" rel=\"noreferrer noopener\"> source zip from github<\/a>. Either way, you end up with the OpenCV sources. I ran the executable and gave it a path. It extracted all the sources to the given path. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_sources_contents.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"779\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_sources_contents-1024x779.png\" alt=\"\" class=\"wp-image-8095\" style=\"width:512px;height:390px\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_sources_contents-1024x779.png 1024w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_sources_contents-300x228.png 300w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_sources_contents-768x584.png 768w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_sources_contents.png 1090w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>We need two more tools to build OpenCV; <a href=\"https:\/\/master.dl.sourceforge.net\/project\/mingw-w64\/Toolchains%20targetting%20Win64\/Personal%20Builds\/mingw-builds\/7.2.0\/threads-posix\/seh\/x86_64-7.2.0-release-posix-seh-rt_v5-rev1.7z?viasf=1\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">MinGW<\/a> and <a href=\"https:\/\/github.com\/Kitware\/CMake\/releases\/download\/v3.26.3\/cmake-3.26.3-windows-x86_64.msi\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">CMake<\/a>. <\/p>\n\n\n\n<p>Extract MinGW files somewhere. It looks something like this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_contents.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"546\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_contents-1024x546.png\" alt=\"\" class=\"wp-image-8096\" style=\"width:512px;height:273px\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_contents-1024x546.png 1024w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_contents-300x160.png 300w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_contents-768x410.png 768w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_contents.png 1132w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Add MinGW to your Environment variables. The path to the MinGW <em>bin<\/em> should be added to the <em>Path <\/em>variables.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_bin_var.png\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"811\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_bin_var.png\" alt=\"\" class=\"wp-image-8097\" style=\"width:554px;height:608px\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_bin_var.png 739w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/mingw_bin_var-273x300.png 273w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/a><\/figure>\n\n\n\n<p>Inside the OpenCV folder, create a new folder called &#8220;mingw_build&#8221;. It could be any name you wish. <\/p>\n\n\n\n<p>Now, it&#8217;s time to install Cmake-gui. Run the installer and let it install. After completing the installation, run Cmake-gui through the start menu. <\/p>\n\n\n\n<p>In the <em>sources<\/em> field, choose the OpenCV source path. The source path should be something like I showed above. <\/p>\n\n\n\n<p>In the second field, it asks where you want to build the binaries. Here, you select the &#8220;mingw_build&#8221; directory that we created previously. If all goes well, you should be able to click the &#8220;Configure&#8221; button and end up with this screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/cmake_gui.png\"><img loading=\"lazy\" decoding=\"async\" width=\"687\" height=\"1024\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/cmake_gui-687x1024.png\" alt=\"\" class=\"wp-image-8098\" style=\"width:515px;height:768px\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/cmake_gui-687x1024.png 687w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/cmake_gui-201x300.png 201w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/cmake_gui-768x1145.png 768w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/cmake_gui.png 948w\" sizes=\"auto, (max-width: 687px) 100vw, 687px\" \/><\/a><\/figure>\n\n\n\n<p>Once you see the &#8220;Generating done&#8221; message, you can click on &#8220;Generate&#8221;. <\/p>\n\n\n\n<p>Go to the <em>mingw_build <\/em>directory and fire up a command prompt window. In case you don&#8217;t know, Shift + right click &gt; Open in terminal here. In case you don&#8217;t have the terminal, you should see a message to open it in PowerShell or command prompt. Anything will do. <\/p>\n\n\n\n<p>In the Terminal window enter the following command.<\/p>\n\n\n\n<p><em>mingw32-make<\/em><\/p>\n\n\n\n<p>This process takes a while to complete since it actually compiles the C source files into object files. When you&#8217;re done with 100% success with the previous command we can proceed ahead. <\/p>\n\n\n\n<p><em>mingw32-make install<\/em><\/p>\n\n\n\n<p>This creates the final binary files required to actually use OpenCV in Windows environment. <\/p>\n\n\n\n<center><p><script type=\"text\/javascript\">\n\tatOptions = {\n\t\t'key' : 'a488f095e80c8a74746e5fdca977eaea',\n\t\t'format' : 'iframe',\n\t\t'height' : 90,\n\t\t'width' : 728,\n\t\t'params' : {}\n\t};\n\tdocument.write('<scr' + 'ipt type=\"text\/javascript\" src=\"http' + (location.protocol === 'https:' ? 's' : '') + ':\/\/www.profitabledisplaynetwork.com\/a488f095e80c8a74746e5fdca977eaea\/invoke.js\"><\/scr' + 'ipt>');\n<\/script><\/p><\/center>\n\n\n\n<h2 class=\"wp-block-heading\">Vitis HLS related configurations<\/h2>\n\n\n\n<p>We are halfway done to actually using Vitis HLS and OpenCV for our projects. Let&#8217;s configure the rest of the setup. Here, I am already assuming you installed Vitis 2022.2 or higher. <\/p>\n\n\n\n<p>To be able to use OpenCV, we need to install a few environment variables again.<\/p>\n\n\n\n<p>Go to Environment variables like earlier and set the following variables:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>LD_LIBRARY_PATH &#8211; <em>&lt;Path to OpenCV&gt;\\mingw_build\\install\\x64\\mingw\\lib<\/em><\/li>\n\n\n\n<li>OPENCV_INCLUDE &#8211; <em>&lt;Path to OpenCV&gt;\\mingw_build\\install\\include<\/em><\/li>\n\n\n\n<li>OPENCV_LIB &#8211; <em>&lt;Path to OpenCV&gt;\\mingw_build\\install\\x64\\mingw\\lib<\/em><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_env_var.png\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"478\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_env_var.png\" alt=\"\" class=\"wp-image-8099\" style=\"width:661px;height:359px\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_env_var.png 881w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_env_var-300x163.png 300w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/opencv_env_var-768x417.png 768w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/a><\/figure>\n\n\n\n<p>I found out that it&#8217;s actually easier to create a HLS project through the <em>tcl<\/em> script using the command line interface. Finally, when you have a project created, you can quickly jump to using the GUI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a project through the Command line script<\/h3>\n\n\n\n<p>Fire up Vitis HLS in command line mode. You can do that by typing <em>Vitis HLS 2022.2 command prompt<\/em> and that fires up the command interface of Vitis HLS shell.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_cmd_prompt.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"960\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_cmd_prompt-1024x960.png\" alt=\"\" class=\"wp-image-8100\" style=\"width:768px;height:720px\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_cmd_prompt-1024x960.png 1024w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_cmd_prompt-300x281.png 300w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_cmd_prompt-768x720.png 768w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_cmd_prompt.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>You can also launch Vitis HLS in command prompt mode by navigating into the folder and launching it there. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_dir-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"133\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_dir-1.png\" alt=\"\" class=\"wp-image-8102\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_dir-1.png 759w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_dir-1-300x53.png 300w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/a><\/figure>\n\n\n\n<p>Next step, download the <a href=\"https:\/\/github.com\/Xilinx\/Vitis_Libraries.git\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Vitis Libraries from github<\/a> either through the git command line or directly by downloading the zip. <\/p>\n\n\n\n<p><em>git clone https:\/\/github.com\/Xilinx\/Vitis_Libraries.git<\/em><\/p>\n\n\n\n<p>For us, we are concerned with the &#8220;<em>vision&#8221;<\/em> libraries. Make sure you download the library because without this our projects won&#8217;t work.<\/p>\n\n\n\n<center><p><script type=\"text\/javascript\">\n\tatOptions = {\n\t\t'key' : 'a488f095e80c8a74746e5fdca977eaea',\n\t\t'format' : 'iframe',\n\t\t'height' : 90,\n\t\t'width' : 728,\n\t\t'params' : {}\n\t};\n\tdocument.write('<scr' + 'ipt type=\"text\/javascript\" src=\"http' + (location.protocol === 'https:' ? 's' : '') + ':\/\/www.profitabledisplaynetwork.com\/a488f095e80c8a74746e5fdca977eaea\/invoke.js\"><\/scr' + 'ipt>');\n<\/script><\/p><\/center>\n\n\n\n<h3 class=\"wp-block-heading\">Edit the tcl file for our project<\/h3>\n\n\n\n<p>Like I said earlier, we need to run the tcl file because this is an easier approach. We will switch to GUI mode later. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># ------------------------------------------------------------------------------\n# Vitis Vision and OpenCV Libary Path Information\n# ------------------------------------------------------------------------------\n#Path to project directory (EDIT)\nset XF_PROJ_ROOT \"J:\/XilinxProjects\/HLS_workspace\/test_project\" \n\n#Path to OpenCV include folder (EDIT)\t\nset OPENCV_INCLUDE \"G:\/opencv\/mingw_build\/install\/include\" \n\n#Path to OpenCV lib (EDIT)\t\t\nset OPENCV_LIB \"G:\/opencv\/mingw_build\/install\/x64\/mingw\/lib\" \t\t\n\n# ------------------------------------------------------------------------------\n# Vitis HLS Project Information\n# ------------------------------------------------------------------------------\n#Path to project directory (EDIT)\nset PROJ_DIR \"J:\/XilinxProjects\/HLS_workspace\/test_project\"\t\t\n\nset SOURCE_DIR \"$PROJ_DIR\/\"\n\n#Name of your project (EDIT)\t\t\t\t\t\t\t\t\t\nset PROJ_NAME \"hls_test\"\n\n#The HLS top level function (EDIT)\t\t\t\t\nset PROJ_TOP \"axiconv_accel\"\n\n#solution name (EDIT)\t\t\t\t\t\t\nset SOLUTION_NAME \"sol1\"\n\n# Device part number (EDIT)\t\t\t\t\t\t\nset SOLUTION_PART \"xczu2eg-sbva484-2-e\"\t\n\n# Clock (10 ns) (EDIT)\t\t\t\t\nset SOLUTION_CLKP 10\t\t\t\t\t\t\t\n\n# ------------------------------------------------------------------------------\n# OpenCV C Simulation \/ CoSimulation Library References\n#------------------------------------------------------------------------------\nset VISION_INC_FLAGS \"-IJ:\/XilinxProjects\/HLS_workspace\/Vitis_Libraries\/vision\/L1\/include -std=c++0x\" #Path to vision library include folder\nset OPENCV_INC_FLAGS \"-I$OPENCV_INCLUDE\"\t\t\t\t\t\t\nset OPENCV_LIB_FLAGS \"-L $OPENCV_LIB\"\n\n# Windows OpenCV Include Style:\n# The number 3416 is the version number. Yours could be different.\nset OPENCV_LIB_REF   \"-lopencv_imgcodecs3416 -lopencv_imgproc3416 -lopencv_core3416 -lopencv_highgui3416 -lopencv_flann3416 -lopencv_features2d3416\"\n<\/pre>\n\n\n\n<p>Read the comments carefully and edit the variables accordingly. You would definitely have different directory paths and those should reflect in this file correctly. The last line<em> <\/em>that declares the <em>OPENCV_LIB_REF <\/em>calls several openCV modules. For Windows Environment, they need to be invoked with their version numbers. It&#8217;s <em>3416<\/em> in my case. It could be something different if you happen to use an older or a newer version. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a new project from examples<\/h2>\n\n\n\n<p>The L1 examples contain plenty of projects to try. I would be using the &#8220;axiconv_accel&#8221; project and recreating it as a starting point for a bigger project. <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a new folder in the workspace directory. Copy all &#8220;run_hls_standalone.tcl&#8221;, and .cpp and .h files from the <em>vision\/L1\/examples\/axiconv<\/em> folder.<\/li>\n\n\n\n<li>Start Vitis HLS in command prompt mode and navigate to the project directory. <\/li>\n\n\n\n<li>At this point, you should edit your tcl script ready with the correct paths.<\/li>\n\n\n\n<li>Invoke the tcl script and let it do its job.<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">PS G:\\Xilinx\\Vitis_HLS\\2022.2\\bin> .\\vitis_hls -i\n\n****** Vitis HLS - High-Level Synthesis from C, C++ and OpenCL v2022.2 (64-bit)\n  **** SW Build 3670227 on Oct 13 2022\n  **** IP Build 3669848 on Fri Oct 14 08:30:02 MDT 2022\n    ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.\n\nsource G:\/Xilinx\/Vitis_HLS\/2022.2\/scripts\/vitis_hls\/hls.tcl -notrace\nINFO: [HLS 200-10] Running 'G:\/Xilinx\/Vitis_HLS\/2022.2\/bin\/unwrapped\/win64.o\/vitis_hls.exe'\nINFO: [HLS 200-10] For user 'nucle' on host 'stark' (Windows NT_amd64 version 6.2) on Mon May 08 22:55:52 +0530 2023\nINFO: [HLS 200-10] In directory 'G:\/Xilinx\/Vitis_HLS\/2022.2\/bin'\n\nHLS_workspace\nHLx_Examples-master\n\nvitis_hls> cd J:\/XilinxProjects\/HLS_workspace\/test_project\/\nvitis_hls> source run_hls_standalone.tcl<\/pre>\n\n\n\n<p>You may end up with an error after this. This is because of a file called &#8220;<em>xf_config_params.h&#8221;<\/em> residing in the <em>&#8220;tests&#8221; folder<\/em> of the L1 examples. We don&#8217;t need this file but optionally you can include it in your compilation. <\/p>\n\n\n\n<p>We are now ready to proceed with the GUI.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start Vitis HLS 2022.2 GUI.<\/li>\n\n\n\n<li>Open project &gt; Select the project folder with the name &#8220;hls_test&#8221;. This is where all the project settings reside that are required for the GUI to pickup and continue. <\/li>\n\n\n\n<li>I edited the program a little to get it to run. Follow the edits as shown below.\n<ul class=\"wp-block-list\">\n<li>Comment the &#8220;<em>xf_config_params.h&#8221; <\/em>line.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Add the following lines in the .h file. <\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#define MPC 0 \/\/ Multiple Pixels per Clock operation\n#define SPC 1 \/\/ Single Pixel per Clock operation\n\n#define GRAY 1\n#define RGB 0\n\n#define XF_CV_DEPTH_IN_1 2<\/pre>\n\n\n\n<p>You should be able to see the project source in the GUI.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/hls_gui_files.png\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"355\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/hls_gui_files.png\" alt=\"\" class=\"wp-image-8103\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/hls_gui_files.png 670w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/hls_gui_files-300x159.png 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><\/figure>\n\n\n\n<p>Click the Green arrow and click on &#8220;C Simulation&#8221;. If all goes well, it should finish the simulation and return no errors. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/no_errors_tb.png\"><img loading=\"lazy\" decoding=\"async\" width=\"723\" height=\"219\" src=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/no_errors_tb.png\" alt=\"\" class=\"wp-image-8104\" srcset=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/no_errors_tb.png 723w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/no_errors_tb-300x91.png 300w, https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/no_errors_tb-720x219.png 720w\" sizes=\"auto, (max-width: 723px) 100vw, 723px\" \/><\/a><\/figure>\n\n\n\n<p>This shows that we are able to use the vision libraries in Vitis HLS with OpenCV in the Windows Environment. Now, the testbench takes and image and outputs and image. It also prints some text that we didn&#8217;t see when running it. The fix is simple and you should be able to figure that out.<\/p>\n\n\n\n<p>Leave your comment below if you find any errors in my post and also any other tips that others may find useful. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Primarily, there is plenty of support to operate Vitis HLS and OpenCV on the Linux environment. This is mainly because of the ease of use on Linux. On Windows operating system, however, the story&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":8102,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1562],"tags":[1746,1798,1797,1749],"class_list":["post-8094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-fpga","tag-opencv","tag-vitis-hls","tag-xilinx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS<\/title>\n<meta name=\"description\" content=\"This blog post will guide you through the setup to run Vitis HLS and OpenCV vision libraries in a Windows environment.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS\" \/>\n<meta property=\"og:description\" content=\"This blog post will guide you through the setup to run Vitis HLS and OpenCV vision libraries in a Windows environment.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\" \/>\n<meta property=\"og:site_name\" content=\"Nuclearrambo\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-08T17:58:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-03T09:32:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_dir-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"759\" \/>\n\t<meta property=\"og:image:height\" content=\"133\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"nuclearrambo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@darkusul\" \/>\n<meta name=\"twitter:site\" content=\"@darkusul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"nuclearrambo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\"},\"author\":{\"name\":\"nuclearrambo\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c\"},\"headline\":\"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS\",\"datePublished\":\"2023-05-08T17:58:00+00:00\",\"dateModified\":\"2024-10-03T09:32:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\"},\"wordCount\":1145,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#organization\"},\"keywords\":[\"fpga\",\"opencv\",\"vitis hls\",\"xilinx\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\",\"name\":\"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS\",\"isPartOf\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#website\"},\"datePublished\":\"2023-05-08T17:58:00+00:00\",\"dateModified\":\"2024-10-03T09:32:47+00:00\",\"description\":\"This blog post will guide you through the setup to run Vitis HLS and OpenCV vision libraries in a Windows environment.\",\"breadcrumb\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nuclearrambo.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#website\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/\",\"name\":\"Nuclearrambo\",\"description\":\"Information is FREE! Progress is MUST! Awakening is inevitable!\",\"publisher\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nuclearrambo.com\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#organization\",\"name\":\"Nuclearrambo\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png\",\"contentUrl\":\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png\",\"width\":1489,\"height\":1152,\"caption\":\"Nuclearrambo\"},\"image\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/darkusul\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c\",\"name\":\"nuclearrambo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g\",\"caption\":\"nuclearrambo\"},\"description\":\"Salil is an electronics enthusiast working on various electronics systems. In his free time he writes on the blog, talks over ham radio or builds circuits. He has Yaesu FT2900R VHF transceiver, FT450D HF transceiver, TYT UV8000E and Quansheng UVK6 Handheld transceivers.\",\"sameAs\":[\"http:\/\/nuclearrambo.com\/wordpress\"],\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS","description":"This blog post will guide you through the setup to run Vitis HLS and OpenCV vision libraries in a Windows environment.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/","og_locale":"en_US","og_type":"article","og_title":"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS","og_description":"This blog post will guide you through the setup to run Vitis HLS and OpenCV vision libraries in a Windows environment.","og_url":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/","og_site_name":"Nuclearrambo","article_published_time":"2023-05-08T17:58:00+00:00","article_modified_time":"2024-10-03T09:32:47+00:00","og_image":[{"width":759,"height":133,"url":"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2023\/05\/vitis_hls_dir-1.png","type":"image\/png"}],"author":"nuclearrambo","twitter_card":"summary_large_image","twitter_creator":"@darkusul","twitter_site":"@darkusul","twitter_misc":{"Written by":"nuclearrambo","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#article","isPartOf":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/"},"author":{"name":"nuclearrambo","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c"},"headline":"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS","datePublished":"2023-05-08T17:58:00+00:00","dateModified":"2024-10-03T09:32:47+00:00","mainEntityOfPage":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/"},"wordCount":1145,"commentCount":4,"publisher":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#organization"},"keywords":["fpga","opencv","vitis hls","xilinx"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/","url":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/","name":"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS","isPartOf":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#website"},"datePublished":"2023-05-08T17:58:00+00:00","dateModified":"2024-10-03T09:32:47+00:00","description":"This blog post will guide you through the setup to run Vitis HLS and OpenCV vision libraries in a Windows environment.","breadcrumb":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nuclearrambo.com\/wordpress\/setup-vitis-hls-2022-2-and-opencv-on-windows-11-os\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nuclearrambo.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Setup Vitis HLS 2022.2 and OpenCV on Windows 11 OS"}]},{"@type":"WebSite","@id":"https:\/\/nuclearrambo.com\/wordpress\/#website","url":"https:\/\/nuclearrambo.com\/wordpress\/","name":"Nuclearrambo","description":"Information is FREE! Progress is MUST! Awakening is inevitable!","publisher":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nuclearrambo.com\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nuclearrambo.com\/wordpress\/#organization","name":"Nuclearrambo","url":"https:\/\/nuclearrambo.com\/wordpress\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/","url":"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png","contentUrl":"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png","width":1489,"height":1152,"caption":"Nuclearrambo"},"image":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/darkusul"]},{"@type":"Person","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c","name":"nuclearrambo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g","caption":"nuclearrambo"},"description":"Salil is an electronics enthusiast working on various electronics systems. In his free time he writes on the blog, talks over ham radio or builds circuits. He has Yaesu FT2900R VHF transceiver, FT450D HF transceiver, TYT UV8000E and Quansheng UVK6 Handheld transceivers.","sameAs":["http:\/\/nuclearrambo.com\/wordpress"],"url":"https:\/\/nuclearrambo.com\/wordpress\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts\/8094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/comments?post=8094"}],"version-history":[{"count":7,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts\/8094\/revisions"}],"predecessor-version":[{"id":8400,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts\/8094\/revisions\/8400"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/media\/8102"}],"wp:attachment":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/media?parent=8094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/categories?post=8094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/tags?post=8094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}