Monday, 17 June 2013

Color Image Segmentation Matlab code

We have done color image Segmentation  using matlab tool. following steps are used to done color image segmentation.

1. Read image file
2. Apply Fuzzy C means clustering and group the data.
3.Find gradient magnitude for grouped data.
4.Finally apply watershed segmentation.

clc

clear all

close all

warning off





[filename, pathname] = uigetfile( {'*.jpg',  'Jpg Image File (*.JPG)'}, ...

   'Read a file'); 

file = [pathname filename]; 

IM = im2double(rgb2gray(imread(file)));



figure;imshow(IM,[]);



% load IM



[r c] = size(IM);



data = IM(:);

[center,U,obj_fcn] = fcm(data,4); % Fuzzy C-means classification with 4 classes

         

% Finding the pixels for each class

maxU = max(U);

index1 = find(U(1,:) == maxU);

index2 = find(U(2,:) == maxU);

index3 = find(U(3,:) == maxU);

index4 = find(U(4,:) == maxU);



% Assigning pixel to each class by giving them a specific value

fcmImage(1:length(data))=0;       

fcmImage(index1)= 1;

fcmImage(index2)= 0.66;

fcmImage(index3)= 0.33;

fcmImage(index4)= 0.0;





% Reshapeing the array to a image

imagNew = reshape(fcmImage,r,c);

figure;imshow(imagNew,[]);



gradmag = imagNew;

g = gradmag - min(gradmag(:));

g = g / max(g(:));



th = graythresh(g); %# Otsu's method.

a = imhmax(g,th/2); %# Conservatively remove local maxima.

th = graythresh(a);

b = a > th/4; %# Conservative global threshold.

c = imclose(b,ones(8)); %# Try to close contours.

d = imfill(c,'holes'); %# Not a bad segmentation by itself.

%# Use the rough segmentation to define markers.

g2 = imimposemin(g, ~ imdilate( bwperim(a), ones(4) ));

L = watershed(g2);

Lrgb = label2rgb(L);

figure;imshow(Lrgb,[]);


Wednesday, 6 March 2013

Switching Bilateral Filter Noise Removal matlab code

Here we discuss about Switching Bilateral Filter Noise Removal step by step.

1.Read the image pixel by pixel (i,j).
2. Each pixel we construct 4 sub windows.

For a (2N+1) *(2N+1) window we divide the window into four (N+1)*(N+1) subwindows .


case N = 2

3.Find the Sorted Quadrant Median Vector (SQMV) for all subwindows.

SQM1, SQM2, SQM3 and SQM4 are the medians 

4. Then we find the regions from above all SQM.

Uniform Region
Diagonal edge in dark side
Diagonal edge in dark side
Veritical edge
Horizontal edge
Diagonal line
Gradual chage edge 
Texture

5. Then we find the reference median (SQMR)  based on above regions.
6. Then apply Bilateral Filter.
7. The apply noise detection .


Code:

clc
clear all
close all
close all hidden
warning off

con = 1; % con1 for 

img = imread('lena.jpg');

figure;imshow(img);
title('Input Image');


img = imnoise(img,'salt & pepper',0.01); % salt and pepper
Tk1 = 30; % for salt and paper noise..
Tk2 = 15; % for salt and paper noise..


% img = imnoise(img,'gaussian',0,0.01); % gaussian noise
% Tk1 = 25; % for Gaussian noise..
% Tk2 = 5; % for Gaussian noise..


img = double(img);
figure;imshow(uint8(img));
title('Noisy Image');

ext_filt = img;
sigma_R = 40;
[r c] = size(img);
N = 2;
pi_val = 25;
h = waitbar(0,'Applying Switching bilateral filter..');
L = 1;
for i = (N+1):r-(N+1)
    waitbar(L/length((N+1):r-(N+1)));
    L = L+1;
    for j = (N+1):c-(N+1)
        [m0,m1,m2,m3,m4] = meadian_calc(i,j,img,N);
        dav = dav_valc(m1,m2,m3,m4,img,i,j);
        SQMDB = m4-m1;
        SQMDC = m3-m2;
        SQMR = SQMR_calc(SQMDC,m1,m2,m3,m4,dav,pi_val);
        [s1 s2] = find_S1_S2(img,i,j,SQMR,Tk1,Tk2);
        if(dav~=0)
            sigma_S = 3;
        else
            sigma_S = 1;
        end
        f_x_y = f_of_x_y(i,j,N,img,sigma_S,sigma_R,s2,SQMR);
        ext_filt(i,j) = f_x_y;
    end
end
close(h); 

figure;
imshow(uint8(ext_filt));%output...

Referencce : Switching Bilateral Filter With a Texture/Noise Detector for Universal Noise Removal Chih-Hsing Lin, Jia-Shiuan Tsai, and Ching-Te Chiu Transactions on: Image Processing, IEEE Journals 2010

