Tuesday, June 25, 2013

VL_SLIC gives disjointed superpixels!!! Is it a bug?


I used vl_slic to oversegment the following image.
I tried both using the RGB image and LAB image for superpixel segmentation.
Strangely, I find some superpixels which are disconnected regions, instead of whole regions!! I do not know why, if it is a bug in my own way of giving inputs or it is an actual bug.

Here is my command for segmentation:

% Read the RGB image
fileName = [num2str(imgInd) '_rgb'];
load(sprintf(imgFile, imgInd),'imgRgb');
rgbImg = im2double(imgRgb);

% % For LAB colorspace
 regionSize  = 30; %25 ;
 regularizer = 30; %50;
 imglab =  vl_xyz2lab(vl_rgb2xyz(single(img))) ;
 structSuperpix(1).segments = vl_slic(single(imglab), regionSize, regularizer);

% For RGB colorspace
regionSize  = 25;%30;
regularizer = 0.008;%0.01;
structSuperpix(1).segments = vl_slic(single(img), regionSize, regularizer);

The input Image:

 

Broken superpixel  using LAB image:

















Broken superpixel  using RGB image:



Moreover, I need to provide different values of regularizer for equivalent shaped superpixels. Superpixels obtained with LAB colorspace appear more irregular than that using RGB colorspace.

What might be the reason?

Sunday, April 14, 2013

file.tex:0:Emergency Stop

This latex error is a simple one but can make you go crazy. It does not give you much clue about where exactly the error occurs and the cursor goes to the beginning of the file. Well, the culprit lies in the end of the file. It is when we miss to end the document by mistake.
So just add \end{document} in the last line of the file and the error vanishes!

Tuesday, April 9, 2013

Turn on Bluetooth in Ubuntu 12.04

I did not find it so straightforward to setup bluetooth in my ubuntu 12.04 system. So I had to look up couple of sites to fix my problem and successfully transfer data via bluetooth.

The following link gives a nice, detailed, step-by-step instruction on how to turn on bluetooth in ubuntu.
http://www.hecticgeek.com/2012/09/how-to-set-up-a-bluetooth-connection-in-ubuntu/

However, I was not able to activate any button. They all appeared deactivated to me. If you are facing the same problem, then you have to do the following setup in terminal:

$sudo hciconfig hci0 reset

This activates the buttons and lets you do your setting. (Refer: http://askubuntu.com/questions/153384/trouble-turning-on-bluetooth-in-12-04)


We need to check the option  "Receive files in Downloads Folder over Bluetooth" in the menu opened in Personal File Sharing. In ubuntu 12.04, it is found in the path: 
Applications ->System Tools->Preferences->Personal File Sharing.

The files transferred to the system are stored in the folder "Public" in the homepath.