Friday 16 August 2013

Install sv journal template on your Word

1. Download Sv-journ template from ftp://ftp.springer.de/pub/Word/journals

2. Extract the zip on your local directory.



3. Double click and open sv-journ.dot open in Word 2010.

4. Check out the Add-Ins tab.then all items are shown.



5. Then create your document and save it.

Wednesday 7 August 2013

Latent Semantic Indexing Matlab Code

In below we give the code of lsi on matlab.



function sim = lsi_calc(A,q,k)

[m,n] = size(A);

[U,S,V] = svds(A,k);

qc = q'*U*inv(S);

for i = 1:n % Loop over all documents

    sim(i) = (qc * V(i,:)') / (norm(qc) * norm(V(i,:)));

end;

MATLAB code for read image from webcam

In below code to read image from web cam then write the image on your local directory.


vid = videoinput('winvideo',1);

testpic = getsnapshot(vid);

imwrite(testpic,'image1.jpg');

imshow(testpic);

Friday 2 August 2013

Face Detection Matlab Code

Following code used to detect the face.

faceDetection.m



function detectfce = faceDetection(I)



faceDetector = vision.CascadeObjectDetector;  



% Read input image



% Detect faces

bbox = step(faceDetector, I);



% Create a shape inserter object to draw bounding boxes around detections

shapeInserter = vision.ShapeInserter('BorderColor','Custom','CustomBorderColor',[255 255 0]);



% Draw boxes around detected faces and display results             

snapshot0 = step(shapeInserter, I, int32(bbox));   



detectfce = I(bbox(2):bbox(2)+bbox(3),bbox(1):bbox(1)+bbox(4),:,:,:);



Main.m



[filename, pathname] = uigetfile({'*.jpg;*.tif;*.png;*.pgm','All Image Files';...

          '*.*','All Files' },'mytitle');

file = [pathname filename];





FileNames = file;

rgbImage = imread(FileNames);

detectfce = faceDetection(rgbImage );

figure;imshow(detectfce );





Neural Network with hidden Layers Example on Matlab | Matlab Neural Network with 2 hidden Layers

Neural network is one of the artificial intelligence technique,it solve problems in more areas ,like as patter recognition,clustering ,fitting and ect.

Neural network Steps as follow


1.Create the network

2.Train the network



1.Create the network


1st thing we design a network for our inputs for ex we have 2 input and 1 output.

ex:-
>>input = [2 2;4 5;6 7; 7 8; 9 10];
>>output = [1;1;2;2;2];

we create neural network with default hidden layer as follow.

>>net = newff(input,output);


if we want design with users hidden layers then we design as follow.

>>net = newff(input,output,[3 4]);

here [3 4] are two hidden layer. Each layer has each neurons.ex 1st hidden layer has 3 neurons and 2nd one 4 neurons.


2.Train Network


Its train our input data on neural network.

ex:

>>net = train(net,input,output);


Related Posts Plugin for WordPress, Blogger...