CN115200722A - Temperature measuring method and refrigerator car temperature measuring system applying same - Google Patents
Temperature measuring method and refrigerator car temperature measuring system applying same Download PDFInfo
- Publication number
- CN115200722A CN115200722A CN202211125539.0A CN202211125539A CN115200722A CN 115200722 A CN115200722 A CN 115200722A CN 202211125539 A CN202211125539 A CN 202211125539A CN 115200722 A CN115200722 A CN 115200722A
- Authority
- CN
- China
- Prior art keywords
- pixel
- temperature
- classification evaluation
- obtaining
- category
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000011156 evaluation Methods 0.000 claims abstract description 100
- 238000009529 body temperature measurement Methods 0.000 claims abstract description 14
- 230000006870 function Effects 0.000 claims description 11
- 239000000126 substance Substances 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 239000006185 dispersion Substances 0.000 claims description 5
- 238000003064 k means clustering Methods 0.000 claims description 4
- 238000011478 gradient descent method Methods 0.000 claims description 3
- 235000012055 fruits and vegetables Nutrition 0.000 abstract description 37
- 230000008569 process Effects 0.000 abstract description 6
- 238000003672 processing method Methods 0.000 abstract description 2
- 230000005855 radiation Effects 0.000 abstract 1
- 235000013399 edible fruits Nutrition 0.000 description 9
- 230000000694 effects Effects 0.000 description 9
- 235000013311 vegetables Nutrition 0.000 description 9
- 230000008859 change Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Chemical compound O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 241000234295 Musa Species 0.000 description 2
- 235000018290 Musa x paradisiaca Nutrition 0.000 description 2
- 238000010438 heat treatment Methods 0.000 description 2
- 238000004321 preservation Methods 0.000 description 2
- 238000011897 real-time detection Methods 0.000 description 2
- 230000029058 respiratory gaseous exchange Effects 0.000 description 2
- 241000207199 Citrus Species 0.000 description 1
- 208000001034 Frostbite Diseases 0.000 description 1
- 206010030113 Oedema Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003851 biochemical process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 235000020971 citrus fruits Nutrition 0.000 description 1
- 238000010224 classification analysis Methods 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000008020 evaporation Effects 0.000 description 1
- 238000001704 evaporation Methods 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 235000011389 fruit/vegetable juice Nutrition 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 235000015097 nutrients Nutrition 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01J—MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
- G01J5/00—Radiation pyrometry, e.g. infrared or optical thermometry
- G01J5/48—Thermography; Techniques using wholly visual means
- G01J5/485—Temperature profile
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
- G06V10/763—Non-hierarchical techniques, e.g. based on statistics of modelling distributions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Probability & Statistics with Applications (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Radiation Pyrometers (AREA)
Abstract
The invention relates to the field of temperature measurement, in particular to a temperature measurement method and a refrigerator car temperature measurement system applying the same. The method includes clustering pixel points in a panoramic infrared heat map to obtain a plurality of pixel areas, evaluating classification results according to heat radiation characteristics to obtain a plurality of evaluation indexes, and finally controlling a clustering process by utilizing the classification evaluation indexes to obtain an optimal clustering result. And obtaining the target temperature according to the temperature area corresponding to the representative temperature category in the clustering result. The invention measures the accurate fruit and vegetable temperature by using the infrared image processing method, thereby ensuring the accuracy and the real-time performance of the temperature measurement in the refrigerated vehicle.
Description
Technical Field
The invention relates to the technical field of temperature measurement, in particular to a temperature measurement method and a refrigerator car temperature measurement system applying the same.
Background
Refrigerated vehicles are often used to transport fruit and vegetable goods that require temperature control. For perishable fruit and vegetable goods, certain storage temperature is required according to the properties and the preservation principle of the fruit and vegetable goods. If the storage temperature of the cooled goods is higher than the upper limit, the biochemical process in the body is accelerated, and the storage life of the goods is shortened due to excessive consumption of nutrient substances. If the storage temperature is lower than the lower limit, abnormal physiological changes such as banana blackening, banana citrus edema and the like can occur, and even frostbite can occur. Perishable goods not only require certain temperature, but also require the fluctuation of temperature to minimize as far as possible, and the temperature fluctuation caused by perishable goods can cause the moisture in the fruit vegetables tissue to transfer and make the ice crystal enlarge, this makes the organizational structure of food warp, takes place irreversible change because of partial juice oozes out when unfreezing to reduce the quality of fruit vegetables. For all perishable goods, the temperature fluctuation will cause the increase of the loss of dry consumption, because when the temperature of the air in the storage environment is increased, the relative humidity is reduced under the condition of constant absolute humidity, the difference between the water vapor pressure on the surface of the goods and the water vapor pressure in the air is enlarged, thereby enhancing the water evaporation on the surface of the goods. Perishable goods are transported in a refrigerator car, stored under moving conditions, and necessary storage conditions are guaranteed as far as possible according to the properties and requirements of the perishable goods, so that the temperature of the positions of fruits and vegetables in the refrigerator car needs to be detected in real time.
In the existing refrigerated vehicle temperature detection, one or a small number of temperature sensors are often used for obtaining the temperature in the refrigerated vehicle, and the surface temperature of fruits and vegetables cannot be collected. An infrared heat map may thus be acquired, which may be used to characterize temperature information for each location within the refrigerated vehicle. Because the temperature of each part of the fruits and vegetables is different, and other heating components exist in the refrigerator car, the temperature of the high-temperature area of the fruits and vegetables in the refrigerator car can not be directly obtained from the infrared chart intuitively according to the pixel value.
Disclosure of Invention
In order to solve the above technical problem, an object of the present invention is to provide a temperature measuring method, which adopts the following technical solutions:
the invention provides a temperature measuring method, which comprises the following steps:
acquiring a panoramic infrared heat map; clustering pixel points in the panoramic infrared heat map according to the coordinate difference and the pixel value difference to obtain three pixel categories, wherein each pixel category forms a plurality of pixel areas; the pixel type with the maximum corresponding pixel value is a representative temperature type;
obtaining a first classification evaluation according to the pixel values of the class central points of all the pixel classes; obtaining the gradient weight of the gradient value of each pixel point according to the distance between the pixel point in each pixel category and the category center point, and obtaining a second classification evaluation according to the gradient weight and the gradient value of all the pixel points; obtaining a third classification evaluation according to the inclusion relation between different pixel regions; obtaining a classification evaluation index according to the first classification evaluation, the second classification evaluation and the third classification evaluation;
adjusting clustering parameters until the classification evaluation index reaches an optimal value, and ending clustering; removing noise pixel areas in the pixel areas corresponding to the representative temperature categories according to the position discrete degree to obtain representative temperature areas; and obtaining the target temperature according to the pixel values in the representative temperature area.
Further, the clustering the pixel points in the panoramic infrared heat map according to the coordinate difference and the pixel value difference to obtain three pixel categories includes:
taking horizontal and vertical coordinate information and pixel value information of pixel points as sample information, and taking Euclidean distance of the sample information between the pixel points as sample distance; and clustering the pixel values by using a K-means clustering method according to the sample distance to obtain the pixel category.
Further, the obtaining a first classification evaluation according to the pixel values of the class center points of all the pixel classes comprises:
obtaining the absolute value of the difference of pixel values between the category central point of the pixel category and the pixel point with the maximum pixel value in the pixel category; and taking the average pixel value difference absolute value of all the pixel categories as the first classification evaluation.
Further, the obtaining a gradient weight of a gradient value of each pixel point according to a distance between a pixel point in each pixel category and the category center point, and the obtaining a second classification evaluation according to the gradient weight and the gradient value of all the pixel points includes:
acquiring the maximum distance between a pixel point in each pixel category and the category center point, and taking the ratio of the distance between each pixel point in the pixel category and the category center point to the maximum distance as the gradient weight;
obtaining an accumulated value of products of the gradient weights and the gradient values of all pixel points in each pixel class; and taking the average accumulated value of all the pixel categories as the second classification evaluation.
Further, the obtaining a third classification evaluation according to the inclusion relationship between different pixel regions includes:
judging whether the target pixel region has the inclusion relation according to an inclusion state function, wherein the inclusion state function comprises the following steps:
wherein the content of the first and second substances,for the number of said pixel classes,is a target pixel regionIs in a state of being included in (c),is the eighth neighborhood of the class center point of the target pixel regionThe pixel class that is closest in direction to the target pixel region,is the target pixel region and pixel classThe distance of the corresponding said pixel area,is the class center point in the target pixel regionDistance in one directionThe pixel value of the point farthest from the center point of the category,is the class center point of the target pixel regionPixel class corresponding to each directionIf the class center point of the target pixel region is the firstThe pixel class does not exist in one direction, thenAndequal;
if the inclusion state is 1, the target pixel area has the inclusion relationship; otherwise, the target pixel region does not have the inclusion relation; and accumulating the inclusion states of all the pixel areas to obtain the third classification evaluation.
Further, the obtaining a classification evaluation index according to the first classification evaluation, the second classification evaluation and the third classification evaluation comprises:
obtaining the classification evaluation index according to a classification evaluation index formula, wherein the classification evaluation index formula comprises:
wherein the content of the first and second substances,in order to evaluate the index for the classification,for the purpose of the first classification evaluation,for the purpose of the second classification evaluation,for the purpose of the third classification evaluation,is an exponential function with a natural constant as the base.
Further, the adjusting the clustering parameters until the classification evaluation index reaches an optimal value, and ending clustering includes:
and continuously adjusting clustering parameters by a gradient descent method to update clustering results until the classification evaluation index reaches the minimum value, and finishing clustering.
Further, the removing the noise pixel region in the pixel region corresponding to the representative temperature category according to the position dispersion degree includes:
obtaining first average center coordinates of all the pixel areas before the noise pixel area is removed, and if the distance between the second average center coordinates of all the pixel areas after a certain pixel area is removed and the first average center coordinates is larger than a preset distance threshold, judging that the pixel area is the noise pixel area; and traversing all the pixel areas, identifying all the noise pixel areas, and removing the noise pixel areas.
Further, the obtaining of the target temperature in the refrigerator car from the pixel values in the representative temperature region includes:
taking the average pixel value of the representative temperature area as the temperature pixel value of the representative temperature area; and obtaining the average temperature pixel values of all the representative temperature areas, and obtaining the target temperature according to the average temperature pixel values.
The invention also provides a refrigerator car temperature measuring system, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes any step of the temperature measuring method when executing the computer program.
The invention has the following beneficial effects:
1. according to the embodiment of the invention, the temperature information of all positions in the refrigerator car is obtained through the panoramic infrared chart. Because the temperature information distribution is relatively complex, in order to accurately identify the temperature of the representative temperature area in the current refrigerated vehicle, the clustering analysis is carried out on the pixel points in the panoramic infrared chart, the optimal clustering result is obtained according to the classification evaluation index, and then the accurate fruit and vegetable temperature is obtained, and the fruit and vegetable temperature obtained in the representative temperature area is a high-temperature area on the surface of the fruit and vegetable, so that a worker can directly regulate and control the temperature in the refrigerated vehicle according to the visual fruit and vegetable temperature, and the fruit and vegetable rot caused by unreasonable temperature in the refrigerated vehicle is avoided.
2. According to the embodiment of the invention, the clustering result is controlled from the three aspects of the pixel value of the category central point, the gradient distribution in the pixel category and the inclusion relation of the pixel category, so that the effectiveness of the clustering result is ensured, the pixel value of the clustering central point of each pixel category in the final clustering result is large enough, the pixel category boundaries are in edge gradient distribution, and the pixel areas of different pixel categories do not have the inclusion relation, the layering of temperature information is realized, and the accuracy of temperature detection is ensured.
3. According to the embodiment of the invention, the noise pixel area corresponding to the representative temperature category is removed according to the position discrete degree, so that the influence of heating equipment in a carriage on the fruit and vegetable temperature acquisition is avoided, and the acquired fruit and vegetable temperature is more accurate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a temperature measurement method according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of an infrared thermograph within a refrigerated vehicle according to one embodiment of the present invention;
fig. 3 is a schematic diagram of a distribution of temperature zones represented in an infrared thermal map according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of a temperature measuring method according to the present invention, its specific implementation, structure, features and effects will be given in conjunction with the accompanying drawings and preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the temperature measurement method provided by the present invention in detail with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of a temperature measurement method according to an embodiment of the invention is shown, the method including:
step S1: acquiring a panoramic infrared chart; clustering pixel points in the panoramic infrared heat map according to the coordinate difference and the pixel value difference to obtain three pixel categories, wherein each pixel category forms a plurality of pixel areas; the pixel class with the largest corresponding pixel value is the representative temperature class.
In an embodiment of the present invention, the infrared thermal imager is deployed at a suitable location inside the compartment of the refrigerated vehicle such that the field of view of the infrared thermal imager covers the entire compartment location. It should be noted that, because the heat preservation structure is stored in the carriage, the infrared thermal imager can only collect the temperature information inside the carriage, and the external temperature information does not constitute an influence, so as to obtain the panoramic infrared thermal map of the refrigerator car.
Referring to fig. 2, a schematic diagram of an infrared heat map in a refrigerator car according to an embodiment of the present invention is shown, as can be seen from fig. 2, in the infrared heat map, there is a complex high temperature distribution on the surfaces of fruits and vegetables, and some electrical devices in the refrigerator car also generate certain temperature information, so that the temperatures of all the high temperature areas of fruits and vegetables cannot be directly obtained according to the pixel values.
In the embodiment of the invention, in order to facilitate the subsequent processing of the panoramic infrared heat map, the panoramic infrared heat map is subjected to graying processing. For the purpose of real-time detection, image information is acquired every ten minutes. In the panoramic infrared thermal map, the lower the pixel value, the lower the temperature of the corresponding location, and the higher the pixel value, the higher the corresponding temperature.
It should be noted that, according to a priori knowledge, since the temperatures between the fruits and the vegetables are high, the heat value is continuously transmitted between the fruits and the vegetables and the air, and therefore, in the panoramic thermodynamic diagram, the temperature information is diffused around the fruit and vegetable area as the center, so that the image forms a diffuse temperature value distribution around the fruits and the vegetables, and therefore, it is necessary to perform classification analysis on the pixel information in the panoramic infrared thermal map, acquire a representative temperature category representing the temperature of the fruits and the vegetables, and further acquire the target temperature, that is, the target temperature is the required surface temperature of the fruits and the vegetables.
Because three temperature layers of fruit and vegetable temperature, fruit and vegetable ambient temperature and compartment ambient temperature can be formed in the compartment, pixel points in the panoramic infrared thermal image are clustered according to coordinate difference and pixel value difference to obtain three pixel categories, so that the pixel value position in each pixel category is close enough to the cut pixel value to be similar. Each pixel class can form a plurality of pixel regions, wherein the pixel class with the largest corresponding pixel value is a representative temperature class. The specific clustering method comprises the following steps:
the horizontal and vertical coordinate information and the pixel value information of the pixel points are used as sample information, the Euclidean distance of the sample information between the pixel points is used as a sample distance, and namely, a sample distance expression is as follows:whereinAndis the coordinate information of the pixel point and is,andis the pixel value information of the pixel point. And obtaining the category center point of each pixel category according to the center coordinate information of the pixel points in each pixel category.
And clustering the pixel values by utilizing a K-means clustering method according to the sample distance to obtain the pixel category. The K-means clustering method is a well-known technique, and is not described herein. Elements in a pixel class
Step S2: obtaining a first classification evaluation according to the pixel values of the class central points of all the pixel classes; obtaining the gradient weight of the gradient value of each pixel point according to the distance between the pixel point in each pixel category and the center point of the category, and obtaining a second classification evaluation according to the gradient weight and the gradient value of all the pixel points; obtaining a third classification evaluation according to the inclusion relation among different pixel areas; and obtaining a classification evaluation index according to the first classification evaluation, the second classification evaluation and the third classification evaluation.
Because the temperature information in the compartment is complex, a good clustering process may not be obtained only by performing initial clustering, and therefore, the current clustering process needs to be judged according to a clustering result, and then clustering parameters are continuously adjusted to achieve an optimal clustering effect.
In the divided pixel categories, because the temperature in the vehicle compartment is distributed dispersively, the larger the pixel value of the category center point in the pixel category is, the better the clustering effect is, and the more the real temperature distribution is obeyed, so that the first classification evaluation is obtained according to the pixel values of the category center points of all the pixel categories, which specifically comprises:
and obtaining the absolute value of the pixel value difference between the category center point of the pixel category and the pixel point with the maximum pixel value in the pixel category. And taking the average pixel value difference absolute value of all pixel categories as a first category evaluation. The expression of the first classification evaluation is:
wherein the content of the first and second substances,in order to evaluate the first classification,is the number of the pixel classes that are,is as followsThe maximum pixel value in the individual pixel classes,is as followsThe pixel value of the class center point in the individual pixel classes. That is, the smaller the absolute difference value is, the more the class center point is the maximum value in the class, the smaller the first classification evaluation is.
According to the temperature dispersion, the temperature at the center of the heat source is high, and as the heat source diffuses to the periphery, the temperature change difference is small in the area close to the heat source, and the temperature change is large in the area far from the heat source. The temperature change is represented in the image as pixel change, namely a gradient value, so that the gradient weight of the gradient value of each pixel point is obtained according to the distance between the pixel point in each pixel category and the center point of the category, and the method specifically comprises the following steps:
and acquiring the maximum distance between the pixel point in each pixel category and the category center point, and taking the ratio of the distance between each pixel point in the pixel category and the category center point to the maximum distance as the gradient weight. In the embodiment of the present invention, in consideration of the value of the gradient weight, the expression of the gradient weight is set as:
wherein the content of the first and second substances,is as followsThe gradient weight of each pixel point is calculated,first, theThe distance of a pixel point to the category center point,is an exponential function with a natural constant as the base,is as followsAll of the pixel classes corresponding to each pixel pointIs at a minimum value ofAt maximum distanceAnd minimum. The gradient weight range is limited to (0, 1) by limiting the gradient weight range.
Obtaining a second classification evaluation according to the gradient weights and the gradient values of all the pixel points, wherein the second classification evaluation specifically comprises the following steps:
obtaining the accumulated value of the product of the gradient weight and the gradient value of all pixel points in each pixel category; and taking the average accumulated value of all pixel categories as a second classification evaluation. That is, the larger the value of the second classification evaluation is, the more the current clustering result conforms to the dispersion distribution, and the better the current clustering result is.
According to the dispersion distribution characteristic, when the fruit vegetables rot, the respiration that corresponds the position is strengthened, so the temperature of this position can be a little higher than other regions, consequently can influence whole temperature recognition result when the refrigerator car has fruit to rot. In addition, different parts of the fruits and vegetables also have different temperatures, for example, the respiration capacity of the leaf parts of the vegetables is stronger than that of the root parts, so the corresponding temperatures are slightly larger. The temperature change of the regions is slight, but when clustering is performed, the regions may be detected as independent temperature regions, and further the subsequent acquisition of the fruit and vegetable temperature of the whole fruit and vegetable region is damaged, so that whether the regions are included with each other or not needs to be judged when a clustering result is evaluated. If the inclusion phenomenon occurs, the whole fruit and vegetable area is divided into different high-temperature and low-temperature areas, namely the clustering effect is poor. Therefore, a third classification evaluation is obtained according to the inclusion relationship between different pixel regions, which specifically includes:
judging whether the target pixel region has an inclusion relation according to an inclusion state function, wherein the inclusion state function comprises the following steps:
wherein the content of the first and second substances,as to the number of pixel classes,is a target pixel regionIs in a state of being included in the content,the second in eight neighborhoods of the class center point of the target pixel regionThe pixel class closest in direction to the target pixel region,is the target pixel region and pixel typeThe distance of the corresponding pixel area is determined,is the class center point of the target pixel regionThe pixel value of the point farthest from the center point of the class in the respective direction,is the class center point of the target pixel regionPixel class corresponding to each directionIf the center point of the category of the target pixel region is the firstThere is no pixel class for one direction,thenAnd withAnd are equal.
According to the inclusion state function, if the target pixel region has an inclusion relation, a pixel point of another pixel category can be detected in each direction of eight neighborhoods of the category center point; if the target pixel region does not have the inclusion relationship, at least one direction does not have a pixel point of another pixel type. That is, if the inclusion state is 1, the target pixel region has an inclusion relationship. Otherwise, the target pixel region has no inclusion relation. And accumulating the inclusion states of all the pixel areas to obtain a third classification evaluation. That is, the larger the third classification evaluation is, the less good the clustering effect is.
Integrating the first classification evaluation, the second classification evaluation and the third classification evaluation, and obtaining a classification evaluation index according to the first classification evaluation, the second classification evaluation and the third classification evaluation, wherein the classification evaluation index specifically comprises the following steps:
according to the expression of the first classification evaluation, the second classification evaluation and the third classification evaluation, the smaller the first classification evaluation and the third classification evaluation are, the better the classification effect is; the larger the second classification evaluation is, the better the classification effect is. Therefore, based on the relation, a classification evaluation index formula is obtained by using a mathematical modeling method, and a classification evaluation index is obtained according to the classification evaluation index formula, wherein the classification evaluation index formula comprises the following components:
wherein, the first and the second end of the pipe are connected with each other,in order to classify and evaluate the indexes,in order to evaluate the first classification,in order to evaluate the second classification,for the purpose of the third classification evaluation,is an exponential function with a natural constant as the base.
According to the classification evaluation index, when the protection relationship is smaller, the difference between the pixel value at the central point and the maximum gray value is smaller, and the gradient of the clustering boundary area is larger, the classification effect is better, and the classification evaluation index is smaller.
And step S3: adjusting clustering parameters until the classification evaluation index reaches an optimal value, and finishing clustering; removing noise pixel areas in the pixel areas corresponding to the representative temperature categories according to the position discrete degree to obtain representative temperature areas; the target temperature is obtained from the pixel values in the representative temperature region.
Preferably, the clustering parameters are continuously adjusted by using a gradient descent method to update the clustering result until the classification evaluation index reaches the minimum value, and the clustering process is ended.
Since image noise or other electrical devices in the vehicle compartment may generate heat to form a representative temperature region similar to the fruit and vegetable region, it is necessary to identify and remove such noise region. Because the pixel regions corresponding to the fruit and vegetable regions in the optimal classification result and representing the temperature categories are all in centralized distribution, the noise regions can be identified and removed according to the position discrete degree, and the method specifically comprises the following steps:
and obtaining first average center coordinates of all pixel areas before the noise pixel area is removed, and if the distance between the second average center coordinates of all pixel areas after a certain pixel area is removed and the first average center coordinates is greater than a preset distance threshold, judging that the pixel area is the noise pixel area. And traversing all the pixel areas, identifying all the noise pixel areas, and removing the noise pixel areas. In the embodiment of the present invention, the distance threshold is set to 30 pixel points.
And removing the noise area in the pixel area corresponding to the representative temperature category to obtain the representative temperature area corresponding to the fruit and vegetable area. Obtaining the target temperature in the vehicle according to the pixel values in the representative temperature area, specifically comprising:
taking the average pixel value of the representative temperature area as the temperature pixel value of the representative temperature area; and obtaining the average temperature pixel values of all the representative temperature areas, and obtaining the target temperature according to the average temperature pixel values, namely completing the measurement of the temperature of the fruits and vegetables. It should be noted that the temperature detection range of the general industrial infrared thermal imager is-20 ℃ to 500 ℃, so that the corresponding real fruit and vegetable temperature can be obtained according to the conversion range and the evaluation temperature pixel value. The high-temperature area on the surface of the fruit and vegetable is used as a representative temperature area, so that the temperature of the fruit and vegetable is obtained, and a worker can adjust the current temperature in the refrigerator car according to the fruit and vegetable temperature presented in real time, so that the fruit and vegetable abnormity caused by temperature fluctuation is avoided.
Referring to fig. 3, a schematic diagram of a distribution of representative temperature areas in an infrared thermal map provided by an embodiment of the present invention is shown, and a plurality of representative temperature areas can be defined in the original infrared thermal map through processing the original infrared thermal map, so as to obtain the temperature of the fruits and vegetables.
In summary, in the embodiment of the present invention, pixel points in the panoramic infrared thermal map are clustered to obtain a plurality of pixel areas, the classification result is evaluated according to the real temperature distribution characteristics of the fruits and vegetables in the refrigerator car to obtain a plurality of evaluation indexes, and finally the classification evaluation indexes are used to control the clustering process to obtain the optimal clustering result. And obtaining the temperature of the fruits and vegetables according to the representative temperature area corresponding to the representative temperature category in the clustering result. The embodiment of the invention identifies the accurate fruit and vegetable temperature by using an infrared image processing method, and ensures the accuracy and real-time detection of the temperature in the refrigerated vehicle.
The invention also provides a refrigerator car temperature measuring system, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes any step of the temperature measuring method when executing the computer program.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. The processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.
Claims (10)
1. A method of temperature measurement, the method comprising:
acquiring a panoramic infrared chart; clustering pixel points in the panoramic infrared heat map according to the coordinate difference and the pixel value difference to obtain three pixel categories, wherein each pixel category forms a plurality of pixel areas; the pixel type with the maximum corresponding pixel value is a representative temperature type;
obtaining a first classification evaluation according to the pixel values of the classification center points of all the pixel classifications; obtaining the gradient weight of the gradient value of each pixel point according to the distance between the pixel point in each pixel category and the category center point, and obtaining a second classification evaluation according to the gradient weight and the gradient value of all the pixel points; obtaining a third classification evaluation according to the inclusion relation among different pixel regions; obtaining a classification evaluation index according to the first classification evaluation, the second classification evaluation and the third classification evaluation;
adjusting clustering parameters until the classification evaluation index reaches an optimal value, and ending clustering; removing noise pixel areas in the pixel areas corresponding to the representative temperature categories according to the position discrete degree to obtain representative temperature areas; and obtaining the target temperature according to the pixel values in the representative temperature area.
2. The method of claim 1, wherein the clustering pixels in the panoramic infrared heat map according to the coordinate difference and the pixel value difference to obtain three pixel categories comprises:
taking horizontal and vertical coordinate information and pixel value information of pixel points as sample information, and taking Euclidean distance of the sample information between the pixel points as sample distance; and clustering the pixel values by utilizing a K-means clustering method according to the sample distance to obtain the pixel category.
3. The method according to claim 1, wherein said obtaining a first classification evaluation based on the pixel values of the class center points of all the pixel classes comprises:
obtaining the absolute value of the difference of pixel values between the category central point of the pixel category and the pixel point with the maximum pixel value in the pixel category; and taking the average pixel value difference absolute value of all the pixel categories as the first category evaluation.
4. The method as claimed in claim 3, wherein the obtaining a gradient weight of gradient value of each pixel point according to a distance between a pixel point in each pixel category and a center point of the category, and the obtaining a second classification evaluation according to the gradient weight and gradient value of all pixel points comprises:
obtaining the maximum distance between the pixel point in each pixel category and the category center point, and taking the ratio of the distance between each pixel point in the pixel category and the category center point to the maximum distance as the gradient weight;
obtaining an accumulated value of products of the gradient weights and the gradient values of all pixel points in each pixel class; and taking the average accumulated value of all the pixel categories as the second classification evaluation.
5. The method according to claim 4, wherein the obtaining a third classification evaluation according to the inclusion relationship between different pixel regions comprises:
judging whether the target pixel region has the inclusion relation according to an inclusion state function, wherein the inclusion state function comprises:
wherein the content of the first and second substances,for the number of said pixel classes,is a target pixel regionIs in a state of being included in (c),is the eighth neighborhood of the class center point of the target pixel regionThe pixel class closest in direction to the target pixel region,is the target pixel region and pixel classThe distance of the corresponding pixel region,is the class center point in the target pixel regionThe pixel value of the point farthest in the direction from the center point of said class,is the class center point of the target pixel regionPixel class corresponding to each directionIf the class center point of the target pixel region is the firstThe pixel class does not exist in one direction, thenAnd withEqual;
if the inclusion state is 1, the target pixel area has the inclusion relationship; otherwise, the target pixel region does not have the inclusion relation; and accumulating the inclusion states of all the pixel areas to obtain the third classification evaluation.
6. The temperature measurement method according to claim 5, wherein the obtaining a classification evaluation index from the first classification evaluation, the second classification evaluation, and the third classification evaluation comprises:
obtaining the classification evaluation index according to a classification evaluation index formula, wherein the classification evaluation index formula comprises the following components:
wherein the content of the first and second substances,for the purpose of the classification evaluation index,for the purpose of the first classification evaluation,for the purpose of the second classification evaluation,for the purpose of the third classification evaluation,is an exponential function with a natural constant as the base.
7. The temperature measurement method according to claim 6, wherein the adjusting the clustering parameters until the classification evaluation index reaches an optimal value, and the ending of clustering comprises:
and continuously adjusting clustering parameters by a gradient descent method to update clustering results until the classification evaluation index reaches the minimum value, and finishing clustering.
8. The method according to claim 1, wherein the removing noise pixel regions in the pixel regions corresponding to the representative temperature category according to the position dispersion degree comprises:
obtaining first average center coordinates of all the pixel areas before the noise pixel area is removed, and if the distance between the second average center coordinates of all the pixel areas after a certain pixel area is removed and the first average center coordinates is larger than a preset distance threshold value, judging that the pixel area is the noise pixel area; and traversing all the pixel regions, identifying all the noise pixel regions, and removing the noise pixel regions.
9. A temperature measuring method according to claim 1, wherein said obtaining a target temperature in the refrigerator car from the pixel values in the representative temperature region comprises:
taking the average pixel value of the representative temperature area as the temperature pixel value of the representative temperature area; and obtaining average temperature pixel values of all representative temperature areas, and obtaining the target temperature according to the average temperature pixel values.
10. A refrigerator car temperature measurement system comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any one of claims 1 to 9 are implemented when the computer program is executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211125539.0A CN115200722B (en) | 2022-09-16 | 2022-09-16 | Temperature measuring method and refrigerator car temperature measuring system applying same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211125539.0A CN115200722B (en) | 2022-09-16 | 2022-09-16 | Temperature measuring method and refrigerator car temperature measuring system applying same |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115200722A true CN115200722A (en) | 2022-10-18 |
CN115200722B CN115200722B (en) | 2022-12-13 |
Family
ID=83572173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211125539.0A Active CN115200722B (en) | 2022-09-16 | 2022-09-16 | Temperature measuring method and refrigerator car temperature measuring system applying same |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115200722B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103035014A (en) * | 2011-09-29 | 2013-04-10 | 索尼公司 | Image processing device and image processing method and imaging device and imaging method |
CN112212980A (en) * | 2020-09-29 | 2021-01-12 | 中电工业互联网有限公司 | Human body temperature detection method capable of resisting external environment temperature interference |
CN112215173A (en) * | 2020-10-16 | 2021-01-12 | 温州职业技术学院 | Forest fire monitoring system based on density peak value adaptive clustering |
CN112330676A (en) * | 2020-12-31 | 2021-02-05 | 中国电力科学研究院有限公司 | Transformer station/converter station defect diagnosis method and system based on infrared point cloud |
WO2021229248A1 (en) * | 2020-05-12 | 2021-11-18 | Fevgas Georgios | Method for detection and classification of biotic - abiotic stress in crops from thermal photographs using artificial intelligence |
CN113776676A (en) * | 2021-09-23 | 2021-12-10 | 中国航天科工集团八五一一研究所 | Infrared small target detection method based on image curvature and gradient |
-
2022
- 2022-09-16 CN CN202211125539.0A patent/CN115200722B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103035014A (en) * | 2011-09-29 | 2013-04-10 | 索尼公司 | Image processing device and image processing method and imaging device and imaging method |
WO2021229248A1 (en) * | 2020-05-12 | 2021-11-18 | Fevgas Georgios | Method for detection and classification of biotic - abiotic stress in crops from thermal photographs using artificial intelligence |
CN112212980A (en) * | 2020-09-29 | 2021-01-12 | 中电工业互联网有限公司 | Human body temperature detection method capable of resisting external environment temperature interference |
CN112215173A (en) * | 2020-10-16 | 2021-01-12 | 温州职业技术学院 | Forest fire monitoring system based on density peak value adaptive clustering |
CN112330676A (en) * | 2020-12-31 | 2021-02-05 | 中国电力科学研究院有限公司 | Transformer station/converter station defect diagnosis method and system based on infrared point cloud |
CN113776676A (en) * | 2021-09-23 | 2021-12-10 | 中国航天科工集团八五一一研究所 | Infrared small target detection method based on image curvature and gradient |
Also Published As
Publication number | Publication date |
---|---|
CN115200722B (en) | 2022-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bhargava et al. | Fruits and vegetables quality evaluation using computer vision: A review | |
Zhang et al. | Challenges and solutions of optical-based nondestructive quality inspection for robotic fruit and vegetable grading systems: A technical review | |
Martynenko | Computer vision for real-time control in drying | |
Liu et al. | Identification of bruise and fungi contamination in strawberries using hyperspectral imaging technology and multivariate analysis | |
Ganatra et al. | A survey on diseases detection and classification of agriculture products using image processing and machine learning | |
Wang et al. | Outdoor color rating of sweet cherries using computer vision | |
Elhariri et al. | Multi-class SVM based classification approach for tomato ripeness | |
Zhu et al. | Support vector machine and YOLO for a mobile food grading system | |
Asmara et al. | Chicken meat freshness identification using the histogram color feature | |
Sarkar et al. | Comparative analysis of statistical and supervised learning models for freshness assessment of oyster mushrooms | |
Mukherjee et al. | Development of artificial vision system for quality assessment of oyster mushrooms | |
Africa et al. | Ripe fruit detection and classification using machine learning | |
Choi et al. | Applying convolutional neural networks to assess the external quality of strawberries | |
Wang et al. | Shelf-life prediction of ‘Gros Michel’bananas with different browning levels using hyperspectral reflectance imaging | |
Kumari et al. | Performance analysis of support vector machine in defective and non defective mangoes classification | |
CN115200722B (en) | Temperature measuring method and refrigerator car temperature measuring system applying same | |
Unay | Deep learning based automatic grading of bi-colored apples using multispectral images | |
Arjun et al. | Non-destructive assessment of quality parameters of white button mushrooms (Agaricus bisporus) using image processing techniques | |
De-la-Torre et al. | Selection and fusion of color channels for ripeness classification of cape gooseberry fruits | |
Yuan et al. | Early warning potential of cucumber spoilage based on hyperspectral information during its storage | |
Qian et al. | A study on phenotypic micro-variation of stored melon based on weight loss rate | |
Jinglei et al. | Distance-based separability criterion of ROI in classification of farmland hyper-spectral images | |
Mohammad et al. | An image processing approach for grading of mangoes based on maturity | |
CN114842469A (en) | Self-adaptive identification method and system for mature fruits | |
Behera et al. | A novel approach for classification of apple using on-tree images based on image processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |