Stone water content detection method and device based on machine vision

文档序号:1950878 发布日期:2021-12-10 浏览:19次 中文

阅读说明:本技术 一种基于机器视觉的石材含水率检测方法及装置 (Stone water content detection method and device based on machine vision ) 是由 毕文波 王心雨 张进生 张恒 朱成栋 于 2021-09-22 设计创作,主要内容包括:本申请公开了一种基于机器视觉的石材含水率检测方法及装置,用以解决目前对石材含水率的检测方法检测周期较长、成本较高,且缺乏灵活性的问题。该方法在预设的色温、照度、湿度下,获得指定石材的图像和重量,建立对应的含水率检测模型;根据待检测石材的种类,从预先建立的若干含水率检测模型中,确定与待检测石材匹配的含水率检测模型;在预设的色温、照度下,采集待检测石材的待检测图像;通过匹配的含水率检测模型,确定待检测图像对应的待检测石材的含水率。这种方法操作简单,更加快捷方便,且通过图像特征的加强,使模型的检测结果具有较高的精度和准确性,实用性更强。(The application discloses stone material moisture content detection method and device based on machine vision, and aims to solve the problems that the existing detection method for stone material moisture content is long in detection period, high in cost and lack of flexibility. The method comprises the steps of obtaining an image and weight of a specified stone under preset color temperature, illumination and humidity, and establishing a corresponding water content detection model; determining a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models established in advance according to the type of the stone to be detected; collecting an image to be detected of the stone to be detected under preset color temperature and illumination; and determining the water content of the stone to be detected corresponding to the image to be detected through the matched water content detection model. The method is simple to operate, is quicker and more convenient, and enables the detection result of the model to have higher precision and accuracy and stronger practicability through the enhancement of the image characteristics.)

1. A stone water content detection method based on machine vision is characterized by comprising the following steps:

obtaining an image and weight of the specified stone according to preset color temperature, illumination and humidity, and establishing a corresponding moisture content detection model;

determining a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models established in advance according to the type of the stone to be detected;

collecting an image to be detected of the stone to be detected under preset color temperature and illumination;

and determining the water content of the stone to be detected corresponding to the image to be detected through the matched water content detection model.

2. The method according to claim 1, wherein the image and the weight of the specified stone are obtained according to preset color temperature, illumination and humidity, and the corresponding moisture content detection model is established, specifically comprising:

acquiring initial weight and initial images of the specified stone under preset color temperature, illumination and humidity;

acquiring a plurality of change weights and change images of the specified stone along with the evaporation of water;

obtaining the drying weight obtained after the water evaporation of the specified stone is finished;

calculating actual water content of the specified stone respectively corresponding to the initial weight and the changed weight according to the dry weight;

and training a water content detection model corresponding to the specified stone according to the actual water content, the initial image and the change image.

3. The method according to claim 2, wherein obtaining the drying weight obtained after the water evaporation of the specified stone material is completed comprises:

determining a difference between two adjacent weight values of the initial weight and the plurality of varying weights;

and if the difference value is smaller than a preset threshold value, determining the smaller value of the two weight values corresponding to the difference value as the dry weight.

4. The method according to claim 2, wherein training the moisture content detection model corresponding to the specified stone according to the actual moisture content, the initial image and the changed image specifically comprises:

extracting the characteristics of the initial image and the changed image, and determining the water content characteristics of the specified stone corresponding to each image;

and performing linear regression analysis by a least square method, and training a water content detection model corresponding to the specified stone according to the water content characteristics and the actual water content.

5. The method according to claim 4, wherein the step of extracting the features of the initial image and the changed image and determining the moisture content features of the specified stone corresponding to the images specifically comprises the steps of:

and performing feature extraction on the initial image and the changed image, and determining the mean value, the variance, the skewness degree and the kurtosis of the gray level histogram of each image as the water content features of the specified stone corresponding to each image.

6. The method of claim 4, wherein before performing feature extraction on the initial image and the changed image, the method further comprises:

and carrying out image preprocessing on each image, wherein the preprocessing mode at least comprises any one of image graying, image segmentation, brightness normalization, homomorphic filtering processing and noise reduction processing.

7. The utility model provides a stone material moisture content detection device based on machine vision, its characterized in that includes:

the box body is used for accommodating stones;

the environment adjusting module is used for adjusting the environment in the box body according to preset color temperature, illumination and humidity;

the weighing module is used for measuring different weights of the stone under the preset color temperature, illumination and humidity;

the image acquisition module is used for acquiring images corresponding to the stones with different weights respectively;

