Wednesday, July 31, 2013

Been doing a lot with Qt lately.  I'm working on a front end for a MySQL database.  Progress is coming along splendidly.

The MySQL tutorials have been invaluable.  I've visited so many web sites over the last few days that I don't think I could count them all.

http://dev.mysql.com/doc/refman/5.1/en/index.html


I've worked with SQL in the past, but this experience has been a fairly steep (re)learning curve.  Especially when you throw Qt into the mix.  Qt has been an invaluable resource during this development and usability has really shined through.

This software should save quite a bit of time for everyone in our lab when it is finished.

Saturday, February 2, 2013

More on MLTrainer

The last couple of weeks I have been working diligently on my detection software.  Many of the functions that I developed over time use the IplImage.  This of course means that in C++ I was limited to a non dynamic structure.  However, as part of my universal file format/database software I have an image format.  I was able to use this image format to manage blocks of memory for opencv (even using the iplimage).

So things might be a bit confusing to describe because of the nature of my program.  Before I had a memory management system with the interpreter.  But because I needed to open 3D Tiff stacks and other image formats, I had to rely on a structure that was more powerful than the IplImage.  This led me to incorporate the database library.  So now my software can open 3d tiff stacks and 2d images.

Since the database library has easy conversion between strings and datatypes I can theoretically now include other variables in my interpreter (and my RPN parser).  Unfortunately I have some other software and work to finish up before I can get to that level.

The next batch of software I will be making will be used for some image analysis utilizing our haar cascades.  I did this before for another project so the new batch of software should be a fast build.  I would like to try and make this software a bit more versatile so that I don't have to keep building analysis software; however, I don't expect that this should be easily accomplished as our needs are constantly changing and it would be difficult to predict our future analysis needs.

Monday, January 14, 2013

CodeChef

After being disappointed with RockPaperAzure, I decided to see if I could find any other programming contests.  After googling "Programming Contests" I struck gold when I explored a website called CodeChef.

CodeChef is based in India, but it appears that contests are open to everyone.  They are in the middle of their January "long" contest.  I've personally been working on some code for the challenge called "A New Door".


This website seems like a great opportunity to help not only new programmers but also veteran programmers expand their skills.  All contests are able to be written in a variety of languages, so even if you're not a C++ guru then you might be able to use one of the other programming languages you have under your belt.

If this sounds like your kind of thing then you can reach CodeChef by clicking on the link below:
http://www.codechef.com/

Thursday, January 10, 2013

Progress on Image Analysis through OpenCV

Today I worked on my image analysis software projects.  I was demonstrating it to a potential user.  This software is essentially the easy way to create and OpenCV haar cascade.

The user goes through image files and boxes in features that they are trying to detect.  The project is in its final stages of completion, meaning there are fewer bugs than lines of code.

One of the most recent additions to the software is a very simple interpreter.  The interpreter allows a user to input custom filter to analyse the image, and perhaps even train the AI library to detect the images at a higher rate.

I was experiencing one very strange bug that was causing the training process to crash.  It turns out that I forgot to initialize a single flag.  So the lesson we learn today of course is always remember to initialize your values, but eh, one is bound to get by every once and a while.

Original Image

Masked Image Base on Selected Area

Brief demonstration of my interpreter



RockPaperAzure

I was at first excited and intrigued to hear that Microsoft is hosting the Rock Paper Azure contest.  This Rock Paper Scissor sets up programmers against each other in a battle of wits.  Microsoft provides a sample of the code and lets you have at it.

The rules of the game are basic.  You program a bot that competes against other bots.
  • Rock beats Scissors
  • Scissors beats Paper
  • Paper Beats Rock
  • Dynamite beats paper, scissors and rock, but can only be used 100 times (per battle).
  • Water balloon beats dynamite but loses to everything else, but can be used an unlimited number of times.
Each battle consists of 1000 rounds, and afterwards  you get to analyse the combat log and make changes to your bot. 

The down side to this is that they want you to sign up for their free 90 day Windows Azure trial.  I thought at first this would be okay to do, but then I found out that they want your credit card.  I don't know about you but I probably would forget to cancel the subscription and end up getting charged 90 days from now.  So sadly I won't be competing here.

My question to Microsoft is why not just open the doors to all developers?  What about some kid who doesn't have a credit card, he or she could be pushed to become a great programmer through a contest like this.

In the end I really think it's a great idea, and wish I could compete.  However, this idea has inspired me.  I would love to set up a server where coders could compete in a contest like this.  There probably wouldn't be any prizes at first, but maybe in the future there could be.

If you're still interested, the webpage for the Microsoft contest is: http://www.rockpaperazure.com/

Good luck and have fun if you enter.

Wednesday, January 9, 2013

The Importans of Copy Constructors

Today I was working on my database software and I was having a horrible time figuring out what was going wrong.  Turns out that on my table I neglected to write the copy constructor.  I could have saved tons of time had I just taken the time to write one when I first put together the class (or if I had not made the assumption that I had previously written one into the code).

Although  it's really strange that I didn't have one.  When I was writing the image file format I used the table as a basis for the image file.  I also recall having a ton of trouble with getting the image file to copy correctly.  I ended up essentially writing in a function that performed the same function as the copy constructor.  I should have realized at that time that my table copy constructor was wrong.

Tuesday, January 8, 2013

Custom Database Software (OpenDB)

I don't want to delete this blog, but I've decided to shift its focus. I won't be having any tutorials like I originally wanted for this blog. However, I will be using this blog to document my projects and their progress. Currently I'm in the middle of several projects. All of these projects use my universal file type/database software. This library is fast, excellent for saving and loading files in a couple of formats. Right now I support csv, my custom file format, and a cfg file type of configuration. I can also load the raw data of any file into the program. Save and load times are fast. I can save a 1GB file in 10 seconds and load the same file in 1-2 seconds. A 512MB file will save nearly instantly, as long as it isn't overwriting old data (not sure why this matters).

I've always been interested in creating database software and I am pleased to say that the software library is nearly complete. It would be hard to understand without seeing the code, but I will include a couple of pictures that hopefully get the message across. Right now I don't have SQL support, but in the future I will (hopefully).

Today I worked out a couple of bugs. One of the core classes in this library is called ODBChar (OChar for short). The OChar is a vector of data that can assume the identity of any base type. This is important in programming a database since we want to make sure we can hold any type of data in a single container.

The next class up from OChar is ODBTable (OTable for short). An OTable can hold a 4 dimensional array of OChars. Both of these types can be saved and loaded very fast.

I'll show save and load times in the future.