PHP projects, Arduino and work

New post!
It's been so long since I last posted here I've almost forgotten how!
You all have no idea how much nagging I've had from Kevin in the past couple of months to blog >.<
So, after all that time, here it is. The bumped blog post of doom!


Face Detection & Mandelbrot
A few weeks ago now Kevin was asking me how to do face detection.
This brought my old image filter script back to mind, as it was initially meant for the first part of a face detection script that used a mean filter to smudge up faces and make colour matching a lot easier. I never really got that far however, so my script remained just for filtering images.
Kevin had found an article on a much simpler method that just used plain colour detection methods but was having an awkward time implementing the concept into working PHP code that could cut out everything but skin tones. After asking me to take a look, and me putting it off for a day or two, I sat down and worked out a small and simple implementation of it.
I'd like to add better features, like using the result of this script to find individual faces, border them and then run feature detection on the original image to cut out false positives, try to get the whole face instead of cutting out eyes/mouths, and to get orientations and such, but that would require more free time than even I have!

The simple implementation is: http://sandbox.palmnet.me.uk/fd.php?face=http://www.centocor.com/centocor/images/people-1.jpg

I did have enough free time however to help Kevin with another PHP/image thing he wanted to try but couldn't get quite right.
He wanted to draw the Mandelbrot set with PHP/GD and so when it didn't quite work out and the maths got sticky he asked me what I knew about the Mandelbrot set and fractals.
Maths was never my strong point and I didn't even take it pas AS Level. Thankfully I know lots of mathsy people and still do my own learning from the webernets and books from the uni library when I get a chance.
So complex numbers were easy and the Mandelbrot set equally so.
After an hour or so of tinkering in Notepad++ I had something that roughly did what it was meant to:
mandlebrot set

Kevin wanted more though, so he tweaked my code to generate this wonderful looking image at an utterly ridiculous mammoth size, which can be viewed by clicking on the thumbnail:
fancy rainbow Mandelbrot set

Source code is available: http://sandbox.palmnet.me.uk/testbox/codebox/index.php?module=snippet&id=705

Arduino
I got my lovely Arduino through the post a month or so ago and have slowly been accumulating components that are either cheap or can be scrounged from companies as samples.
With what limited supplies I had, a potentiometer, MAX2221 and a simple 8x8 LED matrix, I was able to make a lovely version of pong however!

See it in action on Youtube: http://www.youtube.com/watch?v=7uOF9KcOp8g
Code for the arduino: http://sandbox.palmnet.me.uk/testbox/codebox/index.php?module=snippet&id=901

I have also started work on a version of the copter game for the arduino using LED matrices, but since starting work I haven't had much time to finish it off.

London & Work
As mentioned before, I'm a university student who has a placement year where I go and work in the industry that I hope to end up in. And that year is now!
I started work a couple of weeks or so ago and so far it's actually really good. The work seems to be about my level, the people are interesting and definitely know their stuff; And despite the fact everyone else there is from Surrey university I know almost every bodies name now and have fitted in well :)
London is a bit crap however. Busy, expensive, smelly and generally a bit lame so far. But the flat I have with Phil means that things are cheaper than commuting and more interesting.
I will post about what I'm actually doing at work when I get round to doing something. So far I'm stuck in training, and will be for a few weeks yet, and won't really be doing much apart from reading, testing things out and practicing. Lots of crazy XML stuff like you've never seen, Oracle database stuff which is new to a poor student like myself who's used to MySQL and SQLight, and some bespoke back-end server software which though utterly ridiculous and archaic is very good what it does, or so I hear anyway.
If I do anything fancy I might even post the code here as I'm not sure anyone outside the company and a couple of oracle conferences will have ever seen anything like this, I know I certainly haven't.

Uni results
I finally got my university results back for the second year last week. And while not great, I did pass with a 2:2 which is pretty good considering the sheer volume of rubbish business modules I had to do this year!

Project ENFRAME
Phil has enlisted me to code some stuff for a new project of his, currently under a codename of 'Enframe' which we took from a folded t-shirt and prefixed an E to.
Seems like a fairly reasonable idea, and I hope to crank out some code for it shortly to see how it would function, but until we decide exactly how it'll function and if people are interested I won't bother saying much.
But if I'm coding anything in the next few months that isn't for work then it's probably going to be this.

Status script
Another thing Phil has told me to do is my status script.
This should be a nice, feature rich, replacement for the Status2K script that he currently uses to monitor the server, which runs this site and served up this blog for you :)
The main advantage of my script would be the customisation as Status2K isn't free, and so has encrypted source with ionCube, meaning you can't fix any bugs that their lazy support guys can't be arsed to fix. And as the script will most likely just be for us we can make it very server specific and get some interesting stats :)




Page :  1