• Tidak ada hasil yang ditemukan

REAL TIME CHROMAMETRY MEASUREMENT FOR FOOD QUALITY DETECTION USING MOBILE DEVICE by NUR HAZIQAH FARAH BINTI MOHAMAD HUSSIN 18009

N/A
N/A
Protected

Academic year: 2024

Membagikan "REAL TIME CHROMAMETRY MEASUREMENT FOR FOOD QUALITY DETECTION USING MOBILE DEVICE by NUR HAZIQAH FARAH BINTI MOHAMAD HUSSIN 18009"

Copied!
54
0
0

Teks penuh

(1)

REAL TIME CHROMAMETRY MEASUREMENT FOR FOOD QUALITY DETECTION USING MOBILE DEVICE

by

NUR HAZIQAH FARAH BINTI MOHAMAD HUSSIN 18009

Dissertation submitted in partial fulfilment of the requirement for the

Bachelor of Engineering (Hons) (Electrical and Electronic)

JANUARY 2017

Universiti Teknologi PETRONAS 32610, Seri Iskandar,

Perak Darul Ridzuan, Malaysia

(2)

i

CERTIFICATION OF APPROVAL

Real Time Chromametry Measurement for Food Quality Detection by Using Mobile Device

By

NUR HAZIQAH FARAH BINTI MOHAMAD HUSSIN

A project dissertation submitted to the Electrical & Electronic Engineering Programme

Universiti Teknologi PETRONAS in partial fulfilment of the requirement for the

BACHELOR OF ENGINEERING (Hons) ELECTRICAL & ELECTRONIC ENGINEERING

Approved by,

______________________

(A.P DR GUNAWAN WITJAKSONO) SUPERVISOR

UNIVERSITI TEKNOLOGI PETRONAS BANDAR SERI ISKANDAR, PERAK

(3)

ii

CERTIFICATION OF ORIGINALITY

This is to certify that I am responsible for the work submitted in this project, that the original work is my own except as specified in the references and acknowledgements, and that the original work contained herein have not been undertaken or done by unspecified sources or persons.

________________

NUR HAZIQAH FARAH BINTI MOHAMAD HUSSIN

(4)

iii

ACKNOWLEDGEMENT

First of all, I want to express my most noteworthy appreciation to Allah SWT whom, with His willing, I could finish another part of my life in journey to achieve success and His blessing.

I would also like to express my gratitude toward Universiti Teknologi PETRONAS and mainly Electrical and Electronic Engineering Department for providing the opportunity and facilities for the project to be properly conducted. I would also like to thank the Chemical Engineering Department for providing the facilities and lab for the project.

Besides, I would deeply express my appreciation towards my project supervisor, Dr Gunawan Witjaksono for his guidance and continuous support throughout the project from FYP1 to end of FYP2. His guidance make it possible for me to achieve this far and overcoming and difficulty faced.

I would like to sincerely thanks my fellow friends for their encouragement, support all the enjoymenta that awe had awithin this aperiod. I appreciate all atheir helps anda their asupports.

Lastly, to my beloved family for their encouragement, patience and support for me throughout my studies here in UTP. Their never ending encouragements and supports gives me the ability and courage to face any problems or difficulty in UTP.

(5)

iv ABSTRACT

Quality food is essential in current lifestyle to ensure a good living. For the past years, many research have been performed into checking the quality of food such as; by using smart packaging, sensor stickers, time-temperature control of food freshness. One common thing from the current technologies is most of the method used a colour changing labels to indicate the changes of food quality. The indicator will only shows colour instead of stating the freshness of the food. Limitations exist in the current technologies due inaccuracy reading of the colour of labels. As stated from Colour Blindness Awareness, 1 in 12 men and in 200 women have colour blindness. Hence, reading the colours using humans eyes have weaknesses for some users. The results of reading the coloured label may differ for each and every person as human eyes are very subjective and have their own disability. As all colour has its own numerical value, a Red, Green, Blue (RGB) numerical can be obtained from the sensoring materials. This is what we call chromatic measurement.

To overcome the limitations of current technology, a mobile apps has been developed to read RGB colour from the colour changing labels. Main reason in developing the apps is to display the freshness level of food directly to the mobile apps.

The mobile device developed act as medium to detect and display the quality of food. It is also used as a converter from colour to its numerical value to obtained the chromametric measurement from the colour changing label.

Additionally, the color of pH paper changes from yellow to red for pH1 and yellow to purple for pH14. Studies shows that different freshness level of food has different pH value. In this study, pH paper is used to detect shrimp freshness. The home made apps will read the RGB color from the pH paper and display the freshness of the food by stating that whether it is “fresh, good or spoiled”.

(6)

v

Table of Contents

ABSTRACT ... iv

Table of Contents ... v

List of Figures ... vii

List of Tables ... viii

CHAPTER 1 ... 1

INTRODUCTION ... 1

1.1 Background Study ... 1

1.2 Problem Statements ... 3

1.3 Project Objectives ... 5

1.4 Scope of Study ... 5

LITERATURE REVIEW ... 6

2.1 Food Freshness ... 6

2.2 Current Technologies ... 7

2.3 Chromatic Parameters ... 8

2.4 Relationship Between pH and Food Freshness ... 9

2.5 Technology Applications ... 10

CHAPTER 3 ... 12

METHODOLOGY ... 12

3.1 Main Project Flow ... 12

3.2 Pre-Experiment Methodology ... 13

3.3 Experiment Methodology Flowchart ... 15

3.4 Gantt Chart and Key Milestones ... 16

CHAPTER 4 ... 17

RESULTS AND DISCUSSION ... 17

4.1 RGB Data Collection ... 17

4.2 Data Evaluation ... 18

4.3 Pre-Calculation of Chromatic Parameter ... 20

4.4 pH Testing ... 23

4.5 Chromatic Values Calculation ... 27

4.6 Mobile Applications Development ... 29

4.7 Mobile Apps Testing ... 31

(7)

vi

CHAPTER 5 ... 34

CONCLUSION AND RECOMMENDATIONS ... 34

5.1 Conclusion ... 34

5.2 Recommendation ... 35

REFERENCES ... 36

APPENDICES ... 37

Appendix A ... 37

(8)

vii List of Figures

Figure 1: Fadable ink for time – temperature control of food freshness[8] ... 2

Figure 2: Temperature danger zone on rate of growth of bacteria[13] ... 2

Figure 3: The difference of PANI films on fresh fish and spoilage fish ... 3

