Tuesday, 18 October 2011

Face detection and multiple camera feed's

Today set up an tested 3 webCam simultaneously with Opencv to confirm it can handle multiple feeds, there seems to be a small delay while it is running (I can watch myself blink) but its not huge.



Also tried out the Face detection using Haar-like feature detection example that comes with opencv, this worked but was slow,the camera feed seemed to stutter and very gradually grow out of sync with realtime leaving a lag of a few seconds.

I think this may be because it is checking every single frame it receives for faces,it also takes half second to check most of the time, and occasionally  will  pick out items that do not even appear facelike. Training my of Haar classifier might be a good idea.

Tuesday, 11 October 2011

OpenCv very easy setup

Seems setting up and using Opencv even with multiple video feeds is very easy, though using multiple feeds seems to make it run a good bit slower.

Doing this only took a few lines of code

Thursday, 6 October 2011

Started working with opencv(aka learning very slowly)

Tried out an example for an O'reilly textbook, seems the textbook despite being fairly new is already little outdated  cvloadimage requires a minimum 2 arguments to be used as opposed to simply a file address.


oh well least im over the hurdle of getting the sdk to work

Wednesday, 14 September 2011

Points along same bezier curve

                            Was much easier to get working than the curves themselves.

Wednesday, 7 September 2011

Tuesday, 6 September 2011

Bezier Curves in opengl


Not bad i think for a first Attempt in OpenGL i  have done these before manually with a pen and paper of course and in 2d for mobile java. This one would be quadratic, hope to move onto higher order ones later



Friday, 2 September 2011

Subdividing Cubes working

Finally got it working , with a bit of help from DLabz of reddit 2 days of hacking at different ways of figuring out the coordinates.

It is however quite slow and very likely i done it in the most wrong way it could possibly be done.

An attempt to create subdividing cubes which is not going to well


Kind of looks like some sort of fractal...

Friday, 26 August 2011

Camera Class

moved some of the Opengl camera into its own class, in hindsight something i should have done sooner to make it easier to manage

Thursday, 18 August 2011

bad zooming

attempted to make it possible to zoom on cube item, im  going to call this bad zooming as it isn't actually zooming, im simply making the cubes(and the spaces between them) larger which will be useful but not for zooming.


Thursday, 28 July 2011

cubes of cubes

now got a way to use a bool to turn cubes from solid to wireframel.



making a grid shockingly annoyoing

managed to finally make a wireframe, which is really just 15x15x15 wireframe cubes after some trial and error.





As far as accidents go these donuts where kind of cool.



And of course the finished grids

Monday, 25 July 2011

40x4x40


A very large array of particles arranged as  4 particle thick square, anything larger seems to cause a stack overflow, anything larger also seems to slow my PC down so its not much to worry about.

Friday, 15 July 2011

Attempted improvement

Have made an attempt to improve the program by using a simple hard-coded texture generator for the particles instead of relying on an outside texture file. somthing like this one Particle Sytems Rendered as OpenGL Points .

