Stanford AI Class Decision Diagram
r3dux | October 28, 2011
Explanation
I signed up for the advanced stream of the Stanford AI class (where there’s homework and exams), and it’s brilliant – I love the concept, I love the ambition, I love the teachers (except for Sebastian’s 9′s looking like g’s), I love the format and the content intrigues me no end – it’s all awesome. Hell, I love the price, too! Where else can you get access to truly world class lecturers, giants in their field, without paying a single cent?!
But as much as I love the price, I had no idea about the cost… I just don’t think I have the kind of time needed to do the course any justice, not on top of everything else, and not without losing my sanity and my marriage. So I’m going to continue with the course as if I’m doing the basic no-homework stream, in the only time that I have available to give it. I might give the homeworks a shot, but I’m not going to worry about it anymore. If I fail, then I fail, and no harm has come.
No matter how I do the course I’ll still have learnt a lot, I’ll still have enjoyed it (in fact, I’m likely to enjoy it a lot more with the pressure off) and it’ll still have been worthwhile, whether I get a signed piece of paper or not. But I’m not going to push myself to the brink over it, because as much as I’d like to have that piece of paper, right now the cost is more than I’m willing to pay.
All power to anyone in a similar situation who’s decided to tough it out for the long haul – You can do it! You can do it! You can do it!
And if you can’t then don’t even worry about it – maybe we’ll both do it again next year =D
Update: I managed to stick it out in the end, and finished with an overall grade of 91.7%, putting me in the “top 50%” of the class. I say top 50% in quotes because that’s the top 50% of the 20,000 or so students that completed the course. 150,000 started it. You do the math
However you work it, it was a fantastic course, and one of the best things I’ve done in my entire life. Highly recommended.
UB Research Conference Poster 2011
r3dux | October 26, 2011As part of my Ph.D. experience, I’m presenting and have a poster at the upcoming University of Ballarat research conference on the 3rd and 4th of November, and finished my poster the other day. The idea is that all the research students, whether you have results to display and discuss or whether you’re still at the proposal stage like me can have something to show and talk about with people, whether they’re interested in your specific field, or just your idea.
I knocked it together using a combination of Inkscape and trial and error, in full 300dpi for printing on glossy A1 – and when I saw the actual poster today I’ve got to say that was really pleased with how it turned out. As long as it can be read from about 6ft away, or at least most of it, you’ll get people to have a look, and maybe discuss it with you, as well as offer ideas, opinions and maybe criticisms if they feel strongly enough about it. I think the phrase for that is frank academic discussion
Anyways, I thought I’d put up the poster to a wider audience, and ask you – what do you think?
Update: I won 2nd place best poster and 1st place best presentation! Woo-hoo! Show me the book vouchers! =P
Image Credits (will be shown alongside poster at conference! Sorry I couldn’t fit them all on the poster!):
Retro graphics image: Dire Straits – Money for Nothing © Warner Bros., 1986
Modern graphics image: Jeff Patton – iray interior test © Jeff Patton, 2011
Retro keyboard and mouse: No source author found, IBM products.
Modern keyboard and mouse + Kinect sensor: Stock product shots © Microsoft.
Kinect structured light grid on model: Dancing with Invisible Light by Audrey Penven, 2010 CC BY-NC-SA 2.0
Capture from Zdenek Kalal’s TLD Demonstration Video : © Zdenek Kalal
View from Kinect (depth/RGB) : View from OpenNI Kinect Test application, unknown source, 2011
FreeCAD screenshot : Screenshot by JDurston, SourceForge MediaWiki, 2011.
Colourful Kinect grafiti : Kinect graffiti application, © Jean-Christophe Naour, 2011.
Real Duff Beer
r3dux | September 23, 2011I had no idea this existed outside of The Simpsons until I came across it the other week whilst out for some Boag’s Premium.

Beer... Now there's a temporary solution.
It wasn’t all that special or anything, just a non-descript German lager, but I still thought it was kinda fun to try, and a little bit surreal
Simple texture loading with DevIL revisited
r3dux | September 8, 2011I wrote an article a while back about loading images to use as textures in OpenGL, and in it I’d written my own single line image to texture-handle function because I couldn’t get the built-in ilutGLLoadImage function to work. Since I’ve been getting blank looks and failure to compile reports about it, I thought I’d go and take a look at it again, and this time ilutGLLoadImage seems to work just fine, so let’s document it up properly shall we?
Pre-requisites
You will need:
- A C++ compiler of your choice (I prefer Code::Blocks)
- Working OpenGL drivers
- A copy of DevIL
- A copy of GLEW (GL Extension Wrangler – to make the functionality in your OpenGL drivers availble for use)
- A copy of GLFW (GL FrameWork – to quickly and easily set up a OpenGL context)
- An image to load
Preparation and libraries
Create a new project in your IDE of choice, and link in the following libraries:

You’ll have to figure out where the libraries are on your own system but these are where they are on mine, where a /usr/local/ address indicates packages I’ve build myself, /usr/lib/ indicates standard system installed packages, and no prefix uses any paths defined by the compiler (in this case /usr/ where the lib and include directories are assumed). I’ve also added /usr/local/ to the include path so that any headers in /usr/local/include/ are picked up before any in /usr/include. Yes, library paths are a pain
Also, be sure that your project includes its own directory as the working directory (i.e. the directory to be in when executing) so that you can place your image (in this example, a file called abstract-image.jpg) in the main project directory and it’ll be picked up when we try to load it. The way that you specify the working directory will vary depending on the IDE you’re using, but in Code::Blocks you set it from Project | Properties | Build targets like this:

