Programming Portfolio

These are some of the software I've made either for work, studies and/or fun. Anything done under contract is here after owner's consent.


Chicken - stabilizing video using gaze data

Inspired by the virally famous chicken-head video stabilization joke, chicken is a video stabilization tool (currently under development) that uses the human eye compensatory movements to mitigate camera shaking. As of now, it requires that the original video has been shot using an eye-tracking device such as pupil.

It works by segmenting a video into clusters, each corresponding to a interval of time in which the recorder was gazing at the same target. The stabilization occurs, cluster by cluster, by cropping the original frame in such a way that the gazes all align, according to a stabilization function.

I am open to external help, specially in data gathering. If the idea appeals to you, please get in touch. Code is being written in C++, with OpenCV and a Python interface.

Source (Python and C++) (requires OpenCV and PyNpArr_2_CppCvMat)


Sending OpenCV Images between Python and C++

PyNpArr_2_CppCvMat is a simple interface to send OpenCV images from Python to C++ and vice-versa

OpenCV code in Python, although practical to write, can run quite slowly. Pixel-wise operations, if not done inside OpenCV’s calls, can make real-time applications impossible.

On the other hand, while it runs much faster, C++ code can be quite a pain to debug, due to the lack of a practical console.

Implementing the heavy part in C++ and running it from Python is the best of both worlds.

While sending basic types and data structures between the two is easy, sending images is not. This tool focuses on this specific problem. Although there are solutions that could handle the task -such as Boost- they tend to be quite bulky. This code was written using the ctypes Python package, which is in its standard distribution.

Source (Python and C++) (requires OpenCV)


Invisible Wall

A Computer Vision interactive art installation for the second Atibaia’s Art ant Technology Festival, organized by Incubadora de Artistas.

The concept was created by the OHMS team and I. It was coded by me in C/C++, with OpenCV.

This installation consists in a light-controlled room with a camera pointing to the participants and projecting their silhouettes on the wall in front of them. These silhouettes are filled with the view from the other side of the projection wall, captured by another camera. The wall becomes “invisible” only inside each person’s contours, making them move around to interact with the other side.
See photos and a video

Source (C/C++) (requires OpenCV)

 
 


MarkerFinder

Coded in C++ with OpenCV, it was commissioned by Rede Globo from ICAD/VisionLab.

This project’s goal was to make the mapping of fiducial markers on a studio’s ceiling automatic. This mapping process is a crucial preparation step for the use of LightCraft Technology. LightCraft uses an extra wide-angle lens equipped to the top of a camera, pointing up to a ceiling covered with fiducial markers. This lens captures the location of these markers and, with a previously known map, calculates the camera’s location within the studio. The superimposition of virtual elements over the footage is considerably easier when this location is known.

Before MarkerFinder, this mapping was done manually and took about 4 hours. Now, it takes 20 to 40 minutes. Since this was made for a brazilian company, it is documented in Portuguese.

Source (C++) (requires OpenCV)
Visual Studio configuration files


Travelling Salesman Problem, Heuristics Comparison

Coded in Python, this was made to compare the performance of different Heuristics to determine the minimal Hamiltonian cycle in a complete graph. This is the famous Travelling Salesman Problem, an NP-Complete problem. It was a requirement of the Design and Analysis of Algorithms course and was made by me, Carla Galdino and Hugo Musso Gualandi.
Source (Python) (requires GnuPlot for displaying the results)


RubberBand

Coded in C, it is a Heuristic that I conceived to find an upper bound for an instance of the Travelling Salesman Problem. Despite yielding good results, the computational times did not yet improve on the current state-of-the-art.

This is an ongoing project of mine, so I won’t post links for now.


Region Detection in Images

Coded in R, it uses random walks in images to segment them into regions. We implemented the original Algorithm by Leo Grady, as well as an altered version that sets the maximum number of steps in a walk, limiting the computing time. It’s a trade-off between accuracy and performance.
This was a requirement for a Stochastic Simulation course and was made by me and Ericsson Leal.
Source (R)
Presentation PPT(Portuguese)


Poker Console

Coded in Python, it calculates the odds of a Texas Hold’em hand being the highest in a Poker game. It considers the number of total hands dealt, the number of players betting, and the current state of the common cards, as well as the hand itself. Contrary to more common “calculators”, this one computes the odds of a hand without knowing the opponents’.
Source (Python)


Down Payment Optimizer

Inspired by the raging bull that was driving the real estate prices in Rio de Janeiro to the sky between 2011-13, this Python script calculates the optimal down payment on a house.
The user inputs the value of the house; how much money is set aside; the expected interest on such money; monthly disposable income; the annual interest to be paid to the bank and the number of payments.
The script then gives the down payment value that optimizes either total amount of money after all is paid or the average monthly financial impact.


Hunter Prey

Made using Unity 3D and scripts in C#, this project is a game made as a requirement for the Artificial Intelligence for 3D Games course.
It is a competitive game between hunters - the player and the non playable characters (NPC’s). The hunters score taking preys to the goals. The speed that a hunter moves is a function of its strength and the prey’s weight. The decision making process of an NPC’s take in consideration its strength, the intention of those stronger than him, the surrounding preys’ distances and weights. It implements the well known A* pathfinding algorithm to find the nearest safe goal and avoid obstacles and enemies.
Made by me and Felipe Baldino.
Source (C#) - It’s a big zip file with the whole project and requires the free version of Unity 3D