Type in MATLAB code
Figure5.07(a)
Figure5.07(b)
CODE:
K = imread('C:\lena.bmp');
subplot(2,5,1),imshow(K),title('original image');
I=imnoise(K,'gaussian');
subplot(2,5,6),imshow(I),title('Image with gaussian noise');
%contrahormonic filter
data=im2double(I);
Q=-2;
sumn=[];
sumd=[];
pixln=0;
pixld=0;
ro=512;
col=512;
for i=1:ro;
for j=1:col;
for m=-1:1;
for n=-1:1;
if (i+m>0 && i+m<ro && j+n>0 && j+n<col && ... % To keep indices in limit
1+m>0 && 1+m<ro && ...
1+n>0 && 1+n<col)
pixl1=(data(i+m,j+n)).^(Q+1);
% Application of Formula
pixl2= (data(i+m,j+n)).^Q;
pixln=pixln+pixl1; % Application of Summation
pixld=pixld+pixl2;
end
end
end
reformedimage(i,j)=(pixln/pixld);
pixln=0;
pixld=0;
end
end
subplot(3,5,5),imshow(reformedimage),title('contra-harmonic mean (Q=-ve)');
data=im2double(I);
Q=2;
sumn=[];
sumd=[];
pixln=0;
pixld=0;
ro=512;
col=512;
for i=1:ro;
for j=1:col;
for m=-1:1;
for n=-1:1;
if (i+m>0 && i+m<ro && j+n>0 && j+n<col && ... % To keep indices in limit
1+m>0 && 1+m<ro && ...
1+n>0 && 1+n<col)
pixl1=(data(i+m,j+n)).^(Q+1); % Application of Formula
pixl2= (data(i+m,j+n)).^Q;
pixln=pixln+pixl1; % Application of Summation
pixld=pixld+pixl2;
end
end
end
reformedimage(i,j)=(pixln/pixld);
pixln=0;
pixld=0;
end
end
subplot(3,5,7),imshow(reformedimage),title('contra-harmonic mean (Q=+ve)');
Type in MATLAB code Figure5.07(a) Figure5.07(b) 1 Download from the class web page the image Fig5.07(b)jpg...
LMS project Using the notes discussed in class: Implementing the LMS Algorithm First generate some signals clear all close al1: Generate signals for testing the LMS Algorithm 1000 Fs Sampling frequency Sample time 1/Fs 10000: = L Length of signal S Time vector (0:L-1) *T ; Sum of a 50 Hz sinusoid and a 120 Hz sinusoid 0.7 sin (2*pi*50*t); inuside X d+ 10 randn (size (t)); Sinusoids 5O0000000L plus noise fiqure (1) plot (Fs*t (1:150),x (1:1500)) title('Signal Corrupted with...
LMS project Using the notes discussed in class: Implementing the LMS Algorithm First generate some signals clear all close al1: Generate signals for testing the LMS Algorithm 1000 Fs Sampling frequency Sample time 1/Fs 10000: = L Length of signal S Time vector (0:L-1) *T ; Sum of a 50 Hz sinusoid and a 120 Hz sinusoid 0.7 sin (2*pi*50*t); inuside X d+ 10 randn (size (t)); Sinusoids 5O0000000L plus noise fiqure (1) plot (Fs*t (1:150),x (1:1500)) title('Signal Corrupted with...
ER Modeling: Assignment In order to receive credit for this assignment, you must draw your ER model using a compute program and then turn in on the blackboard. Your ER model should include all of the necessary entity sets, relationships and keys, as well a weak entities and superclass/subclass relationships, if needed. A company decides to implement a software to monitor its employees' web surfing, and stores history of each employee's surfing in a database, as well as all of...
Code for the movies page: <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Daniel's Movie Page</title> </head> <body> <a href="hobbies.html">Hobbies</a> <h1>Movies and Actors</h1> <ol> <li class="ol-list1">Gravity</li> <li>Avenger</li> <li>Marshal</li> <li>Interstellar</li> <li>Dark Knight</li> <li>Superman</li> </ol> <ul> <li class="ul-list1">Robet Downey jr.</li> <li>Sharuk Khan</li> <li>Ranbir Kapoor</li> <li>Sidhhart Malhotra</li> <li>Angela Joli</li> <li>Leonardo DiCaprio/li> </ul> <h2>Favorite Movie</h2> <p> <b>Gravity:</b> The movie portrayed what happens to an astronaut if he/she is pushed away from spaceship.It was terrifying how much...
Question 1. Show the correct jQuery code for each of the following UI tasks: a) Select all elements with class="name" and give each of them a unique id in the form "name-0", "name-1", "name-2"… and so on b) Anytime an element with class="trackClick" is clicked (using the "click" event), output the text "element clicked" to the console (using console.log()). This must work for all present and future elements with the class "trackClick". Question 2. Assume that there is only one...
Hi, trying to arrange the fourth photo under media tab for a mock web page. I'm trying to figure out how to get the 'planned stadium' photo to be shifted to the right and parallel to the 'Ground View 2018' picture. Below is the attached code and thanks for your help: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta name="author" content="Ian Kusnadi" /> <title>Tottenham Spurs Fan Page</title> </head> <style type="text/css"> a:link...
[Continued] Your Course class should have: 1)a getter for the course 'code', so that it is read-only; 2)a getter and setter for the lecturer attribute, so that it is readable and writable; 3)a constructor that creates the associations shown in the UML diagram; 4)an enrolStudent method that adds a given Student object into the 'enrolled' set; 5)a withdrawStudent method that removes a given Student object from the 'enrolled' set and returns true if the student was successfully found and removed,...
c++ solve each task please O https//maryash.github.io/135/labs/lab 08 html Since the program should work for all input images that fit into the array, don't Thard-code" the cat picture dimensions into the program, use variables w and h instead Task D. One-pixethick frame Program frame.cpp Same as the previous task, but it should be a frame exactly one pixel thick Example: Task E. Scale 200% Program scale.cpp Scale the original picture to 200% of its size. It can be done by...
Problems: Develop a web page that allows a user to try out different text and background color combinations by clicking buttons. Use Javascript to implement the functionalities. Below are two screen shots of the working application. Clicking the buttons at the bottom changes either the foreground color or the background color. The following descriptions are about the details. Specifically, you have to implement: An HTML file should include the following features (3 points) Some texts (Anything you like) Put the...
Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture i sent is the first page 5. Write and save a function Sphere Area that accepts Radius as input argument, and returns SurfaceArea (4 tt r) as output argument. Paste the function code below. Paste code here 6. Validate your Sphere Area function from the command line, checking the results against hand calculations. Paste the command line code and results below. 7. Design an...