Abstract: With the advent of Industry 4.0, the use of new technologies, robotization and advanced manufacturing has been extended to the agricultural sector, with the aim of increasing productivity, reducing environmental impacts, increasing profits and improving product quality from where emerged the terms Precision Agriculture, Agribusiness 4.0, Agriculture 4.0 and Agri-industry-4.0. However, while much is being said about adopting new technologies in the stages of soil preparation, planting and harvesting, little is said about the processing of agricultural products using, for example, automated systems for visual quality inspection. This work aims to investigate the different approaches for automatic visual inspection of grain quality proposed in the last decade and present a discussion about how these approaches are inserted in the context of these new productive processes of modern agriculture, as well as the positive aspects and limitations found for their uses.
Keywords:Agroindustry 40Agroindustry 40,Industry 40Industry 40,Agriculture 40Agriculture 40,Automatic Visual InspectionAutomatic Visual Inspection,GrainsGrains,Agricultural SectorAgricultural Sector.
Resumo: Com o advento da Indústria 4.0, o emprego das novas tecnologias, da robotização e da manufatura avançada tem sido estendido para o setor agrícola, com o objetivo de aumentar produtividade, diminuir os impactos ambientais, aumentar os lucros e melhorar a qualidade dos produtos, dando origem aos termos Agricultura de Precisão, Agronegócio 4.0, Agricultura 4.0 e Agroindústria-4.0. Contudo, se por um lado muito se fala sobre a adoção de novas tecnologias nas etapas de preparação do solo, plantio e colheita, pouco se fala sobre o beneficiamento dos produtos agrícolas usando, por exemplo, sistemas automatizados para inspeção visual de qualidade. Este trabalho tem como objetivo investigar as diferentes abordagens para inspeção visual automática da qualidade de grãos propostas na última década e apresentar uma discussão sobre como tais abordagens se inserem no contexto desses novos processos produtivos da agricultura moderna, bem como os aspectos positivos e as limitações encontradas para suas utilizações.
Palavras-chave: Agroindústria 40, Agronegócio 40, Indústria 40, Inspeção Visual Automática, Grãos.
AUTOMATIC VISUAL INSPECTION OF GRAIN QUALITY IN AGROINDUSTRY 4.0
INSPEÇÃO VISUAL AUTOMÁTICA DA QUALIDADE DE GRÃOS NA AGROINDÚSTRIA 4.0

