close all;clear all;clc
%%================================================================================================
I=imread('img.jpg'); % Read the Image
figure(1),imshow(I); % display the Original Image
figure(2),imhist(I); % display the Histogram
%%=================================================================================================
n=imhist(I); % Compute the histogram
N=sum(n); % sum the values of all the histogram values
max=0; %initialize maximum to zero
%%================================================================================================
for i=1:256
P(i)=n(i)/N; %Computing the probability of each intensity
level
end
%%================================================================================================
for T=2:255 % step through all thresholds from 2 to 255
w0=sum(P(1:T)); % Probability of class 1 (separated by
threshold)
w1=sum(P(T+1:256)); %probability of class2 (separated by
threshold)
u0=dot([0:T-1],P(1:T))/w0; % class mean u0
u1=dot([T:255],P(T+1:256))/w1; % class mean u1
sigma=w0*w1*((u1-u0)^2); % compute sigma i.e variance(between
class)
if sigma>max % compare sigma with maximum
max=sigma; % update the value of max i.e max=sigma
threshold=T-1; % desired threshold corresponds to maximum variance
of between class
end
end
%%====================================================================================================
bw=im2bw(I,threshold/255); % Convert to Binary Image
figure(3),imshow(bw); % Display the Binary Image
%%====================================================================================================
write a matlab code to apply Otsu's segmentation after getting infromtion from function imread
write a matlab code on image using genatic
segmentation on a car number plate and make segemnt of every word
in image of number plate
see the image above and implement code on above picture and make
segments of of image
A 128 HB 61
Part a: Write a Matlab code that generate Exponential Function. Part b Write a Matlab code that generate sinusoidal Function. Part c Write a Matlab code that generate Unit Ramp delay (shift) function
MATLAB Code:
?MATLAB Code:
Write a function that converts a given letter grade it will print its equivalence in numerical scale. For example if the user enters A, then your function should print a message stating that the grade must be between 90 and 100. B is between 80 and 89, etc. Everything under 60 is F. Use the switch-case function. Use fprintf to display the results on the screen.
Write a code in matlab for AWGN () function. (please comment each line of the code to know what each line does)
write a matlab code
Write a MATLAB function to check the stability of a digital filter described by its coefficients. Syntax: stable (b, a); where b and a are the system's forward and backward coefficient. Hint: The roots() function might be useful. Returned value: None. Operation: Displays either 'Stable' or 'Not Stable' message and plots the z-plane. Test with Case#1: y(n)= 2x (n) +x (n-1) +0.4y (n-1) - 0.6y (n-2) Case#2: y(n)= x(n) +0.5x (n-1) +2x (n-2)- y(n-1) +y (n-2)...
Part A: Write a generic Matlab code that generates delayed (shifted) Unit Impulse function. Part B: Write a generic Matlab code that generates delayed (shifted) Unit step function. Part C: Write a generic Matlab code that generate delayed (shifted) Unit ramp function.
described above. (6 pts.) l Write a Matlab code to apply the high-boost filter to a medical image. (2 pt.)
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?
Consider the function f(x) = x3 – 2x2 + x Write the MATLAB code in the format of "script file" using "Regula Falsi Method" with the estimated relative error of 0.000001 and upload the script file. Direction: 1) Please submit"script file", NOT "function file". If you submit a function file, I will assign ZERO score. 2) You can find some matlab code for the Regula Falsi Method on a web or some books. You can use any code you can...
Matlab
a) Write a MATLAB code that takes the grade letters from the user and provide him/her with the GPA for that semester Enter your grades (letters): AABBC (input) Your GPA is 3.2 output) b) Write a Matlab user defined function to that takes a letter grade and return a numeric grade as shown in the table below. Any other value should give an error message (Invalid Grade). You function name should be Letter2Grade Use the following information to calculate...