and the image processing module is used for acquiring the weight and the image, calculating the actual water content of the stone material corresponding to different weights, training a water content detection model, and detecting the water content of the specified stone material through the water content detection model.

8. The method according to claim 7, wherein the image processing module is further configured to determine a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models trained in advance according to the type of the stone to be detected, and detect the moisture content of the stone to be detected.

9. The apparatus of claim 7, wherein the environmental conditioning module comprises a light source, a color temperature illuminometer, a hygrothermograph, an air drying module and a duct;

the light source comprises a plurality of LED light sources with adjustable brightness and color temperature, and the light sources are adjusted according to the color temperature and illumination data measured by the color temperature illuminometer to reach preset color temperature and illumination;

the air drying module is according to the humiture data that the warm and humid acidimeter measured, right the air in the box carries out circulation drying to reach preset humidity, be convenient for control the moisture evaporation rate of stone material.

10. The device of claim 7, wherein the image acquisition module comprises a micro-motion stage, a camera;

the micro sliding table drives the camera to move according to the thickness of the stone so as to be far away from or close to the stone.

Technical Field

The application relates to the technical field of stone processing and detection, in particular to a stone water content detection method and device based on machine vision.

Background

The moisture content of the stone directly affects the surface color of the stone and further affects the appearance of the stone slab. Therefore, in the production process, the water content of the stone is usually controlled by the technologies of plate drying, glue sealing and the like, so as to ensure the uniform surface color and improve the appearance of the stone. In this process, the detection of the moisture content of the stone material is crucial to the drying process thereof.

At present, when the moisture content of the stone is detected, the detection is usually carried out according to the quality difference before and after the stone is dried. However, this detection method has a long detection period, high cost and poor flexibility.

Disclosure of Invention

The embodiment of the application provides a method and a device for detecting the water content of stone based on machine vision, and aims to solve the problems that the existing detection method for the water content of stone is long in detection period, high in cost and lack of flexibility.

The embodiment of the application provides a stone material moisture content detection method based on machine vision, includes:

obtaining an image and weight of the specified stone according to preset color temperature, illumination and humidity, and establishing a corresponding moisture content detection model;

determining a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models established in advance according to the type of the stone to be detected;

collecting an image to be detected of the stone to be detected under preset color temperature and illumination;

and determining the water content of the stone to be detected corresponding to the image to be detected through the matched water content detection model.

In one example, the method includes obtaining an image and a weight of a specified stone according to preset color temperature, illumination and humidity, and establishing a corresponding moisture content detection model, which specifically includes: acquiring initial weight and initial images of the specified stone under preset color temperature, illumination and humidity; acquiring a plurality of change weights and change images of the specified stone along with the evaporation of water; obtaining the drying weight obtained after the water evaporation of the specified stone is finished; calculating actual water content of the specified stone respectively corresponding to the initial weight and the changed weight according to the dry weight; and training a water content detection model corresponding to the specified stone according to the actual water content, the initial image and the change image.

In one example, obtaining the drying weight obtained after the water evaporation of the specified stone material is finished specifically includes: determining a difference between two adjacent weight values of the initial weight and the plurality of varying weights; and if the difference value is smaller than a preset threshold value, determining the smaller value of the two weight values corresponding to the difference value as the dry weight.

In one example, training the moisture content detection model corresponding to the specified stone according to the actual moisture content, the initial image and the change image specifically includes: extracting the characteristics of the initial image and the changed image, and determining the water content characteristics of the specified stone corresponding to each image; and performing linear regression analysis by a least square method, and training a water content detection model corresponding to the specified stone according to the water content characteristics and the actual water content.

In one example, the performing feature extraction on the initial image and the changed image to determine the moisture content features of the specified stone corresponding to the images specifically includes: and performing feature extraction on the initial image and the changed image, and determining the mean value, the variance, the skewness degree and the kurtosis of the gray level histogram of each image as the water content features of the specified stone corresponding to each image.

In one example, before feature extraction is performed on the initial image and the changed image, the method further comprises: and carrying out image preprocessing on each image, wherein the preprocessing mode at least comprises any one of image graying, image segmentation, brightness normalization, homomorphic filtering processing and noise reduction processing.

The utility model provides a stone material moisture content detection device based on machine vision, include:

the box body is used for accommodating stones;

the environment adjusting module is used for adjusting the environment in the box body according to preset color temperature, illumination and humidity;

the weighing module is used for measuring different weights of the stone under the preset color temperature, illumination and humidity;

the image acquisition module is used for acquiring images corresponding to the stones with different weights respectively;

and the image processing module is used for acquiring the weight and the image, calculating the actual water content of the stone material corresponding to different weights, training a water content detection model, and detecting the water content of the specified stone material through the water content detection model.

