Categories
Uncategorized

Tree nom

tree_nom

Categories
code ffmpeg graphics opencv video vision

Extending the hand tracker with snakes and optimizations [w/ code, OpenCV]

I wish to report of a number of tweaks and additions to the hand silhouette tracker I posted a while back. First is the ability for it to “snap” to the object using a simple Active Snake method, another is a more advanced resampling technique (the older tracker always resampled after every frame), and of a number of optimizations to increase the speed (tracker now runs at real-time on a single core).

Categories
graphics opencv video vision

OpenNI 2.x and OpenCV interoperability [w/ code]

For those of you using OpenCV that are looking to upgrade from OpenNI 1.x to the new OpenNI 2.x, here’s a bit of code to make life a tiny bit easier. It simply wraps the OpenNI 2.x APIs to expose a simple frame grabber for OpenCV.

Categories
code ffmpeg graphics programming video

FFMPEG video writer – now with animated GIF support [w/ code]

rect3825So animated gifs are awesome if you’re writing a software blog. It saves all this time working with YouTube embeddings and stuff, and your “videos” are stored locally. The simplified FFMPEG writer was before unable to output animated GIFs, but I’ve tweaked it and now it does. It’s also a nice piece of code to learn how to FFMPEG in C.

Categories
linux Solutions

Tailing the output of multiple files in Linux

This is a quick post to show a trick to tail multiple files, while showing the filename in the beginning of the line
What I needed was a way to grep multiple logs for an exception. But doing “tail -f *.log | grep exception” only let me see the exception, but I didn’t know which log file to look in
I have found this guide, and altered the script and added

  1. Printing the file name in the beginning of each line
  2. Padding spaces after the file name (you can alter the minimal length in the ALIGN variable

Anyway – here’s the script. Hope you find it useful

#!/bin/bash
# When this exits, exit all back ground process also.
trap 'kill $(jobs -p)' EXIT
ALIGN=31
# iterate through the each given file names,
for file in "$@"
do
        LENGTH=`echo ${file} | wc -c`
        PADDING=`expr ${ALIGN} - ${LENGTH}`
        PAD=`perl -e "print ' ' x $PADDING;"`
        # show tails of each in background.
        tail -f $file | sed "s/^/${file}${PAD}:/g"  &
done
# wait .. until CTRL+C
wait
Categories
code electronics video

C++ library for the C329 SPI camera module [w/ code]

Just putting it out there for whoever is trying to use the C329 camera module of the SPI variety (the URAT module has code posted online)

Categories
code ffmpeg programming video

Simplified FFMPEG video writer (also for OpenFramework) [w/ code]

I want to share a little snippet in case anyone is interested in writing video files from cpp context using FFMPEG, I’ve made it for usage with OpenFrameworks.
It’s basically a simple wrapper around the encoding mechanism of FFMPEG, so you can easily just say which file to write to and start dumping images into it. It will take care of choosing the codec, writing headers and trailers, encode (compress) the frames and write them to the file.

Categories
code graphics opencv programming video vision

Curve tracking with a Heap&Hogg's Particle Filters [w/ code, OpenCV]

Screen Shot 2013-03-15 at 6.18.30 PM I wanna share some code for 2D curve tracking with a particle filter, implementing the body of work of Tony Heap and David Hogg. These guys presented a relatively easy to implement method for tracking deformable curves through space and change in form using a Hierarchical Point Distribution Models (HPDM), which is another elegant way to store shape priors. Granted, it is not perfect, but for a simple 2D shape like a hand it works pretty good, and rather fast as well.
Let’s dive in then,

Categories
code graphics opencv programming video vision

Skin Detection with Probability Maps and Elliptical Boundaries [OpenCV, w/code]

maskSharing a bit of code I created for skin detection.

Categories
Android Mobile phones Solutions

A Creative way to bypass Pattern lock on Android

Let me start putting everything on the table – this post will describe how I eventually managed to unlock an unrooted, non-Google account linked Samsung Galaxy Mini Plus (GT-5570I) device without ADB support. There are a lot of guides on how to bypass this pattern lock on Android (and I will provide some links), but the purpose of this post is to show how looking for creative ways to do this can come handy

So a friend gave me a locked device. This device had no Google account linked to it (which prevented me from bypassing the lock with that account), there was no root or ADB access via recovery, and the USB debugging option was disabled.

I found this guide here, which states some commands you can type in ADB shell and should deactivate the pattern lock. So – How do I get ADB access on that phone?