links for 2007-11-30
Friday November 30th, 2007 at 4:24 pm | research-
involved with the Artech Initiative – Minho-Galicia area (Spain/Portugal border area)
-
Galicia and Portugal collaborative project
You can download my entire Quiet album at Jamendo, if you like. :-)
Over the last two and a half weeks I have been at Visualizar, a project hosted by the ever-awesome Medialab Prado in Madrid, Spain, the same people behind the Interactivos workshops, one of which I participated in earlier this year.
I’ve been working on something called Mail Garden. Mail Garden visualises the contents of one mailbox (read in the mbox format for open goodness) on your computer as a forest of trees. Each tree in this forest represents an email, with the height of the trees reflecting the length of the mail. Moving your mouse over a tree shows some details about the email. The overall aim is to create a view of your mailbox that encourages a more reflective kind of consciousness.
Go to the Mail Garden project page for more…
I put this together this morning, hope you like it.
It’s a zoom system that operates very much the one in Ableton Live’s sample viewer. It’s written as a Processing applet. Click and drag to zoom and scroll: drag up and down to zoom, left and right to scroll. The little guide bar at the bottom also works.
Here’s a nice algorithm to return, as a percentage normalised against the area of the first, the overlap area between two rectangles. It was originally designed to track blob bounding boxes over time: you’d call GetRectangleOverlap passing in the numbers for the bounding rect in the previous frame and the bounding rect in this frame, and if it returned you a number > some threshold (eg 0.5) you could safely assume the two bounding rectangles tracked the same object.
Note: there seems to be some problem with the return statement; thanks go to Almo for pointing it out. I’m sure I meant something else but with have to dig into old code to find out just what. In the meantime use this one..
float Util::GetRectangleOverlap( float minx1, float miny1,
float maxx1, float maxy1, float minx2, float miny2,
float maxx2, float maxy2 )
{
float overlap;
if ( minx1 > maxx2 )
overlap = 0.0f;
else if ( maxx1 < minx2 )
overlap = 0.0f;
else if ( miny1 > maxy2 )
overlap = 0.0f;
else if ( maxy1 < miny2 )
overlap = 0.0f;
else
{
// calculate overlap area
int x_overlap = MIN( maxx2, maxx1 )-MAX( minx2, minx1 );
int y_overlap = MIN( maxy2, maxy1 )-MAX( miny2, miny1 );
overlap = x_overlap*y_overlap;
}
float area1 = (maxx1-minx1)*(maxy1-miny1);
float area2 = (maxx2-minx2)*(maxy2-miny2);
float area_norm = (area1+area2)/(2.0f*area1);
// convert to a percentage
// return overlap/area_norm;
return overlap/area1;
}