Figure 4: Growth of food bacteria over time ... 6

Figure 5: The design of sticker sensor ... 7

Figure 6: Application of red litmus paper as sticker sensor ... 7

Figure 7: The world first smart ripeness indicator label ... 8

Figure 8: Sample of colours and its RGB and HEX number ... 8

Figure 9: Konica Minolta’s Bench-top Spectrophotometer ... 10

Figure 10: Various applications are running on smartphones [11] ... 11

Figure 11: The steps in testing pH paper ... 15

Figure 12: A set of 48 different RGB values and colours ... 17

Figure 13: The smaller range of color indigo ... 21

Figure 14: The table and graph obtained from the chromatic parameter using smartphone’s camera from iPhone ... 22

Figure 15:The table and graph obtained from the chromatic parameter using smartphone’s camera from Samsung ... 22

Figure 16: pH indicator ... 23

Figure 17: Reaction on pH paper when it is dipped in Acidic solotion with a pH 1 ... 23

Figure 18: pH paper reacts on the pH value and changes accordingly (left: pH14, right: pH1) ... 24

Figure 19:Original colour of both pH paper ... 24

Figure 20: Reaction of pH paper to pH value of 5.5, 6 and 6.5 respectively ... 24

Figure 21: Reaction of pH paper to pH value of 7, 8 and 8.5 respectively ... 25

Figure 22: RGB values tested on devices ... 25

Figure 23: pH meter of solutions with pH 2 and pH 13 ... 26

Figure 24: original color of pH paper ... 26

Figure 25: reaction of pH based on their pH value. ... 26

Figure 26: Graph of Chromametry value, X vs pH ... 28

Figure 27: a sample of simple calculator tested on the Android studio ... 29

Figure 28: a sample of camera call function generated ... 30

Figure 29: a sample of calculator generated ... 30

Figure 30: Layout of real-time chromametry measurement apps ... 31

Figure 31: Testing of Apps on pH paper of pH6 ... 32

Figure 32: Testing of Apps on pH paper of pH7 ... 32

Figure 33: Testing of Apps on pH paper of pH8 ... 33

(9)

viii List of Tables

Table 1: Gantt Chart and Key Milestone ... 16

Table 2: Average of RGB colours from 2 types of Smartphone selected colours ... 18

Table 3: Average of RGB colours from Smartphone RGB reader for colour Red, Brown and Orange ... 19

Table 4: Average of RGB colours from Smartphone RGB reader for colour Yellow, Green and Blue ... 19

Table 5: Average of RGB colours from Smartphone RGB reader for colour purple and indigo ... 20

Table 6: Chromatic parameters of indigo colour ... 21

Table 7: RGB values of pH paper for 3 experiments ... 28

Table 8: Chromatic value for 3 experiments ... 28

(10)

1 CHAPTER 1 INTRODUCTION

1.1 Background Study

In recent years, consumers have been expecting a steady rise in quality, safety and diversity of food. The perception of food quality differs from each consumers such as on the processes, products, and management issues (working conditions or the origin of the products). Richard J. Schonberger stated that “quality is like art, everybody praises it, everybody recognizes it but each one has its own understanding of what it is”. Freshness of the food is one of the main contribution in high quality food.

Freshness of food is essential for the quality of the final product [1]. Hence, for current technology, there are many methods that have been proposed to ensure the freshness of the food such as subjective (sensory), objective (non-sensory) , fadable ink for time – temperature control of food freshness and development of aa smart packaging for the monitoring of spoilage.

There are studies that shows that a method used in assessment the quality of based on its sensory test which are based on the feature of the raw fish. The attribute is check based on the eyes, skin gills and the texture of the fish itself. Hence, in assessing the freshness of the fish or seafood, the sensory method remains as the most satisfaction way of assessing it. But, these schemes are not universal and there are no specific guidelines on how the physical of the seafood can shows the freshness level of the raw food. How sure are they that the food is edible? Consequently, some modifications are needed which can indicate clearly on the freshness level of the food that can be consume. Modifications are needed to be done to improve the accuracy of the test used.

As shown in Figure 1, one of the common method that is used on checking the freshness of the food is by using Fadable ink for time and temperature control of food freshness [2]. It works as time – temperature indicator, as the time or temperature changes,

(11)

2

the colour will change as well. It is generally known that bacteria can grow quickly and easier at the danger temperature zone which are at between 5 to 60 degree Celsius as shown in Figure 2.

Fadable ink is used in printing the food indicator. In time, the ink will disappear as it indicates that the food is no longer fresh. The simple process behind this technology is;

the ink will react to the oxygen it will then makes the colour of the sign changes from red to beige. The rate of colour change is varied by the chemical composition. The sign indicators are very useful in monitoring food freshness.

Figure 1: Fadable ink for time – temperature control of food freshness[3]

Figure 2: Temperature danger zone on rate of growth of bacteria[4]

As stated by Yam, Takshitov and Miltz, “smart packaging can be defined as a system that monitors the condition of the packaged food to provide information about the quality during storage, transportation and distribution”. A research has been done on polyaniline (PANI) film on to check for the spoilage of a fish based on the colorimetric

(12)

3

of the food package label. Basically, a smart packaging is a packaging which check the condition of the product and informs it to the consumer. [2]

Referring to Figure 3, PANI films reacted to the ammonia and changes the films based on the absence of the measurement [2]. A reference films which is the film that are not exposed to the spoiled fish are used for measurement of the experiment.

Figure 3: The difference of PANI films on fresh fish and spoilage fish [2]

1.2 Problem Statements

One of the main reason the freshness of the food needed to be checked is due to the demand from consumer for fresh and convenient food which can be achieved through the foods. Nowadays, consumers are willing to pay a higher privce for a better-quality food.

They want to ensure that the food that the paid for and consume is fresh and from a good quality.

Technologies which uses the smart packaging as indicator on checking the spoilage of the food have been widely used in the industrial. The smart packaging works well in indicating the current freshness of the food. It will change it colors as the freshness of the food deflate. For an example, the current food indicator changes it colour from green to blue. Green as an indication that the food is still fresh while blue is spoiled or not to be consumed.

(13)

4

Human eyes are very objective and have their own limitations and disability. Some colors are very hard for our eyes to be differentiated. The same colours may appeared differently to different people due to the eye condition as such, bad eye sight or colour blindness. Some may even see blue as green while good eye sight people just see green as green. Since the cuurent technologies of smart packaging uses the technology of colour changing method, some limitation may occur to consumers.

