You are on page 1of 11

CHAPTER III

RESEARCH DESIGN AND METHODOLOGY

This chapters deals with the methodology of the study in order to achieve

the objectives as specified by the researchers.

Figure

3.1

Conceptual Framework of the study.

The figure above shows the conceptual framework of the study. training

data set is the first part for the system to work that a researcher made here

collects images of those who rent a dormitory in NEMSU-Lianga Campus each of

them needs to take more than 500 to 1000 snaps to our system can study their

faces and their details using our algorithm that uses LBPH, this helps to facilitate

the study of their individual details because LBPH was really designed to

facilitate the identification of image of a person whether it is tenants or not. When

the algorithm captures a frame from the live video stream, Haar cascade will

detect all the faces in the frame. The algorithm must crop all the detected faces

for identification. Since the dataset contains images of 225 x 225 resolution, thus

it is imperative to resize the cropped images into 225 x 225 resolution as well.
After resizing, the algorithm converts these images into grayscale format. The

reason for doing this is to reduce the information of these images by downsizing

them into single dimension from three dimension. in this phase trained model is

where you can train the data you enrolled, here you can see if the data you

entered in a tenant is okay or not while training the image of the tenants which

take 5 to 10 minutes depending on how many snaps you put in your data.

Research Procedure

Figure 3.2 Machine learning life cycle.

The figure shown above is a developmental type of research. For the

development of the proposed software development, the researchers adopted

LBPH model design methodology which is software development life cycle. It is

20
be specially used for the Data Gathering, Data preparation, Data Wranglig,

Anlyse Data, Train Model, Test Model, Deployment.WW

Gathering Data

The researchers collected data from students, faculty and staff at NEMSU-

Lianga Campus. The input image is computed in the LBP histogram is a good

place to start. If the image is in color, convert it to grayscale. Separate the

grayscale image into tiny, overlapping sections or cells. Usually, a square or

rectangle patch of pixels make up each cell. Create the LBP value for each pixel

in a cell. By contrasting the intensity of the core pixel with its surrounding pixels,

the LBP value is determined. Compare the intensity values of each neighboring

pixel with the focal pixel. Create a histogram for each cell after calculating the

LBP values for each pixel in each cell. The frequency of recurrence of various

LBP patterns within the cell is represented by the histogram. Create a feature by

joining the histograms of all the cells.

Data preparation

Gather the dataset that contains the patches or images to be used to

extract LBP histograms from. Make sure the images are prepared for LBP

analysis by preprocessing them. Resizing, grayscale conversion, and normalizing

are necessary for this. For each pixel in the preprocessed images, compute the

LBP values. LBP compares the intensity values of a core pixel with its

surrounding pixels to encode the local texture information. For each image,

calculate the LBP histogram. The frequency distribution of various LBP patterns

in the image is represented by the histogram. One can describe the full dataset

21
as a matrix or feature vector after computing the LBP histogram for each image

in the dataset, where each row or element represents an image and contains its

LBP.

Data Wrangling

Gather the dataset that includes the samples or images that one to use

with the LBP Histogram. Apply any required preprocessing to the samples or

photos. The Local Binary Pattern is calculated for each image or sample. A

texture descriptor called LBP describes the regional patterns found in an image.

Create a histogram after computing the LBP codes for each pixel in the picture or

sample. To make the histogram results similar between various photos or

samples, normalize them. Concatenate the LBP histograms of all the images or

samples if there are a lot of them into a single feature vector. After completing

the data wrangling procedures, the prepared data can be used in a variety of

ways, depending on the unique requirements and the data's dimensionality.

Analyse Data

Make non-overlapping sections or patches on the image. Depending on

the application and image properties, these patches' size and form can change.

Calculate the Local Binary Pattern for each patch. Create a histogram for each

patch by tallying the frequency of its various LBP patterns. To create a final

feature vector that represents the complete image, combine the normalized

histograms from all of the patches if the image has been split up into more than

one. It's important to note that there are a number of variations and extensions to

the fundamental LBP Histogram approach, including the incorporation of spatial

22
relationships between patches, the use of various LBP operators (such as

uniform LBP), and the use of various normalization techniques depending on the

needs of the individual application.

LBPH Model

All images are represented in the Matrix formats, seen here, which are

composed of rows and columns. The basic component of an image is the pixel.

An image is made up of a set of pixels. Each one of these is small squares. By

placing them side by side, one forms the complete image.

Figure 3.3 Local Binary Pattern Histogram

Figure 3.3 face acquisition is the taking of images from tenants so that

they are placed in data sets, pre processing is the setting of how many snaps

need to be placed, feature extraction is the collection of all acquired images in

