69
Edge Detection and Segmentation of Images
(a)
(b)
FIGURE 4.5 (a) Original image and (b) Canny edge-detected image. (Courtesy of Andre
D’Avila, MD, Heart Institute (InCor), University of Sao Paulo, Medical School, Sao Paulo,
Brazil.)
edges, excessively large thresholds can miss the true edges. At this step, the surviving edge pixels are connected to each other to form complete edges.
As mentioned earlier, there are many varieties of Canny edge detection methods.
In this chapter, we focus on using MATLAB for Canny edge detection.
Example 4.4
In this example, the heart image used in the previous example is edge detected
using Canny edge detection method. The option “canny” in “edge” command
identifies Canny method. The MATLAB codes are as follows:
I = imread(‘image.jpg’);
I = rgb2gray(I);
Imshow(I);
J = edge(I,‘canny’);
Figure,
Imshow(J);
The results shown in Figure 4.5 indicate the strength and capabilities of Canny
edge detectors. As can be seen, the performance of this edge detection method is
almost comparable with that of Laplacian of Gaussian. This is the reason that in the
majority of medical image processing applications either Laplacian of Gaussian or
Canny method is used for the standard edge detection step.
4.3 IMAGE SEGMENTATION
In almost all biomedical image processing applications, it is necessary to separate
different regions and objects in an image. In fact, image segmentation is considered as the most sensitive step in many medial image processing applications. For
instance, in processing of cytological samples, we need to segment an image into
regions corresponding to nuclei, cytoplasm, and background pixels. The main techniques for image segmentation are introduced in the following sections.
Edge Detection and Segmentation of Images
(a)
(b)
FIGURE 4.5 (a) Original image and (b) Canny edge-detected image. (Courtesy of Andre
D’Avila, MD, Heart Institute (InCor), University of Sao Paulo, Medical School, Sao Paulo,
Brazil.)
edges, excessively large thresholds can miss the true edges. At this step, the surviving edge pixels are connected to each other to form complete edges.
As mentioned earlier, there are many varieties of Canny edge detection methods.
In this chapter, we focus on using MATLAB for Canny edge detection.
Example 4.4
In this example, the heart image used in the previous example is edge detected
using Canny edge detection method. The option “canny” in “edge” command
identifies Canny method. The MATLAB codes are as follows:
I = imread(‘image.jpg’);
I = rgb2gray(I);
Imshow(I);
J = edge(I,‘canny’);
Figure,
Imshow(J);
The results shown in Figure 4.5 indicate the strength and capabilities of Canny
edge detectors. As can be seen, the performance of this edge detection method is
almost comparable with that of Laplacian of Gaussian. This is the reason that in the
majority of medical image processing applications either Laplacian of Gaussian or
Canny method is used for the standard edge detection step.
4.3 IMAGE SEGMENTATION
In almost all biomedical image processing applications, it is necessary to separate
different regions and objects in an image. In fact, image segmentation is considered as the most sensitive step in many medial image processing applications. For
instance, in processing of cytological samples, we need to segment an image into
regions corresponding to nuclei, cytoplasm, and background pixels. The main techniques for image segmentation are introduced in the following sections.
