I am Charmie

メモとログ

Uncategorized

control HMD by C++

I just wanna show images and videos on an HMD, HTC Vive so far. To build as simple system as possible, I want C++ based development. Python is also fine. OpenVRC++ OpenXRC++ Ogre3dC++ library for graphics OpenHMD C++ for handling HMDs

Unreal Engine 4: 静的ライブラリの使用

このチュートリアルを読んだ.ビルドシステムを使ってUE4に静的ライブラリをリンクする方法.読んでて飽きたから途中まで. Visual Studioのバージョンに気を付ける.当然のことだけど,静的ライブラリをコンパイルしたVSとUE4と一緒に使うVSのバージョンは…

Unreal Engine 4: Media Playerで動画再生

全然スマートじゃないけどMedia Playerで動画を再生できた.銃を持っているのが気になるけど,1人称視点のテンプレートについてきただけ.手順も思ったほど複雑じゃない. 手順1 動画を読み込むContent Browserを使って再生したい動画ファイルを読み込む.Co…

Unreal Engine 4: Media Editor

このチュートリアルを読んだ. プレイヤーウィンドウメディアの再生表示だけではなく,再生オプションの定義なども行うウィンドウ.プレイヤーウィンドウ左側にあるドロップダウンメニューからCapture Devicesオプションを選択できる.Capture Devicesオプシ…

Unreal Engine 4: Media Framework

Unreal Engine 4で動画を再生する方法についてメモ.公式ドキュメントのMedia Frameworkを参照. 以下の2種類が提供されている.ゲーム中で動画を再生する場合はMedia Frameworkと考えれば良いのかな.- Startup Movie Player: エンジンロード中の起動動画の…

HTC Viveにwebカメラの映像を表示 (Windows 10)

