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

CN105334228AActive Publication Date: 2016-02-17HARBIN ENG UNIV
2 Cites 16 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2016-02-17

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a bottled liquid impurity and liquid level detection method based on image processing. The bottled liquid impurity and liquid level detection method comprises following steps: a, images to be processes are collected and inputted by a camera; b, a memory space used for storing images obtained via each step of treatment is constructed; c, Gaussian filtering is adopted for image grayscale smoothing treatment; d, improved otsu auto-thresholding algorithm is adopted so as to obtain a threshold T1; e, the threshold T1 is subjected to amplification so as to obtain a new threshold T2; f, the threshold T2 is used for binary-morphology treatment of the images obtained via Gaussian filtering; g, detection on impurities and liquid level is carried out, and results are outputted; and h, the memory space is released. The bottled liquid impurity and liquid level detection method is capable of realizing self-adaptive adjustment of thresholds in a certain light range. It is shown by experiment results that the bottled liquid impurity and liquid level detection method is capable of identifying impurities with a diameter larger than 0.5mm, detecting liquid level accurately, giving an alarm on unqualified products, and rejecting unqualified products.
Need to check novelty before this filing date? Find Prior Art

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...