The chromatic value for each different color are different from each other.

Researches have been done on reading chromatic parameters to support this argument.

There were devices that have been built in reading the chromatic parameters such as from Konica Minoltta, where the device will sense the colour and as the result, the device will display the chromatic value either in L*a*b or RGB. The devicess have their own limitations as it is mainly use for industrial purposes, big, bulky and not portable. Most of the tools are also used for researches and lab purpose hence it is not accessible for public use.

From the two problem statements, it is clear that new technology needed to be done to ensure that the consumer can check the freshness of the food easily. Since most of the consumer have smartphones, the smartphones will act as a medium to read the colour of indicator. The smartphone will also be used to show the results of the indicator in stating the freshness of the phone. Therefore, consumer can obtain information of the freshness of the food at their fingertips.

(14)

5 1.3 Project Objectives

The main objectives for this project are:

i. To determine and design freshness level using the chromatic parameters ii. To formulate and analyse the chromatic value level using the chromatic

parameters

iii. To design and develop mobile apps based on the chromatic value iv. To characterize the chromatic value on different freshness level.

1.4 Scope of Study

The focused area of the project are the quality of food, the chromatic parameters and the developing of mobile application. mainly focusses freshness of the raw food.

Research paper shows and discussed on the current technologies on determining the quality of food. The chromatic parameters are the study of the relationship of colours and its RGB numbers and its wavelength. Different colours will give different RGB and different wavelength value. A sensing materials are us for experiments to check on the changing of the colours as it reacts with different pH values. The experiments sets as an example for the current technologies that changes it labels as the quality of the food changes. A further studies need to be done to develop the mobile application.

(15)

6 CHAPTER 2 LITERATURE REVIEW 2.1 Food Freshness

Retail food marketers are being driven into providing a bigger range menu of fresh foods that the consumer can choose from [5]. From figure 4, the relationship of growth of bacteria and time can clearly be seen that as time increases, the growth of bacteria increases rapidly. Hence, scientists of food packaging and producer of package resin have been risen into the challenge. The fresh prepared food that was introduced to the market in 2004 was three times greater compared to 1999. The new products have lidded trays which are tightly sealed. It can only be open by peeling the plastic membrane lids. It is fog resistance thus giving more protection to the food

Nevertheless, consumers nowadays are not just considering for convenience in foods packaging to bring to their home, but they also seriously take freshness of the food as consideration. Donna Visioli stated that the demand of healthier, fresher products has created challenges for scientist to do research and studies on the new technology to ensure that the freshness of the food have longer shelf life.

Technologies have been developed to increase the shelf-life of a food to remain the freshness of the food such as subjective (sensory), objective (non-sensory), fadable ink for time – temperature control of food freshness, developmenta of a smart packaginga for thea monitoring of spoilage, and by using chromameter to check the freshness of the food.

Figure 4: Growth of food bacteria over time

(16)

7 2.2 Current Technologies

To meet the increasing consumer’s demand on high quality and fresh food, some technologies have been researched and developed such as Sticker Sensor, Smart Packaging and Real time on-package freshness indicator [6], and a colorimetric food package label.

Sticker sensor works as detecting the increasing of pH values from the food, the sticker sensor will change it colours from red to yellow to as an indicator that the food it detects is spoiled [7]. As shown from Figure 5, the chemistry behind it is mainly the changing of methyl red which has been immobilized through an absorption method to a bacterial cellulose membrane, as the pH changes, the colour will change from red to yellow. An upgrade on the sticker sensor have been done later on from the same researcher. A simple and low cost sticker has been developed by using litmus paper to detect the changes of the pH as the quality of food degraded [8]. The changing of red litmus colour can be seen from Figure 6.

Figure 5: The design of sticker sensor [7]

Figure 6: Application of red litmus paper as sticker sensor [8]

(17)

8

The research and development of sensors for food can be seen as a great potential in developing to many new sensing materials for food packaging. The incorporation of the sensors implies a big effect in technology of food packaging [9]. Hence many smart packaging has been developing. Smart packaging is a system that monitors the condition of the packaged food to provide information about the quality during storage, transportation and distribution as shown in Figure 7 [10]. The chemistry behind smart packaging is that it monitors the safety and quality of the food from biosensor or chemical sensor.

Figure 7: The world first smart ripeness indicator label

2.3 Chromatic Parameters

Figure 8: Sample of colours and its RGB and HEX number

(18)

9

A colour have its corresponding numerical value. Few methods can be used to find the numerical value of the colour. From Figure 8, the methods are HTML colour code which uses HEX numbers, next method are RGB colour code, which stands for Red, Green and Blue. It uses the three prime colours to generate the code. As we know, all the colours exist by mixing the three prime colours, hence it is possible to get the numerical value from the colour of Red, Green and Blue itself. The range aof light that can beadetected byahumans are between 380 to 780mm, thearange of the electromagnetic spectrum is called visible light which are perceived as colours [11]. Sunlightaappears white to usabecause itaemits almost uniformlyaover allavisible frequencies. However, aalaser for aexample, emitsaonly at aasingle veryaspecific frequency. Helium- neonalasers emitaat 632.8nm, whichais aabright red. The lasers inaBlu-ray playeraemit at 405nm, which asathe nameasuggests, isablue. We canastart toasee the relationshipabetween coloursaand wavelength.

A frequentaway ofareferring toacolour on computerascreens isaby usingathe RGBasystem. In this model, eachacolour isagiven aavalue foraeachared, greenaand bluesacomponentsaranging from 0 to 255, givingaa totalavalue of 16.7 millionapossible colours. However, due to the veryacomplex wayain which the eyea perceives acolours, we can asee colours whicha are aoutside of the agamut of athe RGB scheme. aThere is noa unique mapping athat definitively aconverts a wavelength ato a acolour.

2.4 Relationship Between pH and Food Freshness

An assuring method to detect the freshness of fruit by checking on the concentrations of acids. Two experiments have been conducted by Bambang Kuswandi from Universitas Jamber [12][13]. His team uses guava and strawberry as their study product to check on the correlation between freshness of fruits and its acidity as well as the pH value.

Concentrations of acid increases during ripening as compared to its concentration of acid during fresh period. Increasing number of acid was observed throughout the ripening process of guava from the guava was fresh, ripped guava and till it is spoiled. The pH

(19)

10