Recepción: 19 Septiembre 2018
Aprobación: 21 Septiembre 2018
The fourth Industrial Revolution, or Industry 4.0, is promoting a digital revolution characterized by a set of technologies such as artificial intelligence (AI) and computer vision (CV) that are all around us, from standalone cars, drones, virtual assistants, and software that translates or invests.
AI has shown an impressive progress in recent years, boosted by exponential increases in processing power and the availability of large amounts of data, enabling from the creation of software for the discovery of new drugs to algorithms that predict our cultural interests.
Digital manufacturing technologies are interacting with the biological world daily. Engineers, designers and architects are combining computational design, additive manufacturing, materials engineering and synthetic biology to create a symbiosis between microorganisms, our bodies, the products we consume, and even the buildings we inhabit (Schwab, 2015).
Brazil has been the scene of this industrial and agronomic evolution and is one of the countries with the greatest agricultural potential of the world, considering its planted area, and great potential for agricultural intensification (Simões et al., 2017). Grain productivity, for example, should increase over current levels, as soy, corn and bean producers are now producing for export to China, India and some African countries (CONAB, 2018; Embrapa, 2008). The lack of workforce and cultivation areas, the need of improvement of products quality and the search for economic, environmental and social sustainability of this sector, also generate important challenges for technological evolution and demand numerous research efforts (CONAB, 2018; Embrapa, 2008).
Precision Agriculture (PA) is one of the current trends to overcome the challenges pointed out, as it recommends the application of automated systems in tasks such as irrigation, processing, storage and transportation of agricultural products. Thus, with this technological evolution, new practices emerge to maximize its benefits. However, the term PA appears in the literature closely related to soil preparation, planting and harvesting tasks.
In a broader context, and more related to Industry 4.0, are the terms Agribusiness 4.0, Agriculture 4.0 and Agroindustry 4.0, which signal a new milestone in the development of agri-food and that will undoubtedly promote important changes in the coming years. These changes involve the massive use of different technologies such as Internet of Things (IoT), Cloud Computing and Machine Learning, to develop smarter processes, optimize decision making and improve production processes, leading to the production of products with higher quality and respect to the environment (Moya et al., 2017; Fonseca, Massruhá, & Angelica De Andrade Leite, 2016).
While much is said about the various technologies used in soil preparation, planting and harvesting, little is said about the processing of agricultural products, such as automated visual grain inspection processes. It is in this context that this work is inserted, presenting a review of the literature on the various approaches proposed for automatic visual inspection of grains. Many of these approaches were tested only in the theoretical field and could be better explored in the context of Agroindustry 4.0, being applied in real agricultural production environments, adding value to products brought to the final consumer.
It should be noted that although there are approaches for inspection of the most diverse agricultural products, in this work we focused on those related to grain products due to their importance in terms of both production and consumption.
Finally, on the terminology of Precision Agriculture (PA), Agribusiness 4.0, Agriculture 4.0 and Agroindustry4.0, it is important to note that there seems to be a consensus in the literature that PA is closely related to the automation of processes, ranging from preparation of land to harvesting. For example, the use of satellites and drones to collect information on the conditions of agriculture, soil and meteorological conditions that are passed on to farmers, researchers and managers in real time; and installation of sensors in the plantations to guide tractors and autonomous harvesters.
Agribusiness 4.0 is very closely related to automations that include agricultural business processes. However, it was not possible to identify in the literature the differences between Agriculture 4.0 and Agroindustry 4.0. Thus, in this work we associate automated visual inspection approaches to Agroindustry 4.0 because we understand that it involves activities of processing the agricultural raw material.
Industry 4.0 is capable not only of providing modern methods of large-scale production but also of proposing a revolutionary way in which there is a special focus on self-sufficiency and a concern to free the human being from routine and repetitive activities. Thus, the agricultural sector has also appropriated this capacity to aggregate new ways of working with the use of new technologies in all stages of production.
The idea is that the farm of the future be widely monitored and automated. For example, sensors can be distributed all over the property and interconnected to the Internet (IoT) generating a large data volume (Big Data) that will need to be processed, stored (cloud computing) and analyzed, for example, using machine learning algorithms (Fonseca et al., 2016). This new precision and production control will substantially reduce the fragility of agriculture to environmental in clemencies, bringing significant advances in food production, with better quality and without harming the environment (Parronchi, 2017).
From the sowing to the final consumer's table, quality inspection steps are necessary. Such inspections intend to guarantee that products are free from abnormal odors, moisture, foreign materials, residues and pest infestations to ensure that they reach consumers promptly and in full conditions (MAPA, 2015).
Inspection of visual quality is of extreme importance for most agricultural products. In many cases, their visual properties such as color, shape and size consist of the main characteristics evaluated by consumers, being important factors for the determination of their market price (Patil, Yadahalli, & Pujari, 2011).
Despite the importance of the visual inspection tasks of agricultural products, it is very common that they occur manually, can be time-consuming, tedious, generate high operating costs, can be subject to human failure and present difficulties for standardization of results (Sidnei Alves De Araújo, Pessota, & Kim, 2015a; Patil et al., 2011). In this context, the use of computational tools aiming at the automation of such tasks can bring a competitive differential to Agroindustry4.0.
CV can be defined as a subarea of image processing that studies the development of methods and techniques to enable a computer system to interpret images. In other words, a computer vision system (CVS) must endow a machine with some capabilities of the human visual system, such as the ability to describe and interpret the contents of a digital image (Gonzalez & Woods, 2009).
Nevertheless, an efficient SVC must be capable of extracting a set of attributes that accurately describes an image, is small enough to reduce processing time and enables the construction of applications that can be used in practice.
Some examples are vision systems for industrial robots and autonomous vehicles, detection of events in surveillance systems, automated reading of vehicle license plates, recognition of biometric standards, and visual inspection of industrial and agricultural products, among others.
With CV and AI methods, it is possible to recognize patterns where the producer can evaluate a sample of his crop, determine the quality of the product, and identify defects in the products that may indicate problems for the harvest and the need for changes in the management of planting and production.
From the point of view of the type of approach, this is a qualitative research, considering that the main idea was to collect and discuss data without, however, doing any statistical treatment to it. Regarding the objectives, this is an exploratory research, since it aims to provide greater familiarity with the problem in order to make it explicit.
Finally, from the point of view of the technical procedures, this research can be classified as bibliographical, since it was elaborated from material already published (Gil, 2009).
The bibliographic survey included the following databases: Capes, IEEE, ProQuest, SciELO, Science Direct and Google Scholar. In order to identify articles related to the new processes of modern agriculture, the following keywords were considered (in both English and Portuguese): "agriculture 4.0", "agroindustry 4.0", "agribusiness 4.0" and "precision agriculture". To identify the approaches for automatic visual inspection of grain quality, were also considered the keywords "quality", "inspection", "visual", "automatic" and "grain” (in both English and Portuguese).
In this second bibliographical survey, of greater interest for this work, numerous articles were identified and, after reading the abstracts, those that did not refer to agricultural grains were excluded. The selection resulted in 20 articles, which are presented and discussed in the next section.
An analysis of the researched works highlights that, according to (Castro Jorge & Inamasu, 2014), the Brazilian agribusiness is beginning to discover a set of technologies capable of promoting significant advances in food production, with higher quality and without harming the environment.
Inamasu & Bernardi (2014) agree that next to this technological evolution, new concepts or practices appear that seek to maximize their benefits. Hence, automation is used to expand the capacity of human labor (Embrapa, 2008).
Inamasu & Bernardi, 2014 report that 47% of the producers they interviewed used conventional systems (without the use of computers) in property management while the rest 53% adopted concepts of PA.
However, Brito et al (2010) indicate that there are still no studies on the degree of adoption in the country and its determinants. Bernardi et al (2011) agree that national farming has particular characteristics and demand machines, implements and equipment suitable for our reality.
De Toledo, Batalha, & Amaral, 2000 report that the inspection of agricultural products is one of the means to achieve food security and establish a common protocol for the exchange of similar information to trace the food chain from the farm to the supermarket.
Bernardi et al (2011) report that manufacturers of agricultural machinery and equipment, and especially the national manufacturers of implements, are faced with technical barriers because they have not traditionally had departments for the development of embedded electronics and because of the shortage in the market of companies supplying electronics for agricultural applications.
The current moment is generating an increase in demand for food production. Climate change and scarcity of natural resources, such as water and soil nutrients, require a change in the way agricultural products are produced, processed and traded (Agrosmart, 2016)
According to (Sobrinho, 2000), processing is one of the last steps in the inspection process of grain quality, where immature seeds, cracked or broken grains, weeds or any other foreign material different from the raw material are verified and separated.
Still according to the authors, in the past, one of the methods for the beneficiation of grains was the fan, which was primitive because it was based only on the density between the raw material and foreign materials.
Nowadays, with the new technologies, other factors such as size, color and texture can be taken into account by automated inspection systems, contributing significantly to modern agriculture.
Visual inspection of grains is part of the world of agribusiness. For this reason, efforts in the area of CV, especially those focused on pattern recognition methods in digital images, are important because they strengthen and encourage the development of solutions to practical problems of Agribusiness 4.0.
Table 1 lists studies from the recent literature proposing the use of systems based on image analysis and processing techniques, or CVS, for classification and detection of defects in agricultural grains. Information on the grains considered, purpose of the study, accuracy obtained in the experiments and whether they are able to segment conglutination among grains are presented in this table.
Among the studies presented in Table 1, nine proposed automatic systems to classify bean grains, with only one approaching defects. In addition, only seven studies, among which most are recent, consider the segmentation of conglutination among grains in images. In most of the proposed approaches, grains are placed purposely separated to facilitate segmentation, which is one of the first steps of a visual inspection computer system, making it unsuitable to use such approaches in the practical field.
Of all the studies investigated, only (Peterson A Belan, Pereira, Araújo, & Alves, 2016) were concerned with processing time being one of the few studies that present an apparatus for simulating an actual situation in an industry. In view of this, it is noticed that the most recent work has invested especially in the segment of grain segmentation and reduction of processing time, aiming at the development of systems that can be used in quality processes both in agriculture and in the food industry.

