This gallery contains 4 photos.
Posted by fyhao
2015 羊年 新年快乐
今天是农历新年除夕夜,我们即将送走马年迎接羊年啦。
这里送给大家 Astro CNY 2015 的主题曲。。。
[youtube]e8GTIvc_mro,desc=astro cny 2015[/youtube]
A gift collection for SCS new members
The Imitation Game: Alan Turing
The Imitation Game: Alan Turing
Today I watched this movie in GV Suntec City, The Imitation Game. The real story about Alan Turing, who known as the pioneer or creator of computer science, how we invented a machine that beats another machine – Enigma, A German Machine that can encode important military message.
Can’t control my tears when watched until the last part of the movie.
No many people know who is him, why he is so important. Without his works, there is no new mathematical fields exist – Computer Science. Without him, we don’t have Computer, Mac, iPhone, or maybe only exist 100 years later. Without him, the world war II may take longer to end, ten million more people be killed.
This is my first time, the hello world to book a movie ticket, through online, watched a movie in cinema. In my previous life, I only went to cinema once, when I am young, brought by my uncle. Then I joined two times with company events. Today, the fourth, but the first, happened. And this is the first time I walked through inner building from City Hall MRT how to find where the tower 4 level 3 is.
Tutorial on setup OpenCV on iOS
This tutorial is to setup OpenCV on iOS. To include opencv2.framework to iOS8 Objective C Project.
By following this tutorial: http://docs.opencv.org/doc/tutorials/ios/hello/hello.html#opencvioshelloworld
1) to download prebuilt opencv2.framework, the fine working version is 2.4.9.
2) to create new XCode Project, target iOS8.0 if you are under XCode 6.0.1 as this version not yet support iOS8.1
3) link opencv2.framework to XCode Project. Go to project build phase, and link following frameworks:
opencv2.framework
AssetsLibrary.framework
AVFoundation.framework
CoreGraphics.framework
CoreImage.framework
CoreMedia.framework
CoreVideo.framework
Foundation.framework
UIKit.framework
Accelerate.framework
4) Create <NameOfProject>-Prefix.pch, with following snippets of code add between ifdef / endif block.
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
5) in ViewController.h, add the following to header
#import <opencv2/highgui/cap_ios.h>
#include <opencv2/opencv.hpp>
Note, the most important line is #include <opencv2/opencv.hpp>, this is important to make the stuffs works. I spent few hours and found this solve my problems, which unable to recognize cvtColor function, OK, will introduce in next steps.
6) To do some testing, by adding a video camera, reading 30 frames per second, process the images by inverting the color…
7) Rename ViewController.m to ViewController.mm as we are going to put C PlusPlus Code. Extension mm allows coexist of Objective C and C PlusPlus.
8) In ViewController.h, add following line
@property (nonatomic, retain) CvVideoCamera* videoCamera;
9) In ViewController.mm, we initialize videoCamera and starts it.
self.videoCamera = [[CvVideoCamera alloc] initWithParentView:_ImageView];
self.videoCamera.delegate = self;
self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset352x288;
self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
self.videoCamera.defaultFPS = 30;
[self.videoCamera start];
10) In ViewController.h, add CvVideoCameraDelegate
Like this
@interface ViewController : UIViewController
11) In ViewController.mm, add following snippets of code before @end.
#pragma mark – Protocol CvVideoCameraDelegate
#ifdef __cplusplus
– (void)processImage:(Mat&)image;
{
// Do some OpenCV stuff with the image
Mat image_copy;
cvtColor(image, image_copy, CV_BGRA2BGR);
bitwise_not(image_copy, image_copy);
cvtColor(image_copy, image, CV_BGR2BGRA);
}
#endif
12) Run the project. Cheers.