value varies from pH 3.94 at fresh-ripe guava to pH 3.56 at overripe guava [12]. Hence, it shows that the value of pH decreases as the guava continues to ripe.

Strawberry acts differently from guava, as it ripens, the concentrations of acid decreases. Strawberry produce esters as it ripens which react with the acid and making the acidity to decreases. The pH values vary from pH 3.31 at fresh-ripe strawberry to pH 3.92 at overripe strawberry [13]. Hence, it shows that the value of pH increases as the strawberry continues to ripe.

While concentration of acid is used to check on the freshness of strawberry and guava different case occurs to meat, poultry and seafood where the freshness is checked from the concentrations of alkali [2],[6],[7],[8]. The deterioration of meat, poultry and seafood causes the pH to increase as a result of increasing of total volatile basic nitrogen (TVBN).

TVBN increases from the formation of NH3 from the deterioration of raw fresh food.

The pH values vary from pH 5.61 at fresh beef meat to pH 6.24 at spoilage of beef meat, same range of pH occurs to fish [2], [8]. While the pH values vary from pH 6.24 at fresh shrimp to pH 9.04 at spoilage of shrimp [6]. Hence, it shows that the value of pH increases as the raw fresh food approaching spoilage.

2.5 Technology Applications

Technologies which detects the colour of the food to know the freshness of have already widely been used such as Konica Minolta’s Chromameter as shown in Figure 9.

Since most of the technology are widely used at the industrial section, new technology is needed for consumer to use.

Figure 9: Konica Minolta’s Bench-top Spectrophotometer

(20)

11

The progression of technology, in particular mobile technology, offers an opportunity to strengthen the quality of life. With the development of touchscreen technology such as smartphones and tablets, which might eliminate problems with operating computer devices. Various useful and handy applications (apps) are now running on smartphones with touchscreens which are shown in Figure 10. So many apps have been made since apps are easy to use, user friendly and

Figure 10: Various applications are running on smartphones [14]

The availability of smartphone applications (apps), which have become common on all mobile operating systems, encourages users to spend an intensifying amount of time on their smartphones [14]. There are now 1.6 million apps developed for download for Android and another 1.5 million apps accessible for download from Apple's App Store [15].

Hence, creating a mobile application in knowing the freshness of the food will help a lot of consumer since most of the consumer already used to smartphone and smartphone apps.

(21)

12 CHAPTER 3 METHODOLOGY 3.1 Main Project Flow

Mobile apps To test and run the apps on the Mobile device and to check with the chromatic parameters when testing apps

Project Planning To identify the problem statement, objectives and study scope

To study in related research paper and existing/current technologies

Literature Review

Sample Preparations To prepare a colour reference that will be used as reference throughout the experiment

Sensing Materials To determine the materials that will be used to detect the different level of pH

Chromatic parameters To study on the relationship between the RGB colours and the chromatic parameters

To prepare 5 different chemical solutions within the range of Acid and Alkali respectively.

Chemicals Preparations

(22)

13 3.2 Pre-Experiment Methodology

1. Project Planning

• To tackle the objectives of the project.

• To identify the problem statement of the project.

• To understand the study scope that are related to the project.

2. Literature Review

• Understanding more in details on the project given by doing research, journals reading and literature study.

• To undertand better of high quality food and freshness of food

• To focus more on researched papers from Dr Bambang Kuswandi as he has done project which relates with displaying the freshness of food.

• To shows that different level of food has different level of pH.

• To ensure that it is clearly shows that different pH level reacts differently to pH paper.

3. Pre Experiment Preparations

• A new set of 48 colours with its RGB colour have been prepared

• Experiment on checking the RGB number produced by phone are done several times to get the average value that will be produced by the phone.

• The main reason of this pre experiment project is to show that different colour does produce different RGB number.

• The variables also may affect the result on getting the RGB number such as lighting, distance and camera compatibility.

• Experiments are done several times to eliminate all the probabilities that will affect the reading of RGB.

• A constant light intensity, distance between phone and camera and the camera used have been set as constant.

4. Chemical Preparations

• Chemicals solution need to be prepared to be tested with sensing materials

• 12 sets of chemical solutions are prepared which range from pH 2 untill pH 13.

(23)

14

• To ensure the the exact pH level, pH meter was used to check on the pH while chemical is prepared.

• The chemicals are put inside the same beaker with same volume to decrease any manipulated variable.

5. Sensing Materials

• pH paper is used as the sensing materials to detect the changes of pH.

• The pH paper are dip into all the 12 solutions prepared earlier

• Experiments were done to check on the colours produced when pH paper is tested with solutions which have different pH value.

• pH 2 changes pH paper from yellow to red while pH 13 changes pH paper from yellow to purple

• Experiments were repeated 3 times to get better range of RGB reading 6. Chromatic Parameters

• From the pH paper, RGB number is obtained by using a smartphone.

• Experiments are repeated few times to decrease any errors in reading the RGB.

• The chromatic parameters are calculated using equation (2).

• The calculated chromatic parameters are assigned to freshness level of food as shown in Results and Discussions.

7. Mobile apps

• Two android base development are tested to check on the compatibility with the project.

• MIT and Android Studio have been used.

• Development of apps are continued on Android Studio.

• Simple Apps are first developed

• By using the data obtained from all experiments, a layout of the apps is created

• The apps are generated after few trials and error.

(24)

15 3.3 Experiment Methodology Flowchart

Figure 11: The steps in testing pH paper

Preparation of Acid and Alkali

Preparation of Sensor Material

Preparation of solutions from pH 2- 13

Dip Sensor materials to 12 solutions Analyze results of

Sensor Materials Obtain RGB

numbers from the Sensor Materials

Calculate Chromatic value Parameter, X

Assign Chromatic Parameter to Freshness of food

Development of Mobile applications

Testing of Mobile Applications

[1] [2] [3]

[4]

[5]

[6]

[7] [8] [9]

[10]

[2] [3] [4] [5]

(25)

16 3.4 Gantt Chart and Key Milestones

Table 1: Gantt Chart and Key Milestone

(26)

17 CHAPTER 4

RESULTS AND DISCUSSION

4.1 RGB Data Collection

A set of colours are prepared which consists of 48 colors. All the colors are generated from computer. Hence all the values are according to their respective colors.

The main purpose of this set of colors are to check on how sensitivity of mobile device in obtaioning the RGB value. Wether it manages to get the exact number, almost similar or not the same at all. The RGB values may varies depending on the different lighting, distance between the sample and the different type of devices that used to capture the color.

