{"id":33159,"date":"2020-06-01T16:51:53","date_gmt":"2020-06-01T08:51:53","guid":{"rendered":"\/blog\/?p=33159"},"modified":"2020-06-02T16:50:45","modified_gmt":"2020-06-02T08:50:45","slug":"install-opencv-on-jetson-nano-developer-kit-b01-m","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/","title":{"rendered":"Install OpenCV on Jetson Nano Developer Kit b01"},"content":{"rendered":"\n<p>OpenCV is pre-installed on Jetson Nano Developer Kit b01. You can run following code in Python terminal to check your OpenCV version<\/p>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f8f8f8;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em\"><table><tr><td><pre style=\"margin: 0;line-height: 125%\">1\n2<\/pre><\/td><td><pre style=\"margin: 0;line-height: 125%\"><span style=\"color: #AA22FF;font-weight: bold\">import<\/span> <span style=\"color: #0000FF;font-weight: bold\">cv2<\/span>\n<span style=\"color: #AA22FF\">print<\/span>(cv2<span style=\"color: #666666\">.<\/span>__version__)\n<\/pre><\/td><\/tr><\/table><\/div>\n\n\n\n<p>But if you want to install a specific version of OpenCV, like 4.0.0, you can use a shell script provided by Nvidia. The command are as follow<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><code>nano install_opencv.sh<\/code><\/li><li>Copy and paste the following code<\/li><\/ol>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f8f8f8;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em\"><table><tr><td><pre style=\"margin: 0;line-height: 125%\"> 1\n 2\n 3\n 4\n 5\n 6\n 7\n 8\n 9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47<\/pre><\/td><td><pre style=\"margin: 0;line-height: 125%\"><span style=\"color: #008800;font-style: italic\">#!\/bin\/bash<\/span>\n<span style=\"color: #008800;font-style: italic\">#<\/span>\n<span style=\"color: #008800;font-style: italic\"># Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.<\/span>\n<span style=\"color: #008800;font-style: italic\">#<\/span>\n<span style=\"color: #008800;font-style: italic\"># NVIDIA Corporation and its licensors retain all intellectual property<\/span>\n<span style=\"color: #008800;font-style: italic\"># and proprietary rights in and to this software, related documentation<\/span>\n<span style=\"color: #008800;font-style: italic\"># and any modifications thereto.  Any use, reproduction, disclosure or<\/span>\n<span style=\"color: #008800;font-style: italic\"># distribution of this software and related documentation without an express<\/span>\n<span style=\"color: #008800;font-style: italic\"># license agreement from NVIDIA Corporation is strictly prohibited.<\/span>\n<span style=\"color: #008800;font-style: italic\">#<\/span>\n \n<span style=\"color: #AA22FF;font-weight: bold\">if<\/span> <span style=\"color: #666666\">[<\/span> <span style=\"color: #BB4444\">&quot;$#&quot;<\/span> -ne 1 <span style=\"color: #666666\">]<\/span>; <span style=\"color: #AA22FF;font-weight: bold\">then<\/span>\n<span style=\"color: #AA22FF;font-weight: bold\">    <\/span><span style=\"color: #AA22FF\">echo<\/span> <span style=\"color: #BB4444\">&quot;Usage: $0 &lt;Install Folder&gt;&quot;<\/span>\n    <span style=\"color: #AA22FF\">exit<\/span>\n<span style=\"color: #AA22FF;font-weight: bold\">fi<\/span>\n<span style=\"color: #B8860B\">folder<\/span><span style=\"color: #666666\">=<\/span><span style=\"color: #BB4444\">&quot;$1&quot;<\/span>\n<span style=\"color: #B8860B\">user<\/span><span style=\"color: #666666\">=<\/span><span style=\"color: #BB4444\">&quot;nvidia&quot;<\/span>\n<span style=\"color: #B8860B\">passwd<\/span><span style=\"color: #666666\">=<\/span><span style=\"color: #BB4444\">&quot;nvidia&quot;<\/span>\n \n<span style=\"color: #AA22FF\">echo<\/span> <span style=\"color: #BB4444\">&quot;** Install requirement&quot;<\/span>\nsudo apt-get update\nsudo apt-get install -y build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev\nsudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev\nsudo apt-get install -y python2.7-dev python3.6-dev python-dev python-numpy python3-numpy\nsudo apt-get install -y libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev\nsudo apt-get install -y libv4l-dev v4l-utils qv4l2 v4l2ucp\nsudo apt-get install -y curl\nsudo apt-get update\n \n<span style=\"color: #AA22FF\">echo<\/span> <span style=\"color: #BB4444\">&quot;** Download opencv-4.0.0&quot;<\/span>\n<span style=\"color: #AA22FF\">cd<\/span> <span style=\"color: #B8860B\">$folder<\/span>\ncurl -L https:\/\/github.com\/opencv\/opencv\/archive\/4.0.0.zip -o opencv-4.0.0.zip\ncurl -L https:\/\/github.com\/opencv\/opencv_contrib\/archive\/4.0.0.zip -o opencv_contrib-4.0.0.zip\nunzip opencv-4.0.0.zip \nunzip opencv_contrib-4.0.0.zip \n<span style=\"color: #AA22FF\">cd <\/span>opencv-4.0.0\/\n \n<span style=\"color: #AA22FF\">echo<\/span> <span style=\"color: #BB4444\">&quot;** Building...&quot;<\/span>\nmkdir release\n<span style=\"color: #AA22FF\">cd <\/span>release\/\ncmake -D <span style=\"color: #B8860B\">WITH_CUDA<\/span><span style=\"color: #666666\">=<\/span>ON -D <span style=\"color: #B8860B\">CUDA_ARCH_BIN<\/span><span style=\"color: #666666\">=<\/span><span style=\"color: #BB4444\">&quot;5.3&quot;<\/span> -D <span style=\"color: #B8860B\">CUDA_ARCH_PTX<\/span><span style=\"color: #666666\">=<\/span><span style=\"color: #BB4444\">&quot;&quot;<\/span> -D <span style=\"color: #B8860B\">OPENCV_EXTRA_MODULES_PATH<\/span><span style=\"color: #666666\">=<\/span>..\/..\/opencv_contrib-4.0.0\/modules -D <span style=\"color: #B8860B\">WITH_GSTREAMER<\/span><span style=\"color: #666666\">=<\/span>ON -D <span style=\"color: #B8860B\">WITH_LIBV4L<\/span><span style=\"color: #666666\">=<\/span>ON -D <span style=\"color: #B8860B\">BUILD_opencv_python2<\/span><span style=\"color: #666666\">=<\/span>ON -D <span style=\"color: #B8860B\">BUILD_opencv_python3<\/span><span style=\"color: #666666\">=<\/span>ON -D <span style=\"color: #B8860B\">BUILD_TESTS<\/span><span style=\"color: #666666\">=<\/span>OFF -D <span style=\"color: #B8860B\">BUILD_PERF_TESTS<\/span><span style=\"color: #666666\">=<\/span>OFF -D <span style=\"color: #B8860B\">BUILD_EXAMPLES<\/span><span style=\"color: #666666\">=<\/span>OFF -D <span style=\"color: #B8860B\">CMAKE_BUILD_TYPE<\/span><span style=\"color: #666666\">=<\/span>RELEASE -D <span style=\"color: #B8860B\">CMAKE_INSTALL_PREFIX<\/span><span style=\"color: #666666\">=<\/span>\/usr\/local ..\nmake -j3\nsudo make install\nsudo apt-get install -y python-opencv python3-opencv\n \n<span style=\"color: #AA22FF\">echo<\/span> <span style=\"color: #BB4444\">&quot;** Install opencv-4.0.0 successfully&quot;<\/span>\n<span style=\"color: #AA22FF\">echo<\/span> <span style=\"color: #BB4444\">&quot;** Bye :)&quot;<\/span>\n<\/pre><\/td><\/tr><\/table><\/div>\n\n\n\n<p>3. Press <code>ctrl + o<\/code>, then <code>ctrl + x<\/code><\/p>\n\n\n\n<p>4. Run <code>.\/install_opencv.sh<\/code>, then test it by using the python code provided above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenCV is pre-installed on Jetson Nano Developer Kit b01. You can run following code in<\/p>\n","protected":false},"author":3485,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[3254,1340,1825,1608],"class_list":["post-33159","post","type-post","status-publish","format-standard","hentry","category-news","tag-computer-vision","tag-jetson-nano","tag-jetson-nano-developer-kit","tag-machine-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install OpenCV on Jetson Nano Developer Kit b01 - Latest News from Seeed Studio<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install OpenCV on Jetson Nano Developer Kit b01 - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"OpenCV is pre-installed on Jetson Nano Developer Kit b01. You can run following code in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-01T08:51:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-02T08:50:45+00:00\" \/>\n<meta name=\"author\" content=\"ericyu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ericyu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/\",\"name\":\"Install OpenCV on Jetson Nano Developer Kit b01 - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"datePublished\":\"2020-06-01T08:51:53+00:00\",\"dateModified\":\"2020-06-02T08:50:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c1f0264a6ad9ba995b2367e06fd70ec9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install OpenCV on Jetson Nano Developer Kit b01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c1f0264a6ad9ba995b2367e06fd70ec9\",\"name\":\"ericyu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eb22f677db332dc286108258a6b7f324?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eb22f677db332dc286108258a6b7f324?s=96&r=g\",\"caption\":\"ericyu\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/ericyu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install OpenCV on Jetson Nano Developer Kit b01 - Latest News from Seeed Studio","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:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/","og_locale":"en_US","og_type":"article","og_title":"Install OpenCV on Jetson Nano Developer Kit b01 - Latest News from Seeed Studio","og_description":"OpenCV is pre-installed on Jetson Nano Developer Kit b01. You can run following code in","og_url":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2020-06-01T08:51:53+00:00","article_modified_time":"2020-06-02T08:50:45+00:00","author":"ericyu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ericyu","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/","url":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/","name":"Install OpenCV on Jetson Nano Developer Kit b01 - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"datePublished":"2020-06-01T08:51:53+00:00","dateModified":"2020-06-02T08:50:45+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c1f0264a6ad9ba995b2367e06fd70ec9"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/01\/install-opencv-on-jetson-nano-developer-kit-b01-m\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install OpenCV on Jetson Nano Developer Kit b01"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c1f0264a6ad9ba995b2367e06fd70ec9","name":"ericyu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eb22f677db332dc286108258a6b7f324?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb22f677db332dc286108258a6b7f324?s=96&r=g","caption":"ericyu"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/ericyu\/"}]}},"modified_by":"ericyu","views":9454,"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":"","visody_icon":"","magazine-7-slider-full":"","magazine-7-slider-center":"","magazine-7-featured":"","magazine-7-medium":"","magazine-7-medium-square":""},"author_info":{"display_name":"ericyu","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/ericyu\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/3485"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=33159"}],"version-history":[{"count":2,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33159\/revisions"}],"predecessor-version":[{"id":33238,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33159\/revisions\/33238"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=33159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=33159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=33159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}