Source Code
Create a new project with source code something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | #include <iostream> #include <cstdlib> #include <GL/glew.h> // Include GLEW, which pulls in OpenGL headers as required #include <GL/glfw.h> // Include OpenGL Framework headers #define ILUT_USE_OPENGL // This MUST be defined before calling the DevIL headers or we don't get OpenGL functionality #include <IL/il.h> #include <IL/ilu.h> #include <IL/ilut.h> GLuint textureHandle; // Create a uint to store the handle to our texture GLfloat frameCount = 0.0f; void initGL(int width, int height) { // ----- Initialise GLEW ----- GLenum err = glewInit(); if (GLEW_OK != err) { std::cout << "GLEW initialisation error: " << glewGetErrorString(err) << std::endl; exit(-1); } std::cout << "GLEW intialised successfully. Using GLEW version: " << glewGetString(GLEW_VERSION) << std::endl; // ----- Window and Projection Settings ----- // Set the window title glfwSetWindowTitle("ilutGLLoadImage Test | September 2011 | r3dux.org"); // Setup our viewport to be the entire size of the window glViewport(0, 0, (GLsizei)width, (GLsizei)height); GLfloat ratio = (float)width / (float)height; // Calculate the window ratio // Change to the projection matrix, reset the matrix and set up our projection glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0f, ratio, 0.1f, 100.0f); // Params: Field-of-Vision, window-ration, near-clip-plane, far-clip-plane // ----- OpenGL settings ----- glfwSwapInterval(1); // Lock to vertical sync of monitor (normally 60Hz, so 60fps) glEnable(GL_DEPTH); // Enable the depth buffer glDepthFunc(GL_LEQUAL); // Set our depth function to overwrite if new value less than or equal to current value glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Ask for nicest perspective correction glEnable(GL_TEXTURE_2D); // Enable 2D textures // ----- Initialize DevIL libraries ----- // DevIL sanity check if ( (iluGetInteger(IL_VERSION_NUM) < IL_VERSION) || (iluGetInteger(ILU_VERSION_NUM) < ILU_VERSION) || (ilutGetInteger(ILUT_VERSION_NUM) < ILUT_VERSION) ) { std::cout << "DevIL versions are different... Exiting." << std::endl; exit(-1); } // Initialise all DevIL functionality ilInit(); iluInit(); ilutInit(); ilutRenderer(ILUT_OPENGL); // Tell DevIL that we're using OpenGL for our rendering } void drawScene() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the screen and depth buffer // Reset the matrix to identity glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0f, 0.0f, -40.0f); // Move things back into the screen glRotatef(frameCount, 0.1f, 1.0f, 0.3f); // Rotate the MVP matrix orientation glBindTexture(GL_TEXTURE_2D, textureHandle); // Select the texture to use and bind to it static float hsize = 15.0f; // Vertical size of the quad static float vsize = 10.0f; // Vertical size of the quad // Draw our textured geometry (just a rectangle in this instance) glEnable(GL_TEXTURE_2D); glBegin(GL_QUADS); glTexCoord2f(0.0, 0.0); glVertex3f(-hsize, -vsize, 0.0f); // Top left glTexCoord2f(0.0, 1.0); glVertex3f(-hsize, vsize, 0.0f); // Bottom left glTexCoord2f(1.0, 1.0); glVertex3f(hsize, vsize, 0.0f); // Bottom right glTexCoord2f(1.0, 0.0); glVertex3f(hsize, -vsize, 0.0f); // Top right glEnd(); glDisable(GL_TEXTURE_2D); // ----- Stop Drawing Stuff! ------ glfwSwapBuffers(); // Swap the buffers to display the scene (so we don't have to watch it being drawn!) frameCount++; } int main() { // Window settings int width = 800, height = 600; int redBits = 8, greenBits = 8, blueBits = 8; int alphaBits = 8, depthBits = 24, stencilBits = 8; // Flag to keep our main loop running bool running = true; // Initialise glfw glfwInit(); // Create a window if(!glfwOpenWindow(width, height, redBits, greenBits, blueBits, alphaBits, depthBits, stencilBits, GLFW_WINDOW)) { std::cout << "Failed to open window!" << std::endl; glfwTerminate(); return 0; } initGL(width, height); // Call our initGL function to set up our OpenGL options ILstring imageFilename = "abstract-image.jpg"; // Specify filename textureHandle = ilutGLLoadImage(imageFilename); // Load image directly to texture // Output last image loaded properties // Available properties list is at: http://www-f9.ijs.si/~matevz/docs/DevIL/il/f00027.htm std::cout << "Image width : " << ilGetInteger(IL_IMAGE_WIDTH) << std::endl; std::cout << "Image height : " << ilGetInteger(IL_IMAGE_HEIGHT) << std::endl; std::cout << "Image bits per pixel: " << ilGetInteger(IL_IMAGE_BITS_PER_PIXEL) << std::endl; // Main loop while (running == true) { // Draw our scene drawScene(); // exit if ESC was pressed or window was closed running = !glfwGetKey(GLFW_KEY_ESC) && glfwGetWindowParam( GLFW_OPENED); } glfwTerminate(); return 0; } |
End Result
If you’ve linked in the libraries and used source code like the above, you should end up with a working texture that looks something like this:

And information regarding the image being used that looks something like this:

I’ve attached a copy of my Code::Blocks project here for anyone who wants it.
Cheers!
Credits: The wallpaper I used as the texture in this guide is Life by N.Design Studio, which you can find here.











