Asynchronous video capture with OpenCV and Python

Capturing a video stream from a camera in python can be done with OpenCV. However, when doing this operation on the main thread, performance won't be great, especially when capturing in HD quality. In this blog post, a solution is shown by running the video capture operation in a separate (green)…


Network crawler

Holywood style artwork of a network crawler. Run Full Screen


Simple example of multithreading and multiprocessing in Python

Implementing multithreading or multiprocessing in Python is really easy. However when running a function in a thread and collect its return value, needs a trick. There are multiple solutions to do so, here is shown just one way of many possible ways. Choosing between multithreading or…


Fun with FFT

For a project I work on, the designer had the idea of having real-time sound waves on the background of the application. Challenge accepted! See below the result of the first prototype. The current implementation measures the energy of sound by doing fast Fourier transformations and sum the…


Intel Python Distribution

Intel provides an high performance python distribution that integrates seamless into Anaconda. You'll see performance gains when using packages like pandas, numpy, scikit-learn and more. Intel provides a downloadable package that installs in the OS on system level. However, I prefer to install it…


Creating Tensorflow C++ headers and libraries for macOS

Note: this is an updated post for Tensorflow 1.6.0   I had some tough times in finding out how to prepare a Tensorflow library package that you can use in your own cmake projects. Tensorflow uses bazel as build system and does not provide a build target yet for creating the necessary C++…


Deep Dream in HD

Around may 2015, a researcher at Google, Alexander Mordvintsev, took a deep network meant to recognize objects in an image, and instead used it to *generate new objects in an image. The internet quickly exploded after seeing one of the images it produced. Soon after, Google posted a blog entry on…


Moonraker

Chasing the moon, flying over the surface with high speed. I love the ray marching method for creating incredible graphics. No mesh or texture is used, the whole program is made in the fragment shader. Click on the image to run the simulation. Fly over the surface of the moon. Run Full Screen Ray…


Ray marching

I started to experiment with a technique called "ray marching", also called "ray casting" or "sphere tracing". The method is quite new and different from the classic method with 3D vertex models or ray tracing. There is an excellent paper, written by Prof. John C. Hart. You can read it here:…


Painting with deep neural network

I'm fascinated by computer generated art and I think it would be great if a computer would be able to learn how to paint. As an experiment, I've created a deep neural network that takes coordinates input X of 2 neurons, mapped to 5 hidden layers with 64, 128, 256, 128 and 64 neurons respectively.…