Keywords

1 Introduction

Statistics show that agriculture plays an important role in Poland. Poland is famous for the production of cereals, rapeseed and potatoes. The use of artificial neural networks and computer image analysis in agriculture and processing in the assessment of the quality of raw materials and final products can make a huge contribution [1]. As currently stated in the literature [2, 3], machine vision system based image analysis is widely used in the food industry to monitor food quality, greatly assisting researchers and industry in improving food inspection efficiency. Meanwhile, the use of deep learning in machine vision has significantly improved food identification intelligence. This article reviews the application of machine vision in food detection from the hardware and software of machine vision systems, introduces the current state of research on various forms of machine vision, and provides an outlook on the challenges that machine vision system faces. According to Xi Bin [2], the main function of computer vision is to simulate the video and graphic information seen by human eyes and to monitor and process existing data image information, which can facilitate technicians to quickly capture sensitive detection indicators in the process of data entry, information integration, data analysis and data labeling. Machine vision systems usually include two parts: image information capture and image information [4, 5].

Since the authors point out that the problem of assessing the quality of raw materials is important, an attempt was made to develop a quality assessment method using computer image analysis. The aim of the work is to optimize the management of the process of evaluation of contaminants in grain mass in the warehouse and during purchase using vision techniques based on computer image analysis in order to expedite laboratory work [6, 7].

2 Research Methodology

Artificial neural networks were also used to model the results. It was therefore assumed that on the basis of the prepared application for processing and analyzing the acquired digital images, based on the RGB color recognition model, a quick and good method of assessing the quality of products will be obtained. There is a great practical demand for such solutions, e.g. during the purchase of cereals for storage. Determining the initial quality of the incoming seed in terms of impurities gives an immediate basis for determining the price of the purchased material. The second aspect of using this method is the quality control of the grain stored in the warehouses. The development of such a method will allow to quickly obtain results without time-consuming laboratory work. For this purpose the samples of wheat seeds were prepared. The computer application was prepared and developed to assess the degree of contamination of grain mass based on the RGB model. Also a measurement stand was made to enable taking digital photographs of appropriate quality and digital photographs of the collected wheat seed samples were taken [8, 9]. The obtained photographs of wheat seed samples were analyzed using the “Agropol V08” computer application and neural analysis of the obtained empirical results was performed [10].

The research was conducted in a company dealing with the purchase and storage of cereals. For the research, wheat that was stored in the floor cereal warehouse there were used. The research was conducted for 7 months’ storage period from the loading date. Samples were taken every 4 days (8 samples per month). Five samples were taken each time from a randomly selected batch of wheat pile. Approximately 0.5 kg of grain was collected for testing. Samples were taken using a prototype multi-chamber probe with an overall length of 150 cm, which was equipped with a humidity and temperature sensor type AM2302. The probe allowed for the acquisition of a representative cross-sectional sample at the depth of up to 120 cm and for the study of temperature and humidity of the intergranular space at a depth of about 100 cm. Then the sample was taken to the laboratory, where the contaminants were determined by means of the weight-sieve and microscopic methods. In parallel, the same sample was evaluated using computer image analysis. For this purpose, a special test stand was used, equipped with a camera for image acquisition (sampling) and connected with a computer application for grain evaluation. After the acquisition of the image, the analysis was carried out using the computer application “Agropol V08”. Figure 1 shows the test stand.

Fig. 1
A photo captures a laptop on a table with wires connected to its ports. The scanner box, containing grains in a dish, is being examined through software displayed on the laptop screen.

Source Katarzyna Szwedziak

Computer image analysis stand.

To carry out research based on computer image analysis, “Agropol V08” application was developed, which is used to analyze, process and recognize images. Its basic feature is the ability to build image processing scripts. For this purpose, a scripting language has been built in that allows for a number of graphic operations. The program is adapted to read and write images in standard graphic formats (BMP, JPEG). The results obtained were compared with those from the laboratory. Neural modelling was used for comparative assessment. The task of “Agropol V08” computer application based on the RGB color description model and the application of the color recognition model was to extract the measured objects from the background and averaging the RGB components within the object outline:

$$ R,G,B = \frac{{\sum {R_{0 - 255} \cdot K} }}{\sum K } $$
(1)

where

R:

acquisition resolution (0–255),

K:

number of pixels of a given resolution.

With the average values of the R, G, B components, you can calculate the average brightness of the image according to the formula:

$$ I = \left( {R + G + B} \right)/3 $$
(2)

3 Results and Discussion

