how I can make Average filter without built-in function for image
on matlab
ANSWER:
MATLAB CODE:
clc;
clear all;
close all;
a=imread('cameraman.tif');
figure, imshow(a)
an=imnoise(a,'gaussian');
[m,n]=size(an);
figure, imshow(uint8(an))
b=input('Enter Averaging Mask size: ');
z=ones(b);
[p,q]=size(z);
w=1:p;
x=round(median(w));
anz=zeros(m+2*(x-1),n+2*(x-1));
for i=x:(m+(x-1))
for j=x:(n+(x-1))
anz(i,j)=an(i-(x-1),j-(x-1));
end
end
figure, imshow(uint8(anz))
sum=0;
x=0;
y=0;
for i=1:m
for j=1:n
for k=1:p
for l=1:q
sum= sum+anz(i+x,j+y)*z(k,l);
y=y+1;
end
y=0;
x=x+1;
end
x=0;
ans(i,j)=(1/(p*q))*(sum);
sum=0;
end
end
figure, imshow(uint8(ans))
----------------------------------------------------------------------------------------------------------
Run the code
will ask you to input the value of averaging mask.
enter 3 if you want to use 3*3
enter 5 if you want to use 5*5
how I can make Average filter without built-in function for image on matlab
I need help creating a Mean Filter for Matlab 3 by 3. ( I need the Actual Matlab WORking code) It's dude tomorrow, final project worth 40% of my grade. It can not use Matlab Function, must be user define fuction. So far what I have is, I am not sure how to start this, I was told it requires 2 for loops A= imread('lena_256.tif'); % Reads the image in matrix M = ones(3,3)/9; % Creates a matrix of 3...
Matlab task:Realizing radon transform without using built-in matlab fuction
DO NOT use the built in function ”histeq” to do the histogram equalization. Capture an image with low contrast. Write a Matlab program to do histogram equalization and process your image.
Hi Im a matlab beginner. Would you plz solve my problem? Thanks! Matlab) How to make a code about interpolation?(without using interp1,imresize..etc the internal function) I=[1 10 25 432 28 294 70 80] How to make the I2 whose length is 11 with linear interpolation?(Without matlab function such as imresize!!)
Your assignment it to write code in matlab that takes an image and remove shadow from the image. Write the whole code yourself, without using any built-in function. would anyone please help me?
Hi Im a matlab beginner. Would you plz solve my problem? Thanks! Matlab) How to make a code about interpolation?(without using interp1,imresize..etc the internal function) I=[1 10 25 432 28 294 70 80] How to make the I2 whose length is 11 with linear interpolation?(Without matlab function such as imresize!!)
write a matlab code for histogram and histogram equallization code without built in commands
How can I make my own function for rbinom(n, size, prob) in R. So, basically I want to build my own rbinom function that gives me the same result as rbinom that's built in R software.
How can i design FIR and IIR filters in matlab without using tools ? Any diagram to follow or any schematic for the types of filters?
The image is .mat file in matlab i just need a program to find its frequency please. Write a (short) Matlab program to find the frequency of each grey level in your personal image Sxx 16. Hence (by hand), derive the Huffman code for this image. What is the average number of bits per pixel for this Huffman code? How close to optimal is the Huffman code? In terms of average word length, how does the Huffman code compare with...