Figures shown below are the sample set that will be used for experimantation to obtain the RGB value from the mobile device.

Figure 12: A set of 48 different RGB values and colours

(27)

18

4.2 Data Evaluation

From the set of 48 colors, 7 colors are selected to be measure and analyze. In this experiment, “measure” is referirng to a smartphone’s camera is used to obtain or captured the color of the sample. While the term “analyze” is refering to converting the colors to RGB numbers. The RGB numbers obtain may differ from the original value due to the different lighting, quality of the camera or maybe the error in printing which may look the same but it differs a lot from original RGB value.

The value is measure and analyze to get its RGB number. The experiments are repeated 3 times to get its average color to reduce any errors from any experiment.

From Table 2, the colour on the left side are the original color while on the right side is from the average RGB. It can be seen that the colors on the right side shows a slight difference compared to the original colour. The test was executed with the same variables, which are the height of the camera from the colour samples, the light intensity, and there are no shadows blocking it. Although the variables are constant, the result produced are different from one another.

Table 2: Average of RGB colours from 2 types of Smartphone selected colours

The experiment continues with checking on the average RGB numbers for all colors from the sample.

(28)

19

Table 3: Average of RGB colours from Smartphone RGB reader for colour Red, Brown and Orange

Table 4: Average of RGB colours from Smartphone RGB reader for colour Yellow, Green and Blue

(29)

20

Table 5: Average of RGB colours from Smartphone RGB reader for colour purple and indigo

4.3 Pre-Calculation of Chromatic Parameter

From all 7 main colours, one colour is selected for further experimentation which is indigo. The experiments continue with obtaining the chromatic parameter for each colour by using the formula below. The equation below has not been set, it is just part of trial and error to check on which calculation works the best to obtain the Chromatic values.

So, for first experiment, equation 1 is used to obtained the chromatic value, χ1, of all indigo colors.

χ1 = 𝑅𝑏&+𝐺𝑏&+ 𝐵𝑏& - 𝑅𝑎&+𝐺𝑎&+ 𝐵𝑎& (1)

Rb, Gb, Bb are the RGB numbers obtained from the base colour while Ra, Ga and Ba is the RGB numbers from the average of RGB values from experimented colour.

(30)

21

Table 6: Chromatic parameters of indigo colour

Next, to check on the sensitivity of the camera, the range of the colors are being decrease. 3 colours from the indigo is selected. More colours are generated between each of the previous indigo colour. The details explanation is shown in figure below.

Figure 13: The smaller range of color indigo

From the new range of indigo, the experiments are repeated again to obtain the RGB and chromatic parameters, the graphs are plotted. Theoretically, the values wanted for the chromatic parameters need to be different from each other. As seen from I3b, I4 and I4a, the range of chromatic parameters fall in the same range numbers between 80-90. This will cause difficulties for future calculations. It is advisable to get numbers that falls in different range number.

The experiment was repeated again with different type of smartphone to see the differences of the results.

(31)

22

Figure 14: The table and graph obtained from the chromatic parameter using smartphone’s camera from iPhone

Figure 15:The table and graph obtained from the chromatic parameter using smartphone’s camera from Samsung

As seen from tables and graphs there are some colours that fall under same range of numbers. From experiment from Samsung base, all chromatic values fall under the same range of 60 – 70. This data will give some difficulties in setting the freshness level to the chromatic value. Different range of numbers are needed for different freshness level as example; 60<x<70, the food is fresh, 50<x<40, the food is spoiled. Hence, further studies are done with new equation to calculate the chromatic parameter. The studies are continued after testing of pH with different pH solution are completed.

x

x

x

x

(32)

23 4.4 pH Testing

By referring to section 3.3; experiment methodology part 1, 5 samples of pH have been prepared ranging from 1 to 14 which consist of some Acidic solution, some Alkaline solution and a neutral solution. A test was performed using the pH paper to observe on the reaction of pH paper and the 5 solutions. Theoretically, the different pH values will result in different colour. Which are dark purple for pH 14, green for pH7 and red for pH1.

Figure 16: pH indicator

Figure 17: Reaction on pH paper when it is dipped in Acidic solotion with a pH 1

(33)

24

Figure 18: pH paper reacts on the pH value and changes accordingly (left: pH14, right: pH1)

The studies have been continued in finding the changes of pH paper in smallest possible pH value. The experiment has been tested on solution which varies from pH 5.5 to 8.5. The experiment is conducted to see the sensitivity of the pH paper, on how well the pH paper will react on the solution tested as mention at section 3.3; experiment methodology part 2. The experiment is conducted using two types of pH paper. This is so that variation can be seen since different sensing material gives different value. From the experiment, it can be seen that the bigger pH paper is more sensitive than the smaller pH paper. In naked human eyes, the colour changes are not clearly seen. But on perspective of RGB code, the colour produced gives different value. This supports the problem statement that naked human eyes are not sensitive to colours thus, a device is needed to differentiate the colours of the sensing materials or in this case, the pH paper.

A further analyzation that will be shown on next part on the different RGB value.

Figure 19:Original colour of both pH paper

Figure 20: Reaction of pH paper to pH value of 5.5, 6 and 6.5 respectively

(34)

25

Figure 21: Reaction of pH paper to pH value of 7, 8 and 8.5 respectively

The current studies are ranging between 5 to 8 acid-neutral-alkali, and it will be continued with different solutions which are ranging between the pH 13 of alkalis and pH 2 of the acids respectively. Hence the reaction and the sensitivity of the pH can be clearly seen and the colour code be extracted.

From below, it shows that different color produces different RGB value. The color may look the same in naked human eyes but it produces different RGB when we a device is used to check.

Figure 22: RGB values tested on devices

(35)

26

The experiment continues with pH solution that varies from pH2 until pH13.

Hence, 12 solutions were prepared. A pH meter was used to get an accurate value of the solution.

Figure 23: pH meter of solutions with pH 2 and pH 13

Result below shows the color changes from original color to its respective color based on the pH.

Figure 24: original color of pH paper

Where R, G and B are RGB value from the experimented

Figure 25: reaction of pH based on their pH value.

The experiment is continued to the next part to get the RGB value and chromatic parameter.

(36)

27 4.5 Chromatic Values Calculation

From the 12 samples of pH paper, the colours are measured and analyzed to obtain the RGB value and the chromatic parameter as mentioned in Figure 11, part 5. A new formula is used for this experiment. Which is

