Tag: open-source

[OpenCV] detectMultiScale: output detection score

OpenCV provides quite decent implementation of the Viola-Jones Face detector. A quick example looks like this (OpenCV 2.4.5 tested): // File: main.cc #include using namespace cv; int main(int argc, char **argv) { CascadeClassifier cascade; const float scale_factor(1.2f); const int min_neighbors(3); if (cascade.load("./lbpcascade_frontalface.xml")) { for (int i = 1; i < argc; i++) { Mat img


一般在iOS上做录像都可以直接使用UIImagePickerController。 但有时候难免需要做逐帧的处理,比如实时的滤镜之类的。 参照这个帖子: A (quasi-) real-time video processing on iOS 把使用AVFoundation做录像的代码,做了一个简单的封装。 Delegate可以得到逐帧的彩色或者灰度图,然后就可以加上自己需要的处理了。 代码放在Gihub上:MPVideoProcessor 具体使用请参见Github上的Readme.

Draw ROC Curve

A piece of fairly simple Matlab script to draw the ROC Curve from an array of scores and an array of labels. function [Tps, Fps] = ROC(scores, labels) %% Sort Labels and Scores by Scores sl = [scores; labels]; [d1 d2] = sort(sl(1,:)); sorted_sl = sl(:,d2); s_scores = sorted_sl(1,:); s_labels = round(sorted_sl(2,:)); %% Constants counts


OmniGridView Code (GitHub) OmniGridView This is a half-finished grid view for iOS. Cause Apple’s UITableView only allows us to add and reuse vertical cells, we need to write our own scroll view when we want to have horizontal cells. HOW TO USE Drag the OmniGridView Folder to your project. Use the OmniGridView like any other