Back to Browse

Patterns and Pattern Classes in Object Recognition for DIP and its implementation in MATLAB

8.7K views
Sep 20, 2023
9:34

Video lecture series on Digital Image Processing, Lecture: 72, Patterns and Pattern Classes in Object Recognition for DIP and its implementation in MATLAB Which are different object recognition methods? Explain numeric pattern vectors descriptors? Explain string descriptors? Explain tree descriptors. Implementation of detection of square within the binary image in MATLAB Link to download ppts/lecture notes: https://drive.google.com/drive/folders/1AtR1eq6ZvQf-5vjXEMUPXNj2S0d9rAMZ?usp=share_link #DIP #DIPwithMATLAB #DigitalImageProcessingUsingMATLAB #digitalimageprocessing #digitalimageprocessinglecturesin4K #studywithdrdafda The MATLAB code used in the video is given below: % MATLAB program that shows basic image processing % techniques to detect the square within the binary image. clear all; close all; clc; % Create a blank binary image imageSize = 200; % Adjust as needed binaryImage = zeros(imageSize, imageSize); % Create shapes (circle, square, and triangle) radius = 20; centerX = 50; centerY = 100; % Add a circle to the binary image [x, y] = meshgrid(1:imageSize, 1:imageSize); circle = ((x - centerX).^2 + (y - centerY).^2 (less than or equal to) radius^2); % Add a square to the binary image squareSize = 40; squareX = 120; squareY = 80; square = (x (greater than or equal to) squareX & x (less than or equal to) squareX + squareSize & y (greater than or equal to) squareY & y (less than or equal to) squareY + squareSize); % Add a triangle to the binary image triangleX = [170, 190, 210]; triangleY = [120, 80, 120]; triangle = roipoly(binaryImage, triangleX, triangleY); % Combine the shapes to create the final binary image binaryImage = binaryImage | circle | square | triangle; % Display the original binary image subplot(1, 2, 1); imshow(binaryImage); title('Original Binary Image'); % Detect the square in the binary image labeledImage = bwlabel(binaryImage); stats = regionprops(labeledImage, 'Area', 'BoundingBox'); areas = [stats.Area]; [~, squareIndex] = max(areas); % Extract the square and create a binary image for it squareBinary = ismember(labeledImage, squareIndex); % Display the detected square binary image subplot(1, 2, 2); imshow(squareBinary); title('Detected Square'); % Display the side-by-side comparison sgtitle('Original Binary Image and Detected Square');

Download

0 formats

No download links available.

Patterns and Pattern Classes in Object Recognition for DIP and its implementation in MATLAB | NatokHD