Showing posts with label university. Show all posts
Showing posts with label university. Show all posts

Monday, July 13, 2009

The Journey Continues...

...into the realm of C/C++.

I have been absent for a while (again) while i try and get uni under control. My second-to-last semester seems to have blown by in a great hiss and roar, along with the break between semesters (which i can't really say was much of a "break" for me). Oh well, so Uni goes. Only one more semester to go.

Recently i've been getting up to my neck in various image processing projects, and most recently i decided to attempt using OpenCV for my latest assignment since i was going to use it for my project anyway. Yes, i would rather code in C/C++ than Matlab. Not to mention all the tools i am using are free. The one bit of proprietry software i'm using is Microsoft Visual Studio 2008 Professional edition, not for the .NET libraries and classes, but simply because it's easier to import OpenCV and cvBlobsLib into (because these libraries are written in Visual C++). Oh and also because the company i am doing my project for is working in Visual Studio. And technically this is still a freebie because i recieved a copy courtesy of the MSDNAA (Acedemic Alliance) program. Otherwise i would probably just work in Eclipse, even if i had to manually build the libraries from source.

OpenCV itself will appear kind of hideous to someone like myself who hasn't had much experience with non object-oriented programming. It's easy enough to use though, and makes the whole process as painless as possible. OpenCV includes libraries for just about everything imaginable; from basic array operations to filtering and segmentation, to object recognition and motion tracking. It really is the most versatile library you will find for image processing. It was not complete though. Naturally as it is, OpenCV lacks blob labelling and feature measurement/generation.

Enter cvBlobsLib, a complement to the base OpenCV library which basically adds all of the above. It even has Matlab-like profiles for blobs, including features such as the convex hull, ellipse best fit, max pixel dimentions, area, perimeter, etc.

The final library i will mention is actually a set of libraries i stumbled upon while looking for a way to iterate through the files in a directory (and the C/C++ standard libraries currently have no directory/file lookup functionality). Boost is a free library collection which adds alot of much-needed functionality to C++. Not only does it do this, but it does it for free, and is compatible across most (if not all) operating systems, courtesy of the POSIX interoperability standard. In lamens terms, you can use this set of libraries on Windows, Linux, MacOS, and even some other less well-known operating systems without any major issues.

Now hopefully, with this combination of free libraries tacked together i will be able to go full speed ahead with both my project and assignment.

Thursday, May 22, 2008

With All the Formalities

I'm currently in the process of plowing through the end-of-semester rush of assignments that always comes at university; it's like all the papers forgot they have to get another assignment done, so they hastily tack it onto the last week or second to last week of the semester. Of course this is never the case; assignments are planned out at the beginning of the semester, so those of us who have to do them can't use the old excuse "it crept up on me and covered my eyes so i couldn't see it".

One of the worst things about doing a report is the level of formality usually espected. In my first Practical Work Report (Practicum 1) for engineering, i had my mark downgraded because the report was "too personal", and "felt more like an essay than a report" to be fair the man was right. I used the letter "I" far too much, but my excuse was that i was writing about a personal experience. How else am i supposed to write about diagnosing a problem with an offshore tide monitoring station. My computer didn't diagnose the problem, it didn't diagnose itself; I did it. For my latest statistical report i decided to make it pretty casual: the lecturer is a fairly laid back and funny sort of guy, so i thought i'd throw a few colloquial terms in there, use "I" alot (after all I was the experiment), and talk about walls of text.

It got me thinking, why can't all reports be like this? I can see how it might be regarded as unprofessional to not be as objective as possible, and how you could get bored of someone talking about themselves. But when describing what actions you took, surely the use of "I" is not prohibited. For me it's boring just writing like this about personal experiences. I can be objective about things that just happened in my presence, or decisions that were made not just by me. Anyway objectiveness is just the tip of the ice berg. I also tend to be the sort of person that doesn't make good use of appendices; i prefer not to include irrelevant material in my report, and if it's that relevant it should really deserve to be up front, in the body of the report itself.

Ah well i guess it's all hopeless in the end. So much depends on standards and compliance in the modern world. I'll learn to change my ways in the end.

Thursday, May 15, 2008

Better Window Tiling

I was thinking about this today in my computer lab, where i was working with a multi-windowed program, and at the same time flicking between tutorials and help files. What a pain in the butt.

Luckily the program in question, LabVIEW, allowed the tiling of windows that were related to the program. However i still had to alt-tab for the documentation and help. For once i would like to see an OS include some really smart tiling, something allowing you to actually specify which windows you want to tile, instead of tiling all or none. And options like being able to choose whether to scale the windows to fill all available space, or scale them as a factor of their current dimensions, so they fit together as a sort of jigsaw, but you don't get overly thin or short windows, obscuring most of the content and defeating the purpose of tiling them in the first place.

Of course the only reason this is even possible is because my university is rich enough to fill our engineering labs with 23" and 24" screens. Tiling isn't very applicable to small screen sizes or small resolutions, probably why it's never been considered a big feature of most desktop environments. But my point is it would be nice to have something to do some slightly smarter and more customizable tiling instead of just expanding every open window to the size of the screen.

Keep thinking.

Tuesday, May 13, 2008

The Internet

Today was interesting, Massey University Palmerston North hosted a guest lecturer who talked about the internet. It was largely a history lecture, but some interesting issues and ideas were raised surrounding the internet. One comment that i found particularly interesting was about embedded device networking and it's interfacing to the internet.

One idea this raises is if your home appliances were connected to the internet, how would they be kept safe? What would you do if someone hacked your toaster or changed the temperature on your hot water supply. But yea the main idea i got thinking about was ubiquitous networking (sort of related to the smart toaster). What if we had every modern device with any sort of smarts try and network to any other device in range? This would create a constant moving P2P network between these devices. The great application for this is mobile phones, and viral information distribution. You could create bulk messaging systems like say a news website. This website could then be updated at a hardwired local node (say a cell site), and then that cell site transmits to all other nodes in range. If you wanted to save bandwidth you would make use of the viral distribution network: transmit to say 20% of the network, then use that 20% to virally spread the information to other devices in range.

This would practically put mobile service providers out of a job if it could be made to work; you could distribute information en masse simply by getting each node to sync with every other node in range. My great vision for this would be diminishing the need for wireless access points for internet; the devices become the internet; their interconnections support a short range network allowing information to hop from device to device to reach it's destination, rather than relying on the cell site to transmit the information to each device.

For another example, you could have two people on opposite sides of a town/city IM each other. Normally message would be transmitted to the cell site, then through local network infrastructure, then to possibly another cell site, and finally transmitted to the target phone. From the phone company's point of view they could free up bandwidth on the infrastructure for other information. From the person's point of view it would be cheaper because there practically isn't any cost to make a message jump from phone to phone.

This is not a perfect system by any means though: the first and biggest hurdle is that the technology would have to be available, and it would require cooperation from phone vendors and telecos. With most telecos, they would not be willing to let people exchange any sort of information for free; they make their money by making people pay for it. A great example is how Telecom NZ has always used CDMA handsets that are stripped of all software that allows you to transfer content from computers or other devices. This means you have to buy any new content from their "online stores" via WAP or other mobile services.

Ideally though, it is exciting to think about mini-networks driven by mobile devices. Bringing us slightly closer to that goal of faster, cheaper information exchange. It relies on the principle of human population density, where most people are concentrated on popular centres, which cause more people to gravitate toward them simply by being populous. Because in these areas people are so densely packed in a single area, viral information distribution and networks like the one i have described would be highly feasable to reduce the amount of traffic going through cell sites. It could also make internet access cheaper for people on the move if it could be integrated with local wifi networks; phones could attach themselves to nearby wifi networks and be used as mini cell sites for other phones to communicate with.

The big thing about any part of this theory that i've put forward is that it means phones/nodes/devices/whatever we're talking about here would be constantly active. For mobile phones this would mean a much, much shorter battery life. Even standard wifi equipment uses a reasonable amount of power. So this theory is largely hitched on the classic hitch to all mobile technology; a power source/battery life. You could lower the power requirement, but this would shorten the range considerably. This might still be feasable in a small area scope; maybe up to a couple hundred metres of low-bandwidth networking? This would be enough for places like schools, universities, businesses.