It is observed that a good part of the studies is directed to the analysis and classification of rice and beans, perhaps because they are two types of grain widely consumed in the world. Most of the authors who have mentioned accuracy and / or precision in their work reported rates above 90%, which is very positive regarding the practical use of their proposals.
Finally, none of the authors listed in Table 1 relate the proposed approach to Agriculture 4.0 or Precision Agriculture, which shows a certain distance from the proposed approaches with what happens in practice in modern industry and agriculture.
The fourth Industrial Revolution is already part of modern agriculture. Thus, terms such as AI, CV and IoT, which were previously unknown, are already common and have been discussed at events in this segment.
However, despite the great benefits that Industry 4.0 can bring to agriculture, Brazil still has some difficulties in implementing such benefits. On the review of the literature on modern agriculture carried out in this study, it was not possible to identify the differences between Agriculture 4.0 and Agroindustry 4.0, which shows that there is still no consensus on the use of these terms.
Regarding the automatic visual inspection systems proposed in the literature, although important for modern agriculture, for they increase productivity, reduce environmental impacts, increase profits and improve product quality, they lack some advances since most of them classify grains without detecting defects and are tested only in laboratory experiments.
Cite it like this: Macedo, R., Marques, W., Belan, P., & de Araújo, S. (2018). Automatic Visual Inspection of Grains Quality In Agroindustry 4.0.International Journal of Innovation, 6(3), 207-216. http://dx.doi.org/10.5585/iji.v6i3.339
The authors would like to thank CNPq– Brazilian National Research Council for the research scholarship granted to S. A. Araújo (Proc. 311971/2015-6) and FAPESP–São Paulo Research Foundation (Proc. 2017/05188-9).
Evaluation Process: Invited paper E-ISSN: 2318-9975
