cmusatyalab / diamond-android Goto Github PK
View Code? Open in Web Editor NEWAndroid library for running Diamond filters
Home Page: http://diamond.cs.cmu.edu/
License: Eclipse Public License 1.0
Android library for running Diamond filters
Home Page: http://diamond.cs.cmu.edu/
License: Eclipse Public License 1.0
Map[Str,Byte[]]: Double
or Map[Str,Byte[]]: Boolean
This filter is written in Python.
Hi @bgilbert - should this repository be licensed under the EPL like diamond-core-filters
?
Options:
I'm currently leaning towards the 2nd since not every
dependency might not be versioned with git.
Debugging is difficult because the filter doesn't return control and
hangs at in indeterminate location.
Hi @bgilbert - can we discuss what the application should do before I make further modifications?
Hi @bgilbert @theonewolf and @wenluhu - just brainstorming here.
I've been compiling a lot of utility libraries for ARM in addition
to the ones in here, such as tune2fs, mknod, and gammaray.
Mostly, I can build them fine with the snippet below,
but other times a small diff of the original source is required,
or I need to link other static ARM libraries.
I've been thinking that a simple ARM package manager to
build executables and static libraries from the original source
would be helpful to run non-standard C programs on Android.
The benefit of centralizing this is that people wouldn't have to
manually build or chain together dependencies as I've done in https://github.com/cmusatyalab/diamond-android/blob/master/diamond-android-library/jni/build.sh.
Is this a sane idea?
Do you all have any thoughts on this?
if [[ ! -d toolchain ]]; then
# Using NDK r10b.
$ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
--platform=android-18 \
--toolchain=arm-linux-androideabi-4.8 \
--install-dir=$PWD/toolchain
fi
# Add the standalone toolchain to the path.
pathadd() { PATH="${PATH:+"$PATH:"}$1"; }
pathadd "$PWD/toolchain/bin"
command -v arm-linux-androideabi-gcc &> /dev/null || exit -1
export SYSROOT=$PWD/toolchain/sysroot
export CC="arm-linux-androideabi-gcc --sysroot=$SYSROOT"
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
export RANLIB=arm-linux-androideabi-ranlib
export AR=arm-linux-androideabi-ar
export CROSS_PREFIX=arm-linux-androideabi-
export CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
export LDFLAGS='-Wl,--fix-cortex-a8'
./configure --enable-static --host=arm-linux || die "Configure failed."
make -j8 bin/gray-crawler || die "Make failed."
One response to using the Diamond OpenCV face detector could be
that the OpenCV Android library is simpler to use than diamond filters.
I think their Android library is using JNI on the backend, but I wonder
how the performance compares to using diamond filters.
From 5b6b978#commitcomment-7951862:
That's mostly harmless in this case, since the cache dir is per-application, but racy in general. Sadly, Android doesn't yet seem to have added createTempDirectory from JDK 7. If it were me, I'd probably implement createTempDirectory myself by looping over random suffixes and trying mkdir, rather than leaving a race lurking in the code, but I could see it either way.
Since OpenCV is integrated into the diamond-android build,
a perceptual hash OpenCV implementation can easily
be created by using ls64/cvhash as
a reference for OpenCV API calls.
This might also be useful upstream?
Depends on #32
Instead, try removing the RGB filter and restructuring InputFormat.RGB565
into the RGB format the filters are expecting.
The memstream library website says the library is under the MIT license, but this is not apparent in the code itself. Add a header block
build.sh
should be doing a depth-first traversal of the dependency tree, but instead it seems to build the JNI libraries in a random order. Libraries are built before their dependencies are even unpacked; how does this even work? Are you sure you're not building with headers from the host?
130|root@hltevzw:/data/data/edu.cmu.cs.diamond.android.examples.facialrecognition/files # ./rgbimg
CANNOT LINK EXECUTABLE: cannot locate symbol "sigfillset" referenced by "./rgbimg"...
Diamond Core Filters is EPL-licensed, but getline.c
is GPLv2. The resulting binaries are non-distributable.
Simplest: Minimum external library dependencies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.