In one example, the image processing module is further configured to determine, according to the type of the stone to be detected, a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models trained in advance, and detect the moisture content of the stone to be detected.

In one example, the environmental conditioning module includes a light source, a color temperature illuminometer, a hygrothermograph, an air drying module, and a duct; the light source comprises a plurality of LED light sources with adjustable brightness and color temperature, and the light sources are adjusted according to the color temperature and illumination data measured by the color temperature illuminometer to reach preset color temperature and illumination; the air drying module is according to the humiture data that the warm and humid acidimeter measured, right the air in the box carries out circulation drying to reach preset humidity, be convenient for control the moisture evaporation rate of stone material.

In one example, the image acquisition module comprises a micro-motion sliding table and a camera; the micro sliding table drives the camera to move according to the thickness of the stone so as to be far away from or close to the stone.

The embodiment of the application provides a stone material moisture content detection method and device based on machine vision, and the method and device at least have the following beneficial effects: and analyzing the relation between the image characteristics and the water content of the stone by utilizing machine vision and image processing technologies. Based on four image characteristics of mean value, variance, skewness and kurtosis of the image gray level histogram, linear regression analysis is carried out by adopting a least square method, a water content detection model is established, and the water content detection of the stone is realized. The method is simple to operate, is quicker and more convenient, and enables the detection result of the model to have higher precision and accuracy and stronger practicability through the enhancement of the image characteristics.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

fig. 1 is a flowchart of a method for detecting moisture content of stone based on machine vision according to an embodiment of the present application;

FIG. 2 is a schematic diagram of an establishing process of a moisture content detection model provided in the embodiment of the present application;

FIG. 3 is a schematic diagram illustrating an application of a moisture content detection model according to an embodiment of the present disclosure;

fig. 4 is a schematic structural diagram of a first part of a stone moisture content detection device based on machine vision according to an embodiment of the present application;

fig. 5 is a schematic structural diagram of a second part of the stone moisture content detection device based on machine vision according to the embodiment of the present application.

Reference numerals

Case 41

The environment adjusting module 42, the color temperature illuminometer 421, the light source 422, the temperature and humidity meter 423, the air drying module 424 and the pipeline 425

Weighing module 43, load cell 431, support leg 432

Image acquisition module 44, fine motion sliding table 441 and camera 442

An image processing module 45, a motion control card 451, a motion controller 4511, a data acquisition card 452, and an image acquisition card 453.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Fig. 1 is a flowchart of a method for detecting moisture content of stone based on machine vision according to an embodiment of the present application, which specifically includes the following steps:

s101: and obtaining an image and weight of the specified stone according to the preset color temperature, illumination and humidity, and establishing a corresponding moisture content detection model.

In the embodiment of the application, for different types of stones and the same type of stones with too large grain difference, the moisture content detection models corresponding to the different types of stones are respectively established for the targeted detection of the moisture content of the corresponding types of stones.

In the process of establishing the moisture content detection model, specific color temperature, illumination and humidity are determined to be adopted according to the environmental characteristics of practical application scenes of different types of stones, the stones are tested, and the corresponding moisture content detection model is established according to the images and the weight of the stones obtained in the moisture evaporation process.

Specifically, the establishment process of the water content detection model of the specified stone comprises the following steps:

firstly, determining preset color temperature and preset illumination humidity corresponding to the specified stone, acquiring initial weight and initial image of the specified stone under the color temperature, the illumination and the humidity, and taking the moment corresponding to the initial weight as the start of the moisture evaporation process of the specified stone.

Secondly, in the process of water evaporation of the appointed stone, weighing and image acquisition are carried out on the appointed stone for multiple times so as to obtain a plurality of variable weights and variable images of the appointed stone along with water evaporation. The weighing and the image acquisition are carried out simultaneously, each data acquisition can obtain a changed weight and a corresponding changed image, and the data acquisition can be carried out on the specified stone according to a preset time interval, such as one minute at each interval.

And thirdly, acquiring the dry weight obtained after the water evaporation of the specified stone is finished, wherein the dry weight represents that the water evaporation of the specified stone is small and even approaches to the corresponding weight when no time exists.

Fourthly, according to the dry weight, calculating the actual water content of the specified stone respectively corresponding to the initial weight and the changed weight. If the moisture contained in the stone material at the dry weight is 0 or other preset fixed values, the moisture contained in the stone material at other weight values can be determined through the difference between the dry weight of the stone material and other weight values, and the corresponding actual moisture content of the stone material at that time can be further determined.

