MATLAB THEORY QUESTION
Write a detailed report about Edge detection, then sobel edge detector in Least squares fitting for linear line detection, explaining the MATLAB Functions to used.
Edge detection is an important task in image processing based applications. There are numerous cases where edges are required. For example, in every pattern recognition task, edges are required to get the shape perimeter and size estimation. Edges gives a separation between regions of different properties in an image like brightness, contrast, texture etc. Edge detection algorithms are primarily based upon the image intensity derivative. At edge points, there is sharp change in intensity as one enters from one region to other region. Normally when moving within the same region, the image intensity is constant and thereby, the image intensity derivative is also zero, however, when there is sudden rise in image intensity derivative, the edge point occurs. Edge detection gives about the shape information. There are different kernels that are used in image processing to detect the edges: These are:
Sobel Operator
Sobel Operator is a 3x3 kernel used to extract the boundary of an object in binary image. The kernel is given by:
Sobel = [-1, -2, -1 ; 0, 0, 0 ; 1, 2, 1]
Matlab Code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all,
clear all,
clc,
ProjectPath = pwd;
ImagePath = strcat(ProjectPath,'\CameraMan.jpg');
Orig = imread(ImagePath);
Gray = rgb2gray(Orig);
subplot(2,4,1); imshow(Gray); title('Original Image');
BW = edge(Gray,'sobel');subplot(2,4,2); imshow(BW); title('Edge Detection using SOBEL');
BW = edge(Gray,'prewitt');subplot(2,4,3); imshow(BW); title('Edge Detection using PREITT');
BW = edge(Gray,'roberts');subplot(2,4,4); imshow(BW); title('Edge Detection using ROBERTS');
BW = edge(Gray,'log');subplot(2,4,5); imshow(BW); title('Edge Detection using LOG');
BW = edge(Gray,'zerocross');subplot(2,4,6); imshow(BW); title('Edge Detection using ZERO CROSS');
BW = edge(Gray,'canny');subplot(2,4,7); imshow(BW); title('Edge Detection using CANNY');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MATLAB THEORY QUESTION Write a detailed report about Edge detection, then sobel edge detector in Least squares fitting f...
MATLAB QUESTION Implement Least squares fitting for linear line detection in MATLAB. Using Any input image, After detection you need to plot output line on the input image used (you can use MATLAB functions for this purpose) Hint: find an appropriate input image and apply edge detection first. Then use MATLAB edge detector function and Implement Sobel edge detector. Write a report about it (written codes need to be included as a text as well).
1. What is Least squares fitting for linear line detection? 2. What is Edge Detection in Least squares fitting for linear line detection? 3. What is Sobel Edge Detection in Least squares fitting for linear line detection?
Given the data points (xi , yi), with xi 0 1.2 2.3 3.5 4 yi 3.5 1.3 -0.7 0.5 2.7 find and plot (using MATLAB) the least-squares basis functions and the resulting least-squares fitting functions together with the given data points for the case of a) a linear monomial basis p(x)= {1 x}T . b) a quadratic monomial basis p(x)= {1 x x2}T . c) a trigonometric basis p(x)= {1 cosx sinx}T Moreover, determine the coefficients a by the Moore-Penrose...
please write down detailed solution (do not copy 3. [Polynomial interpolation versus least squares fitting, 10pts] Recall how Q7 in HW3 required you to find the cubic best fit to six given data points. This led to a least squares optimization problem. We are given the same points as in HW3: i 01 | 2 | 3 | 4 | 5 X 0.0 0.5 1.0 1.5 2.0 2.5 Y 0.0 0.20 0.27 0.30 0.32 0.33 (a) Write down the least...
Hello, I need help with the following question in MATLAB for digital image processing, thank you for your help in advance Convolution operations using mask are commonly applied in image enhancement. Even edge detection is based on convolution with a specially designed mask. The assignment here is to write your own function for convolution and test it in edge detection. 1. Write a function in Matlab as follows: function Img2 Convolution(Img, mask); %Input: Img is the original image data matrix,...
Question 3 In lecture, we stated that the estimate of ß in Weight Least Squares as: BWLS = (XTWX)-1xTWY Derive BW when p = 1. (It should have a form similar to simple linear regression.) Hint: Notice that we can write a weighted average as: Tw Zi=1 Hint: You may need to use weighted analogues of the sums of squares identities that we have used; you should derive (or expand) the following w2 (x - w)-w) i-1 i-1 W Question...
Matlab Question. Please be detailed Write a user-defined function that performs LU decomposition (using Gauss Elimination without partial pivoting) of a square matrix. Do not use built-in MATLAB functions lu( ), inv(), \, linsolve(). Matrices (in [A]*{x}={B} form) A=[15 -3 -1; -3 15 -6; -4 -1 12] B=[3800; 1200; 2350] Given code lines: function[L,U]=myLUFact_username(A) [m,n]=size(A); %numbers of rows/comlumns of A assert(m==n, 'A should be a square matrix');
Upload an image of your choice into Matlab and apply several different edge detectors to locate object(s) of interest. Think carefully about the type of image which may respond well. Investigate the effect of varying edge filter parameters. Write a short report (~300 words) which includes the original image, the filtered images and describes the parameters used. Explain the choice of input image and how the edge detectors perform differently. Which is the best choice for your image and why
Linear Algebra Question: Least Squares {(0, b), (1, b2),, , . (k, bk)) İs a set of k points in R2. Show that in the horizontal line 5. Suppose P of best fit f(x) A, A is the average of the numbers b1,. b {(0, b), (1, b2),, , . (k, bk)) İs a set of k points in R2. Show that in the horizontal line 5. Suppose P of best fit f(x) A, A is the average of the...
please chooose all corrct answers to the question( it could be more than one corrct answers):- Q1) What are the best practices for building out good unit tests? - You do not need an assert statement for each edge case. - Write a test function to check for implementation given all parameters. - Have multiple assert statements to test for all edge cases. - Think about all edge cases before you write the function. - Run a test function to...