X = (𝑅 − 𝑟)&+(𝐺 − 𝑔)&+ (𝐵 − 𝑏)& (2)

Where R, G, B are the RGB value from the pH paper. While r, g and b are the RGB value of the original color of the pH paper before it reacts to any pH value. In this case the value of r, g and b has been set to r=196, g=159, b=56. Substituting the r, g, b values to the formula, we will get:

X = (𝑅 − 196)&+(𝐺 − 159)&+ (𝐵 − 56)& (3)

The pictures for all 12 samples of pH paper were captured 3 times to decrease the error. By using the equation 3, all the 12 samples were calculated for its chromatic value, X and graph is generated to observe the result.

(37)

28

Table 7: RGB values of pH paper for 3 experiments

Table 8: Chromatic value for 3 experiments

Figure 26: Graph of Chromametry value, X vs pH

(38)

29

As mentioned before, it is stated that the pH value for fresh shrimp is at pH 6.24 while spoilage is at pH 9.04. From this data, the values from the table and graph can be relate with the spoilage pH for shrimp. It can be seen that for all three 3 pH values of 6, 7, and 8, they have significantly different number of X. pH 6 falls under range of 78 – 85, pH 7 falls under range of 116 – 120, and pH 8 falls under range of pH 145 – 155. From all values we can came up with 3 equations. At:

pH 6: 78 < X<85 = The shrimp is fresh pH 7: 116 < X<120 = The shrimp is good pH 8: 145 < X<155 = The shrimp is spoiled

Therefore, from all 3 values, we can set it in the mobile applications to ensure that it displays the correct freshness of the shrimp when reading the RGB of the litmus paper as mentioned in Figure 11, part 8.

4.6 Mobile Applications Development

Two types of Android base development have been tested for this study. Firstly, Android studio. Some simple apps have been tested such as camera calling and simple mathematics calculation as shown in Figure 27. Secondly, user uses MIT inventor in developing the apps. Some simple apps from Android Studio are generated such as camera call function from Figure 28 and calculator from Figure 29. Camera calling and calculations play a big role in developing the apps wanted.

Figure 27: a sample of simple calculator tested on the Android studio

(39)

30

Figure 28: a sample of camera call function generated

Figure 29: a sample of calculator generated

Android Studio have been used for further developing the Apps and after a few trial and error, the apps “real-time chromametry measurement” are manage to be developed.

As shown in Figure 30, it is the layout for the Apps generated.

(40)

31

Figure 30: Layout of real-time chromametry measurement apps

The coding for “real-time chromametry measurement” apps are attached in Appendix A.

4.7 Mobile Apps Testing

Referring to Section 3.3; experimental methodology part 10, the generated apps were tested to ensure there are no errors or bugs. The apps were tested with 3 pH paper of pH6, pH7, and pH8 to see that if it shows the freshness of food based on the color of pH paper. Figure 31, 32 and 33 are the results of the apps from the phone.

(41)

32

Figure 31: Testing of Apps on pH paper of pH6

Figure 32: Testing of Apps on pH paper of pH7

(42)

33

Figure 33: Testing of Apps on pH paper of pH8

From all 3 figures above, it is clearly shows that the apps is working as the given condition. Although pH paper of pH 7 and 8 looks almost the same, but the devices are able to differentiate it and shows different result for both of it. From pH paper 6, it manages to display that the food is fresh. While good in pH 7 and spoiled in pH 8. The apps only use the colors to display the freshness of the food.

(43)

34 CHAPTER 5

CONCLUSION AND RECOMMENDATIONS

5.1 Conclusion

Since there is high demand in high quality food from the consumers, many research has been done either to increase the life span of the food or to observe the changes of quality in food. Hence, technologies such as smartpackaging and sticker sensors have been developed. The common method that were used by all these technologies are they used colour changing label. The label will change as the quality of the food changes.

Even though there are plenty of colour changing label technologies have been produced, they still have their limitation on it. It requires consumer to read the colour using their naked eyes. As human eyes have their limitations, the colour that the eyes read will be slight different from each and every person. Hence, it shows that there are limitations to the current technologies.

By doing the mobile apps that will read the chromatic parameters from the colour changing labels, we can upgrade the existing technology. This project is a one step forward than the current technologies because it is upgraded to reading the label by using a mobile application from user’s smartphones. By only a single app, we can ensure that it is easier for the consumer to check on their quality of food. Therefore, from all the experiments done, the chromatic values of different pH paper have been assigned, mobile applications are managed to be developed.

In a nutshell, the mobile apps was developed based on the chromatic parameter of the pH paper. The simulations of the apps manage to achieve the targeted result. After several experiments and calculations, the perfect chromatic parameters could be set. From the experiments, it can be concluded that different colour has different RGB values despites the colours look similar from the naked eye. The data from the experiment was measured and analyzed carefully. From the results, it can be seen that the from the

(44)

35

different pH solution, different colour were able to be produced and different level of freshness were managed to be developed interrelate with the pH and colour.

5.2 Recommendation

From the research and studies done, the focus of this experiment is mainly referred to the freshness level of prawn. The experiment also is conducted by using pH paper as the sensoring material. Due different level of pH values for different type of food, this mobile application may not work with other type of food which have different pH range. Hence, it can be recommended that:

1. Continuation of studies by using different type of raw food such as meat, chicken and fish.

2. Changing to different sensoring materials that are more sensitive in changing level of pH of every food or chemicals components.

(45)

36

REFERENCES

1. Alasalvar, C., et al., 2010, Seafood Quality, Safety, and Health Applications: An Overview, in Handbook of Seafood Quality, Safety and Health Applications.

Wiley-Blackwell. p. 1-10

2. B Kuswandi, Jayus, A Restyana, A Abdullah, LY Heng, M Ahmad, 2012, A novel colorimetric food package label for fish spoilage based on polyaniline film in Food Control 25(1):18 ·

3. Galagan, Y. and W.F. Su, 2008, Fadable ink for time–temperature control of food freshness: Novel new time–temperature indicator. Food Research International, 41(6): p. 653-6

4. Darlene, 2010, The Danger Zone, Food Safety Matters. Accessed on 27/2/2016 from http://foodsafetymattersyear9.weebly.com/the-danger- zone.html

5. Visiolli, 2009, The Cotemporary Meaning of Food Freshness . dupont packaging resins, DuPont p 1-5