Fifthly, the initial image, each change image and the corresponding actual moisture content of the specified stone can be determined by determining the actual moisture content of the specified stone at each weight value. And taking the initial image, the changed image and other images as input, taking the corresponding actual water content as output, and taking the corresponding actual water content as a training set to learn and train the model, so as to obtain the water content detection model corresponding to the trained specified stone. Wherein, the water content detection model can be a neural network model based on machine learning, etc.

In one embodiment, during the process of water evaporation of the specified stone material, for each collected weight value (including the initial weight and the plurality of variation weights), the difference between two adjacent weight values can be determined. If the difference is not greater than the preset threshold, it indicates that the change of the weight value of the designated stone is faster, that is, the moisture evaporation speed of the designated stone is also faster, and the moisture evaporation process of the stone is still in progress. If the difference value is smaller than the preset threshold value, the change of the weight value of the specified stone material is slow, the moisture evaporation speed of the stone material is slow, the moisture evaporation process of the stone material can be considered to be finished, and the smaller value of the two weight values corresponding to the difference value is determined as the dry weight.

Furthermore, in the process of obtaining the training set and performing model training, feature extraction can be performed on the initial image and the changed image, and the moisture content features of the specified stone corresponding to the images are determined, so that feature expression of the moisture content of the stone in the images can be enhanced, the model can be facilitated to enhance learning of the features, and accuracy of the model is improved. And then, during training, performing linear regression analysis by a least square method, and training a moisture content detection model corresponding to the specified stone according to the moisture content characteristics and the actual moisture content.

Furthermore, when the characteristics of the initial image and the change image are extracted, 4 characteristics of the mean value, the variance, the skewness and the kurtosis of the gray level histogram of each image can be determined as the water content characteristics of the specified stone corresponding to each image. And 4 features obtained by feature extraction can be used as independent variables subsequently, the actual water content is used as a dependent variable, and the model is trained.

In addition, after each image of the specified stone is collected, image preprocessing can be firstly carried out on each image, and the definition, the characteristics and the like of the image are processed through preprocessing modes such as image graying, image segmentation, brightness normalization, homomorphic filtering processing, noise reduction processing and the like, so that the definition of the image and the image analysis accuracy are improved, and the accuracy of subsequent model training is conveniently enhanced.

S102: and selecting a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models which are established in advance according to the type of the stone to be detected.

In the embodiment of the application, after the plurality of moisture content detection models are established in advance according to different types of stones, when detection is needed, the moisture content detection model matched with the stone to be detected can be selected from the plurality of moisture content detection models established in advance according to the type of the stone to be detected, and the moisture content detection model is used for detection.

In one embodiment, if there is no model matching with the stone to be detected in the pre-established moisture content detection model, data acquisition may be performed according to the type of the stone to be detected, and the model matching with the stone to be detected may be newly trained.

S103: and acquiring an image to be detected of the stone to be detected under preset color temperature and illumination.

Determining the color temperature, illumination and humidity required by the stone to be detected, and acquiring an image of the stone to be detected under the condition as an image to be detected.

S104: and determining the water content of the stone to be detected corresponding to the image to be detected through the matched water content detection model.

And inputting the image to be detected into a moisture content detection model matched with the stone to be detected, and obtaining the output moisture content, namely the moisture content corresponding to the stone to be detected when the image to be detected is collected.

In the embodiment of the application, the relation between the image characteristics and the water content of the stone is analyzed by utilizing machine vision and image processing technologies. Based on four image characteristics of mean value, variance, skewness and kurtosis of the image gray level histogram, linear regression analysis is carried out by adopting a least square method, a water content detection model is established, and the water content detection of the stone is realized. The method is simple to operate, is quicker and more convenient, and enables the detection result of the model to have higher precision and accuracy and stronger practicability through the enhancement of the image characteristics.

Fig. 2 is a schematic diagram of an establishing process of a moisture content detection model provided in the embodiment of the present application. As shown in fig. 2, the model training process mainly includes the following steps:

(1) adjusting a light source according to illumination conditions required by the application scene of the stone to enable the environment around the stone to reach corresponding color temperature and illumination;

(2) adjusting the humidity of the stone surrounding environment to meet the requirement of a preset value;

(3) measuring the initial weight (m) of the stone0);

(4) Acquiring the current change weight of the stone, and performing image processing, feature extraction and recording;

(5) waiting for a certain time to evaporate the water in the stone in parts;

(6) measuring the current change weight of the stone again, and performing image processing, feature extraction and recording;

(7) judging and determining whether the difference value between the current change weight and the last change weight of the stone is greater than a preset threshold value or not;

if the difference value is larger than or equal to the preset threshold value, repeating the steps (4), (5) and (6);

