2014-01-01から1年間の記事一覧
ceres solver 1.9.0 compilation fails with gcc > 4.8.0. The error happens at line 505 in Eigen/src/Cholesky/LDLT.h and the error is typedef 'Scalar' locally defined but not used [-Werror=unused-local-typedefs]A solution is just to comment t…
mlpack compilation fails when LAPACK is not found by cmake. One solutions is to enable mlpack's CMakeLists.txt to find LAPACK. Namely, the solution is to add FindLAPACK.cmake in the directory mlpack-1.0.9/CMake so that cmake can find LAPAC…
Calling the executable of CodeSynthesis XSD from terminal, we will obtain a set of test.hxx and test.cxx files given an XSD file test.xsd. [sourcecode language="bash"] xsd cxx-tree --generate-doxygen test.xsd doxygen -g test.doxygen doxyge…
Following the wiki, we should be able to use CodeSynthesis XSD with CMake. What the FindXSD.cmake does is that call the executable of CodeSynthesis XSD and give an .xsd file, say test.xsd, the executable. pre-defined function generates a s…
In preamble, define as \usepackage{color} % for changing font color \usepackage{ulem} % to strike out sentence(s) \newcommand{\yuji}[2]{\textcolor{red}{\sout{#1}} \textcolor{blue}{#2}} In text body, call the defined command as Yuji is \yuj…
sudo apt-get install texlive-science
My previous post mentions how to install Boost C++ library 1.53 on Ubuntu, specifically Ubuntu 12.04 LTS since Boost installation using official package manager installs Boost 1.37 (or later but younger than 1.50). Installation on Ubuntu 1…
CodeSynthesis XSD is an XML Schema to C++ data binding compiler, which generates C++ classes representing given xsd file(s) as a pair of cxx and hxx files. We can either build by ourselves or install using package manager, see here. To ins…
Xerces-C++ XML parser is an XML parser for C++. This library is also required for using code synthesis XSD. The library provides instruction for a href="http://xerces.apache.org/xerces-c/install-3.html">installation and build. [sourcecode …
Expat is an XML parser library for C. Expat is required library for using code synthesis XSD. [sourcecode language="bash"] wget downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz tar -xvzf expat-2.1.0.tar.gz mkdir expat…
Here is an instruction how to use XSD with CMake. Following the first solution by Brad Howes, we need to prepare the following CMakeLists.txt as well as FindXercesC.cmake and FindXSD.cmake.
[code lang="cpp"] include <time.h> include <mlpack/core.hpp> include <mlpack/methods/kmeans/kmeans.hpp> include <mlpack/methods/kmeans/allow_empty_clusters.hpp> include <mlpack/methods/kmeans/refined_start.hpp> include <mlpack/methods/kmeans/max_variance_new_cluster.hpp> include </mlpack/methods/kmeans/max_variance_new_cluster.hpp></mlpack/methods/kmeans/refined_start.hpp></mlpack/methods/kmeans/allow_empty_clusters.hpp></mlpack/methods/kmeans/kmeans.hpp></mlpack/core.hpp></time.h>
[code lang="cpp"] int numGauss = 3; int numDim = 3; int numObs = 1000; mlpack::gmm::GMM<> gmm(numGauss,numDim); arma::mat covar(numDim, numDim); gmm.Weights() = GenerateWeight(numGauss, 1.0/*1; // set j-th gmm's mean and covariance for(int…
OpenGM has two files, alphaexpansionfusion.hxx and fusion_mover.hxx, both of which seem to implement Fusion Move algorithm. Yes, both of the code in fact implement Fusion Move algorithm but they are different. 1. AlphaExpansionFusionThis w…
The following script downloads the source code of OpenGM it, and installs it. sudo apt-get -yV install libhdf5-serial-dev wget https://github.com/opengm/opengm/archive/master.zip -O opengm-master.zip unzip opengm-master.zip mkdir opengm-bu…
The following script downloads the source code of libDAI it, and installs it. wget https://github.com/yesimon/libDAI/archive/master.zip -O libdai-master.zip unzip libdai-master.zip mkdir libdai-build cd libdai-build cmake ../libDAI-master …
The following script downloads the source code of TinyXML2, compiles it, and installs it. wget https://github.com/leethomason/tinyxml2/archive/master.zip -O tinyxml2-master.zip # download the source code unzip tinyxml2-master.zip mkdir tin…
The activation requires administrator right. Without the right, we will have 0x80070190 error. The solution is to run any of office application as an administrator and then do activation.
the following settings are required: sudo apt-get -yV install libdvdread4 sudo /usr/share/doc/libdvdread4/install-css.sh
this is not on VirtualBox installation on Ubuntu 12.04, which is based on this. sudo apt-get -yV install dkms sudo gedit /etc/apt/sources.list # add the following line at the end of /etc/apt/sources.list deb http://download.virtualbox.org/…
PlayOnLinux is a software for Linux with which we can play software/applications for Windows on Linux. PlayOnLinux uses wine to enable to use software for Windows. We don't have to install wine before installing PlayOnLinux because PlayOnL…
qpdfview is a pdf viewer, which provides tab-browsing and copying pdf document as a picture. sudo apt-add-repository ppa:b-eltzner/qpdfview sudo apt-get update sudo apt-get -yV install qpdfview
Patch files for IBFS (MaxFlow-IBFS) and GCO were corrected in OpenGM 2.3.1!!
TeXMaths is an LibreOffice's extension that enables to make equations with LaTeX on LibreOffice. The installation is very simple: Download .oxt file from download pageRun LibreOffice -> Tools -> Extension manager -> Add -> Specify the down…
This code loads an image lena.bmp and shows the original image and its grayscaled one in a window, which shows text "Original image | Grayscale image" on its bar. [code lang="c"] std::string strFile = "lena.bmp"; cimg_library::CImg<unsigned char> img1(st</unsigned>…
This code loads a image lena.bmp and converts the image to grayscale one. [code lang="c"] std::string strFile = "lena.bmp"; cimg_library::CImg<unsigned char> img1(strFile.c_str()); cimg_library::CImg<unsigned char> img2; int color = _imgInput.spectrum(); // to check th</unsigned></unsigned>…
CImg provides several constructors for cimg_library::CImg type objects. [code lang="c"] std::string strFile = "lena.bmp"; cimg_library::CImg<unsigned char> img1(strFile.c_str()); cimg_library::CImg<unsigned char> img2; img2 = c…
CImg is provides as a single header file, however it requires several libraries to use CImg in C++ code. CMakeLists.txt and Makefile in ./CImg-1.5.8_rolling140227/examples tells us which libraries should be set.
Default applications for each file type are set in a text file /usr/share/applications/defaults.list . In the file, an application is assigned to each file type as a default application as text/plain=gedit.desktop The above line means that…
Install mozc sudo apt-get -yV install ibus-mozc run ibus as a startup Dash -> Startup -> Add command: ibus-daemon -drx