Wednesday, 12 December 2012

Cloudsim installation in Windows

Cloudsim is the best simulation for cloud computing domain.this tools used for more research papers.In below we sea How to install cloudsim on windows.

1.Download clousim, apache_ant and Java version 1.6 or newer.
2.Then Install Java.
3.Extract clousim and  apache_ant files on C:\


4.open command prompt.
5.Set the path for Java and apache_ant,both are set the path on bin directory.
ex:

set path=%path%;.;"c:\Program Files\Java\jdk1.6.0_06\bin";
set path=%path%;.;C:\apache-ant-1.8.4\bin;


6.Then set the classpath to cloudsim library files.

for ex

set classpath=%classpath%;.;C:\cloudsim-3.0\jars\cloudsim-3.0.jar;C:\cloudsim-3.0\jars\cloudsim-3.0-sources.jar;C:\cloudsim-3.0\jars\cloudsim-examples-3.0.jar;C:\cloudsim-3.0\jars\cloudsim-examples-3.0-sources.jar


7.Then goto cloudsim example folder using cd command.

ex :cd  C:\cloudsim-3.0\examples

8.Compile example1 program using Javac command.

ex: javac org/cloudbus/cloudsim/examples/CloudSimExample1.java

9.Then Run CloudSimExample1 using java command
ex: java org.cloudbus.cloudsim.examples.CloudSimExample1

10.Then Result will come and successfully installed cloudsim on your computer. 

Sunday, 2 December 2012

A New Human Identification Method Sclera Recognition Matlab code

Training
  • Read the all Input Images from Hard Disk Drive Folders.
  • Then Converted RGB into Gray scale Image
  • Applying Horizontal sobel filter on that Image.
  • Estimation of Glare Area.
  • Iris Boundary Detection using circular iris segmentation methods.
  • Extract sclera region using Otsu’s threshold method.
  • Iris and Eyelid Detection and Refinement using Morphological operator and Gabor Filter.
  •  Then Save and create the Iris Eyelid templates on Hard disk Drive.

Testing
  • Read one Image from Hard Disk.
  • Then follow above Training steps 2 to 6 applying.
  • Then mach the Iris Eyelid template on Database template.
  • Finally Recognition Results will Comes.

Output:


System Requirement:

OS : Windows
Matlab  Version : 2012a
Price : Rs 2000
Matlab Code is available.
contact : 8015926919
Email : ieeematlabcode@gmail.com

Monday, 27 August 2012

Remove Pendrive Autorun Inf Virus | Remove read only attribute on Command window

How Remove Pen drive Auto run Inf Virus?

Just follow this below command to remove your virus.

1.open command prompt on your system.
2.choose your Pen drive Colon.

if your pen drive H: means . type H: on command prompt then press enter.
>>H:

3.then edit autorun.inf on your command window.

>> edit autorun.inf

4. then note the exe and pif file.
5.Then goto File and exit.
6.Then type attrib -R noted exe file or pif  +s +h. It remove read only attribute on that file.

>> attrib virus.exe +s +h -R

7. Then delete command used to delete the virus.

>> del virus.exe /a

8.Then we remove autorun.inf remove following cmds.

>>attrib autorun.inf +s +h -R
>> del autorun.inf /a

9.Finally we remove the virus on your pendrive.

Related Search : Remove Pendrive Autorun Inf Virus on Pc. Remove pif Virus on pendrive. Remove the read only file attribtes on file using command. attrib read only command for read only files.

Monday, 18 June 2012

Matpower Toolbox Examples

Matpower toolbox fully supported for Power System domain.Its solves power flow and optimal power flow in all types of IEEE buses.

you can easy to download from Mathpower Home Page www.pserc.cornell.edu/matpower/. Its open source package .so freely you can download.After downloading you have set the path on Matlab to Matpower toolbox. 

Main Functions(Subroutines)  :

loadcase - > test the loadcase ie(IEEE 14,30,57,118,330 bus system). Its

ex:

loadcase('case14')


totcost -> Test the  total cost of your selected bus systems
ex:
totcost('case14')

uopf ->  Its find the nodal cost of your selected bus system

ex:
uopf('case14')





Monday, 21 May 2012

Tamilnadu HSC Results 2012



The Tamilnadu Government announce HSC examination results are expected to be declared on May 22, 20.In below we put some 6 links for Tamilnadu +12 HSC Results 2012. So Students are check in below links.

dge1.tn.nic.in
dge2.tn.nic.in
dge3.tn.nic.in
tnresults.nic.in
results.nic.in
results.tamilnadueducation.net
www.examresults.net
www.schools9.com

above websites are publish the +12 exam results.

Related Search : Tamilnadu HSC Results 2012 ,Tamilnadu +12 HSC Results 2012 ,Tamilnadu +2 HSC Results may 22,2012,Tamilnadu Government HSC Results 2012.
Related Posts Plugin for WordPress, Blogger...