Vous êtes sur la page 1sur 13

DETERMINING CARABAO MANGO RIPENESS STAGE USING LAPLACIAN

OF GAUSSIAN DETECTION ALGORITHM AND L*A*B COLOR VALUE


EXTRACTION OF OPENCV

CZARYL P. DIOQUINO

SUBMITTED TO THE FACULTY OF


THE COLLEGE OF SCIENCE AND MATHEMATICS
UNIVERSITY OF THE PHILIPPINES MINDANAO
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE DEGREE OF

BACHELOR OF SCIENCE IN COMPUTER SCIENCE

June 2017
UNIVERSITY OF THE PHILIPPINES MINDANAO

Bachelor of Science in Computer Science

Czaryl P. Dioquino

Determining Carabao Mango Ripeness Stage Using Laplacian of Gaussian


Detection Algorithm and L*a*b Color Value Extraction of OpenCV

Special Problem Adviser

Miguel Carlo S. Guillermo, M.M.

Department of Math, Physics, and Computer Science

Date of Submission

June 2017

Permission is given for the following people to have access to this special problem:

Available to the general public No


Available only after consultation with author/thesis adviser Yes
Available only to those bound by confidentiality agreement Yes

Students signature:

Signature of special problem adviser:

ii
The special problem manuscript attached hereto, entitled DETERMINING
CARABAO MANGO RIPENESS STAGE USING LAPLACIAN OF GAUSSIAN
DETECTION ALGORITHM AND L*A*B COLOR VALUE EXTRACTION OF
OPENCV, prepared and submitted by CZARYL P. DIOQUINO in partial fulfillment of
the requirements for the degree of Bachelor of Science in Computer Science is hereby
accepted.

MIGUEL CARLO S. GUILLERMO, M.M. CINMAYII G. MANLIGUEZ, MIS


Adviser Co-Adviser

____________________ ____________________
Date Date

EMMA RUTH V. BAYOGAN, Ph.D.


Panelist

____________________
Date

LEO MANUEL B. ESTAA, M.Sc.


Department Chair

____________________
Date

DOMINICA DM. DACERA, Ph.D.


Dean

____________________
Date

Recorded by:
NOREEN GRACE V. FUNDADOR, Ph.D.
College Secretary

____________________
Date

iii
BIOGRAPHICAL SKETCH

Czaryl P. Dioquino was born on November 30, 1996 in Davao City. She is the

second child of Rico S. Dioquino and Josephine G. Pahamotang. Her older brother Kalyph

P. Dioquino, like her father, is an electrical engineer. While, her younger sister, Fritzielle

P. Dioquino, is still in grade-school. Her mother has a bachelors degree in accountancy.

She attended elementary at Ma-a Central Elementary School. It was a local school

in their barangay. Her elementary years were filled with endless games and leisure.

However, she did not forget her grades, and she still maintain her average scores. She

graduated grade-school on 2009 and soon enrolled at Davao City National High School.

She was always a shy girl and a bit aloof. Even in her grade-school years she was never

really that competitive and her drive was moderate.

During her high school years, she wanted to shed her shyness and experience

participating in different school activities. So, she joined the Red Cross Youth (RCY) on

her freshmen year and even experienced joining a competition. However, it was short-

lived. Because on her sophomore year, she was qualified to be in the honor section and

became busier to the point where she no longer has time to participate in any non-academic

activities. Nonetheless, her high school years was a fond memory. In 2013, she graduated

high school and attended the University of the Philippines Mindanao where she took

Bachelor of Science in Computer Science, even though she had no prior knowledge on any

programming. For four years, she struggled, studied hard and persevered just to achieve

her goals in life.

iv
ACKNOWLEDGEMENT

There are several people who I would like to express my gratitude to. Without their

help, physically, financially and emotionally, I would not have been able to finish this.

First and foremost, thank you God for providing me strength and endurance that

were necessary to complete this task. My family, who been very supportive and

understanding of my needs, thank you so much.

My deepest thanks to my adviser and co-adviser, Mr. Miguel Carlo S. Guillermo

and Ms. Cinmayii G. Manliguez for their guidance, pieces of advice and

recommendations. Truly, you guys are amazing.

Id like to thank my panelist, Dr. Emma Ruth V. Bayogan, for her constructive

feedbacks, suggestions, and for providing the lab tools and materials needed in this study.

As well as her research assistants, Ate Diana, Ate Leizel and Ate Maj for their time and

effort in helping me gather data and teaching me how to use those lab tools. A huge thanks

to the Australian Centre for International Agriculture Research (ACIAR) for funding

the mangoes used in this study.

Lastly, I would like to thank my colleagues: Deborah, Mary Grace, Kristoffer,

Vince, and Reanna for all their help. To friends, classmates, and teachers who had given

me encouragement, and shaped and influence the person that I am now. Maraming salamat

po!

v
TABLE OF CONTENTS

PAGE

INTRODUCTION 1

REVIEW OF LITERATURE 4

