TX1側のOFのプロジェクトの中身です。初回でmake -j4 make run すると、〇〇〇.caffemodel.tensorcasdheが作成されるため実行までに3〜4分必要。ターミナルにエラーが表示されていなければ正常に動いてます。ハングしたんじゃないかと心配になりますが...。一度作成されれば次回からはスーイスイ。
############################################################################### # CONFIGURE CORE PLATFORM MAKEFILE # This file is where we make platform and architecture specific # configurations. This file can be specified for a generic architecture or can # be defined as variants. For instance, normally this file will be located in # a platform specific subpath such as # # $(OF_ROOT)/libs/openFrameworksComplied/linux64 # # This file will then be a generic platform file like: # # configure.linux64.default.make # # Or it can specify a specific platform variant like: # # configure.linuxarmv6l.raspberrypi.make # ################################################################################
################################################################################ # include common rules # # all linux systems have several rules in common so most of them are included # from the following file # ################################################################################
include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk
################################################################################ # PLATFORM CFLAGS # This is a list of fully qualified CFLAGS required when compiling for this # platform. These flags will always be added when compiling a project or the # core library. These flags are presented to the compiler AFTER the # PLATFORM_OPTIMIZATION_CFLAGS below. # # Note: Leave a leading space when adding list items with the += operator ################################################################################ #PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/app/ofAppEGLWindow.cpp #PLATFORM_CFLAGS = -Wall -std=c++11 PLATFORM_CFLAGS = -Wall -std=c++14 -DGCC_HAS_REGEX
################################################################################ # PLATFORM LIBRARIES # These are library names/paths that are platform specific and are specified # using names or paths. The library flag (i.e. -l) is prefixed automatically. # # PLATFORM_LIBRARIES are libraries that can be found in the library search # paths. # PLATFORM_STATIC_LIBRARIES is a list of required static libraries. # PLATFORM_SHARED_LIBRARIES is a list of required shared libraries. # PLATFORM_PKG_CONFIG_LIBRARIES is a list of required libraries that are # under system control and are easily accesible via the package # configuration utility (i.e. pkg-config) # # See the helpfile for the -l flag here for more information: # http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html # # Note: Leave a leading space when adding list items with the += operator ################################################################################ #check gstreamer version ifeq ($(CROSS_COMPILING),1) ifdef TOOLCHAIN_ROOT #You have specified TOOLCHAIN_ROOT with an environment variable else TOOLCHAIN_ROOT = /opt/cross/bin endif ifdef GCC_PREFIX #You have specified GCC_PREFIX with an environment variable else GCC_PREFIX = arm-linux-gnueabihf endif PLATFORM_CXX = $(TOOLCHAIN_ROOT)/$(GCC_PREFIX)-g++ PLATFORM_CC = $(TOOLCHAIN_ROOT)/$(GCC_PREFIX)-gcc PLATFORM_AR = $(TOOLCHAIN_ROOT)/$(GCC_PREFIX)-ar PLATFORM_LD = $(TOOLCHAIN_ROOT)/$(GCC_PREFIX)-ld SYSROOT=$(RPI_ROOT) PLATFORM_CFLAGS += --sysroot=$(SYSROOT) PLATFORM_HEADER_SEARCH_PATHS += $(SYSROOT)/usr/include/c++/5
これで一応インストールは終了。お好みのサンプルフォルダに行き(ここでは一番見た目が派手なやつ) cd ~/of_v0.9.8/examples/3d/3DPrimitivesExample webcameraをusbに接続して make -j4 make run でビルドして、動かすと。ものすごく早い!!(最初の画像参照)。キーボード入力は今の所1〜9、大文字アルファベットのA〜Z、矢印キーしか受け付けません。escキーは使えないので注意。(もっとも操作上はこれだけあれば十分ですけど)サンプルファイルは小文字入力が必要な場合は大文字に変更してください(ofAPP.cpp内部。keyPressed内に書かれた入力処理のみ受け付ける。keyReleasedに書かれている場合は、keyPressed部分に書き換えればOKです。)。どうやらglfw3ライブラリに関してTX1の相性が悪いみたいですが、うまく行ったらまた書き込みます。