Self-DTW software and sample dataset
The software package contains a set of programs for phase estimation by self-DTW with bias correction,
example of input signal data and its corresponding output.
The Institute of Scientific and Industrial Research (ISIR), Osaka University (OU) has copyright in the software and associated data and serves as a distributor of the Self-DTW software and dataset.
If you use the software for your research, please cite the following paper:
Makihara, Y.; Aqmar, M.R.; Trung, N.T.; Nagahara, H.; Sagawa, R.; Mukaigawa, Y.; Yagi, Y.,
"Phase Estimation of a Single Quasi-Periodic Signal," Signal Processing, IEEE Transactions on ,
vol.62, no.8, pp.2066,2079, April 2014.
Phase Estimation source code (C++) and sample dataset
A. Requirements/Dependency (The source code has been tested and and the executable files have been built in the environment below)
A.1. OS: Tested on Windows (7/8)
A.2. OpenCV (version 2.4.2)
A.3. CMake (2.8.7)
A.4. Microsoft (MS) Visual Studio (2008)
B. Solution file for MS Visual Studio
B.1. GaitID.sln : Solution file
- Open the solution file (GaitID.sln) in MS Visual Studio.
- Build all the projects in the solution file.
- Make sure all the projects successfully compiled without errors, and check the executable files in \bin\Release.
B.2. GaitID.ncb : Intellisense database. NCB stands for Non-Compiled Browse file. NCB files contain information about symbols used in a C++ program,
as well as user-defined classes. NCB files are used by Intellisense, a component of Microsoft Visual Studio that allows code auto-completion. It is produced automatically when we build the solution
C. List of directories and files
C.1 bat -> It contains batch file for running the whole executable files
C.2. bin -> It contains Executable files
- bin\Debug -> It contains executable directory in debugging mode
- bin\Release -> It contains executable directory in release mode (This is the one used in batch file)
- TestAbsPhase2RelPhase (convert absolute phase to relative phase)
- TestEstPhaseByPeriodSeq (phase estimation from STPD)
- TestEstPhaseByPeriodShiftedDTW (phase estimation by period shift self-DTW with data and smoothness terms)
- TestEstPhaseGlobalByPeriodShiftedDTW (phase estimation by period shift self-DTW with data, smoothness, and bias correction terms)
- TestGetNSpline3Int (spline interpolation calculation)
- TestGetNSpline3Prm (reconstruct spline parameters)
- TestGetPeriodAndTWFByPhase (period segmentation and TWF reconstruction)
- TestGetPeriodicPhaseShift (calculate periodic phase shift/bias)
- TestGetPeriodSeq (calculate instantaneous period by STPD)
- TestMakeEqualIntvRelPhase (make equal interval relative phase file)
- TestMakePeriodShiftedDTWSeq (produce period-shifted self-dtw optimal path result)
- TestMakePhaseSyncSeq (produce phase synchronization/registration result)
- TestPeriodShiftedSelfDTWSeq (calculate cost for periodic-shifted self-DTW)
- TestReconstructNSpline3 (reconstruct spline control point for averaged phase shift)
- TestRemovePeriodicPhaseShift (remove periodic phase shift)
C.3. data -> It contains input and output data
- sinusoidal_input.csv : sample dataset, quasi-periodic sinusoidal input signal.
- sinusoidal_noise_input.csv : sample dataset, quasi-periodic sinusoidal input signal with noise.
- phase_gt.csv : signal phase ground truth.
- data\output -> Directory to store the phase estimation output and its intermediate results.
- data\output\estimated_phase -> Output result of phase estimation.
- data\output\period -> Short-term period detection result.
- data\output\phase -> Phase estimation and its intermediate results (each is described in batch file).
- data\output\self_dtw -> Self-DTW output files: cost, etc.
- data\output\sync -> Phase synchronization/registration file.
- data\output\twf -> Time warping function (TWF) file.
Note that the explanation of the above files can be found in the batch file comments.
C.4. include -> It contains all include .h files.
C.5. lib -> It contains all library .lib files.
C.6. Projects -> It contains all Projects directories and files.
C.7. src -> It contains all C++ source code .cpp files.
- First, complete the procedure of B.1.
- Go to "bat" directory.
- Run the batch file under the name: "PhaseEstimationBiasCorrectionWC.bat".
- The output files will be stored in "data\output" directory. The estimated phase is stored in "data\output\estimated_phase" directory, and the intermediate results are stored in the others.
- The parameters used in the paper are described in the beginning of the batch file. We set the default value. Please set it accordingly for your own purpose.
- For clarity purpose, the batch file contains comments to describe the executable files as well as the files of intermediate and final results.
E. How to get the code
To advance the state-of-the-art in the research community, the software package and sample could be downloaded as a zip file with password protection and the password will be issued on a case-by-case basis. To receive the password, the requestor must send the release agreement signed by a legal representative of your institution
(e.g., your supervisor if you are a student) to the database administrator by mail, e-mail, or FAX.
It was often reported that Windows built-in zip did not work to extract all the files. Please try another unzip software if necessary.
The software administrator
Department of Intelligent Media, The Institute of Scientific and Industrial Research, Osaka University
Address: 8-1 Mihogaoka, Ibaraki, Osaka, 567-0047, JAPAN