MSc CS
Image Enhancement Statistical Filters (i) Mean and Median Filters (ii) Max-min and Min-max Filters
clc;clear all;close all; % ========================================= % Mean Filter % ========================================= f = imread(‘saturn.tif’); subplot(2,2,1); imshow(f); title(‘Original Image’); m = mean2(double(f)); g = imfilter(f,m); k =… Read More »Image Enhancement Statistical Filters (i) Mean and Median Filters (ii) Max-min and Min-max Filters
Lossless Image Compression , Error Free Compression
clc;clear all;close all; infile = ‘car.jpg’; % 3D Image if (exist(infile)==2) a = imread(infile); subplot(1,2,1); imshow(a); title(‘Input image’); else warndlg(‘The… Read More »Lossless Image Compression , Error Free Compression
Lossy Image Compression
clc; clear all; close all; function out_put = btc_image(in_put,block_size) X=imread(‘rice.png’); Y=imfinfo(‘rice.png’); K=input(‘Enter the block size’); X1=double(X); y1=size(X); n=y1(1); m=y1(2); k=1;l=1; if (Y.ColorType==’grayscale’) % IMAGE ENCODING… Read More »Lossy Image Compression
HISTOGRAM STRETCHING
% **** HISTOGRAM STRETCHING **** a=imread(‘old imagelc.jpg’); aa=double(a); [row col]=size(aa); h=zeros(1,300); rmax=(max(max(aa))); rmin=(min(min(aa))); slope=255/(rmax-rmin); smin=0; aa=aa+1; for x=1:row for y=1:col c(x,y)=slope*(aa(x,y)-rmin)+smin; end… Read More »HISTOGRAM STRETCHING
HOMOMORPHIC FILTERING
% **** HOMOMORPHIC FILTERING **** a=imread(‘Ranch house.jpg’); r1=double(a); [row col]=size(r1); b=r1; D0=input(‘enter cut off : ‘); Yh=input(‘enter the value of Yh :’); Yl=input(‘enter the value… Read More »HOMOMORPHIC FILTERING
Wavelet Analysis
clc;clear all;close all; load sumsin; s = sumsin; figure (‘Name’,’Input 1-D Signusoidal Signal’); plot(s); figure (‘Name’,’Decomposition’); [c,l] = wavedec(s,4,’bior1.1′); subplot(2,2,1); plot(c); title(‘Function at resolution level… Read More »Wavelet Analysis
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
% **** 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
Plot the Image details using histogram
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