International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Vol XXXV, Part B3. Istanbul 2004
is due to the fact that each colour component (R,G,B) is stored
in separate section of the matrix (e.g. the Red component is
stored in first third of the matrix, the Green component is stored
in the second third of the matrix, and the Blue component is
stored in the third (last) third of the matrix.
3.2.2. Segmentation of Pita images: Segmentation is a concept
in which an image is subdivided into its constituent regions or
objects. The level to which the subdivision is carried depends
on the goal of carrying out the segmentation process (Gonzalez
and Woods,1992; Parker,1991; Perez and Gonzalez, 1987).
Segmentation procedures applied on monochrome images
generally utilize one of two properties of the gray level values
for the segmentation process, these are discontinuity and
similarity. If the discontinuity is utilized, then the approach is to
partition an image based on abrupt changes in gray level. The
main areas of interest within this category are detection of
isolated points, lines, and edges in an image. On the other hand
if the similarity property is utilized, then factors such as region
growing, region splitting, and thresholding processes can be
applied. (Rosenfeld and Kak, 1982; Prat, 1978; White and
Rohrer, 1983). The segmentation process mentioned here was
applied only when the other algorithms couldn't. provide
satisfactory measurements.
Majority of image processing operations in this study were
carried out by the use of the Image Processing Extension
Package and its conventions of the MathCAD Professional 2000
Program, © MathSoft Copyright (Mathsoft, 1999).
To carry out segmentation, first a mask must be constructed to
delineate the edge of the pita loaf and within that edge to
delineate the border of different objects in the bread. Areas that
were darkened by baking were delineated easily by
segmentation process. To carry out segmentation, the image of
the loaf was first binarized, and then upper and lower thresholds
were chosen to include the loaf's entity and exclude its
background. If the outside edge delineation of loaf is not
satisfactory, then erosion can be applied to enhance the
delineation process.
Figures 3 and 4, show binarized image of the pita bread and its
eroded version, it is evident in these images that the background
was separated from the front of the image. After binarizing the
geometric measurements are carried out to determine the
diameter, the radius, and height of the loaf, and consequently
the surface area and the volume of loaf before collapsing,
simple area of loaf (after collapsing) can be measured too.
NPLR is abbreviated for Number of Pixels in the Longest Row
in the image, and NPLC is abbreviated for Number of Pixels in
the Longest Column in the image. If one pixel in loaf image is
considered to be having dimensions of (width x length- area)
synonymous to (1 x 1 = 1), then the measurements can be done
as follows:
Loaf diameter:
D=NPLR (5)
Loaf radius:
R=D/2 (6)
Loaf Height
H=NPLC (7)
Loaf upper surface area:
480
S. EZXX(R 4H) (8)
up
Loaf simple surface area:
—-zxR (9)
simple
Loaf volume:
VurxHx(QxR-4-H06:30nm,
The colour and extension of the dominant colour in the loaf can
be determined by applying labeling process an the image and
choosing the largest component in the labeled image and
considering it the dominant colour, then setting upper and lower
threshold for the gray scale to be included in the dominant
colour, and calculating the number of pixels in this component.
First the pita bread loaf entity was separated from the
background of the image. One good and practical way of
separating the front from the background of the loaf image is to
associate region with its colour and implement the hue
saturation. vector of the whole image, then carry out a
binarization process. This can be done by converting the RGB
representation of the image to HSV and applying an extraction
process to emphasize the association of region with its
corresponding colour (Zhoi, Chalana, and Kim, 1998).
Pital := READBMR{("C:\Pics\Fig12.bmp")
Pital := READ RGH"C:\Pics\Fig12.bmp")
Pital := extract(rgb to hsv (Pital),2)
Figure 2. RGB and hue saturation images of pita bread
To separate the forefront of the image from its background, a
binarization process at a suitable gray scale threshold is applied
(Zhoi, Chalana, and Kim, 1998), then holes, spots, noise, and
In
no
ca
fo
ni
nc
The
dete
ima,