Moved …

Moved to szabster.net … Please update your bookmarks and/or RSS subscriptions if you didn’t so far.

Will keep a few old posts here due to “Google Rank” :)

Posted in Uncategorized

Tags:

Permalink

Libtouch and more …

Today I saw this excellent HOWTO at http://ssandler.wordpress.com/mtmini/ on how to make your very own multi-touch pad, which is the coolest thing i’ve ever seen during the last two decades … *cough, cough* …

I haven’t made one myself yet, but I downloaded touchlib and I found it quite annoying that it used my built-in cam from my toshiba sattelite laptop however I plugged in another external one.

So, I did a quick fix to be able to use /dev/video1 … oh yeah, I tried this under Linux, more specifically Ubuntu, because I was lazy to setup all the libs with headers and shits under Windows.

In the CvCaptureFilter.cpp right in the void CvCaptureFilter::setParamater( … ) I added two more lines, so my version looks like this:


void CvCaptureFilter::setParameter(const char *name, 
                                   const char *value)
{
   if(!capture)
   {
      if(strcmp( name, "source" ) == 0)
      {
        strcpy(source, value);
        if(strcmp( value, "cam" ) == 0)
        {
          capture = cvCaptureFromCAM( CV_CAP_ANY );
        }
        else if(strcmp( value, "cam1" ) == 0)
        {
          capture = cvCaptureFromCAM( 1 );
        }
        else
        {
          capture = cvCaptureFromAVI(value);
        }
      }
   }
}

With this done, i can just change in the “config.xml” the “source” to “cam1″ and make use of my other camera device on /dev/video1 :)

That’s all I need :D

A few other thoughts … you can give an index from 0..99 to the cvCaptureFromCam( … ) and then it will try to find the first available driver for that particular device, or if you give something >=100 then it will try to use that particular driver with the first available video device; CV_CAP_ANY = 100 .

Forging wallpapers …

Recently I bought a nice 19′ wide LCD monitor with an 1440×900 resolution, so I quickly setup Twinview between my laptop running at 1280×800 and obviously moved down the first screen by 100 pixels, to achieve the same effect as “Extend my …” Wind0ze.

Everything was fine, until I wanted to set a wallpaper, and it hurt my eyes … duhh, it was horible … stretched between the two screens. yuck!

The wallpapers designed for dual monitors assume that both have the same height, which obviously wasn’t my case … so the only viable solution was to create my own wallpaper by arranging two images in GIMP.

I like to have the same wallpaper on both screens, so that wasn’t a problem, but it was rather annoying after trying 2-3 wallpapers.

Instead I thought of the nice utility package called “ImageMagick” … Yay! and wrote a nice little bash script to generate the desired wallpaper from two images given as input.

Here is the contents of the script:

#!/bin/bash

if [ $# -ne 3 ] ; then
echo “Usage: $0 image1.png image2.png outimage.png”
exit 13
fi

convert -size 2720×900 xc:black “$1″ -geometry +0+100 -composite “$2″ -geometry +1280+0 -composite “$3″

echo “Done …”
exit 1

I named it “mkwlp” , made it executable (chmod u+x mkwlp) then copied it into /usr/bin for convenience …

This can be customized for other resolutions, etc and it’s fairly straight forward so i won’t go into this.

(I highlighted the customizable parts for convenience)

VoilĂ !!!

Here are a few wallpapers i “forged” with this little script :) Enjoy! (click to see the bigger version)

Oh, I almost forgot to tell that EWallpapers.eu is my number #1 landing place when I’m looking for high resolution wide screen wallpapers ( but not only! ) and also Hollywood Desktop.

My “dark” VS theme …

I am in the race for a good “dark” theme for some time now, but today I just came up with my very own one … haha!

When it comes to fixed size fonts, I prefer “Monaco” :D Also the guy who proposed that “blue” background for Borland C, Borland Pascal, etc was really clever … haha.

Here is a screenshot with my very own theme.

blueish.png

If you like it, you can download it right here .

Ubuntu : Kernel update fucks up sound ….

This is the 2nd time when it is happening to me that after a kernel update, my sound vanishes. So in this scenario i get the latest alsa driver sources, and I recompile them which always fixes the problem, that’s not a big issues after all, but I wanted to blog about it … haha!

Follow

Get every new post delivered to your Inbox.