Digital Signal Processing Reference
In-Depth Information
interference such as part of pilling and non-pilling part may also interfere with each
other, with a median filter, filtered through a small white spots, and the rest of the white
point, which is recognized the hair bulb. Then 'bwarea' function calculates the value.
After image pre-processing, if the information you need is differ from the methods
used, program should be adjusted with data consistent. Such as images, the black part
is the hair bulb part of the required 'bwarea' function obtained is a part of pixels
(white), should represent the first images of the hair bulb part as the representative of
the pixels of the white one, and then subsequent processing.
picture = im2bw (~ midFilter);
% inverted part of pilling into the white dots
total = bwarea (picture);
% calculate the binary image pixels for an area
3.2
Calculate of the Entire Image Area / Pixel
Only the image pixels, the proportion of the hair bulb part of the whole image can be
calculated. The 'size' function can be used to calculate the overall pixels.The key
code is as follows:
[M, n] = size (picture);
% seek a long, wide pixel value
allarea = m * n;
% calculate the total area of pixels
3.3
Calculate the Proportion of Hairiness and Pilling
The pilling ratio of area is divided by the entire area of the hair bulb, then the final
percentage can be calculated. The photos compared to the value of the test sample and
standard samples, we the level of pilling can be calculated.
The key code as follows:
q = total / allarea;% demand ratio
percent = q * 100;% to the ratio of percentage
This paper stresses the major design steps, produced a corresponding form interface
for a program in MATLAB
Fig. 8. The GUI by Matlab of the software
Search WWH ::




Custom Search