2017-12-01から1ヶ月間の記事一覧

PYNQでface detection

facedetect.py from pynq import Overlay Overlay("base.bit").download() import time import cv2 import numpy as np from pynq.drivers import HDMI from pynq.drivers.video import VMODE_1920x1080 hdmi_out = HDMI('out', video_mode=VMODE_1920x1080)…

PYNQでリアルタイムエッジ検出

canny.py from pynq import Overlay Overlay("base.bit").download() import time import cv2 import numpy as np from pynq.drivers import HDMI from pynq.drivers.video import VMODE_1920x1080 hdmi_out = HDMI('out', video_mode=VMODE_1920x1080) hdmi…

PYNQにCaffeをインストール

sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang libgoogle-glog-dev liblmdb-dev

Ubuntuのaptのsources.listの書き方

http://blog.goo.ne.jp/j_adversaria/e/4c024665dc61a79510d72cdf5444467a書式:deb URL Distribution [component1] [component2]... 書式:deb-src URL Distribution [component1] [component2]...

PYNQのubuntu 15.10 (wily)のaptのsources.list

/etc/apt/sources.list.d/multistrap-wily.list #以下を変更する #deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports wily universe main #deb-src http://ports.ubuntu.com/ubuntu-ports wily universe main deb [arch=armhf] http://old-releases.ub…

PYNQでHDMI+OpenCV

PYNQはv2.0だとpynq.driversがないようなのでHDMIが使えない(追記:v2.0のドキュメントに気づかなかった。APIが多少変わっているが普通に動きます。) v1.4を使う https://github.com/Xilinx/PYNQ/tree/v1.4 face detect sample https://github.com/Xilinx…

音楽生成

ゲームx強化学習

Introduction to AI for Video Games (Reinforcement Learning)

YOLO v2を試す

YOLOの解説 darkflowを使った https://github.com/thtrieu/darkflow YOLO v2のcfgとweightsのダウンロード https://pjreddie.com/darknet/yolo/ darkflowのインストール python3 setup.py build_ext --inplace実行 ./flow --model cfg/yolo-voc.cfg --load b…

ZyboでPS側のGPIO(MIO)を使う

https://forums.xilinx.com/t5/Xcell-Daily-Blog/Driving-the-Zynq-SoC-s-GPIO-Adam-Taylor-s-MicroZed-Chronicles/ba-p/389611 #include <stdio.h> #include "platform.h" #include "xil_printf.h" #include "xgpiops.h" #define ledpin 7 int main() { init_platfor</stdio.h>…

ubuntuにzynqのクロス環境debianをdebootstrapで入れる

http://dora.bk.tsukuba.ac.jp/~takeuchi/?%E9%9B%BB%E6%B0%97%E5%9B%9E%E8%B7%AF%2Fz-turn%2FLinux%E3%81%AE%E8%A8%AD%E5%AE%9A $ mkdir -p ~/zynqfs $ export targetdir=~/zynqfs $ export distro=jessie $ sudo debootstrap --arch=armhf --foreign $dist…

SDSoCでビデオ処理のデモ

AXI Streamについて

ZyboでColor tracking

FPGAでface tracking

ZYBO+HDMIでFASTコーナー検出

Zybo+OpenCVでリアルタイム画像処理

以下の記事を試す 32. Linux on Zynq / Real-Time Video Processing https://sites.google.com/site/powellsshowcase/home/32linuxonzynqreal-timevideoprocessing 1. GitHubレポジトリをクローン git clone https://github.com/andrewandrepowell/zybo_peta…

Windows10でVivado2017.3が起動しない

2回再インストールしたけどダメだった 以下によるとバグらしい https://www.xilinx.com/support/answers/69908.htmlワークアラウンド(C:\Xilinx\Vivado\2017.3\bin\unwrapped\win64.oに入り、vivado-vg.exeをvivado.exeにリネームする) 1.Navigate to (Vi…

PYNQでCNN

CPUと対比するためのベンチマークのとり方が参考になる bitstreamを事後的に読めるのは面白い

Arty Z7でHDMIのチュートリアル

基本的に以下のDigilentのレポジトリをそのまま試せばいい https://github.com/Digilent/Arty-Z7/tree/master/Projects/Z7-20/hdmi_inハマったのは 1. 最初dvi2rgbのタイミングが合わなかったので係数をIPをEditしていじったりしたけど、結局最初の値にもど…

ArtyZ7ボードでサーミスタを使う

Sprinterのルックアップテーブルを利用した温度測定の原理 http://d.hatena.ne.jp/seinzumtode/20171211/1512956856 で書いたような方法ではArty Z7でXADCを使った温度測定ができなかったのでメモ。ZYNQのXADCは0-1.0Vのレンジを計測できるが、Arty Z7のA0-A…

AXI TimerでPWMを使い、さらにPWMの立ち上がりと立ち下がりで別のハンドラを使う

1. 立ち上がりか立ち下がりかは、TCSR0(TCSR1)の8ビット目、 TINT0(TINT1)を読んで判定する。 2. XTC_CSR_ENABLE_PWM_MASK | XTC_CSR_EXT_GENERATE_MASKをONに入れる。 pwm0だけでなくgenerateout0, generateout1にも信号が出るが、使わなくて良い #include <stdio.h></stdio.h>…

オープンソース遠心分離機: OpenFuge

Thingiverse https://www.thingiverse.com/thing:151406 GitHub https://github.com/CopabX/OpenFuge

AXI TimerでPWMを使う

ポイントはXTC_CSR_ENABLE_PWM_MASKとXTC_CSR_EXT_GENERATE_MASKを入れてやること (後者に気づかずにハマった)PWMがONになる立ち上がりとOFFになる立ち下がりでハンドラが呼ばれる どちらのエッジかを検出するステータスフラグを用意してやれば、COMPA_vec…

Sprinterのヒータ制御のPWM動作について

Timer2_OVF_vectとTimer2_COMPA_vectの違い

Describing Function

ÅströmとHägglundによるPIDのリレー・オートチューニングについて

カール・ヨハン・オーストラム(Karl Johan Åström)とトーレ・ヘーグルン(Tore Hägglund)の1984年の論文 Automatic tuning of simple regulators with specifications on phase and amplitude margins https://dl.acm.org/citation.cfm?id=2235880解説論文…

ArduinoのPIDライブラリ

https://github.com/br3ttb/Arduino-PID-Library/ PID制御器 PID::Computeの解析 1. P on Errorのとき(デフォルト) double input = *myInput;//システムからの出力x_tのこと double error = *mySetpoint - input;//セットポイントはターゲットr、inputはx_…

ArduinoのPID autotuningライブラリ

Arduino PID Autotune Library http://brettbeauregard.com/blog/2012/01/arduino-pid-autotune-library/