close all,
clear all,
clc,
ProjectPath = pwd;
ROW = 128; COL=128;
ImagePath = strcat(ProjectPath,'\InputImg.jpg');
Orig = imread(ImagePath);
Gray = rgb2gray(Orig);
subplot(1,3,1); imshow(Gray); title('Original Image');
Mask = [-1,-1,-1;-1,9,-1;-1,-1,-1];
Mask_1_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,2); imshow(Mask_1_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
Mask = [0,-1,0;-1,5,-1;0,-1,0];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,3); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
figure,
A=0;
subplot(1,3,1); imshow(Gray); title('Original Image, A=0');
Mask = [0,-1,0;-1,A+4,-1;0,-1,0];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,2); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
Mask = [-1,-1,-1;-1,A+8,-1;-1,-1,-1];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,3); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
figure,
A=1;
subplot(1,3,1); imshow(Gray); title('Original Image - A=1');
Mask = [0,-1,0;-1,A+4,-1;0,-1,0];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,2); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
Mask = [-1,-1,-1;-1,A+8,-1;-1,-1,-1];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,3); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
figure,
subplot(1,3,1); imshow(Gray); title('Original Image, A=2');
A=2;
Mask = [0,-1,0;-1,A+4,-1;0,-1,0];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,2); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
Mask = [-1,-1,-1;-1,A+8,-1;-1,-1,-1];
Mask_2_Filter_Image = imfilter(Gray,Mask);
subplot(1,3,3); imshow(Mask_2_Filter_Image); str = strcat('Filter
Image Mask',num2str(Mask)); title(str);
have to implement a matalb code using the figure0121(a) & have to show the results of modified one for each simulat...
3.9 Assuming continuous values, show by example that it is possible to have a case in which the transformation function given in Eq. (3.3-4) satisfies conditions (a) and (b) in Section 3.3.1, but its inverse may fail to be single valued. . Write a MatLab program to perform spatial filtcring of an imags (see Sacticn 3.635) reganding eplementation) You can fix the size of the spatial mask a 3 x3 but the ceefliacicnts need to be variables that can be...
Implement (i) filtering/denoising with a mask, (ii) a thresholding algorithm using the following logic: **A good threshold value is at a value where the number connected regions in an image do not change as much.** Thus your thresholding algorithm steps are: 1. For each candidate threshold value (from 0 to 255), calculate the number of connected regions in your binary image (use MATLAB's builtin code for number of connect regions) 2. Based on these values of number of connected regions,...
Write a VHDL code to implement the circuit function described below. 6. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal. DIR: Direction of the display sequence, '1 CLK: clock pulse for the display sequence RST: reset the display counter. forward, '0' - reverse. Student ID: 8480594 Vdd ABCDE F G DIR CLK RST For example, if...
Write a VHDL code to implement the circuit function described below. 6. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal. DIR: Direction of the display sequence, '1 CLK: clock pulse for the display sequence RST: reset the display counter. forward, '0' - reverse. Student ID: 8243416 Vdd ABCDE F G DIR CLK RST For example, if...
6. Write a VHDL code to implement the circuit function described below. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal DIR: Direction of the display sequence, '1'forward, '0'- reverse. CLK: clock pulse for the display sequence. RST: reset the display counter Student ID-8860729 Vdd ABC|DEFG DIR CLK RST For example, if your ID number is 1234567,...
Implement the function R = ab'h' + bch' + eg'h + fgh using *only* 2-to-1 multiplexers. Use the 2-to-1 multiplexer VHDL description from Problem 1 as a component to write VHDL code for the circuit design of function R. Perform CAD simulation of your design. (60)
Write a VHDL code to implement the circuit function described below. Student Id : 8123405 Last 4 digits : 3405 6. Write a VHDL code to implement the circuit function described below The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal DIR: Direction of the display sequence, T-forward, Ό'-reverse. CLK: clock pulse for the display sequence. RST:...
Write MIPS code for each of the following instructions, Your assembly should implement the C code directly – i.e.,do not ’optimize’ the C code to change the order of operations or reduce computations. Use commands only like add, sub, lw, sw, immediate Part 1. x = 3-13*x; Do not use multiply. One way of doing the multiply without a multiply instruction is by using many add instructions (x+x+...+x). For this problem, you should do it with fewer additions. Hint: We...
Write a code in java by considering the following conditions. Task :- 1. Design, implement and test a class RationalNumber. 2. Your class must have a constructor. 3. Your class must implement an interface Number that has methods to perform different operations on a rational numbers (addition, subtraction, reciprocal, multiplication and division). 4. Also design some methods to check whether two rational numbers are same or not (consider numbers are in reduced form). 5. You must develop an appropriate GUI...
Write code to implement the following function: /* * Generate mask indicating leftmost 1 in x. Assume w=32. * For example 0xFF00 -> 0x8000, and 0x6600 --> 0x4000. * If x = 0,then return 0. */ int leftmost_one(unsigned x); Your function should follow the above bit-level integer coding rules, except that you may assume that data type int has w=32 bits. Your code should contain a total of at most 15 arithmetic, bit-wise, and logical operations. In C++ and has...