Tutorial by Examples

>> img = imread('football.jpg'); Use imread to read image files into a matrix in MATLAB. Once you imread an image, it is stored as an ND-array in memory: >> size(img) ans = 256 320 3 The image 'football.jpg' has 256 rows and 320 columns and it has 3 color channels: Red, ...
As long as you have an internet connection, you can read images from an hyperlink I=imread('https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png');
Like for 1D signals, it's possible to filter images by applying a Fourier transformation, multiplying with a filter in the frequency domain, and transforming back into the space domain. Here is how you can apply high- or low-pass filters to an image with Matlab: Let image be the original, unfiltere...
Let's say you have an image rgbImg, e.g., read in using imread. >> rgbImg = imread('pears.png'); >> figure, imshow(rgbImg), title('Original Image') Use fspecial to create a 2D filter: >> h = fspecial('disk', 7); >> figure, imshow(h, []), title('Filter') Use imfi...
Starting with a binary image, bwImg, which contains a number of connected objects. >> bwImg = imread('blobs.png'); >> figure, imshow(bwImg), title('Binary Image') To measure properties (e.g., area, centroid, etc) of every object in the image, use regionprops: >> stats = reg...

Page 1 of 1