Diemension9

  • News
  • Linux
  • Fuckipred
  • Tiny gems
  • Htc Hero
  • Downloads
  • FreeBSD 9.0 out!!

    Tjosan Hejsan!!
    FreeBSD 9 is out! got two exams, monday and wednesday, coming up so i won’t be able to mess around with it this weekend.. but the mba will soon be running the greatest BSD-version there is again.

    In other, much less interesting news a new version of uvcc will be out soon. just haven’t had time to fix up the last bits and pieces of the new (and waaay less buggy) version of it yet.

    // sluggo

    Posted

    2012-01-13 #

    Filed under

    News

    Tags

    freebsd 9, uvcc

    no comments

  • [mac, uvc-ctrl] uvcc: uvc-controller app, alpha version out

    new version out.


    uvcc icon stolen from the internetcodename “ugly-code” is out!
    with it you can kill auto-focus/-exposure/-white balance and set the absolute value of these manually on a uvc camera. the gui is really just thrown together and may not recognize your cam if it returns any error in the get-all request of uvcc.app/Contents/Resources/uvc-ctrl. it does however work nicely with the logitech c910 (on both x86_64 and i386 snowy leopards). a screenshot is available in the earlier post about it.
    oh, and i stole the icon from somewhere on the internet.. can’t even remember where!

    note: requires python 2.6, shipped with os x 10.6 – snowy leopard. so if you are running os x 10.5 you can update your python installation, or just wait.. ill get a new, python >= 2.5 version up in a while.

    note 2: found a bug, the auto exposure slide should go from 1 to 8. selecting 0 will cause an error that goes unnoticed by (well, not that unnoticed.. you’ll notice the setting wasn’t saved)!

    note 3: got some reports it isn’t working.. it seems alotta progs that use a webcam resets all settings (and thus turns on auto-whatever) when opened. This may very well be an apple driver “feat” but most people i’ve spoken with says it works well if they turn off the auto-whatever after starting said program.
    btw, beer is good.

     uvcc.zip (116.5 KiB, 1,238 downloads)

    // sluggo

    Posted

    2011-12-14 #

    Filed under

    News

    Tags

    c910, i386, logitech, mac os x, uvc-ctrl, uvcc, x86_64

    27 comments

  • [mac] libusb-1.0.8 package (installer) for os x

    built a libusb-1.0.8 package installer for os x. it’s a universal binary for both i386 and x86_64 archs (“32 and 64 bit”).
    it was built on a snow leopard (10.6) x86_64 machine; haven’t been able to try it on any other version/arch. used the default minimum target setting in packagemaker which was leopard (10.5) and compiled both a i386 and a x86_64 lib and lipo’d them together.
    anyone with a i386 machine and/or other versions of os x are very welcome to report success/fail.
    update: tested and working on i386 snow leopard.
    update2: tested and working in os x 10.7 (Lion), thank you F-red!

     libusb-1.0.8.pkg.zip (96.3 KiB, 2,142 downloads)

    // sluggo

    Posted

    2011-12-13 #

    Filed under

    News, Tiny Gems

    Tags

    i386, installer, libusb, mac os x, package, universal binary, x86_64

    5 comments

  • [mac, uvc-ctrl] python front-end to the uvc-ctrl

    since i’ll be using the uvc-controller with some work-related stuff im working on a front-end for it.. it’s nearly done. here’s a sneek peek
    front-end to the uvc-controller
    if you haven’t noticed.. i do not like writing guis.

    // sluggo

    Posted

    #

    Filed under

    News

    Tags

    auto-focus, mac os x, uvc

    no comments

  • [uvc] cross-platform killing of autofocus on uvc-cam

    got some work done on the uvc-controller today.. finally managed to turn of auto-* on the logitech c910 in mac os x (haven’t tried on the other boxes yet). heres a dump:
    os x uvc-controller

    // sluggo

    Posted

    2011-12-05 #

    Filed under

    Linux, News

    Tags

    auto-exposure, auto-focus, autofocus, c910, freebsd, libusb, linux, logitech, mac os x, turn off, uvc

    1 comment

  • [bash] unnecessary script

    think i wrote the most useless script i’ve ever produced today. the embarrassing thing was i didn’t realize what the hell i was doing til it was almost done.. to make some use of it i figured i’d comment it and put it here.

    #!/bin/bash
    # check if number of arguments ($#) is less than (-lt) 2 
    if [ $# -lt 2 ]; then
    	echo "usage: $0 dst src [src1 src2 ...]"
    	# wrong usage means non zero exit code
    	exit 1
    fi
    # make sure first argument ($1) is a directory
    if [ ! -d $1 ]; then
    	echo "target dir must exist!"
    	exit 1
    fi
    # store arguments to script in args (only reason is i dunno
    # how to do the following line with $@).
    args=$@
    # loop through args-array from element 2 to <last>
    for a in ${args[@]:2}; do
    	if [ ! -d $a ]; then
    		echo "\"$a\" is not a directory, skipping.."
    		# if it's not a dir skip this iteration
    		continue
    	fi
    	echo "creating dir \"$1/$a\""
    	mkdir "$1/$a"
    	# check exit code of last call (mkdir), if it's not equal (-ne)
    	# to 0 we've got an error.
    	if [ $? -ne 0 ]; then
    		echo "could not create \"$1/$a\", skipping.."
    		continue
    	fi
    	# list all files (-A), including symbolic links (-P) in $a, one per line (-1), with trailing / on dirs (-p) |
    	# select the ones with without trailing / |
    	# make xargs replace {} in the cp-call with result
    	ls -1APp $a | grep '[^/]$' | xargs -I '{}' cp "$a/{}" "$1/$a/{}"
    	# list files in $a as above but recursively (-R) |
    	# select the lines containing a : |
     	# remove the : and loop thru the result
    	for b in `ls -ARPp $a | grep ":" | sed -e 's/://'`
    	do
    		mkdir "$1/$b"
    		if [ $? -ne 0 ]; then
    			echo "could not create \"$1/$b\", skipping.."
    			continue
    		fi
    		ls -1APp $b | grep '[^/]$' | xargs -I '{}' cp "$b/{}" "$1/$b/{}"
    	done
    done
    
    exit 0
    

    notice how lines 23-46 can be replaced by

    cp -R "$a" "$1/."
    

    // sluggo

    Posted

    2011-12-04 #

    Filed under

    Linux, Tiny Gems

    Tags

    bash, idiot, moron, stupid

    no comments

  • [libusb/uvc] cross-platform autoadjustment killer..

    working on a cross-platform thingy to friggin kill all auto-adjustments (focus, exposure, etc) on uvc-compliant webcams. being short on time, as usual, i’ve realized i hate usb. thats right, i hate universal serial bus. if it wasn’t for libusb i’d probably shot my self dead, at least three times already.
    if you think controlling uvc-cams seems super-duper-interesting and wanna read all about it here’s a guy who has done pretty much what im doing.

    // sluggo

    Posted

    2011-11-27 #

    Filed under

    Linux, News

    Tags

    auto-exposure, auto-focus, cross-platform, libusb, uvc

    no comments

  • [ocr] gocr in mac os x

    I needed to do some ocr’ing on the mac and figured i’d go with gocr.
    first off i already had libpng, libjpeg and a svn-client installed. if/when you got that covered this is what you can do:
    download tiff-3.9.5 from ftp://ftp.remotesensing.org/pub/libtiff. to build it just unpack and

    ./configure #add --build=x86_64 if you want
    make
    sudo make install

    then download netpbm via svn (for me the super-stable tarball failed, wanting an older version of libpng):

    svn checkout http://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced netpbm

    it has a special kinda, interactive build process

    ./configure # interactive, i could hit enter all the way through.
    make
    # now we first need to build a package
    make package pkgdir=/tmp/netpbm
    sudo ./installnetpbm # also interactive, again i could just go with enter

    now download gocr from http://jocr.sourceforge.net/download.html. this is a simple

    ./configure #--build=x86_64
    make
    sudo make install

    before you can run it you have to add the netpbm dir to your path

    export PATH=/usr/local/netpbm/bin:$PATH

    or if you’re (like me) using tcsh

    set path = ($path /usr/local/netpbm/bin)

    and create a symlink to the netpbm-lib (note that the version may differ for you)

    sudo ln -s /usr/local/netpbm/lib/libnetpbm.11.56.dylib /usr/local/lib

    thats all there is to it, to run gocr with a gui just type gocr.tcl and get your ocr’ing on!
    note that mac os x’s x does not come with xli so there’s no preview available in the gui (aka “show”-btn does not work).

    // sluggo

    Posted

    2011-11-06 #

    Filed under

    News

    Tags

    gocr, libjpeg, libnetpbm, libpng, libtiff, mac os x, netpbm, ocr, optical character recognition

    no comments

  • PyQt4 on mac os x

    Through work i needed to install pyqt4 on a mac os x (snow leopard). So i went to nokia.com and downloaded the latest qt-sdk (sdk: 1.1.3, libqt: 4.7.4), then to riverbank computing and downloaded sip (needed for installing pyqt4) and pyqt4. After installing the standard way i tried a hello world but couldn’t import anything from PyQt4. The module was installed but i could not use it. To make this more google-friendly this is the error i got:

    Traceback (most recent call last):
      File "qt-test.py", line 4, in <module>
        from PyQt4 import QtGui
    ImportError: cannot import name QtGui

    I googled around and found this blog which informed me that when installing PyQt4 you have to explicitly define the path to qmake, site-packages and the arch. if you use python shipped with os x and installed the sdk to its standard path then the command to configure pyqt4 should probably be

    python configure.py -q /Users/<USERNAME>/QtSDK/Desktop/Qt/474/gcc/bin/qmake -d /Library/Python/2.6/site-packages -g --use-arch x86_64

    of course this assumes you have a 64bit os.

    // sluggo

    Posted

    2011-10-19 #

    Filed under

    Tiny Gems

    Tags

    import error, mac os x, pyqt4, python, qt, sip

    1 comment

  • [winblow$] tiling in in win7..

    forced to work in the violent rectal exam of OSs i went looking for a “tiler” and stumbled upon bug.n. It’s easily the greatest app for windows i’ve found thus far. It basically mimics dwm, is well documented, distributed with its source and comes with a single, easy enough config-file!
    Taking a step back it’s funny to realize that sitting by my shitload-of-money-worth apple laptop using a stripped-down-to-my-bare-ass expensive OS, to get a nice user experience im digging up tools written by people just for the fun (and use) of it..

    NOTE: im a student, hence my view on whats alotta money

    // sluggo

    Posted

    2011-09-29 #

    Filed under

    News, Tiny Gems

    Tags

    bug.n, dwm, tiling, windows

    no comments

Top

<< Newer posts | Older posts >>