In addition, as part of the research, the management of the entire technological process has been implemented in parallel with the currently operating system. With such an approach it was possible to work out an optimal scheme of implementation of the new solution. It was also possible to compare the time of conducted research, determine the costs incurred by both operating systems and calculate the operating profit related to the implementation of the new solution. As part of the research conducted, only the cleaning process was analyzed for profitability. The whole technological process was divided into the following stages: weighing, sampling, evaluation of the composition and quality of contaminants, unloading, intra-elevator transport, cleaning (separation), drying, storage, transport [11]. The implementation of the innovative method will improve the organization of the technological process at the stage of weighing, sampling, assessment of the composition and quality of pollutants, cleaning and drying. The analysis assumes a comparison of the current method of sampling and evaluation in the technological process and the implemented method carried out during the research. Figure 2 shows a block diagram of granular material evaluation technology.

Fig. 2
A block diagram of granular material evaluation technology includes stags such as laboratory, place abstersion, and dryer. The warehouse includes computer evaluation, receipt of foods, traditional method, cleaning, result analysis, clean and separation, and drying.

Source: own study

Block diagram of granular material evaluation technology.

As part of the project, the profitability of the project was assessed using the EBIT operating profit ratio. The key element was the time of receipt of the produce and thus the lost profit when using the traditional method. Figure 2 shows a diagram of the entire process.

The assumption for the analysis was that the company is able to work 12 h a day in the working season. On average, from experience and analysis of the company’s records, it follows that the receipt department accepts around 50 transports (2021 data) with 20 tons of grain. The time of the task performance by traditional method takes about 15 min. In case of implementation of the new method, the time is reduced to 3–5 min per transport. The laboratory is able to handle 150 shipments of 20-tonne each using the new vision method within the same period [12, 13]. The financial analysis was based on generating income only from the cleaning and separation stage. Shipment of wheat with the contamination up to 1% of grain value was accepted for analysis. After the analysis at this technological stage, it was found that the traditional method generates a value of 11,522 PLN/day (operating profit), and the vision method 2,073,960 PLN/day (operating profit). The value was calculated using the following formula:

  1. (1)

    (+) direct revenue—taxable revenue

  2. (2)

    (−) tax-deductible costs

  3. (3)

    (=) profit (+)/loss (−)—operating profit

The financial data include purchase and sale prices in 2021. Subsequently, a financial analysis was made based on generating income only from the technological stage of cleaning and separation. Shipment of wheat with the contamination up to 2% of grain value was accepted for analysis. After analysis at this technological stage, it was found that the traditional method generates a value of PLN 12 354 per day (operating profit) and the vision method PLN 2,359,614 per day (operating profit).

Based on the operating profit ratio only, the percentage of growth ranges from 90 to 190%. The entire technological process has also been modernized to avoid bottlenecks:- material cleaning,

  • drying

  • transport inside the warehouse.

As part of the project, fixed assets were purchased to improve the whole process. Based on the above assumptions, an analysis of the so-called straight payback on investment was also made. The payback time is understood as the time necessary to recover the initial expenditure on the project. This factor allows to choose from investment projects under consideration such an option which enables the fastest payback of initial expenditure. In the case of a single project, it may be carried out if its payback period is shorter or equal to the period accepted by the investor as acceptable.

In applying this criterion, the annual nominal amounts of income should be summed up and the resulting sum should be compared with the value of the expenditure.

$$ OZN = \frac{CNPI}{{PRNF}} $$

where

ONZ:

payback time

CNPI:

total investment project expenditure

PRNF:

planned annual financial surpluses resulting from a given undertaking

In this case, the ONZ value—the payback time is about 3 years.

4 Conclusion

On the basis of the analyses carried out, it was found that neural models for quality assessment of wheat grain contaminants, which were developed and verified logically and experimentally, confirmed that it is advisable to use them on the basis of color characteristics obtained from the image analysis software developed. The application of computer image analysis allowed for a significant acceleration of the assessment of the quality of the examined material in relation to traditional methods. This method was of particular importance in the case of the examination of the condition of the seed coat of wheat from the cereal warehouse. The generated models were characterized by good parameters and high quality, obtaining a high R2 coefficient, at the level of 0.999. As part of the investment project we have savings resulting from the time of receipt of goods and further production process. Profitability was estimated at 190% per day. The analysis was made without taking into account other costs related to the business activity. The straight payback time is 3 years.

This paper illustrates how to optimize the management of the process of evaluation of contaminants in grain mass in the warehouse and during purchase using vision techniques based on computer image analysis in order to expedite laboratory work.

Sensor technologies can be used from the production industry to provide an economic advantage to the farming enterprise [14]. Strategies can be associated with the farming procedure for economic decision making, sustainable agricultural practices and food security [15].

Marketing managers may use technology optimization in providing packaging information with code generators (QR) and detailed information about the products for customers to be informed.