Deutsch (English below) ======================= Anleitung zum aufspielen und starten von HALCON/HPEEK auf einem PHYTEC i.MX6 Board mit einem BSP ab PD20 ======================================================================================================== Allgemein: Diese Anleitung zeigt ihnen folgende Möglichkeiten mit HALCON/HPEEK zu arbeiten. A) Verwendung der HPEEK Demoversion von Halcon (kein Dongle/Lizenz erforderlich) B) Verwendung von HPEEK zum starten von hdev-Demos mit Zugriff auf phyCAM-Kameramodule (Dongle/Lizenz erforderlich) -------------------------------------------- Schritte: 1) Vision-BSP PD20.1.0 (oder höher) auf eine microSD-Card spielen (Wähle entsprechend der verwendeten Plattform (Mira [microSD-Card], Nunki [microSD-Card], phyFLEX[SD-Card])) Alternativ kann ein vorcompiliertes SDCARD Image vom PHYTEC-FTP verwendet werden, in diesem Fall kann bei Schritt 4 begonnen werden. 2) Speicher auf microSD-Card anpassen 3) HPEEK/HALCON installation 4) HPEEK starten 5) HALCON Demos aufspielen. HALCON Demos mit phyCAM-Kameras starten Voraussetzung: - phyBOARD Nunki (phyboard-nunki-imx6-1), phyBOARD Mira (phyboard-mira-imx6-3) oder phyFLEX-i.MX6 (phyflex-imx6-2) - PD20.x.x, i.MX6 Vision-BSP (ftp://ftp.phytec.de/pub/Software/Linux/BSP-Yocto-i.MX6/BSP-Yocto-i.MX6-PD20.1.0/images/yogurt-x11/) oder dem vorcompilierten BSP mit HALCON vom PHYTEC FTP (ftp://ftp.phytec.de/pub/ImageProcessing/) - freie microSD-CARD min. 2GB (oder SD-CARD mit Adapter auf microSD) - HDMI Monitor oder Display - Host PC, im nachfolgenden wurde ein Windowsrechner mit den Programmen: "Putty", "WinSCP" und "Win32DiskImager" verwendet. Schritt 1) Image auf microSD-Card spielen ========================================= Nachfolgend wird die Vorgehensweise mittels BSP auf microSD-Card beschrieben: - SD-Card-BSP PD20.x.x auf microSD-Card spielen (z.B. mit "Win32DiskImager" auf einem Windows Rechner) - microSD-Card einstecken und von SD booten (Bootjumperstellung abhängig von Plattform) - Mittels eines Terminalprogramms (z.B. "Putty") können die nachfolgenden Consolenbefehle auch über einem Windowsrechner eingegeben werden - nach dem durchbooten als root anmelden, type "root" - QT und X11 mittels ".../gstreamer_examples/remove_qt_demo.sh" abschalten - Netzwerkverbindung ihrem Netzwerk anpassen (Einstellung in der "/lib/systemd/network/10-eth0.network") - type "reboot" (neustart) Schritt 2) Speicher auf microSD-Card anpassen ============================================= Beim aufspielen des BSPs wird die microSD-CARD üblicherweise nur mit der Größe des BSP formatiert. Damit wir jedoch das HPEEK mit aufspielen können wird die volle Größe der microSD-Card benötigt. - Prüfen und einstellen der microSD-CARD Größe. * Linux von microSD-CARD booten und mittels "root" anmelden * Speicher anzeigen lassen, dev/root soll verwendet werden und min. 2GB groß sein * eingeben * eingeben Unter "/dev/mmcblk0" wird die mögliche Speichergröße ausgegeben. * * Enter (specify here the end of the total memory, for example 2GB) * Enter leave program "parted" * Enter re-reading the memory * Enter Show memory, dev / root should now have the new memory size Step 3) HPEEK/HALCON installation ================================= - A current version of HPEEK is located on the homepage of company MVTEC: https://www.mvtec.com/de/produkte/embedded-vision/ - Before you can download HPEEK, you need to register there. - Select Product-> HALCON / Version-> HPeek / Operating System-> Linux for ARM (32-Bit Version) * Note: HPEEK work without licence, HALCON need a licence - turn on the system and authorized you, type "root" - Create a directory ../usr/share/halcon on the phyCORE. - Play the "xxxarmv7a-linux-hpeek.tar.gz" file into the ../usr/share/halcon directory (e.g. via "WinSCP") - change into path ../usr/share/halcon - Set attributes and unpack: * chmod 755 halcon-20.05.0.0-armv7a-linux-hpeek.tar.gz * tar -xvf halcon-20.05.0.0-armv7a-linux-hpeek.tar.gz extra ===== - turn off screen saver X11 * copy file "xorg.conf" in to path "/etc/X11/..." * chmod 755 xorg.conf - type "reboot" (restart) Step 4) Start HPEEK demo ======================== Requirements: a) the Vision-BSP you have adapted with HPEEK/HALCON on an microSD-Card b) or you have written the precompiled image from PHYTEC on microSD-Card (eg via "WinSCP"). - turn on the system and authorized you ("root") - change into path ../usr/share/halcon - Start X11 server * - set the environment for display * - start HPEEK * <./run_overview.sh> * <./run_deep_learning.sh> Adapt HPEEK: - adapt resolution and choise demos: open /usr/share/halcon/examples/hpeek/config.txt 1) setup the resolution of display WindowWidth xxx (set desired resolution) WindowHeight xxx (set desired resolution) 2) choise the demos set the variablen, e.g.: * show_intro 0 (intro off) * show_intro 1 (intro on) Step 5) Start HALCON demo ========================= Requirements: a) the Vision-BSP you have adapted with HPEEK/HALCON on an microSD-Card b) or you have written the precompiled image from PHYTEC on microSD-Card (eg via "WinSCP"). c) an HALCON Licence/Dongle - turn on the system and authorized you ("root") - copy licence file into .../halcon/license/... path and stick the dongle in - set up the connected camera in bootloader environment (see document "phyCAM_with_xxx-iMX6_Getting_Started", ftp://ftp.phytec.de/pub/ImageProcessing//Dokumentation/) - copy "halcon_examples.tar" into path ../usr/share/halcon/ (is include at the precompiled image) - set attributes and unpack: * chmod 755 halcon_examples.tar * tar -xvf halcon_examples.tar - change into path ../usr/share/halcon/examples/phytec/ - Start X11 server * - call "start.sh" Troubleshooting: ================ If you get the error "Cannot run unsigned script phyCAM_show_stream.hdev (5)", please check the set system time. Update them if necessary.