Develop with OpenCV on Mac

1.Open Xcode, choose New -> New Project -> Command Line Tool
2.Name it and select C++ for type
3.Click on your project from the left menu. Click the build settings tab from the top. Filter all. Scroll to Search Paths. Under header search paths, for debug and release, set the path to /usr/local/include. Under library search paths, set the path to $(PROJECT_DIR). Finally, check if C++ standard library is libstdc++ or not, if not, change it to this!
4.Click on your project from the left menu. File->New->New Group, Name the group OpenCV Frameworks.
5.Select the folder (group) you just labeled, OpenCV Frameworks in the left menu. Go to File -> add Files, Type /, which will allow you to manually go to a folder. Go to -> /usr/local/lib
6.Select both of these files, libopencv_core.dylib, libopencv_highgui.dylib, and click Add. (you may need to add other library files from this folder to run other code.)
7.You must include this line of code in the beginning of your main.cpp file:
#include <opencv2/opencv.hpp>

Ref: http://hujiaweibujidao.github.io/blog/2014/03/13/develop-with-opencv-on-mac-os-x/

Advertisements

IEEE-xpress: font not embedded error

Do not use ps2pdf.exe, use the following command:

gswin32c -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dCOMPatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=%.pdf %.ps

Then the problem will be solved.

Ref: http://bbs.ctex.org/forum.php?mod=viewthread&tid=57382&extra=&page=1

Chinese title and category cause 404 not found

For the titles, the simplest way is to install a plugin called WP Slug Translate.

For the categories, I modified the file rewrite.php.

function get_extra_permastruct($name) {
if ( empty($this->permalink_structure) )
return false;

if ( isset($this->extra_permastructs[$name]) )
return $this->extra_permastructs[$name][‘struct’];

return false;
}

Change if ( empty($this->permalink_structure) ) to if ( !empty($this->permalink_structure) )

Ref: http://www.howsci.com/wordpress-404-error.html

WiFi Tethering in Windows

1. Run command prompt with administrator privileges.
2. Execute the below command to verify that your network interface support virtualization:

netsh wlan show drivers

If the “Hosted network supported” says “Yes“, then you’re ready to share the internet via Wi-Fi. Otherwise, you need to upgrade your hardware, if the software update doesn’t fix it.

3. Set up the ssid and key.

netsh wlan set hostednetwork mode=allow ssid=abc key=12345678

ssid is nothing but your desired Wi-Fi name, you can give your own.

Key is nothing but your Wi-Fi password. It should be Minimum 8 characters long

4. Until now, your hosted network has been created. Now, you need to start it.
Use the command below to start your Wi-Fi Network:

netsh wlan start hostednetwork

5. Share  the Internet Connection with the created WiFi.

Ref: http://www.techtolead.com/how-to-make-wi-fi-tethering-in-windows-8-1/

Install CUDA on AWS GPU Instance

1. Install build-essential
$ apt-get update && apt-get install build-essential

2. Install linux-image-extra-virtual
$ sudo apt-get install linux-image-extra-virtual
This step is important for virtual system.
If this package is not installed, the error “Unable to load the kernel module ‘nvidia.ko’. ” will appear.

3. Download CUDA and install the package.
This step is same as installing on a normal PC.

4. Set LD_LIBRARY_PATH and test sample code.

Main reference:

http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html
http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/