6. B Kuswandi, Jayus, TS Larasati , A Abdullah 2011, Real-Time Monitoring of Shrimp Spoilage Using On-Package Sticker Sensor Based on Natural Dye of Curcumin in Food Analytical Methods 5(4) ·

7. B Kuswandi, R Oktaviana, A Abdullah, LY Heng, 2014 A Novel On-Package Sticker Sensor Based on Methyl Red for Real-Time Monitoring of Broiler Chicken Cut Freshness in Packaging Technology and Science 27(1)

8. B Kuswandi, F Damayanti, Jayus A Abdullah, LY Heng, 2015, Simple and Low- Cost On-Package Sticker Sensor based on Litmus Paper for Real-Time Monitoring of Beef Freshness in Journal of Mathematical and Fundamental Sciences 47(3):236- 251 ·

9. B Kuswandi, Y Wicaksono, A Abdullah, LY Heng, M Ahmad, 2011, Smart Packaging: Sensors for monitoring of food quality and safety in Sensing and Instrumentation for Food Quality and Safety 5(3):137-146 · December 2011 10. K.L. Yam, P.T. Takhistov, J. Miltz, 2005, Intelligent packaging: concepts and

applications. in J. Food Sci. 70(1), R1–R10 (2005)

11. Colour to wavelength relationship. Retrieved on Oct 10, 2016 from https://academo.org/demos/wavelength-to-colour-relationship/

12. B Kuswandi, , D P Kinati, Jayus, A Abdullah, L Y Heng, 2013, Simple &

low-cost freshness indicator for strawberries packaging. Acta Manila.

13. B Kuswandi, , C Maryska, Jayus, A Abdullah, L Y Heng, 2013, Real time on-package freshness indicator for guavas packaging. Journal of Food Measurement and Characterization

14. Statista, 2016b. Worldwide mobile app revenues 2015–2020. Accessed on 4/4/2016 from: http://www.statista.com/statistics/269025/worldwide-mobile-app-revenue forecast

15. R. Garg, R. Telang, 2013, Inferring app demand from publicly available data MIS Q., 37 (4), pp. 1253–1264

(46)

37 APPENDICES

Appendix A

package com.mystudio.rgbtest;

import android.Manifest;

import android.content.CursorLoader;

import android.content.DialogInterface;

import android.content.Intent;

import android.database.Cursor;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Color;

import android.graphics.Matrix;

import android.graphics.drawable.BitmapDrawable;

import android.graphics.drawable.Drawable;

import android.net.Uri;

import android.os.Bundle;

import android.os.Environment;

import android.provider.MediaStore;

import android.support.v7.app.AlertDialog;

import android.support.v7.app.AppCompatActivity;

import android.view.MotionEvent;

import android.view.View;

import android.view.animation.Animation;

import android.view.animation.AnimationUtils;

import android.widget.Button;

import android.widget.ImageView;

import android.widget.TextView;

import android.widget.Toast;

import com.kimo.lib.alexei.Alexei;

import com.kimo.lib.alexei.Answer;

import com.kimo.lib.alexei.Utils;

import com.kimo.lib.alexei.calculus.DominantColorCalculus;

import com.vistrav.ask.Ask;

import com.vistrav.ask.annotations.AskDenied;

import com.vistrav.ask.annotations.AskGranted;

import java.io.ByteArrayOutputStream;

import java.io.File;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

//Variables declaration

private ImageView input_imageview;

private TextView rgb_result_textview;

private TextView food_result_textview;

(47)

38

private Button more_btn;

private Button camera_btn;

private Button photo_btn;

private Button refresh_btn;

private Button edit_btn;

private View color_indicator_view;

private final int INPUT_IMAGEVIEW_ID = R.id.input_imageview;

private final int RGB_RESULT_TEXTVIEW_ID = R.id.rgb_result_textview;

private final int FOOD_RESULT_TEXTVIEW_ID = R.id.food_result_textview;

private final int MORE_BTN_ID = R.id.more_btn;

private final int CAMERA_BTN_ID = R.id.camera_btn;

private final int PHOTO_BTN_ID = R.id.photo_btn;

private final int REFRESH_BTN_ID = R.id.refresh_btn;

private final int EDIT_BTN_ID = R.id.edit_btn;

private final int COLOR_INDICATOR_VIEW_ID= R.id.color_indicator_view;

private final int CONSTANT_RED = 196;

private final int CONSTANT_GREEN = 159;

private final int CONSTANT_BLUE = 51;

private int REQUEST_CAMERA = 0;

private int SELECT_FILE = 1;

Bitmap bmp;

Uri selectedImageUri = null;

ByteArrayOutputStream stream;

FileOutputStream fo;

boolean isEdit = false;

@Override

protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

//Call this function to initialize the view of the screen initView();

checkIfImageExist();

//Set on touch listener to the particular button edit_btn.setOnTouchListener(onTouchButtonAnim);

camera_btn.setOnTouchListener(onTouchButtonAnim);

photo_btn.setOnTouchListener(onTouchButtonAnim);

}

@Override

protected void onPause() { super.onPause();

}

@Override

protected void onResume() { super.onResume();

}

@Override

public void onBackPressed() { super.onBackPressed();

}

(48)

39

private void initView() {

input_imageview = (ImageView) findViewById(INPUT_IMAGEVIEW_ID);

rgb_result_textview = (TextView) findViewById(RGB_RESULT_TEXTVIEW_ID);

food_result_textview = (TextView) findViewById(FOOD_RESULT_TEXTVIEW_ID);

more_btn = (Button) findViewById(MORE_BTN_ID);

camera_btn = (Button) findViewById(CAMERA_BTN_ID);

photo_btn = (Button) findViewById(PHOTO_BTN_ID);

refresh_btn = (Button) findViewById(REFRESH_BTN_ID);

edit_btn = (Button) findViewById(EDIT_BTN_ID);

color_indicator_view = (View) findViewById(COLOR_INDICATOR_VIEW_ID);

//Set on click listener of particular button more_btn.setOnClickListener(this);

camera_btn.setOnClickListener(this);

photo_btn.setOnClickListener(this);

refresh_btn.setOnClickListener(this);

edit_btn.setOnClickListener(this);

//Make the edit button set to "OFF" by default

edit_btn.setBackgroundResource(R.drawable.btn_orange); //Button orage means 'OFF' button

}

// Change this button responding to onclick private void changeEditBtnBehavior() { //For button UI

