Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (121)
Showing
with 2619 additions and 19 deletions
**/.DS_Store
**/Thumbs.db
docs/html/
/emscripten_output/*
# Created by https://www.gitignore.io/api/emacs
......
cmake_minimum_required(VERSION 2.8.9)
project (rapidmix)
# The version number.
set (rapidmix_VERSION_MAJOR 2)
set (rapidmix_VERSION_MINOR 2)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
# Compiler Flags
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DJSON_DEBUG -fPIC")
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
# Main lib
include_directories(${PROJECT_SOURCE_DIR}/src)
# RAPID-MIX dependencies
include_directories(dependencies/RapidLib/src)
include_directories(dependencies/xmm/src)
include_directories(dependencies/GVF)
include_directories(dependencies/Maximilian)
include_directories(dependencies/Maximilian/libs)
include_directories(dependencies/pipo/sdk/src)
include_directories(dependencies/pipo/sdk/src/host)
include_directories(dependencies/pipo/modules)
include_directories(dependencies/pipo/modules/collection)
include_directories(dependencies/pipo/modules/bayesfilter/src)
include_directories(dependencies/pipo/modules/finitedifferences)
include_directories(dependencies/pipo/modules/rta/src)
include_directories(dependencies/pipo/modules/rta/src/util)
include_directories(dependencies/pipo/modules/rta/src/statistics)
include_directories(dependencies/pipo/modules/rta/src/signal)
include_directories(dependencies/pipo/modules/rta/bindings/lib)
# Third party dependencies
include_directories(dependencies/third_party/json)
# Source Files
file(GLOB_RECURSE RAPIDMIX_SRC "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB GVF_SRC "${PROJECT_SOURCE_DIR}/dependencies/GVF/GVF.cpp")
# Maximilian
file(GLOB MAXI_SRC "${PROJECT_SOURCE_DIR}/dependencies/Maximilian/maximilian.cpp")
file(GLOB MAXI_SRC ${MAXI_SRC} "${PROJECT_SOURCE_DIR}/dependencies/Maximilian/libs/maxiFFT.cpp")
file(GLOB MAXI_SRC ${MAXI_SRC} "${PROJECT_SOURCE_DIR}/dependencies/Maximilian/libs/fft.cpp")
#PiPo
file(GLOB_RECURSE PIPO_SRC "${PROJECT_SOURCE_DIR}/dependencies/pipo/sdk/src/*")
file(GLOB_RECURSE PIPO_SRC ${PIPO_SRC} "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/bayesfilter/src/*")
file(GLOB_RECURSE PIPO_SRC ${PIPO_SRC} "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/collection/*")
file(GLOB_RECURSE PIPO_SRC ${PIPO_SRC} "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/finitedifferences/*")
file(GLOB_RECURSE PIPO_SRC ${PIPO_SRC} "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/rta/src/util/*")
file(GLOB_RECURSE PIPO_SRC ${PIPO_SRC} "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/rta/src/signal/*")
file(GLOB_RECURSE PIPO_SRC ${PIPO_SRC} "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/rta/src/statistics/*")
list(REMOVE_ITEM PIPO_SRC "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/rta/src/signal/rta_onepole.c")
list(REMOVE_ITEM PIPO_SRC "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/rta/src/signal/rta_resample.c")
list(REMOVE_ITEM PIPO_SRC "${PROJECT_SOURCE_DIR}/dependencies/pipo/modules/rta/src/statistics/rta_cca.c")
# RapidLib
file(GLOB RAPIDLIB_SRC "${PROJECT_SOURCE_DIR}/dependencies/RapidLib/src/*.cpp")
file(GLOB RAPIDLIB_DEP "${PROJECT_SOURCE_DIR}/dependencies/RapidLib/dependencies/libsvm/libsvm.cpp")
# XMM
file(GLOB_RECURSE XMM_SRC "${PROJECT_SOURCE_DIR}/dependencies/xmm/src/*")
file(GLOB JSON_SRC "${PROJECT_SOURCE_DIR}/dependencies/third_party/jsoncpp.cpp")
# Set the source for the main library, using the groups defined above
set(RAPIDMIX_FULL_SRC ${RAPIDMIX_SRC}
${GVF_SRC}
${MAXI_SRC}
${PIPO_SRC}
${RAPIDLIB_SRC}
${RAPIDLIB_DEP}
${XMM_SRC}
${JSON_SRC}
)
add_library(RAPID-MIX_API SHARED ${RAPIDMIX_FULL_SRC})
add_executable(rapidmixTest tests/rapidMixTest.cpp )
add_executable(helloRapidMix ${PROJECT_SOURCE_DIR}/examples/HelloRapidMix/HelloRapidMix/main.cpp)
if (APPLE)
find_library(ACCELERATE Accelerate)
if (NOT ACCELERATE)
message(FATAL_ERROR "Accelearate not found")
endif()
target_link_libraries(RAPID-MIX_API ${ACCELERATE})
endif()
target_link_libraries(rapidmixTest RAPID-MIX_API)
target_link_libraries(helloRapidMix RAPID-MIX_API)
......@@ -3,11 +3,27 @@
It has been built with RAPID-MIX technologies, that make it easy to combine sensor data, machine learning algorithms and interactive audio. They provide a full set of functionalities for cross-device and cross-platform development, modular components, and cloud-based services and multimodal data storage.
## Dependencies
Use `git submodule init` followed by `git submodule update` to pull the following library dependencies.
Use `git submodule update --init --recursive` to pull the following library dependencies.
1. RapidLib
2. XMM
3. GVF
4. RepoVizz2 Client
1. XMM
1. PiPo
1. GVF
1. RepoVizz2 Client
## Documentation
Full documentation at http://www.rapidmixapi.com/
## Testing
We are using Catch for C++ testing. Look at the test fixtures in the /tests/test_projetc/test_project.xcodeproj for an example of how to implement them.
\ No newline at end of file
We are using Catch for C++ testing. Look at the test fixtures in the /tests/test_projetc/test_project.xcodeproj for an example of how to implement them.
## Building with CMake
Navigate to /RAPID-MIX_API and run this in a terminal:
`mkdir build
cd build
cmake ..
make
`
Or run the shell script: `./rmix_build_test.sh`
\ No newline at end of file
......@@ -192,7 +192,7 @@ void GVF::addGestureTemplate(GVFGesture & gestureTemplate)
config.inputDimensions = inputDimension;
gestureTemplates.push_back(gestureTemplate);
activeGestures.push_back(gestureTemplates.size());
activeGestures.push_back(int(gestureTemplates.size()));
if(minRange.size() == 0){
minRange.resize(inputDimension);
......
......@@ -114,7 +114,7 @@ public:
void addObservation(vector<float> observation, int templateIndex = 0){
if (observation.size() != inputDimensions)
inputDimensions = observation.size();
inputDimensions = int(observation.size());
// check we have a valid templateIndex and correct number of input dimensions
assert(templateIndex <= templatesRaw.size());
......@@ -178,7 +178,7 @@ public:
}
int getNumberOfTemplates(){
return templatesRaw.size();
return int(templatesRaw.size());
}
int getNumberDimensions(){
......@@ -186,11 +186,11 @@ public:
}
int getTemplateLength(int templateIndex = 0){
return templatesRaw[templateIndex].size();
return int(templatesRaw[templateIndex].size());
}
int getTemplateDimension(int templateIndex = 0){
return templatesRaw[templateIndex][0].size();
return int(templatesRaw[templateIndex][0].size());
}
vector<float>& getLastObservation(int templateIndex = 0){
......
......@@ -82,8 +82,8 @@ inline void initMat(vector< vector<T> > & M, int rows, int cols){
// init matrix and copy values from another matrix
template <typename T>
inline void setMat(vector< vector<T> > & C, vector< vector<float> > & M){
int rows = M.size();
int cols = M[0].size();
int rows = int(M.size());
int cols = int(M[0].size());
//C.resize(rows);
C = vector<vector<T> >(rows);
for (int n=0; n<rows; n++){
......@@ -150,7 +150,7 @@ inline void initVec(vector<T> & V, int rows){
//--------------------------------------------------------------
template <typename T>
inline void setVec(vector<T> & C, vector<int> &V){
int rows = V.size();
int rows = int(V.size());
C = vector<T>(rows);
//C.resize(rows);
for (int n=0; n<rows; n++){
......@@ -161,7 +161,7 @@ inline void setVec(vector<T> & C, vector<int> &V){
//--------------------------------------------------------------
template <typename T>
inline void setVec(vector<T> & C, vector<float> & V){
int rows = V.size();
int rows = int(V.size());
C.resize(rows);
for (int n=0; n<rows; n++){
C[n] = V[n];
......@@ -225,7 +225,7 @@ template <typename T>
inline vector<T> multiplyMat(vector< vector<T> > & M1, vector< T> & Vect){
assert(Vect.size() == M1[0].size()); // columns in M1 == rows in Vect
vector<T> multiply;
initVec(multiply, Vect.size());
initVec(multiply, int(Vect.size()));
for (int i=0; i<M1.size(); i++){
multiply[i] = 0.0f;
for (int j=0; j<M1[i].size(); j++){
......@@ -269,7 +269,7 @@ inline vector<vector<float> > getRotationMatrix3d(T phi, T theta, T psi)
template <typename T>
float distance_weightedEuclidean(vector<T> x, vector<T> y, vector<T> w)
{
int count = x.size();
int count = int(x.size());
if (count <= 0) return 0;
float dist = 0.0;
for(int k = 0; k < count; k++) dist += w[k] * pow((x[k] - y[k]), 2);
......
Subproject commit f5cfd55793699b3a8ed9a2ac08cd8db9b9082732
Subproject commit 22c4e36d58eb7f2aecf03fb8da7a07211b76432f
RapidLib @ ab5950e8
Subproject commit 803fe51a29911bf5d8e4652eb6fb3c8dbce21e50
Subproject commit ab5950e8ff4c20b1c9e1ec9b8f369fcadbabdca6
Subproject commit 0643ed47778d5a4e2b95151a2836f50f382915f7
Subproject commit 9029d999f5d381645cf82ae478b3b875ec19800f
This diff is collapsed.
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added