Similar to GitHub, Bitbucket makes it very easy to host your code. We all know that GitHub works great for open-source. However, you have to pay if you want to create private repositories. On the other hand, Bitbucket enables you to create unlimited free private repositories. This is an important reason why more and more people are using Bitbucket nowadays. In this post, I will show how to use Bitbucket to easily host your code (over TortoiseHg specifically).

Read more »

A text file can be encoded in many different character encodings. There are many encoding variations even just for Windows system. Special attention has to be given when handling text files with different character encodings, e.g. if we use fstream‘s getline() to read from a text file (contains Chinese) in UTF-8, we will get gibberish characters, while will be correct if the text file is in ANSI.

In this post, given a text file, I will show how to get its character encoding and how to convert it from one character encoding to another.

Read more »

Boost is a set of libraries for the C++ programming language that provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. Steps to build Boost for x32/x64 VC++ compilers on Windows are as follows:

Read more »

Weird things often occur in programming. We can tell so-called reasons to some of them. For others, the only thing we can do is, how the hell could these be? We have to pay extra attention to avoid these in order not to fall into debugging nightmares.

Read more »

Install

Error code: S1023 when trying to install DirectX

Solve [1]:

  1. Uninstall Microsoft Visual C++ 2010 x86 Redistributable and Microsoft Visual C++ 2010 x64 Redistributable.
  2. Install DirectX again. Should be OK.
  3. Install back Microsoft Visual C++ 2010 x86 Redistributable and Microsoft Visual C++ 2010 x64 Redistributable.
Read more »

Data types of Mat

Name Data Type Bit Size Range Other
CV_8U uchar / unsigned char 8 0 ~ 255 Default for image data
CV_8S char 8 -128 ~ 127
CV_16U ushort / unsigned short int 16 0 ~ 65535 unsigned short
CV_16S short int 16 -32768 ~ 32767 short
CV_32S int 32 -2147483648 ~ 2147483647 long
CV_32F float 32 \(1.18\times10^{-38}\) ~ \(3.40\times10^{38}\)
CV_64F double 64 \(2.23\times10^{-308}\) ~ \(1.79\times10^{308}\)
Read more »

Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License. We can use it to read/write data from XML data file.

Read more »