Welcome to the personal website of Markus Konrad. You can find blog posts about computer science related topics here, as well as information about own open-source software projects.

Blog Posts

Android off-screen rendering using EGL pixelbuffers and OpenGL ES 2.0

Posted at 08 Dec 2014
Tags: android, opengl, egl, ndk, gpgpu

Setting up an Android project for OpenGL ES 2.0 on-screen graphics rendering is quite easy using GLSurfaceView. However, if you want to do off-screen rendering (like rendering to a texture), you need to go the long the way by manually setting up an EGL context and creating an EGL pixelbuffer (“pbuffer”) surface to render to. By this, OpenGL runs completely in the background without any visible surface or view, and will render to a pixelbuffer which you can later read back to main memory, for example by using glReadPixels(). This is the fundament for OpenGL-driven GPGPU experiments on Android devices. This small posts explains how to do that.

Read on…

Resolving the ‘unresolved inclusion’ error in Eclipse CDT for standard library headers of the Android NDK

Posted at 04 Dec 2014
Tags: c, cpp, eclipse, android, ndk

Java Native Interfaces (JNI) and the Android NDK are a nightmare to set up properly for development. For my first NDK experiments I didn’t care about features like nice syntax highlighting, auto-completion or interactive debugging. Too much of a hassle. But for bigger projects the described IDE features are crucial. Enter Setting up Eclipse for Android C/C++ Development and Debugging.

Read on…

Some notes about OpenGL Textures, Mipmaps and Blackness

Posted at 12 Nov 2014
Tags: opengl, ios

I recently came across the beloved OpenGL Blackness when working on offscreen texture rendering for an iOS application using OpenGL ES 2.0. This once again showed to me that OpenGL is very hard to debug.

The main problem was that calling texture2D() in a fragment shader would always return black color values ([0, 0, 0, 1] RGBA floats), although I was sure that I uploaded a valid texture to the GPU. However, it turned out that the texture was actually incomplete. By default, OpenGL requires the texture to provide a complete mipmap for minification. This is because GL_TEXTURE_MIN_FILTER is initially set to GL_LINEAR_MIPMAP_LINEAR, one of four minifying functions that require a mipmap. I noticed that texture2D() always needs a complete mipmap in such a case, even if it should display a texture of mipmap level “0” – which means the original texture.

Read on…

OSX Yosemite Phoning Home

Posted at 28 Oct 2014
Tags: osx, security, privacy

Looks like not only Mac OSX Yosemite’s updated Spotlight sends your private information to Apple (and Microsoft), but even “unsaved documents” are automatically send over to iCloud. This repository tries to find out the various ways OSX “phones home” and has even more of these creepy discoveries.

Converting PDF to (E)PS on OSX

Posted at 13 Oct 2014
Tags: pdf, ps, eps, postscript, osx

This is how you can convert PDF documents to PostScript files via terminal:

  1. Install the poppler package via MacPorts or Homebrew.

  2. Run pdftops -eps input.pdf output.eps. Omit -eps if you need straight-forward PostScript (.ps) output. You can further specify the first and last page to use with the parameters -f and -l, respectively.

Making GPS Visible

Posted at 10 Oct 2014
Tags: link, arduino, gps

Mobile Augmented Reality with Cocos2D

Posted at 21 Aug 2014
Tags: ar, ios, cocos2d

Recently, I’ve been working on an Augmented Reality framework for iOS, which is called ocv_ar-cocos2d. As the name implies, it is based on the AR library ocv_ar and the iOS graphics framework Cocos2D. With this framework, it is easy to integrate sophisticated graphics into an AR application. It also features user interaction, so that graphics related to a tracked marker can be “touched”. It has been tested on several mobile device models and can be directly compiled and tested using the provided XCode project file.

Simple OpenGL object picking in 3D

Posted at 07 Aug 2014
Tags: opengl, math

User interaction in a three-dimensional OpenGL scene often includes “picking”, which means that a user can select an object in the scene by clicking on it. This requires to find out the correct object in the three-dimensional scene from the two-dimensional information that is provided for this user interaction event – the x and y coordinate of the click.

Read on…

History of Squats in Berlin – Visualized with Mapbox

Posted at 29 Jul 2014
Tags: visualization, map, berlin, link

CV Dazzle – Camouflage from Face Detection

Posted at 28 Jul 2014
Tags: computervision, imageproc, art, link