Friday, December 30, 2011

Book: Practical image and video processing using matlab

This book is used as a text book at the following universities.

1. The Multimedia & Sensors Lab (MSL) at Georgia Institute of Technology (http://www.ece.gatech.edu/research/labs/msl/)

Thursday, November 10, 2011

Strategic knowledge, 2x2 matrix method


  1. Simple vs. complex
  2. Chaotic vs. ordered
  3. Dynamic vs static
  4. Adaptive vs. acceptive
  5. Robustness: the characteristics of being strong and healthy, withstanding the operating environment
  6. Resilience: being able to recover easily and quickly from unpleasant and damaging events
  7. Effectiveness: the quality of being able to bring about an effect
  8. Efficiency: avoid wasting time and effort

Octave


  1. Octave 3.4.2
  2. GUI Octave 1.5.4
  3. Cygwin, X11

Tuesday, November 8, 2011

Returning memory from a function

#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

char *get_street_address(void); /*function prototype*/

int main(void) {

char *street_address =  NULL;

street_address =  get_street_address();

/*Check if the above state is successful if not the program is terminated*/
assert(street_address != NULL):

printf("The entered street address was: %s \n",  street_address);

/*Return the memory block to the pool*/
free(street_address);

return 0;
}

/*Implement the function get_street_address(void)*/
char *get_street_address(void) {

/*Assign a memory of 150 characters to the "input" pointer*/
char *user_input = malloc(150);

/*Check if the memory assignment is successful*/
if (user_input == NULL) {
   printf("Unable to assign memory!\n");
   return NULL;
}

/*Ask for user_input*/
printf("Enter your street address: ");
scanf("%149s", user_input);

getchar();

return user_input;
}

Preventing memory leaks

char *b;
b=malloc(100);
free(b);

Monday, November 7, 2011

MATLAB GUI Edit Text and Static Text Objects Example


%Assume there is text_edit object which is called editext1.
%Assume there is a static_text object which is called statext1.

%Get the string in the text_edit object and convert it into a number n
n=str2num(get(handles.editext1,'string'));

%Do some thing with n
y=n*n;

%Convert y back into a string stry
stry=num2str(y);

%Set the 'string' field of the static_text object the string stry.
set(handles.statext1,'string',stry);

UNESCO's 'Four Pillars for the 21st Century Education'


  1. Learning to know
  2. Learning to live with
  3. Learning to be
  4. Learning to do

Sunday, November 6, 2011

Image processing with MATLAB


  1. Find and tracking a green ball from images/frames in a video in a MATLAB demo.
  2. Creating a GUI with GUIDE
  3. Open and display an image file in the GUI
  4. Save a current image
  5. MATLAB GUI for changing image brightness
  6. MATLAB GUI for measuring image quality using PSNR and RMSE metrics
filename = uigetfile('*.jpg','Select an image file');
im = imread(filename);
imagesc(im);
%Create a handle to manage the image im
handles.im = im;
%Update handles structure/Save the change made to the structure
guidata(hObject, handles);


%Get the image im for manipulation
im = handles.im;
%Save the image im
[filename,pathname] = uiputfile( ...
       {'*.jpg', 'JPEG Image File'; ...
        '*.*',   'All Files (*.*)'}, ...
        'Save current image as');    
if (filename~=0)
        var=strcat(pathname,filename);
        imwrite(im,var);
end

Saturday, November 5, 2011

Topics in my head

  1. Science
  2. Business
  3. Invention
  4. Magazine
  5. Ebooks
  6. Programming languages
  7. MATLAB
  8. WEKA
  9. SQL
  10. PHP
  11. Applied mathematics
  12. Jobs
  13. Career
  14. Money
  15. Intelligence
  16. Smart
  17. New scientist
  18. Simulation
  19. Modelling
  20. Internet retailer
  21. Internet retailing
  22. Research
  23. Entrepreneur
  24. Optimization
  25. Data mining
  26. Quadratic programming
  27. SVM
  28. Canon EOS 550D
  29. Canon EOS 600D
  30. Artificial intelligence
  31. Database
  32. Android/IOS apps
  33. R and data mining
  34. Statistics
  35. Signal processing
  36. Octave

Friday, November 4, 2011

How to choose a home loan agent

The following helps us to select a home loan agent

1. Loan to home value ratio: 80% up to 100%
2. Exit fee
3. Evaluation fee
4. Minimum and maximum term (e.g. 1 year to 30 years)
5. Application fee
6. Fixed interest or variable interests
7. Different payment period options (e.g. monthly, fortnightly, weekly)
8. Payment options: principle and interest or interest only
9. Options to redraw
10. Options to make extra payment
11. Account transfer fee

Source from infochoice.com.au

Perspectives

1. One object to another object
2. One thing to another thing
3. One idea to another idea
4. One image to another image
5. One situation to another situation

Oracle recruitment channels

1. http://oraclerecruiter.blogspot.com/
2. Create your own profile on

1. LinkedIn.com
2. Twitter.com
3. Facebook
4. Myspace

to attract potential Oracle recruiters.

Tuesday, October 4, 2011

Visual communication

1/ Tools for effective visual communcation

-Tables
-Graphs and charts
-Diagrams and sketches
-Maps, drawings and photographs
-Scientific and information visualisation

2/ References

Terry Mohan, Helen McGregor, Shirley Saunders and Ray Archee "Communicating as professionals", 3nd Ed, Thomson, 2008.

Sunday, October 2, 2011

Quicksort algorithm

Quicksort algorithm has the worst-case time complexity of O(n^2), and the best-case time complexity of O(nlogn).

Friday, September 2, 2011

Problem solving as search

Problem solving as search

Uninformed search

I/ Breath-first search
II/ Depth-first search

Depth-first search is not optimal and incomplete.

"Incomplete" means it can start down an infinite path and never return to try other possibilities.

Informed search

I/Best-first search approach

1. Greedy best-first search

"Greedy" means at each step it tries to get as close to the goal node as it can.

2. A* search

A* search tries to minimize the total estimated solution cost.

f(n)=g(n) + h(n)

h(n) represents the heuristic cost from the considering node to the goal.
g(n) represents the cost from the current node to the considering node.

A* search is both complete and optimal.

A* search is optimal if h(n) is an admissible heuristic. That means h(n) never overestimates the cost to reach the goal.

A* tends to run out of space faster than out of time as it keeps all the previous generated nodes.

Reference
Stuart Russel and Peter Norvig "Artificial intelligence: a modern approach", 2nd Ed, 2003.

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...