Bottled liquid impurity and liquid level detection method based on image processing
A bottled liquid, image processing technology, applied in the field of image processing, to achieve the effect of reducing conservatism
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2016-02-17
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
Technical field
[0001] The invention relates to an image processing method, in particular to a bottled liquid impurity and liquid level detection method based on image processing. Background technique
[0002] As we all know, whether the bottled liquid contains impurities is related to the safety of food and medicine. Food safety issues have become a hot topic in today's society, so it is very important to strictly control the sanitation in the food production process and ensure food safety. However, nowadays, most domestic enterprises and product production workshops use traditional visual recognition. This recognition method is slow, the inspectors are prone to fatigue, and the reliability is poor. Regardless of the practicality or the cost requirements of enterprises, it is a trend to use image processing methods with simple principles, low costs and easy operations to detect food.
[0003] There is no fixed algorithm for image processing. Research on image processing must tak...
Examples
Embodiment Construction
[0021] The present invention will be further explained below in conjunction with the drawings. Since the invention only introduces the algorithm of the detection system, the following schematic diagram only shows the basic composition related to the invention.
[0022] An algorithm for detecting impurities and liquid level in bottled liquids based on image processing. The specific algorithm is as follows:
[0023] a. The camera collects and inputs the image to be processed;
[0024] b. Create a memory space for storing images after each step of processing;
[0025] Call the cvCreatImage() function in OpenCV to create the memory used to store the image after each step of processing.
[0026] c. Use Gaussian filtering to perform grayscale smoothing on the image;
[0027] d. Use the improved otsu adaptive threshold segmentation algorithm to find the threshold T 1 ;
[0028] e. A certain proportion of the threshold found in d is enlarged to obtain a new threshold T 2 ; The specific algorithm...