How to write a good code

![](featured-image.jpg) This article is a quintessence of my all experience I’ve got for last years working as a computer vision consultant. I hope you will find this interesting and useful. My goal was to create set of rules I follow personally on daily basis. 1. Prefer functional approach Image processing is a place where functional paradigm shows it’s bests. In most cases, image processing algorithm depends only on input image and has no side effects.

Introducing CloudCV bootstrap

Here’s an open-source ready to use bootstrap project written in Node.js that lets you to quickly build a REST service to host your image processing and computer vision code in a cloud environment. Please welcome: cloudcv-bootstrap. I made this project aside of CloudCV to keep it simple but functionaly. It is self-contained Node.js project that helps you to get quick results on building and deploying your first server-based image processing service.

How to debug node.js addons in Visual Studio

While working on CloudCV I encountered problems in node.js addon written in native code. For CloudCV I use node.js with C++ Addon to separate high-performance algorithms (C++) from high-level networking API which node provides. In this tutorial I’m going to reveal best practices on debugging C++ Addons for Node.js (0.12) using Visual Studio 2013. Continue reading if you want to read in details why this works. This article is valid for Node.

Hacking OpenCV for fun and profit

![](logo.png) This post convers very specific but important topic about writing memory-efficient code. I will show you how to collect and analyze memory allocations that happens in OpenCV. When it comes to writing efficient code we usually care about CPU-efficiency. However there are many times, when memory-efficiency is more important. A limited amount of RAM is not so rare as one can think. On iOS and Android there are a strict memory usage restrictions, and of your app uses more memory than allowed your app can get killed by the system.

Tile-based image processing

How would you design an algorithm to process 40Mpx image? 100Mpx? What about gigapixel-sized panorams? Obviously, it should differs from those that are intended for 640x480 images. Here I want to present you implementation of the very simple but powerful approach called “Tile-based image processing”. I will show you how to make this using OpenCV. First, let’s define a few restrictions in order to simplify our implementation. In this tutorial I will consider a ‘pass-through’ pipeline - when we apply some function to input image and give an output image of the same size as an output.

Image processing in your browser - Unit Test automation

JavaScript. Do you like debug JavaScript code? I hate it. Literally. What what if you have to? In this post I’m going to show you how to simplify your life by automating unit testing of the JavaScript code for the browser. To get things more interesting - let’s automate unit-testing of the image processing library called JSFeat. JSFeat provides a JavaScript implementation of the basic image processing operations that let you to process images in your browser and build sophisticated algorithms.

Computer Vision Digest - September 2014

Third computer vision digest. Your monthly portion of news in computer vision for September 2014. In this issue: - Real-time face 3D model reconstruction - Image color correction and contrast enhancement - Robust Optimization Techniques in Computer Vision Previous issues: - Computer Vision Digest (May 2014) - Computer Vision Digest (June 2014) - Computer Vision Digest (August 2014) Feel free to leave your suggestions on interesting materials in post comments or via Twitter by mentioning [@cvtalks](https://twitter.

Argument checking for native addons for Node.js. Do it right!

![NanCheck](logo.jpg) During development of CloudCV I came to the problem on converting v8::Arguments to native C++ data types in my Node.js native module. If you are new to C++ and Node.js, I suggest you to read how to write C++ modules for Node.js and connecting OpenCV and Node.js first. Mapping V8 data types to native C++ equivalents is trivial, but somewhat wordy. One should take the argument at given index, check whether it is defined, then check it’s type and finally cast to C++ type.

Computer Vision Digest - August 2014

Third computer vision digest. Your monthly portion of news in computer vision for August 2014. In this issue: - Free Photo Editing Software Lets You Manipulate Objects in 3D - Real-Time Digital Makeup with Projection Mapping - Video stabilization through 3D scene recovery - Using OpenCV, Python and Template Matching to play “Where’s Waldo?” - OpenCV 3.0 alpha is out Previous issues: - Computer Vision Digest (May 2014) - Computer Vision Digest (June 2014)

Mapping data from Eigen to OpenCV and back

![Eigen2CV](eigen2cv.png) Eigen is a C++ template library for matrix and vector operations. It is highly optimized for numeric operations and support vectorization and use aligned memory allocators. When it comes to matrix operations, Eigen is much faster than OpenCV. However, it can be situations when it is necessary to pass Eigen data to OpenCV functions. In this post I will show how to map Eigen data to OpenCV with easy and efficient way.
1/7 »