Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Active contour segmentation
1. Image Segmentation
Active Contours
By:- Abhishek Tiwari
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB
2. Introduction
Active contours, also known as snakes, is a framework for getting object
outline contour
The framework minimizes an energy associated to the current contour as a
sum of internal and external energies
External energy expression is derived such that it is minimum at object boundary
Internal energy regulates the shape of contour, controlling its curvature, shape
regularity, etc.
More energy terms can be introduced as per user application such as initializing
multiple snakes and defining attraction energy between them, etc.
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB
3. Advantages & Limitations
Advantages of snakes
Autonomous and self-adapting in their search for minimal energy
Can track moving objects in temporal as well as spatial direction
Custom energies can be defined to enhance contour evolution
Limitations of snakes
Can get stuck in local minima states
Can miss minute features in the process of minimizing whole contour energy
May require higher computation time
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB
4. Contour Evolution Example
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB
5. Contour Evolution Example
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB
6. Our Implementation
clear all; close all; clc;
% Read an input image
A = imread('coins1.jpg');
% Convert the image to grayscale
A = rgb2gray(A);
% Generate mask for active contour initialization
mask = zeros(size(A));
mask(10:end-10,10:end-10) = 1;
% Segment the image using active contour method
bw = activecontour(A, mask, 300);
% Display original and segmented images
figure, subplot(1, 2, 1), imshow(A), title('Original image');
subplot(1, 2, 2), imshow(bw), title('Segmented image');
7. Results
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB
8. Thank You
For my complete course on Image processing using MATLAB ,
visit https://www.udemy.com/matlabipt/?couponCode=PROMO_MATLAB