6
Internet of Things (IoT)
at the segmented graph location denoted as (x 25 , y 21 ). Let the length and breadth of each
block in the segmented graph be fixed. Then, the horizontal component gives the value
“25 (from x component) * length of block” and the vertical component gives the value of
“21 (from y component) * breadth of black.” From these horizontal lengths and vertical
breadths, one can calculate the aspect ratio, to approximately classify the vehicle type.
Identification of vehicle types is very important in our case. The number of windows and
location of windows depend on the type of vehicle.
1.4 Implementation Details
Figure 1.6 shows the detailed adaptive background subtraction (ABS) algorithm implementation. Here, two images, that is, background (Bg) and foreground (Fg) images are
given as input to the system, and an appropriate filtering algorithm is applied to both the
images for removing the noises (if any) from the images. Then, the images are converted
into gray-scale images and their corresponding histograms are equalized for the desired
background subtraction. The whole process is performed by pixel-by-pixel comparison
of foreground and background images. If the absolute difference value of the foreground
image pixel and its corresponding background image pixel is greater than a specified
threshold value, then it is considered as foreground image and hence it is substituted with
a high-intensity value (say, 255), else it is substituted with a low-intensity value (say, 0).
Along with this subtraction process, the updation of background image is also done by
comparing the foreground and background image pixels. This updation is performed to
change the background image according to the change in environment. In this comparison, if the background image and foreground image intensity of specific location is the
same, then the background remains same (no updation). Otherwise, if the value of the
background pixel intensity of a specific location is greater than the value of the foreground
pixel intensity of the corresponding location, then the background pixel intensity value is
increased by one, if not the intensity value is decreased by one.
In Figure 1.6, an image “I” consists of a finite set of pixels and our mapping assigns to
each pixel p = (Px, Py), a pixel value I(p). Consider that the mapping is done in Z 2 plane.
So, in this algorithm, we have two images; one is background image which is represented
as “Bg” and its intensity value Bg(p) which is mapped in Z 2 plane at p = (Px, Py), and the
FIGURE 1.5
Distance calculation using overlaid coordinates on the acquired image.
Précédent

- 31/358

Suivant