2/23/11

Symbol Table in Java

Symbol Table Definition :

In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is associated with information relating to its declaration or appearance in the source, such as its type, scope level and sometimes its location. 


2/14/11

Image Processing : Edge Detection of Image Using MATLAB

There are many operators in MATLAB for finding images
1. Sobels Operator
2. Roberts Operator
3. Prewitts Operator
4. Laplacian of Gaussian Method
5. Zero-Cross Method, etc..

To use them in MATLAB there is a function called as edge(I).


Syntax :

BW = edge(I)

BW = edge(I,'sobel')

BW = edge(I,'prewitt')
 
BW = edge(I,'roberts') etc.

Description : 

BW = edge(I) takes a grayscale or a binary image I as its input, and returns a binary image BW of the same size as I, with 1's where the function finds edges in I and 0's elsewhere.

By default, edge uses the Sobel method to detect edges but the following provides a complete list of all the edge-finding methods supported by this function:
  • The Sobel method finds edges using the Sobel approximation to the derivative. It returns edges at those points where the gradient of I is maximum.
  • The Prewitt method finds edges using the Prewitt approximation to the derivative. It returns edges at those points where the gradient of I is maximum.
  • The Roberts method finds edges using the Roberts approximation to the derivative. It returns edges at those points where the gradient of I is maximum.
  • The Laplacian of Gaussian method finds edges by looking for zero crossings after filtering I with a Laplacian of Gaussian filter.
  • The zero-cross method finds edges by looking for zero crossings after filtering I with a filter you specify.
  • The Canny method finds edges by looking for local maxima of the gradient of I. The gradient is calculated using the derivative of a Gaussian filter. The method uses two thresholds, to detect strong and weak edges, and includes the weak edges in the output only if they are connected to strong edges. This method is therefore less likely than the others to be fooled by noise, and more likely to detect true weak edges.
The parameters you can supply differ depending on the method you specify. If you do not specify a method, edge uses the Sobel method.

Example :

Find the edges of an image using the Prewitt , Sobel and Roberts methods.
 

i = imread('far.jpg');
I = rgb2gray(i);
BW1 = edge(I,'prewitt');
BW2= edge(I,'sobel');
BW3= edge(I,'roberts');
subplot (2,2,1);
imshow(I);
title('original');
subplot(2,2,2); 
imshow(BW1);
title('Prewitt');
subplot(2,2,3);
imshow(BW2);
title('Sobel');
subplot(2,2,4);
imshow(BW3); 
title('Roberts'); 
 




2/5/11

2/4/11

SQL : Structured Query Language (basics)

SQL stands for Structured Query Language is a database computer language used for managing data when used with application  in a Relational Database Management System (RDBMS).

There are many database software available which used the same query language. Some of them are Oracle, My SQL, DB2 etc. 
As the name suggest Structures Query language so it uses QUERY for retrieval of data from the database, and that query has a structure which is same for all databases software.