Question
Matlab code Q The rectangular region shown Fig. 6.44(a) contains samples of reddish colors we wish to segment out of the color image. This is
Matlab code Q
The rectangular region shown Fig. 6.44(a) contains samples of reddish colors we wish to segment out of the color image. This is the same problem we considered in Example 6.14 using hue, but here we approach the problem using RGB color vectors. The approach followed was to compute the mean vector a using the color points contained within the rectangle in Fig. 6.44(a), and then to compute the standard deviation of the red, green, and blue values of those samples.A box was centered at a, and its dimensions along each of the RGB axes were selected as 1.25 times the standard deviation of the data along the corresponding axis. For example, let denote the standard deviation of the red components of the sample points. Then the dimensions of the box along the R-axis extended from to where denotes the red component of average vector a. The result of coding each point in the entire color image as white if it was on the surface or inside the box, and as black otherwise, is shown in Fig. 6.44(b). Note how the segmented region was generalized from the color samples enclosed by the rectangle. In fact, by comparing Figs. 6.44(b) and. 6.42(h), we see that segmentation in the RGB vector space yielded results that are much more accurate, in the sense that they correspond much more closely with what we would define as reddish points in the original color image.
b FIGURE 6.44 Segmentation in RGB space. (a) Original image ith colors of interest shon enclosed ba rectangle. (b) Result of segmentation in RGB ector space. Compare ith Fig. 6.42(h). b FIGURE 6.44 Segmentation in RGB space. (a) Original image ith colors of interest shon enclosed ba rectangle. (b) Result of segmentation in RGB ector space. Compare ith Fig. 6.42(h)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started