
C++
visionfans
研究方向:计算机视觉,模式识别,机器学习
展开
-
C++中动态创建二维数组——尴尬的不支持C99的VC
很多老外公布出来的算法代码都是在Linux下实现的。很多时候会遇到这种形式的变量定义。Graph::node_id node[height][width];VC的编译器不支持这种动态数组定义,因此要改写成动态创建的数组。改法如下:Graph::node_id **node = new Graph::node_id*[height];for (int i = 0; i 最后释放:for (int i=0;i简单例子:#include "stdafx.h"#include "stdio.h"int原创 2011-04-03 17:13:00 · 2987 阅读 · 1 评论 -
Read pixel data from bitmap file
/*================================================================= * GetBmpData.cpp * * This mex-file is used to read pixel data from bmp file directly * from bitmap file. * * This is a原创 2011-06-17 01:08:00 · 1470 阅读 · 0 评论 -
Mingw and Boost
http://stackoverflow.com/questions/13256788/building-boost-1-52-with-mingwhttp://nuwen.net/mingw.html原创 2015-05-11 21:42:47 · 557 阅读 · 0 评论 -
using cling under cygwin
build struction: https://solarianprogrammer.com/2012/09/02/building-cling-cpp-interpreter-windows/fix some issues: http://stackoverflow.com/a/21820642/661935test:原创 2015-05-14 13:44:35 · 592 阅读 · 0 评论 -
Python C++ interoperability
Python C++ interoperabilityBernhard Kaplan’s slidesBuilding Hybrid Systems with Boost.PythonBridging Python to C++ - and vice-versaHow does Boost.Python hold C++ class?原创 2015-09-17 15:58:16 · 515 阅读 · 0 评论 -
boost python object creation process
Test codes and pipelinefoo.cpp:#include <boost/python.hpp>#include <iostream>namespace bp = boost::python;using namespace std;class Foo{public: Foo(int n) { cout << "in Foo::Foo()" <<原创 2015-09-17 19:45:22 · 552 阅读 · 0 评论 -
i/o notes
difference between ios::ate and ios::appate allow seek to other position, while app not. When using app all writes are preceeded by seeks.原创 2015-10-06 21:24:35 · 488 阅读 · 0 评论 -
SRM 208 DIV 1 Level One
题目:http://www.topcoder.com/stat?c=problem_statement&pm=2923&rd=5854#include #include #include #include using namespace std;const int max_num = 50;int height[max_num][max_num] = {0};class TallPeople{public: vector getPeople(vector people原创 2011-05-08 19:08:00 · 1527 阅读 · 0 评论