タイトル通り.Viveと言ったらUnityでしょうと思っていたけど,Unreal Engine 4の方がよさそうだったので.良さそうと思った理由は,- 「 カメラの映像をリアルタイムで表示する」みたいなキーワードで検索した時にヒットした情報の質 (Unityはよくわからな…

HTC Vive setup

Running ViveSetup.exe, the computer takes 5 steps for Vive installation. Step 1: Software1. installs something, this could be Vive drivers and some SDK I guess,2. asks to create an HTC account,3. installs STEAM,4. asks to create a STEAM ac…

Aruco in OpenCV

OpenCVで実装されているArucoに関するメモ.あくまでもPython.Versionは4.0.0.21テスト チュートリアルに書いてある内容+α. dictionary(マーカのセット)は2種類1. predefined dictionary: あらかじめ用意されているマーカ2. custom dictionary: 自作するd…

ffmpegのコマンド

ffmpegの使いそうなコマンドをまとめる. FILE_INPUTは入力ファイル名 FILE_OUTPUTは出力ファイル名 時間はhh:mm:ssというフォーマット (01:23:45なら1時間23分45秒) 動画の一部を切り出す (TIME_STARTからTIME_DURATIONの長さ) ffmpeg -ss TIME_START -i FI…

Tkinter

tkinter.Tk()root(メインウィンドウ?)の作成rootにwidgetを配置していく tkinter.Tk().mainloop()メインの処理を実行 geometryウィンドウのサイズや位置を設定まさにgeometry widgetの配置widget(オブジェクト)を作成する時は,1. 作成するwidgetの親widget…

PyTorch 1.0 with CUDA 10.0 and cuDNN 7.5 on Ubuntu 18.04

This post describes how to setup PyTorch 1.0 with CUDA 10.0 and cuDNN 7.5 on Ubuntu 18.04. Step 0 uninstall CUDA 10.1 related components# uninstall PyTorchconda uninstall pytorch torchvision cudatoolkit# uninstall cuDNNsudo dpkg -r libcudn…

Kivy on Mac OS X

It's super simple with Anaconda.The official instruction says the following command is fine $ conda install kivy -c conda-forge The above command installs kivy and its components. The tutorial Pong game works on my computer.

PyTorch 1.0 on Ubuntu 18.04

The official site provides conda package with the combination of CUDA toolkit 10.0 and cuDNN 7.4. My installation is CUDA toolkit 10.1 and cuDNN 7.5.After the installation, a sample program worked, however I may need to downgrade the toolk…

CUDA 10.1 on Ubuntu 18.04

You should first check the compatibility between NVIDIA driver and CUDA here so that you can avoid installing/uninstalling wrong combinations of them. Also, you should check which version are supported by some applications. In my case, I u…

NVIDIA driver on Ubuntu 18.04

This post describes how to install an NVIDIA driver on Ubuntu 18.04. The official CUDA toolkit documentation didn't work me. I tried package manager based installation and it worked. Step 1. Disable the Nouveau driversNvidia driver install…

日本人の9割が知らない英語の常識181 (ちくま新書)

日本人の9割が知らない英語の常識181 (ちくま新書) キャサリン・A・クラフト筑摩書房 この本もためになった. 内容: 本書は、日本人の9割が知らないと思われる「英語の常識」について考察したものです。現代日本には英語があふれていますが、英語のネイティ…

その英語、ネイティブにはこう聞こえます

その英語,ネイティブにはこう聞こえますデイビッド・セイン主婦の友社 英語の陥りがちな罠というか犯しがちなミスをまとめた本.感覚が分からないので大変参考になった.と言っても,既に大半の内容を忘れていると思うので,何回も読み返したりドラマ見て学…

C# on Linux

To enjoy .NET program on Linux, let's follow the official tutorial.The following information is for Ubuntu 16.04 but the tutorial itself contains information for other versions and OSs. Step 1 install dependencies[code lang='bash']wget -q …

FLIR camera on Linux

This post describes how to use a FLIR camera on Linux (Ubuntu 16.04). Step 0 RTFMAs the camera package says, let's read the Getting Started Manual (GSM).As soon as you read the manual, you can see the manual is not up-to-date. The followin…

FLIR camera on HTC Vive with Unity

This post has a set of links to my posts that describe how to show video stream captured by a FLIR camera on HTC Vive using Unity on Linux and Mac.Step 1 Use FLIR cameraStep 2 Show video stream from FLIR camera on HTC Vive

Leap Motion with Unity on Mac

This note describes how to setup an environment to use leap motion with unity on Mac OS X Mojave.The official information is available here. Step 1: Enable to use Leap Motion on computerWe need to install the SDK to use Leap Motion on comp…

Unity on Linux

The installer is available on unity forum. At the end of this thread, you can access the link to the installers. Download the installer (UnityHubSetup.AppImage).Make the installer executable.Run the installer. The installation works as the…

Unity on Mac

This is my note how to setup Unity on Mac OS X Mojave.Unity hub is a Unity package manager with which we can easily install multiple version of Unity and manage installed components.See the official documentation here! Go to download page …

Python: 特殊メソッド

関数名の前後に2つのアンダースコアをつけたクラス関数は特殊メソッドとして扱われる. 例: def __FUNC__(self, ...): 演算子のオーバーロードとして定義できるメソッドは以下の通り. object.__add__(self, other): object + otherobject.__sub__(self, oth…

Leap Motion with Unity on Mac

This is a memo on setup using leap motion with unity on my mac book pro mojave.I got hints from the following sites.https://uni.gas.mixh.jp/unity/mac-install.htmlhttp://kan-kikuchi.hatenablog.com/entry/VisualStudioforMachttps://qiita.com/h…

Edit Movie: rotate 180 degree while keeping video quality

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=180 output.mp4

OpenCV-Python: video properties

[code lang='python']import cv2video = cv2.VideoCapture('input.mp4')num_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT))fps = video.get(cv2.CAP_PROP_FPS)width = int(video.get(cv2.CAP_PROP_FRAME_WIDTH))height = int(video.get(cv2.CAP_PROP_FR…

ArUco in OpenCV

ArUco is a fiducial marker tracking method against occlusion published in Pattern Recognition in 2014. ArUco was integrated into OpenCV modules. This blog post is to know its definition, how-to-use, etc. for my works. ArUco provides three …

Install OpenCV contrib for python

I was looking for a way to install OpenCV and OpenCV contrib for Python 3 with Anaconda. The following commands are what I found and succeeded to install but with pip not with Anaconda. pip install opencv-python pip install opencv-contrib-…

Install Octave on Mac OSX

[code lang='bash'] brew install octave [/code]