–1
–1
–1
2
2
2
–1
–1
–1
–1
2
–1
–1
2
–1
–1
2
–1
–1
–1
2
–1
2
–1
2
–1
–1
2
–1
–1
–1
2
–1
–1
–1
2
72
Biomedical Signal and Image Processing
FIGURE 4.8 Line detection masks. From left to right: horizontal lines, vertical lines, rising
lines with 45° angle, and falling lines with −45° angle.
In practical application, for each single point in the image, the masks for all four
directions are applied. Then, through a thresholding on the response for each point,
the algorithm decides whether the point belongs to a line in a specific direction or
not. Often, only the line with maximum mask response will be chosen as the line the
point belongs to.
Example 4.6
In this example, we illustrate the effects of the line detection masks introduced in
Figure 4.8 on a satellite image. In MATLAB, code for this example is shown as follows. In the first few lines of the code, we define the first three masks of Figure 4.8
and then we apply these masks to the original image.
I = imread(‘18.jpg’);

I = rgb2gray(I);

Hh = [−1 −1 −1;2 2 2;−1 −1 −1];

Hv = [−1 2 −1;−1 2 −1;−1 2 −1];

H45 = [−1 −1 2;−1 2 −1;2 −1 −1];

Hlinedetected = imfilter(I,Hh);

Vlinedetected = imfilter(I,Hv);

Line45detected = imfilter(I,H45);

Imshow(I);

Figure,

Imshow(Hlinedetected);

Figure,

Imshow(Vlinedetected);

Figure,

Imshow(Line45detected);

Figure 4.9 shows an image of the vascular system and images after line detection.
It can be seen that in the image of Figure 4.9b, most of the horizontal lines representing the horizontally oriented blood vessels have been detected. Similarly, most
of the vertical lines have been detected in the image of Figure 4.9c. The image in
Figure 4.9d extracts the diagonal lines from the original image. There is nothing
special about the 3 × 3 size of the defined masks, and the masks can be extended
to larger masks such as 5 × 5 and 7 × 7 line detection masks.
4.3.3 REGION AND OBJECT SEGMENTATION
Previously, we discussed the detection of points and lines in an image. Next, we
focus on processing techniques to distinguish and detect regions representing different objects. These methods are particularly important for biomedical image
Précédent

- 99/412

Suivant