Pages

Showing posts with label Setup. Show all posts
Showing posts with label Setup. Show all posts

Sunday, 24 May 2015

What if I told you, you can use OpenCV code with Matlab mex!!



Matlab is probably one of the best tools for quickly prototyping and testing your research ideas. As quick and flexible it is, sometimes Matlab code can consume a lot of execution time. This is specifically a big hurdle when multiple experiments need to be run. A real-time execution alternative is to implement Matlab compatible C++ code and compile it with mex-compiler. While this works most of the time, it is well known that quickly implementing ideas in C++ is not possible.

Monday, 16 March 2015

Executing Matlab scripts on different Operating Systems

Just a quick post about making matlab scripts run on different OS.

Writing a matlab code that works on both Windows and Linux is a little challenging, especially when accessing the disk both OS use a slightly different syntax for filesystem.

One solution to this is using computer string to check the OS. Once checked you can use if condition statements to execute relevant code on each system.

The script for this is pretty straight forward and is listed below:

%compile everything
if strcmpi(computer,'PCWIN') |strcmpi(computer,'PCWIN64')
   compile_windows
else
   compile_linux
end



Saturday, 27 September 2014

Saying hello to the Internet of Things!

A while back I signed up for Microsoft Developer Program for Internet of Things ( #iot for more info ). As much as I love exploring new things this was extremely exciting thing for me.

I have always had the curiosity to know more and try to hack things my own way. Even as a kid I had an investigative mind which always tried to discover more about how everything works. You can imagine this curiosity by the fact that I got severe electric shock as a kid, when I tried to cut a live wire from "Clothes Iron". This curiosity grew more and more in me, to a point that I did an engineering degree (Yes! I was born with an engineer's mind). I have always been interested in hacking different devices to make something more useful out of it.

Monday, 31 March 2014

Compiling OpenCV-3.0 with Matlab Support

A big uppercase HELLO to everyone!  I am back and after a long time (yet again) I am going to write a tutorial. The thing I am able to achieve here is awesome for us computer vision researchers. Yes! you heard it correct, exciting stuff.

I have been using OpenCV for quite sometime now. As good as it is for real-time computer vision applications, it can also be time consuming when it comes to exploring and implementing new research designs. Matlab on the other hand has always been flexible and a quick work around to achieve my research goals. The only problem, though, with matlab is that it is not real-time or even worse is that if you plan to implement code in OpenCV for real-time application, you would have to write the algorithms all over again as the usage of Matlab toolboxes is different than using the same methods in OpenCV.

Now comes the fun part, what if you can access OpenCV function calls within Matlab code? What if you can have easily transferable code from Matlab to C++?  This is all possible now with the OpenCV 3.0 Dev including matlab mex wrappers, which really is a good big step in the right direction. So lets start compiling the code.

Friday, 1 March 2013

Computer Vision in Matlab

Over the time of my research I have found out that it is really difficult to get access to actual codes that different authors use in their implementation for their publication.

I just found out about a very good link where you can find basic algorithms and  implementations of different image processing techniques which can be useful for a person doing research in these field.

Here is the link ( Peter's Functions for Computer Vision ):
http://www.csse.uwa.edu.au/~pk/research/matlabfns/

Kudos to the University of Australia for putting this online for other researchers.

Update 07/03/2013: Since I wrote this post, I have found numerous matlab implementation pages online. I am sharing a list below.

Right now I have just listed down all the available toolboxes and codes. I will be sorting and updating this list soon.

Saturday, 21 July 2012

AndroidWifi is live!

Following my post few months back about how to set up a simple script to share your connection with Android devices in particular, I found that there was no application which provided full capabilities as my batch scripts did. I started work on a very simple application to convert these scripts into an easy to use application. Today I am releasing first version of this application.




Why AndroidWifi?
While reading this post, some of you might be wondering, why use AndroidWifi? why go through all these steps?

The answer is simple. This is the only free software available to date which enables you to share all types of internet connections over wifi.

These include:
  • 3G dongle internet
  • Wired internet
  • Wifi internet from another router
  • internet accessed through USB adapters

Update 13/08/2013: I am seeing people copying this blogpost as it is on their blogs. For this reason I have put a password on the file.

The software can be downloaded at: AndroidWifi_0.9  AndroidWifi_0.91 AndroidWifi_0.95
Download password: seevisionc.blogspot.co.uk

Thursday, 21 June 2012

Installation of OpenNI with NITE middleware for Microsoft Kinect

Update (31/03/2013): Since writing this blog post, there have been a number of updates to the OpenNI SDK. Now the framework is totally changed, and the links to the OpenNI and NITE binaries used in this tutorial have been moved to another location. You will need to download the specific version of binaries from the new links, rest of the installation process is still the same.

Okay, so this post is again a guide for installation of another library. This time it is OpenNI library for Microsoft Kinect. I am currently working on a computer vision project which utilizes the power of Microsoft Kinect's depth sensor. While researching for my project, I found out that OpenNI library is better than Kinect SDK in many ways. It is opensource, cross-platform, has skeletal as well as hand tracking (which I needed for my project), gesture recognition and ability to use OpenCV were many reasons for choosing OpenNI over Kinect SDK.

OpenNI contains the SDK to access RGB and Depth data from depth sensors containing primesense hardware which includes Microsoft Kinect. However to use skeletal tracking, hand tracking, gesture recognition or any other natural interaction functions in an application a natural interaction library called NITE is required. To use these libraries with Microsoft Kinect, drivers for using Kinect sensor with OpenNI and NITE are required. To install these libraries and drivers is the easiest part, however to make the sensor working with these libraries is really difficult. I followed a number of guides online, however I could not find any guide which could completly resolve all the problems which come after installation and make the sample programs work. I am writing this guide to make sure that most people get the sensor working with these open source libraries.

Monday, 28 November 2011

Speaker-o-phone anyone?!?

One of these days I wanted to have voice chat with a friend of mine, but unfortunately his microphone was not working. He still had his headphones working though.

So I searched and found a very cool way to fix this.

Apparently microphones and speakers work the same way, however the difference being in the direction of data. Microphone is used to get voice data, whereas speakers are used to output the audio signals.

What I found was extremely simple and straightforward. All you have to do is plug the headphones jack in place of the microphone slot. Hoping that you have desktop speaker to hear other persons voice, you will be able to communicate with your friend using the very same headphones, just have to speak up into those small speakers.


I know what you guys are thinking now. No! its not one of those pranks, it really works. Simple physics!!

Monday, 12 September 2011

Linux Like Installation of OpenCV 2.3.0 on Windows

So you have been using Linux for opencv programming lately and now, for some reason, have no other option then to work on Windows. I too have to go through the same situation when I had nothing but Windows on my desktop and I was been too lazy to install Linux or maybe I wanted Windows for gaming.

Well this is your lucky day then, because I will be guiding you through 'Linux-Like-Installation' of OpenCV 2.3.0 on Windows. This guide will use minimum possible Linux System installation , hence it wont take much time to setup except for OpenCV compilation which takes sometime (and hey we all need sometime to relax)
First step is to download all the packages required for setup. Here are the direct links to the packages. You can also google these packages if, for some reason, you can not download them from here.
  1. Minimalist GNU for Windows: TDM-MinGW-4.5.2
  2. Cmake 2.8.4: cmake-2.8.4-win32-x86
  3. MSYS 1.0.10: MSYS-1.0.10
  4. OpenCV 2.3.0 Source: OpenCV 2.3.0

Wednesday, 4 May 2011

Setting up Opencv2.0 with MinGW on Windows

I have been using OpenCV for quite long now, and well I must say it is a very good library for implementing different image processing technique in real time. Previously I was using Ubuntu 10.04 along with OpenCV 2.20, which was very easier to setup as compared to my recent venture.

In order to test my projects on a slower system, I decided to work with OpenCV on my old desktop with Windows Xp. I thought it would be much easier and less time consuming to set up everything as Windows is always considered to be better at interacting with user. However after few hours, I was proven wrong.

Since I previously worked in Linux Envoirnment and my old desktop was slow enough to not smoothly run any IDE software, I wanted to setup something similar to linux terminal and gedit. After googling for few minutes, I successfully found the fastest, or should I say the slowest way, of setting up OpenCV. It involved using MinGW (minimalist gnu for windows) and OpenCV 2.0 precompiled library for MinGW. After installing everything, when I compiled a simple helloCV program, it crashed!