Mango 4

Philippine Mango Industry 4

Maturity and Ripeness 5

Laplacian of Gaussian Edge Detection 5

CIE L*a*b Color Space 7

Open Source Computer Vision Library 8

Related Studies 8

MATERIALS AND METHODS 11

Development Model 11

Control Flow Diagram 13

Data Requirement 14

L*a*b standards 15

Image acquisition 16

System Requirement 18

Entity-Relationship Diagram 18

Data Flow Diagram 20

Testing Phase 23

Performance Evaluation 23

vi
RESULTS AND DISCUSSION 26

Carabao Mango Ripeness Detector Features 26

Converting RGB to CIE L*a*b 29

Ripeness Level Identification 30

Evaluation of Accuracy 33

First trial 33

Second trial 34

SUMMARY AND CONCLUSION 36

LITERATURE CITED 37

APPENDICES 40

vii
LIST OF TABLES

TABLE TITLE PAGE

1 Confusion Matrix. 22

2 a* Standard 24

3 Confusion Matrix of the System. 30

viii
LIST OF FIGURES

FIGURE TITLE PAGE

1 Laplacian of Gaussian output. 6

2 CIE L*a*b color space diagram. 7

3 OpenCV RGB to CIE L*a*b conversion. 6

4 General flow of the methodology. 11

5 Incremental life cycle model of the Carabao Mango Ripeness 12


Level Detector.

6 Carabao Mango Ripeness Level Detector previous control 13


flow diagram.

7 Output image using: a.) Laplacian of Gaussian, b.) Gaussian 13


Blur and Threshold

8 Carabao Mango Ripeness Level Detector control flow 14


diagram

9 Mango image and where the points were taken: a.) first trial 15
with three points and b.) second trial with 10 points per side.

10 Mango images with different backgrounds: a.) Black 16


background, and b.) white background.

11 Carabao Mango Ripeness Level Detector entity-relationship 17


diagram.

12 Carabao Mango Ripeness Level Detector data flow diagram 19


level 0.

13 Carabao Mango Ripeness Level Detector data flow diagram 20


Level 1.

14 Homepage of the Carabao Mango Ripeness Level Detector 25

15 Mango Records page of the Carabao Mango Ripeness Level 25


Detector

ix
16 Determine Ripeness page of the Carabao Mango Ripeness 26
Level Detector

17 View Image page of the Carabao Mango Ripeness Level 27


Detector

18 Code snippet for obtaining the L*a*b values 28

19 Boxplot of a* values per category 28

20 Boxplot of b* values per category 29

21 Sample images from the first trial 33

22 Sample images from the second trial 34

x
LIST OF APPENDIX TABLES

APPENDIX TITLE PAGE


TABLE

1 a* and b* 95% Confidence Interval. 42

2 Mango Light Exposure During Image Acquisition. 43

3 a* Values per Index. 44

4 b* Values per Index 47

xi
LIST OF APPENDIX FIGURES

APPENDIX TITLE PAGE


FIGURE

1 Mango Peel Color Index Scale. (Lifted from UPLB-PHTRC, 50


2014).

xii
ABSTRACT

CZARYL P. DIOQUINO, University of the Philippines Mindanao, June 2017,


DETERMINING CARABAO MANGO RIPENESS STAGE USING LAPLACIAN
OF GAUSSIAN DETECTION ALGORITHM AND L*A*B COLOR VALUE
EXTRACTION OF OPENCV.

Adviser: Miguel Carlo S. Guillermo, M.M.


Co-Adviser: Cinmayii G. Manliguez, MIS

Maturity and ripeness stage is an important information that contributes to the


quality of Carabao mangoes in the market. There are several ways to know these maturity
and ripeness stage based on mango maturity indices. However, only a few indices are non-
destructive, in which the method does not destroy the fruit, such as peel color. Image
processing is one of the rising technology commonly used in agricultural purposes.
Specifically, in grading, quality, and disease checks. This study assesses the color of
Carabao mango peel to get its ripeness stage using Commission Internationale
dEclairage (CIE) L*a*b color extraction of OpenCV. This is an alternative non-
destructive way to assess the ripeness stage of Carabao mangoes. Using the mango
images acquired by the Digital Single Lens Reflex (DSLR) camera, the Red-Green-Blue
(RGB) images were converted into an CIE L*a*b images, where the L*, a*, and b*
channels were separated. By comparing the a* values to the standard a* values, the system
will output the category green, breaker, turning, more yellow than green, more green than
yellow, fully yellow, it belonged to. The system yielded an overall accuracy of 16.67%.
One of the most influential factor to the dissatisfying result is the difference in the type of
illuminant used by OpenCV, and the Chroma meter values where the standards are based.
A suitable method to assess the results yield by this system is highly recommended. The
researcher also recommends a wider set of features and functionalities in the system.
Keywords: Carabao Mango, CIE L*a*b, Color value analysis

xiii

Vous aimerez peut-être aussi