void particles::makeFloorTexture(void)
{

     char circles[17][17]= {
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxx....xxxxxxxx",
  "xxx......xxxxxxx",
  "xxx......xxxxxxx",
  "xxx......xxxxxxx",
  "xxx......xxxxxxx",
  "xxxx....xxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
  "xxxxxxxxxxxxxxxx",
     };

  //GLubyte
   //floorTexture[16][16][3];
  GLubyte *loc;
  int s, t;

  /* Setup RGB image for the texture. */
  loc = (GLubyte*) floorTexture;
  for (t = 0; t < 16; t++) {
    for (s = 0; s < 16; s++) {
      if (circles[t][s] == 'x') {
        /* Nice blue. */
        loc[0] = 0x0;//0x1f;
        loc[1] = 0x0;//0x1f;
        loc[2] = 0x0;//0x8f;
      } else {
        /* Light gray. */
        loc[0] = 0xca;
        loc[1] = 0xca;
        loc[2] = 0xca;
      }
      loc += 3;
    }
  }




result not good

Sunday, 3 July 2011

Something more interesting


Using some perlin noise (which might be overkill) i have created something that allows me to create random arrays of "stars"(particles) in in what are hopefully unique combinations and then allow these to be represented are particles in my particle system, for some reason blue stars seem to be grossly over represented most of the time i run the program





Thanks to some  patient help from r/opengl i have eliminated the problem of having to depth test particles while creating the new problem of making it look l artifact-ed with my poorly implemented additive blending.

Sunday, 19 June 2011

3d particle system

Managed to finally hack together something functional now a 3d particle system with mouse movement minus a billboarding error . Two videos to demonstrate.



and a better view:

Tuesday, 14 June 2011

Faux Brownian motion

An attempt at Brownian motion with some simple particles obviously not exact , and i have noticed after leaving it running for a few minutes all the particles gradually drift towards the bottom left so its not entirely random ,it looked better on my computer but a combination of a bad screencap program and youtube compression can ruin anything

An attempt at a fire effect

ok that could be improved :/

Wednesday, 8 June 2011

Glowing particles

While messing around with opengl trying to make my particles glow, i accidentally made the glow! hurray! screenshot:

Here is a   video :

Particle cubes with shader

A merging of swiftless cube shader tutorial with a particle system, seems to work well, looks awful in screencap programs.

Monday, 30 May 2011

particles 5

Bitmask problem solved all i needed to do was set the bitmask as glcolor(1,1,1)
then set glcolour as the particle's colour to draw the main texture

        glPushMatrix();


       
         glColor3f (1,1,1);


        glTranslatef (parts[i].Xpos, parts[i].Ypos, parts[i].Zpos);
        glRotatef (parts[i].Direction - 90, 0, 0, 1);


        glScalef (parts[i].Scalez, parts[i].Scalez, parts[i].Scalez);


        glDisable (GL_DEPTH_TEST);
       glShadeModel(GL_SMOOTH);
        glEnable (GL_BLEND);


        glBlendFunc (GL_DST_COLOR, GL_ZERO);
        glBindTexture (GL_TEXTURE_2D,  texture1[0]);


        glBegin (GL_QUADS);
        glTexCoord2d (0, 0);
        glVertex3f (-1, -1, 0);
        glTexCoord2d (1, 0);
        glVertex3f (1, -1, 0);
        glTexCoord2d (1, 1);
        glVertex3f (1, 1, 0);
        glTexCoord2d (0, 1);
        glVertex3f (-1, 1, 0);
        glEnd();






            glColor3f (parts[i].Red,parts[i].Green,parts[i].Blue);
           
        glBlendFunc (GL_ONE, GL_ONE);


        glBindTexture (GL_TEXTURE_2D,  texture1[1]);


        glBegin (GL_QUADS);
        glTexCoord2d (0, 0);
        glVertex3f (-1, -1, 0);
        glTexCoord2d (1, 0);
        glVertex3f (1, -1, 0);
        glTexCoord2d (1, 1);
        glVertex3f (1, 1, 0);
        glTexCoord2d (0, 1);
        glVertex3f (-1, 1, 0);
        glEnd();




        glEnable(GL_DEPTH_TEST);




        glPopMatrix();





Whoa

Blending functions are interesting , also 10,000 particles

Particles 3

I have turned the particle generator into something more colourful, and now which  has made a bit-masking problem become apparent hence many of the particles are surrounded by blocks of colour that should not be visible.


Sunday, 29 May 2011

Black Jack lab

An application i created for experimenting with simple card counting systems, it allows you to create and store custom counting systems.






Despite being a simple calculator like App was surprisingly difficult to create as i had to learn how to use sqlite as i was building the application, the alternative would have been to use a text file for storing systems but i think that would have made things more difficult in the long run.










A caution to anyone that would try to use this in a casino that it is likely illegal wherever  you are. And probably a good way to get your shiny new smart phone mercilessly  stepped on.

Saturday, 28 May 2011

Particles 2

http://www.gnu.org/s/hello/manual/libc/CPU-Time.html#CPU-Time and using the clock function i have managed to make the program run more smoothly regardless of the number of particles ...though it is a bit of hack the way i have done it for now.

Thursday, 26 May 2011

Particles

Spent a bit of time converting this http://www.swiftless.com/tutorials/opengl/particles.html C particle system into a C++ program with particles classes in the hopes that doing so would give me a good idea of how it works(and perhaps allow its use in a future project), most of it went easily with 2 exceptions. The first was that i created a bottleneck by transfering the particle text within repeatedly within the draw function which brought my Computer to a grinding halt , the second was an imagined problem once i had removed the bottleneck the program was running so (when only 100 particles where in use unlike the 500 in the aforementioned tutorial) that it appeared to be going slow, as a result i spent most of my time looking for a nonexistent problem,i'll be adding a function to check the cpu clock and then i'll put up the code.

Wednesday, 11 May 2011

Whack a Taoiseach

http://www.appbrain.com/app/whack-a-taoiseach%28admob%29/lawless.wackT

I made this just around the time  the government decided to spend a week announcing we don't need a bailout and then promptly  took a huge bailout loan.
I was looking for a game Idea and figured why not make something for people to vent some anger into?

The game features the faces of both Cowen and Bertie, I used paint.net at the time to turn the images into PNG's with some areas being transparent, The hole in the background is the one left by the undeveloped Chicago spire http://en.wikipedia.org/wiki/Chicago_Spire, the fist image is mine.





For time between Christmas and some of January this game surprised me, while its use has dropped of a lot it was briefly being used about 1000 times a day assuming admobs reporting  is accurate.




The game wasn't without errors of course,luckily a friend led me to the android clock function which allowed me to make the speed a bit more consistent across multiple devices,and i spent some time trying to figure out gesture detection.



And im currently still dealing with an error that crops up if the user quickly leaves and try's to start another round of the game, hopefully AsyncTask will allow me to fix this.

An image of the menu here with different difficulty settings.

Friday, 6 May 2011

QuickshopCalc

This Application is just a simple calculator with some modifications to the GUI and functions, it was attempt to make a calculator specifically for people to use while shopping.

Since shops often price items in ways to make the product seem cheaper while getting the most money from our purchases we often seem items priced at 4.99 or  6.96 both of these may as well be 5.00 and 7.00 ,but taking that cent or three off is enough to remove the sting of overcharging for something while keeping a good profit margin.

Thats why this application is built with buttons like "99" or ".99" instead of most normal calculators with "123456789".


It also uses to text displays, the one on the bottom is for displaying the overall total the one on the top is for displaying the current price of the item being added.

I consider this application moderately a success as it seems to have been downloaded much more than my previous applications.

Thursday, 5 May 2011

Logcat

Got my first introduction to Logcat, through a bug in an older program , brilliant

pomodoro

The pomodoro technique may just be the only thing that can curb my procrastination

Friday, 22 April 2011

Migrated

I started developing these android applications on windows 7 but have recently migrated to Ubuntu and  found the experience to be identical if not better  this is mostly down to the use of the eclipse IDE i think.

A sounboard.....

Im going to mention this application despite being thoroughly disappointed in its quality after putting it out, it was the first app to cause me a real headache in creating for many reason.

The application was intended to be a blank soundboard which users can record onto themselves for the creation of custom soundboards,the result though basically functional is not as graceful as i had wanted.

1. it has a lot of buttons which makes it absolutely enraging to use on a small device like a phone and quite ugly.

2. It was the first application i made using multiple activities which took me a while to get right.

3.Most soundboards can play multiple sounds simultaneously the only consequences  being that  it doesn't sound to great, my soundboard can only play one sound at a time, attempting to play another sound will knock of what ever is currently playing before it starts to play, i had attempted to get more than one MediaPlayer  working simultaneously but this only led to crashes.




Above is the main activity screen which allows a user to record/playback sounds stored at each button the horrific panel  i created  is running in an emulator , anyone with fingers larger that that of a small child will  find it impossible to use.

This screen is the secondary activity i added, its a ListView of all the sounds and allows the user to to set sounds and can be used to set a recorded sound as the ring tone for the phone via android.settings , it also makes use of the alert dialog to inform the user when they have set the tone, as you can see having just the numbers in those spaces on the left of the screen makes very inefficient use of the screen space, it also takes a while to scroll the whole thing.

From doing this app i have learned(apart from the use of mediarecorder and mediaplayer)  that Gui design and foresight is important to say the least, regardless of how many amazing features or function an application has , if the interface is bad it may as well not work.

Friday, 8 April 2011

PrimeWizard (my first non hello world android app)

Ok decided to post some of the details on the first android application i made, http://www.androidzoom.com/android_applications/tools/prime-wizardadmob_kres.html  a simple app for finding prime numbers, i made this in order to get a grasp of how to build functioning GUI's in android and as a test to go through the process of getting something on the marketplace.


The Code i used for finding if a number is a prime or not  was a simple loop i made originally to solve a puzzle in project Euler http://projecteuler.net/ .





This is how the start of the program appears a simple XML layout of buttons to select the language you want to use, for this i just used google translate, unfortunately you have to select your language every time, something some users complained about.
 An now for a shot of the functioning application, you enter in a number in the textbox at the top of the screen and then press the button below, the program will return a true or false result and also give you the nearest prime numbers above and below the number you have chosen.


The program Works but does have some flaws, i could have spent longer on the  GUI to make it more pretty and the size of the searchable numbers is limited to the size of 32 bit long integers, but if your going to be looking for larger primes you would probably want to use something more powerful than a smartphone.

Sunday, 27 March 2011

Ok, ive started this blog primarly to keep a record of any personal software projects im working on  or have worked on, which for the moment will include some android apps and college project(s).

oh yay

my first post