Region Filling Morphological Operation
% region filling clc; close all; clear all; % Input A=[0 0 0 0 0 0 0 0 0 1 1 0 0 0… Read More »Region Filling Morphological Operation
% region filling clc; close all; clear all; % Input A=[0 0 0 0 0 0 0 0 0 1 1 0 0 0… Read More »Region Filling Morphological Operation
% **** BIT PLANE SLICING **** a=imread(‘Moon.tif’); b=double(a); [row col]=size(b); %r=input(‘enter bitval : ‘); for x=1:row for y=1:col c=dec2bin(b(x,y),8); d=c(1); w1(x,y)=double(d);… Read More »BIT PLANE SLICING
This program displays following details for a given image 1. Jet Colormap Image 2. Background Estimation 3. Flattened Background Removal 4. Image Thresholding 5. Connected… Read More »Plot the Image details using histogram
% morphdemo.m % demonstration of morphological operators clc; clear all; close all; load p64int.txt; % 64 x 64 gray scale image V=[80:168]; x=ones(size(p64int))-ismember(p64int,V); figure(1),clf, subplot(231),imagesc(x),colormap(‘gray’)… Read More »Morphological Operation 1) Opening 2)Closing 3) Erosion 4) Dilation 5) Boundary Extraction
1. IDEAL LPF: clc; close all; clear all; a=imread(‘circuit.tif’); % reading an image X a=double(a); c=size(a); N=c(1); D0=input(‘Enter the cut-off… Read More »Image Enhancement in Frequency Domain (i) Gaussian Low Pass Filter (ii) Butterworth Low Pass Filter (iii) Ideal High Pass Filter (iv) Ideal Low Pass Filter
Applying DFT on image matrix & Performing the IDFT Code clc;close all;sum=0;a=imread(‘D:final printdip speechimages8.jpg’); b=a;M=50;N=50; for x=1:50 for y=1:50 … Read More »Applying DFT on image matrix & Performing the IDFT
MATLAB Program for Boundary Detection Code close all;clear all;BW1 = imread(‘DSC08386.jpg’); subplot(1,2,1);imshow(BW1)title(‘original image’); SE = strel(‘arbitrary’,eye(5));BW2 = imerode(BW1,SE);subplot(1,2,2);imshow(BW1 – BW2)title(‘Boundary Extracted’); Output of Boundry Detection
Morphological Operations on Image A) OpeningB) Closing C) Morphological GradientD) Top-hat Transformation (A) Opening Code Clc;clear all;close all; a=imread(‘D:final printdip speechimages5.jpg’); se=[1 1 1… Read More »Morphological Operations on Image
MATLAB Program to apply Histogram Equalization on image Code clear allclcI=imread(‘cameraman.tif’);I=double(I);maximum_value=max((max(I)));[row col]=size(I);c=row*col;h=zeros(1,300);z=zeros(1,300);for n=1:rowfor m=1:colif I(n,m) == 0I(n,m)=1;endendendfor n=1:rowfor m=1:colt = I(n,m);h(t) = h(t) + 1;endendpdf… Read More »MATLAB Program to apply Histogram Equalization on image
MATLAB Program to plot a Histogram Code clear all;clc;close all;a=imread(‘E:Danieldaniel-radcliffe-20071006-321486.jpg’);b=zeros(1,256);[row,col]=size(a); for x=1:1:row for y=1:1:col if a(x,y)<1 … Read More »MATLAB Program to plot a Histogram