if

(edit_btn.getText().equals(getResources().getString(R.string.edit_on))) { edit_btn.setBackgroundResource(R.drawable.btn_orange);

} else { //if the text is 'EDIT OFF'

edit_btn.setBackgroundResource(R.drawable.btn_green);

} }

private void refreshImage() {

if (rgb_result_textview.getText().toString().equals("....")) { //Something here...

} }

//Check if image already exist then execute the function; else display a 'toast' msg

private void checkIfImageExist() {

if (input_imageview.getDrawable() == null) { edit_btn.setEnabled(false);

rgb_result_textview.setText("No image found...");

Toast.makeText(getApplicationContext(), "image not found", Toast.LENGTH_SHORT).show();

} else {

edit_btn.setEnabled(true);

processImageAutoMode();

Toast.makeText(getApplicationContext(), "image found", Toast.LENGTH_SHORT).show();

} }

//Change edit mode

private void changeEditMode() { changeEditBtnBehavior();

String edit_mode = edit_btn.getText().toString();

(49)

40

if (edit_mode.equals(getResources().getString(R.string.edit_off))) { //disable edit mode

edit_mode = getResources().getString(R.string.edit_on);

edit_btn.setText(edit_mode);

isEdit = true;

} else if

(edit_mode.equals(getResources().getString(R.string.edit_on))) { edit_mode = getResources().getString(R.string.edit_off);

edit_btn.setText(edit_mode);

isEdit = false;

} else { }

if (isEdit) { //if true

input_imageview.setEnabled(true);

processImageManualMode();

} else {

input_imageview.setEnabled(false);

} }

public static int getHexColor(int[] color) {

return android.graphics.Color.rgb(color[0], color[1], color[2]);

}

//Get RGB value manually

private void processImageManualMode() {

input_imageview.setOnTouchListener(new View.OnTouchListener() { @Override

public boolean onTouch(View view, MotionEvent event) { float eventX = event.getX();

float eventY = event.getY();

float[] eventXY = new float[]{eventX, eventY};

Matrix invertMatrix = new Matrix();

((ImageView) view).getImageMatrix().invert(invertMatrix);

invertMatrix.mapPoints(eventXY);

int x = Integer.valueOf((int) eventXY[0]);

int y = Integer.valueOf((int) eventXY[1]);

System.out.println(

"touched position: "

+ String.valueOf(eventX) + " / "

+ String.valueOf(eventY));

System.out.println(

"touched position: "

+ String.valueOf(x) + " / "

+ String.valueOf(y));

Drawable imgDrawable = ((ImageView) view).getDrawable();

Bitmap bitmap = ((BitmapDrawable) imgDrawable).getBitmap();

System.out.println(

"drawable size: "

+ String.valueOf(bitmap.getWidth()) + " / "

(50)

41

+ String.valueOf(bitmap.getHeight()));

//Limit x, y range within bitmap if (x < 0) {

x = 0;

} else if (x > bitmap.getWidth() - 1) { x = bitmap.getWidth() - 1;

}

if (y < 0) { y = 0;

} else if (y > bitmap.getHeight() - 1) { y = bitmap.getHeight() - 1;

}

int touchedRGB = bitmap.getPixel(x, y);

int redValue = Color.red(touchedRGB);

int greenValue = Color.green(touchedRGB);

int blueValue = Color.blue(touchedRGB);

int[] color={redValue,greenValue,blueValue};

color_indicator_view.setBackgroundColor(getHexColor(color));

//color_indicator_view.set(Color.argb(0, redValue, blueValue, greenValue));

rgb_result_textview.setText("R=" + redValue + ", G=" + greenValue + ", B=" + blueValue);

food_result_textview.setText(getResultFromRGB(redValue, greenValue, blueValue));

return true;

} });

}

//Get RGB value automatically by getting the major color private void processImageAutoMode() {

Alexei.with(MainActivity.this) .analyze(input_imageview) .perform(new

DominantColorCalculus(Utils.getBitmapFromImageView(input_imageview))) .showMe(new Answer<Integer>() {

@Override

public void beforeExecution() { //setContentShown(false);

rgb_result_textview.setText("....");

}

@Override

public void afterExecution(Integer answer, long elapsedTime) {

int red = Color.red(answer);

int green = Color.green(answer);

int blue = Color.blue(answer);

int[] color={red,green,blue};

color_indicator_view.setBackgroundColor(getHexColor(color));

rgb_result_textview.setText("R=" + red + ", G=" + green + ", B=" + blue);

(51)

42

food_result_textview.setText(getResultFromRGB(red, green, blue));

}

@Override

public void ifFails(Exception error) { }

});

}

//Show a pop up msg to select the image source to pick up private void selectImage() {

final CharSequence[] items = {"Take Photo", "Choose from Gallery", "Cancel"};

AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);

builder.setTitle("Select item photo");

builder.setItems(items, new DialogInterface.OnClickListener() { @Override

public void onClick(DialogInterface dialog, int item) { if (items[item].equals("Take Photo")) {

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

startActivityForResult(intent, REQUEST_CAMERA);

} else if (items[item].equals("Choose from Gallery")) { Intent intent = new Intent(

Intent.ACTION_PICK,

MediaStore.Images.Media.EXTERNAL_CONTENT_URI);

intent.setType("image/*");

startActivityForResult(

Intent.createChooser(intent, "Select File"), SELECT_FILE);

} else if (items[item].equals("Cancel")) { dialog.dismiss();

} } });

builder.show();

}

//optional : if the camera permission is granted @AskGranted(Manifest.permission.CAMERA)

public void fileAccessGranted() {

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

startActivityForResult(intent, REQUEST_CAMERA);

}

//optional

@AskDenied(Manifest.permission.CAMERA) public void fileAccessDenied() { }

//optional : if the external storage permission is granted @AskGranted(Manifest.permission.WRITE_EXTERNAL_STORAGE) public void mapAccessGranted() {

Intent intent = new Intent(

Intent.ACTION_PICK,

MediaStore.Images.Media.EXTERNAL_CONTENT_URI);

intent.setType("image/*");

Gambar

Figure 2: Temperature danger zone on rate of growth of bacteria[4]
Figure 1: Fadable ink for time – temperature control of food freshness[3]
Figure 3: The difference of PANI films on fresh fish and spoilage fish [2]
Figure 6: Application of red litmus paper as sticker sensor [8]
+7

Referensi

Garis besar

Dokumen terkait