if the difference value is smaller than the preset threshold value, entering the step (8);

(8) and establishing a moisture content detection model according to the acquired image and characteristics and the actual moisture content obtained by calculation.

Fig. 3 is an application schematic diagram of a moisture content detection model provided in the embodiment of the present application. As shown in fig. 3, according to the type of the stone to be detected, a moisture content detection model matching with the stone to be detected is selected from a plurality of moisture content detection models established in advance. And adjusting the stone to be detected to corresponding color temperature, illumination and humidity according to the environment condition required by the stone to be detected, and collecting the image to be detected of the stone to be detected. And calculating and determining the water content of the stone to be detected corresponding to the image to be detected through the matched water content detection model, and outputting a result.

Based on the same inventive concept, the machine vision-based stone water content detection method provided by the embodiment of the present application further provides a first part and a second part of the corresponding machine vision-based stone water content detection device, which are shown in fig. 4 and 5.

Fig. 4 is a schematic structural diagram of a first part of the stone moisture content detection device based on machine vision according to the embodiment of the present application, and specifically includes a box 41, an environment adjusting module 42, a weighing module 43, and an image capturing module 44.

In particular, the box 41 is intended to contain the stones 40; the environment adjusting module 42 is used for adjusting the environment in the box body according to preset color temperature, illumination and humidity; the weighing module 43 is used for measuring different weights of the stone under preset color temperature, illumination and humidity; the image acquisition module 44 is used for acquiring images corresponding to the stones with different weights respectively.

Further, the environment adjusting module 42 includes a color temperature illuminometer 421, a light source 422, a temperature and humidity meter 423, an air drying module 424 and a duct 425. The light source 422 comprises a plurality of LED light sources with adjustable brightness and color temperature, and the light source 422 adjusts the LED light sources according to the color temperature and illumination data measured by the color temperature illuminometer 421 so as to achieve preset color temperature and illumination and ensure the stability of the collected stone images. The air drying module 424 circularly dries the air in the box 41 according to the temperature and humidity data measured by the temperature and humidity meter 423 to reach the preset humidity, so as to control the moisture evaporation speed of the stone material.

Further, the image capturing module 44 includes a micro slide 441 and a camera 442. The micro sliding table 441 drives the camera 442 to move according to the thickness of the stone so as to be far away from or close to the stone, thereby facilitating the acquisition of the image of the stone.

Further, the weighing module 43 is composed of a load cell 431, and a foot 432. When the stone image is collected, the weighing module is utilized to measure the weight of the stone, and the weighing sensor transmits the collected data to the computer.

Fig. 5 is a schematic structural diagram of a second part of the stone moisture content detection device based on machine vision according to the embodiment of the present application.

As shown in fig. 5, the stone moisture content detection apparatus further includes an image processing module 45. The image processing module 45 is used for acquiring the weight and the image of the stone, calculating the actual moisture content of the stone corresponding to different weights, and training a moisture content detection model so as to detect the moisture content of the specified stone through the moisture content detection model.

Specifically, the image processing module includes internal boards such as a motion control card 451, a data acquisition card 452, and an image acquisition card 453. The motion control card 451 controls the sliding of the micro sliding table 441 through the motion controller 4511 to control the image acquisition. The data acquisition card 452 is connected with the hygrothermograph 423 and the color temperature illuminometer 421 to determine the environmental conditions in the box 41 and control the light source 422 accordingly. The data acquisition card 452 is also connected to the load cell 431 for acquiring the weight of the stone. The image capture card 452 is connected to the camera 442 for capturing an image of the stone.

Further, the image processing module processes the acquired data such as the image, the weight, the temperature and the humidity, the color temperature and the illumination, calculates and establishes a moisture content detection model, determines a moisture content detection model matched with the stone to be detected from a plurality of moisture content detection models which are established in advance according to the type of the stone to be detected, and detects the moisture content of the stone to be detected.

In one embodiment, the present disclosure is explained and verified using a granite slab as an example.

And preparing the white granite board with saturated water content, putting the white granite board into a stone water content detection device, and establishing a water content detection model. The expression of the moisture content detection model obtained through training is as follows:

wherein y is the water content of the granite of white hemp, X1Is the mean value of the grey histogram, X2Is the variance of the gray histogram, X3Is the skew, X, of a grey-level histogram4Is the peak state of the grey level histogram.

After the water content model is established, a plurality of white granite samples with different water contents in the same batch can be adopted to test the model, and the detection value of the water content is obtained. The test results are shown in table 1.

TABLE 1

The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种粗集料粒径组合密实状态的评价方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!