one tenant, data base is the when taking the name of the tenants who are

enrolled in it, classifier is the person who sorts the image if it is tenants or non-

tenants, matching is the content if it is a tenants or non tenants, not matching is

knowing if it was a guest or unknown person who threatened to enter the

dormitory, by that the time the alarm system will ring on the said Dormitory.

23
Figure 3.4 Local Binary Pattern Histogram algorithm.

LBPH (Local Binary Pattern Histogram) is a Face-Recognition algorithm it

is used to recognize the face of a person. It is known for its performance and how

it is able to recognize the face of a person from both front face and side face.

When the algorithm captures a frame from the live video stream, Haar cascade

detects all the faces in the frame as shown in Figure 3.3. The algorithm must

crop all the detected faces for identification. Since the dataset contains images of

225 x 225 resolution, thus it is imperative to resize the cropped images into 225 x

225 resolution as well. After resizing, the algorithm converts these images into

grayscale format. The reason for doing that is to reduce the information of these

images by downsizing them into single dimension from three dimension.

24
Figure 3.5 Architecture Framework.

This architecture frameworks represents the process of every stage of

each development of the study. In this process here you can see the steps of

how the system works. Data is one of the most important because that is where a

person's details, their photo and names are taken. second phase is the camera

or device that is placed outside the door to serve as a guard in the dormitory.

Third phase is the data sets where the faces obtained from the tenants in the

dormitory are studied, LBPH is the algorithm used to obtain or create the system

that wants to be created, the work of OpenCV is the one that connects the code

to the camera for it to work so that the camera can make or the camera can read

which people are enrolled in the data. Data anomaly is a problem in detecting an

image of a person or problems in the system that can affect the detection of a

person. and if there are people who enter the dormitory as stated, The alarm that

is set up together with the system will sound so that the people in the dormitory

25
are aware that someone has entered or wants to enter who is not a member of

the dormitory, in all events it is caught by the camera, it is recorded and it can be

reviewed in case of emergency to see what is going on inside and outside the

dormitory of NEMSU-Lianga Campus.

Train Model

In the training phase after the images are enrolled in the data sets, the

tenants spend 3 to 5 minutes to read the Local Binary Histogram Pattern if it is

okay, if ever it is not successful, a tenant trains again to change how many

snaps need to be added for it to be okay, after enrolling the tenants face the

camera for a few minutes to watch if a tenant has been read into the system.

Test model

For validating the model effectiveness the measurement of the model is

based on certain individuals appearance in the conduct of surveys.

Valuation and Validation of the Training Results of the System


The model is trained to evaluate the result of the training phase. The

detection of the system for non-tenants is to use its special features to detect the

eyes and the chin of the person, it is also easy to recognize because all that has

been studied in the system is the people only those enrolled in the datasets, and

if it is confirmed that it is non-tenants, it automatically alarms using the device

set up for said dormitory.

26
Figure 3.6 Process of the studies.

In Figure 3.6, it shows the process of this studies. The first one is

identified as Classified Output of the data where the datasets trained and have a

desired output to recognize which are non-tenants and tenants in the area by

gathering all the images to train, then followed by OpenCV to link the camera for

automatic detection, and with the help of the Local Binary Pattern Histogram to

classify the non-tenants and tenants, This process where the researchers applied

a camera device to installed in the area, Can be considered as a security for the

surveillance which it could be the real time. Then last is the output of the data or

the real time image classification or processing the image in real time by

capturing the person mentioned in the second process where the person is

detected and captured and process the image for matching the output. This

process it can be identifies the person where it is a tenants or non-tenants.

27
Deployment

The system deployment is the final placement of a system, NEMSU

Lianga Dormitory is a nice place for deployment with advantage of detecting

non-tenants is recorded and at the same of it takes pictures of non-tenants,

which can be and see the images taken in the system.

Research Instrument

A research instrument is a tool that best served to answer the questions

and the purposes of this study. The instruments used to collect data were

camera device that was used, data sets, openCV and algorithm to determine the

tenants and non-tenants personnel in the said dormitory. The researchers

conducted experiment and observation if this study is functional and

recommendable.

Research Respondents

To determine how well the Real Time Image Classifier functions,

researchers needed participants from NEMSU-Lianga Campus who gave

comments on the participants and participated in the project. After consultation

with a statistician, it was decided that a total of 40 respondents,10 instructors and

27 students polled using a questionnaire. Both the professors and the students

were deemed respondents. With the assistance of the statistician, this was

decreased. Tenants have a variety of faces, and the researchers recognize and

took these into account while analyzing the responses since doing so helped

students comprehend how to detect non-tenants.

28
29

You might also like