Method and device for monitoring quality of fresh meat and electronic equipment

By processing the fresh meat image information and using the quality prediction model to calculate the weighted gray mean vector, it solves the gap in fresh meat quality detection in the existing technology, achieves rapid non-destructive detection and monitoring, and improves the user experience.

CN118675166APending Publication Date: 2024-09-20CHINA MEAT RES CENT
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410648832.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing technology makes it difficult to implement rapid non-destructive testing during the production, storage, transportation and sales of fresh meat products, resulting in quality deterioration, making it impossible to perform batch testing and early warning in a timely manner, and affecting user experience.

Method used

By collecting the image information of fresh meat products, calculating the weighted gray mean vector, and using the pre-trained quality prediction model to determine the quality monitoring results, rapid non-destructive detection and monitoring of the quality of fresh meat products is achieved, and alarm messages are issued to remind the quality. Abnormal or expired storage.

Benefits of technology

It achieves fast and accurate monitoring of fresh meat quality, avoids the problems of human judgment errors and insufficient detection indicators, and improves monitoring efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118675166A
    Figure CN118675166A
Patent Text Reader

Abstract

The invention provides a quality monitoring method and device for fresh meat and electronic equipment. The quality monitoring method comprises the following steps: acquiring fresh meat image information of the fresh meat; calculating a corresponding weighted gray average vector according to the fresh meat image information; determining a quality monitoring result according to the weighted gray mean vector and a quality prediction model; wherein the quality prediction model is a model which is trained and determined in advance according to the sample information of the fresh meat, and the quality monitoring result is used for reflecting the quality monitoring result of the fresh meat. According to the technical scheme of the invention, the image information of the fresh meat is collected, the image is identified and processed, the quality prediction model is adopted to train and determine the quality monitoring result, and the quality of the fresh meat is monitored based on the quality monitoring result, so that the blank of rapid nondestructive detection of the quality of the fresh meat in the prior art is solved; the quality of the fresh meat is ensured, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fresh meat quality monitoring, and in particular to a fresh meat quality monitoring method, device and electronic equipment. Background Art

[0002] Packaged fresh meat is pre-packaged or made in specific packaging materials or containers. With the widespread application of low-temperature storage technology and composite packaging technology in the field of low-temperature transportation and storage, the storage period of packaged fresh meat has been extended, thus providing conditions for maintaining the quality of the product for customized production, cross-regional transportation and trade of fresh meat.

[0003] At present, in the existing technology, in the actual production, storage, transportation and sales of packaged fresh meat products, the processing, storage, transportation and other links are usually greatly affected by human or environmental factors. This monitoring method may cause changes in the physical and chemical properties of fresh cut meat, resulting in a trend of deterioration in its sensory, processing, safety and other qualities. In addition, the existing technology does not perform batch inspections and early warnings at time points such as before such products are shipped, before the products arrive at the destination for storage, and before the start of deep processing, which makes it impossible to guarantee the quality of fresh meat products and reduces the user experience. Summary of the invention

[0004] The present invention provides a method, device and electronic equipment for monitoring the quality of fresh meat, which are used to solve the gap in the prior art for rapid and non-destructive detection of the quality of fresh meat. By collecting image information of fresh meat, based on recognition processing of the image, quality prediction model training is used to determine the quality monitoring result, and the quality of fresh meat is monitored based on the quality monitoring result, so as to ensure the quality of fresh meat and improve the user experience.

[0005] The present invention provides a method for monitoring the quality of fresh meat, comprising:

[0006] Acquire fresh meat image information of fresh meat;

[0007] Calculate the corresponding weighted grayscale mean vector according to the fresh meat image information;

[0008] The quality monitoring result is determined according to the weighted grayscale mean vector and the quality prediction model; wherein the quality prediction model is a model determined in advance based on the sample information of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat.

[0009] According to a quality monitoring method for fresh meat provided by the present invention, the quality prediction model includes a first prediction model and a second prediction model, the first prediction model is a model determined in advance based on the weighted grayscale mean vector training of the sample image of the fresh meat, and the second prediction model is a model determined in advance based on the storage period training of the sample image of the fresh meat; determining the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model, including: inputting the weighted grayscale mean vector into the first prediction model to predict and determine the quality evaluation index; when the quality evaluation index does not meet the preset index threshold, determining the quality monitoring result as quality abnormality and issuing a first alarm message; wherein the first alarm message is used to remind the quality of the fresh meat expired; when the quality evaluation index meets the preset index threshold, determining the target remaining storage period according to the quality evaluation index and the second prediction model; when the target remaining storage period is less than the preset storage period, determining the quality monitoring result as quality abnormality and issuing a second alarm message; wherein the second alarm message is used for fresh meat storage overdue; when the target remaining storage period is greater than or equal to the preset storage period, determining the quality monitoring result as normal.

[0010] According to a method for monitoring the quality of fresh meat provided by the present invention, after determining that the quality monitoring result is abnormal and issuing a first alarm message, the method further comprises: sorting the fresh meat based on the quality evaluation index.

[0011] According to a method for monitoring quality of fresh meat provided by the present invention, after determining that the quality monitoring result is abnormal and issuing a second alarm message, the method further comprises: performing secondary sorting of the fresh meat based on a target remaining storage period.

[0012] According to a quality monitoring method for fresh meat provided by the present invention, a target remaining storage period is determined based on a quality evaluation index and a second prediction model, comprising: inputting the quality evaluation index into the second prediction model for training to determine a storage period prediction value; and determining the target remaining storage period based on the difference between a storage threshold value and the storage period prediction value.

[0013] According to a method for monitoring the quality of fresh meat provided by the present invention, a corresponding weighted grayscale mean vector is calculated based on the image information of the fresh meat, including: determining an image binary matrix based on the image information of the fresh meat; determining image color components based on the image binary matrix; and determining a weighted grayscale mean vector based on the image color components.

[0014] A quality monitoring method for fresh meat provided by the present invention determines a weighted grayscale mean vector according to image color components, including: determining a gray interval according to gray intensity; allocating image color components to corresponding grayscale intervals, and calculating and determining the pixel grayscale mean and the number of pixels corresponding to the grayscale interval; determining a weight vector according to the number of pixels; and determining a weighted grayscale mean vector according to the product of the weight vector and the pixel grayscale mean.

[0015] A method for monitoring the quality of fresh meat provided by the present invention obtains fresh meat image information of fresh meat, including: obtaining an image frame to be detected of any fresh meat in a video stream of an image acquisition device at a preset angle; and obtaining the fresh meat image information according to the image frame to be detected.

[0016] The present invention also provides a fresh meat quality monitoring device, comprising:

[0017] An information acquisition module, used to acquire fresh meat image information of fresh meat;

[0018] A mean calculation module, used to calculate the corresponding weighted grayscale mean vector according to the fresh meat image information;

[0019] The result determination module is used to determine the quality monitoring result according to the weighted gray mean vector and the quality prediction model; wherein the quality prediction model is a model pre-trained and determined based on the sample information of fresh meat products, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat products.

[0020] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned methods for monitoring the quality of fresh meat is implemented.

[0021] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the quality monitoring method of any of the fresh meat products described above is implemented.

[0022] The present invention also provides a computer program product, including a computer program, which implements any of the above-mentioned fresh meat quality monitoring methods when executed by a processor.

[0023] The present invention provides a method, device and electronic device for monitoring the quality of fresh meat. The method calculates the corresponding weighted grayscale mean vector according to the image information of fresh meat; the quality monitoring result is determined according to the weighted grayscale mean vector and the quality prediction model; wherein the quality prediction model is a model determined in advance according to the sample information of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat. The technical solution of the present invention collects the image information of fresh meat, and based on the recognition processing of the image, the quality monitoring result is determined by the quality prediction model training, and the quality of fresh meat is monitored based on the quality monitoring result, so as to solve the vacancy of the prior art for rapid and non-destructive detection of the quality of fresh meat, ensure the quality of fresh meat, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 This is one of the flow charts of the method for monitoring the quality of fresh meat provided by the present invention.

[0026] Figure 2 This is the second flow chart of the method for monitoring the quality of fresh meat provided by the present invention.

[0027] Figure 3 This is the third flow chart of the method for monitoring the quality of fresh meat provided by the present invention.

[0028] Figure 4 It is a schematic structural diagram of the fresh meat quality monitoring device provided by the present invention.

[0029] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] It should be noted that the serial numbers assigned to the objects described in the present invention, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.

[0032] Packaged fresh meat is a high-end product of fresh cut meat that is pre-packaged or made in specific packaging materials or containers, and is selected based on specific feeding methods, breeding ranges, livestock and poultry breeds, etc. It can maintain the good quality and processing performance of the product contents under the storage conditions required by the product and within the best consumption period, and can greatly inhibit and slow down the physiological and biochemical reactions related to meat spoilage, and is suitable for the processing, fresh consumption, and cooking of mid-to-high-end meat products. With the widespread application of low-temperature storage technology and composite packaging technology in the field of low-temperature transportation and storage, the storage period of packaged fresh meat has also been extended, thus providing conditions for maintaining the quality of the product for customized production, cross-regional transportation and trade of fresh meat.

[0033] However, in the actual production, storage, transportation and sales of packaged fresh meat, due to the influence of human or environmental factors in the processing, storage and transportation, the physical and chemical properties of the fresh cut meat in the package may change, resulting in a trend of deterioration in its sensory, processing, safety and other qualities, and the leakage of sarcoplasmic protein, browning of myoglobin, and even invasion of non-food substances or microorganisms in the product contents, which seriously affect the quality and shelf life of the product contents, resulting in hidden dangers such as damage to the appearance of packaged fresh meat, deterioration of edible quality and reduction of processing performance. The cost-effectiveness of physical and chemical index testing cannot meet the timeliness requirements of bulk transactions and batch inspections, and the results obtained are fait accompli and cannot be adjusted for a second time, and the substantial losses caused are irreversible. Therefore, a method is needed to conduct batch inspection and early warning before such products are shipped, before they arrive at the destination and are put into storage, and before deep processing begins, so as to reduce the missed inspection rate and factory rate of problematic products. This can also promptly arrange other uses for the sorted products, thereby filling the current gap in rapid non-destructive quality inspection and intelligent sorting of fresh meat products in different packaging methods produced in batches.

[0034] Combine the following Figure 1-Figure 2 Description of the present invention The quality monitoring method of fresh meat provided by the present invention is described. Figure 1This is one of the flow charts of the method for monitoring the quality of fresh meat provided by the present invention. The method for monitoring the quality of fresh meat provided by the present invention can be applied to the quality monitoring of fresh meat, and specifically can be applied to the quality monitoring of fresh meat in various packaging forms during the production, transportation, warehousing, inspection and the like, including but not limited to the use of livestock meat, poultry meat, aquatic meat or any cut parts of commercially available fresh meat. In addition, it is not limited to packaging materials, packaging forms and fresh meat varieties, and specifically can be any packaged fresh meat specified by national standards, industry standards or local standards, and this embodiment does not specifically limit this. The executor of the present method can be an electronic device, or it can be a fresh meat quality monitoring device arranged in the electronic device, and the fresh meat quality monitoring device can be implemented by software, hardware or a combination of both. Figure 1 As shown, the fresh meat quality monitoring method includes steps 101 to 103.

[0035] Step 101: Acquire fresh meat image information of fresh meat.

[0036] In this step, the fresh meat image information refers to the image information at time points such as before the fresh meat in different packaging forms is shipped, before the product arrives at the destination and is put into storage, and before the deep processing begins. This embodiment does not limit this time point.

[0037] The fresh meat image information is mainly used to judge the meat quality of the fresh meat. The fresh meat may be, for example, commercially available red meat or commercially available white meat in a packaging form such as skin packaging, vacuum packaging or modified atmosphere packaging, which is not limited in this embodiment.

[0038] Specifically, based on fresh meat in different packaging forms, image information of fresh meat is obtained at time nodes such as before shipment, before the product arrives at the destination and is put into storage, and before deep processing begins.

[0039] Step 102: Calculate the corresponding weighted grayscale mean vector according to the fresh meat image information.

[0040] Specifically, after obtaining the image information of fresh meat, dynamic threshold calculation is performed on the image information of fresh meat to obtain the binary matrix of the image information of fresh meat, and then the connected component with the largest number of pixels is the binary matrix of fresh meat according to the area of ​​each connected component in the binary matrix and the number of pixels in descending order, and then the fresh meat binary matrix is ​​multiplied with the image frame of the image information of fresh meat to obtain the color image of fresh meat, and the gray intensity range of 0-255 is further divided into several gray intervals, and the pixel color components in the color image of fresh meat are allocated to the corresponding gray intervals, and the gray mean value and number of pixels in each gray interval are calculated. The number of pixels in each gray interval is divided by the pixel comprehensive value of the fresh meat image information to obtain the weight vector of the pixels in each gray interval, and then the weight vector of the pixels in each gray interval is multiplied by the gray mean value of the pixels in each gray interval to obtain the weighted gray mean vector corresponding to the image information of fresh meat.

[0041] In one embodiment, Figure 2 FIG. 2 is a flow chart of the method for monitoring the quality of fresh meat provided by the present invention. Figure 2 As shown, the corresponding weighted grayscale mean vector is calculated according to the fresh meat image information, specifically including steps 10201 to 102100.

[0042] Step 10201: Obtain the image frame to be detected in the video stream.

[0043] In this step, the image frame to be detected is a frame in the fresh meat image information.

[0044] Specifically, the image frame to be detected in the video stream is obtained according to the image information of the fresh meat. It should be noted that in the actual implementation process, the continuous video stream is mainly obtained by the image acquisition device, and the image frames to be detected of several fresh meat products to be detected in the video stream can be obtained at the predicted angle, and the range of the preset angle also depends on the field of view width of the image acquisition device at different object distances. For example, image frames at 90 degrees can be collected as image frames to be detected. Here, the image at 90 degrees can be an image directly above the fresh meat products in different packaging forms to be detected. For another example, images at 60 degrees or 120 degrees can be taken as image frames to be detected. It can be understood that the image acquisition can be obtained by an image acquisition device (such as a camera, a video camera, etc.), and the image matrix is ​​a static image or a continuous image frame, which is not limited in this embodiment. Furthermore, the present embodiment does not specifically limit the method for obtaining the image frame to be detected captured at a preset angle. For example, packaged fresh meat can be placed on a conveyor belt passing through a dark box, and a diffuse reflection lamp with a polarizing film attached to the surface can be used as a light source. The image frame to be detected can be captured at a preset angle by a complementary metal oxide semiconductor camera equipped with a polarizing film.

[0045] Step 10202: determine the target foreground according to the image frame to be detected.

[0046] Specifically, the height and width of the image frame to be detected are sampled, and then the foreground and background are separated, so as to obtain the target foreground of the image frame to be detected. It should be noted that in the actual process of collecting digital images, the sampling rate of the digital signal is reduced by downsampling, part of the signal noise is filtered out, and the volume of the image data is reduced. By scaling the height and width of the image frame, the space occupied by the image matrix in the memory during online detection can be reduced, the calculation complexity is reduced, and the function operation speed is accelerated. This embodiment does not specifically limit this. In this embodiment, for example, the downsampling rate of the image frame to be detected is obtained. For example, the original image frame size is 1920×1024×3, and the image is scaled by 0.5, then the downsampling rate is 0.25, the image frame size is reduced to 960×512×3, and the data volume is 1 / 4 of the original image. This image matrix can be used as a sample image frame to be detected. For another example, the image is scaled by 0.3162, the image frame size is reduced to 192×102×3, the downsampling rate is 0.1, and the memory occupancy is 57.4KB. This embodiment does not limit this.

[0047] Step 10203: determine the meat target object based on the target foreground.

[0048] Specifically, for the target foreground, filtering processing is performed according to the morphological attributes of the foreground object, and the meat target object in the target foreground is obtained after the filtering processing.

[0049] Step 10204: Determine the binary matrix of the meat interest area according to the meat target object.

[0050] Specifically, the meat target is subjected to illumination balancing, the regions of interest in the meat target are segmented, and then the binary matrix of the meat regions of interest of all the regions of interest is obtained. It should be noted that the main purpose of illumination balancing for the meat target is to adjust the local brightness of the meat target when the illumination of the light source is insufficient or too strong, so as to highlight the color characteristics of the fresh sample to be detected. The present invention does not specify the method of illumination balancing. For example, the binary matrix of each target in the meat target and the original image are used to obtain the color (Red As Integer, Green As Integer, Blue, RGB) image of each target. For the RGB image, the histogram method, multi-scale or morphological top hat algorithm are used to perform illumination balancing operations. Finally, the meat target is converted into a grayscale matrix, and each grayscale matrix is ​​segmented again for the region of interest with its own threshold value to obtain a binary matrix of the meat region of interest.

[0051] Step 10205: Determine matrix data based on the binary matrix of the meat interest area.

[0052] Specifically, matrix data is calculated and determined according to the binary matrix of the meat interest area, and the matrix data includes the centroid of the meat interest area, the minimum circumscribed rectangle coordinates, and the color matrix corresponding to the binary matrix of the meat interest area. When the matrix data is determined to be the centroid and the minimum circumscribed rectangle coordinates of the meat interest area, step 10206 is executed; when the matrix data is determined to be the color matrix, step 10208 is executed. It should be noted that, to calculate the centroid and the minimum circumscribed rectangle coordinates of the meat interest area, first, the horizontal and vertical coordinates of all non-zero pixel points in the meat interest area are obtained according to the binary matrix of the meat interest area, the horizontal and vertical coordinates are accumulated respectively, the sum of the horizontal and vertical coordinates is divided by the sum of the non-zero pixel points, and the rounded value is obtained to obtain the centroid coordinates of the centroid of the meat interest area, and this operation is performed for all meat interest areas in turn to obtain the centroid coordinates of each interest area in the image frame to be detected of the fresh meat to be detected, and an M×2 centroid coordinate matrix is ​​constructed, where M represents the number of meat interest areas. Furthermore, the binary matrix of each meat interest area is converted into a column vector, the column index of the first and last non-zero pixel in the vector is obtained, and the column indexes are divided and modulo-calculated by the height of the image, respectively, and the coordinates obtained are [c1 r1] and [c2 r2]. Furthermore, the binary matrix of the above interest area is transposed and converted into a column vector, the column indexes of the first and last non-zero pixel in the vector are obtained, and the column indexes are divided and modulo-calculated by the width of the image, respectively, and the coordinates obtained are [r3 c3] and [r4 c4]. The coordinates are transposed to obtain [c3r3] and [c4 r4]. Furthermore, the coordinates of the origin of the minimum enclosing rectangle are [c1 c3], and the coordinates of its diagonal points are [c2c4], and the coordinate matrix of the M×4 minimum enclosing rectangle is constructed in the form of [c1 c3 c2-c1 c4-c3], where M represents the number of regions of interest; further, the binary matrix of each region of interest is multiplied by the original image to obtain M (c2-c1)×(c4-c3)×3 RGB matrices, where M represents the number of regions of interest.

[0053] Step 10206: The matrix data is the centroid and minimum circumscribed rectangle coordinates of the meat interest area to determine the distance from the meat to the specific location.

[0054] Specifically, when the matrix data is determined to be the centroid and minimum circumscribed rectangle coordinates of the meat interest area, for a single meat interest area, the specific distance constant is added to the centroid and the origin horizontal coordinates of the minimum circumscribed rectangle coordinates of the meat interest area and the width of the minimum circumscribed rectangle to determine the distance from the meat to the specific position.

[0055] It should be noted that the specific position distance represents the distance constants d1 and d2 from the first sorting device and the second sorting device to the black box exit, respectively. Further, the distance constants d1 and d2 are added to cx, c1, and c2, respectively, to obtain two M×3 distance matrices, namely D1=[d1+cx d1+c1 d1+c2] and D2=[d2+cx d2+c1 d2+c2], which represent the specific position distances from each point in each area of ​​interest to the first sorting device and the second sorting device.

[0056] Step 10207: Determine the time interval according to the distance from the meat product to the specific location and the transmission speed.

[0057] Specifically, after determining the distance from the meat to the specific location, the time interval for the meat interest area to reach the specific location is determined according to the ratio of the distance from the meat to the specific location and the current transmission speed of the fresh meat.

[0058] It should be noted that the current transmission speed of the fresh meat is obtained by accessing a specific register address through a speed encoder, and the hexadecimal code is converted into a decimal code, whose unit is cm / s, to obtain the transmission speed V. Further, the distance matrix of the distance to the specific position is divided by the transmission speed V, respectively, to obtain the time interval vector T1=D1 / V-T1d=[T1s T1c T1e]-T1d when the fresh meat to be detected arrives at the sorting device for primary sorting, and the time interval vector T2=D2 / V-T2d=[T2s T2c T2e]-T2d when the fresh meat to be detected arrives at the sorting device for secondary sorting, respectively. It should be noted that T1d and T2d are the time advances of the sorting device when receiving the activation signal, and this embodiment does not limit this.

[0059] Step 10208: Determine the number of pixels in the area of ​​interest based on the color matrix.

[0060] Specifically, when it is determined that the matrix data is a color matrix, for a single region of interest, the number of pixels of the region of interest in different color intervals and different grayscale value intervals is obtained according to the color matrix.

[0061] It should be noted that the grayscale intensity range of 0-255 is divided into several grayscale intervals. For a single area of ​​interest, the color component is determined according to the color matrix, and the number of non-zero pixels is counted according to the grayscale value of the pixel in the color component and the division of the grayscale interval. The non-zero pixel grayscale values ​​falling into the corresponding grayscale interval are accumulated, and the accumulated pixel grayscale value of each grayscale interval is divided by the number of non-zero pixels in the corresponding grayscale interval to obtain the grayscale of the corresponding grayscale interval.

[0062] Step 10209: determine the weighted grayscale mean based on the number of pixels.

[0063] Specifically, according to the number of pixels in different color intervals and different gray value intervals of a single interest area and the sum of the number of pixels in the binary matrix, the weight vectors of the variables in different gray intervals are calculated, and the weighted gray mean of each gray value interval in different color intervals is calculated with the corresponding gray mean.

[0064] Exemplarily, the non-zero pixels of the binary matrix of a single area of ​​interest are accumulated to obtain the total number of pixels in the binary matrix, the weight of the mean of the corresponding grayscale interval is obtained by dividing the number of pixels in each grayscale interval by the non-zero pixels of the binary matrix, the mean of each grayscale interval of each color component is multiplied by the weight of the mean of the corresponding grayscale interval to obtain the weighted grayscale mean.

[0065] Step 10210: Determine a weighted grayscale mean vector according to the time interval and the weighted grayscale mean.

[0066] Specifically, for the image frame to be detected acquired at a specific acquisition frequency, steps 10201 to 10210 are used to obtain a weighted grayscale mean vector consisting of a time interval and a weighted grayscale mean corresponding to a single area of ​​interest in the image frame to be detected.

[0067] Step 103: Determine the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model.

[0068] In this step, the quality prediction model is a model determined by pre-training based on sample information of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat. The quality prediction model includes a first prediction model and a second prediction model. The first prediction model is a model determined by pre-training based on the weighted gray mean vector of the sample image of fresh meat, and the second prediction model is a model determined by pre-training based on the storage period of the sample image of fresh meat. The sample image is the image information of fresh meat with good quality collected in advance.

[0069] In one embodiment, the quality monitoring result is determined based on the weighted grayscale mean vector and the quality prediction model, which can be specifically achieved in the following manner: the weighted grayscale mean vector is input into the first prediction model to predict and determine the quality evaluation index; when the quality evaluation index does not meet the preset index threshold, the quality monitoring result is determined to be a quality abnormality and a first alarm message is issued; wherein the first alarm message is used to remind that the quality of fresh meat is overdue; when the quality evaluation index meets the preset index threshold, the target remaining storage period is determined based on the quality evaluation index and the second prediction model; when the target remaining storage period is less than the preset storage period, the quality monitoring result is determined to be a quality abnormality and a second alarm message is issued; wherein the second alarm message is used for fresh meat storage overdue; when the target remaining storage period is greater than or equal to the preset storage period, the quality monitoring result is determined to be normal.

[0070] In this step, the first alarm message is used to remind that the quality of fresh meat has expired, and the second alarm message is used for fresh meat storage has expired. Quality evaluation indicators refer to evaluation indicators used to judge whether the quality of fresh meat meets national, industry or local standards. The quality evaluation indicators specifically include: one or more of the volatile basic total nitrogen content, myoglobin content, total colony count, carbonyl content, water holding capacity, shear force, myofibrillar protein oxidation degree, fatty acid free degree and meat quality indicators of the fresh meat to be tested, including but not limited to the above indicators. The sampling range is from the surface of the fresh meat sample to 1 cm below the surface. The sampling method is uniform sampling. The number of samples is 5 to 9, which is not limited to this embodiment.

[0071] In one embodiment, the quality monitoring results of fresh meat products are evaluated from the aspects of safety quality, processing quality, sensory quality and edible quality during training. Safety quality corresponds to volatile basic nitrogen, total bacterial count, malondialdehyde and carbonyl content, sensory quality corresponds to the ratio of deoxygenated, oxygenated and metmyoglobin in myoglobin, edible quality corresponds to shear force, and processing quality corresponds to water holding capacity. When the quality index of the packaged fresh sample to be tested includes one or more of the above parameters, the construction of the first prediction model also needs to include the above corresponding types of parameters. The present invention does not make specific provisions for the selection of quality indicators, which can be replaced or increased or decreased according to the characterization quality requirements involved in the specific implementation process.

[0072] In one embodiment, the preset index threshold is a preset index for judging whether the quality evaluation index meets the requirements. The target remaining storage period refers to the remaining period that fresh meat can be stored at present, and the preset storage period is the preset period that fresh meat can be stored, for example, it can be one week, one month, half a year, one year, etc., and this embodiment does not limit this. In the actual operation process, different packaging forms mainly adopt skin packaging, vacuum packaging and modified atmosphere packaging, etc., and there are also several types of food packaging materials used. Fresh meat mainly refers to the meat of livestock and poultry parts described according to national standards, industry standards or landmarks. For example, fresh pork split sirloin in skin packaging, or fresh chicken breast in vacuum packaging, the present invention does not make specific provisions for the packaging form, packaging materials, meat type, meat split part, etc. of the packaged fresh meat to be tested, and only requires that the meat is a fresh slaughtered split product. Furthermore, the preset storage period is usually under the constraints of specific packaging form, packaging material, meat type and cutting part. The preset storage period can be, for example, the longest period achieved when the fresh meat to be tested is stored at 4°C and its microbial test results do not exceed the national standard requirements. This value is the average value obtained after multiple tests.

[0073] Specifically, after calculating and determining the weighted grayscale mean vector, the weighted grayscale mean vector is first input into the first prediction model for prediction training in the model to determine the current quality evaluation index of the fresh meat product; it is determined whether the quality evaluation index is sufficient to meet the preset index threshold. When it is determined that the quality evaluation index does not meet the preset index threshold, the quality monitoring result is determined to be quality abnormality and a first alarm message is issued, and the user is reminded through the first alarm message that the quality of the fresh meat product is overdue; when it is determined that the quality evaluation index meets the preset index threshold, the quality evaluation index is further input into the second prediction model for summary and prediction training to determine the target remaining storage period of the fresh meat product; then it is determined whether the target remaining storage period of the fresh meat product is less than the preset storage period. When it is determined that the target remaining storage period is less than the preset storage period, the quality monitoring result is determined to be quality abnormality and a second alarm message is issued, and the user is reminded through the second alarm message that the storage of the fresh meat product is overdue; when the target remaining storage period is greater than or equal to the preset storage period, the quality monitoring result is determined to be normal.

[0074] In this step, for the construction of the first prediction model, first determine the one-to-one correspondence between the quality evaluation index and the quality of fresh meat, which are respectively expressed as the safety quality, processing quality, sensory quality and edible quality of packaged fresh meat. Follow this operation for all fresh meat samples to obtain the safety quality sample set, processing quality sample set, sensory quality sample set and edible quality sample set of the sample interest area of ​​the fresh meat sample. Then, after associating the safety quality sample set, processing quality sample set, sensory quality sample set and edible quality sample set of the above samples with the weighted gray mean vector of the interest area of ​​the packaged fresh meat group with different packaging forms, different packaging materials, different meat types and different segmented parts, several linear regression prediction models with 15 factor variables are established. The optimal prediction model with the highest fitting determination coefficient is screened respectively. Among them, the partial least squares method is used to construct a 15-factor variable linear regression prediction model. The quality indicators of safety quality, processing quality, sensory quality and edible quality corresponding to the target interest area of ​​packaged fresh meat samples are taken as dependent variables Yn, and the weighted gray mean vector of the interest area of ​​packaged fresh meat samples is taken as the independent variable matrix T. The relationship equation Yn=f(T)+(a+b|f(T)|)e is constructed respectively. The f(T) in the relationship equation is the partial least squares function form of the model, expressed as Σk(i)T(i), where k(i) represents the estimated coefficient vector of each observation item, T(i) represents the weighted gray mean of each gray interval, and i∈[1 15], (a+b|f(T)|)e in the relationship equation is the error variance model, where a is the intercept of the error variance model, b is the slope of the error variance model, e is a variable matrix with a mean of 0 and a variance of 1, Yn represents the observed value of each quality index, n∈[1 7]. The iterative method is used to fit the corresponding prediction equation, and different weight functions such as Andrews, Bisquare, Cauchy, Fair, Huber, Logistic, Talwar, and Welsch are used to control the robustness of the fitting process. When the estimated value converges within the termination tolerance range based on the estimated coefficient or the residual sum of squares, the iterative process ends, and the best prediction model for the corresponding packaged fresh meat quality index with the largest fitting determination coefficient R2 is selected as the first prediction model. During model training, the K-fold, HoldOut, and LeaveOne methods are mainly used to divide the number of samples in the sample set for the calibration set and the test set. After each division, the sample numbers of the calibration set and the validation set after the previous sample division need to be compared. If the comparison results of the sample numbers of the two divisions are consistent, the sample set is divided again to avoid repeated model training.By collecting clear image frames at different angles in the video stream of packaged fresh meat samples, the interest area in the fresh meat target is separated, and the quality change related to the weighted grayscale mean is analyzed based on the partial least squares method. A variety of weight functions are used to control the robustness of the iterative process, and the prediction equations of the weighted grayscale mean vector and the changes of several quality indicators of fresh meat in different packaging forms, different packaging materials, different meat types and different segmented parts are effectively fitted, thereby improving the robustness and accuracy of the model prediction performance. The present invention only provides a guiding description of the method for constructing the first model, and does not make specific provisions on which model to use and how to construct it.

[0075] In one embodiment, after determining that the quality monitoring result is abnormal quality and issuing the first alarm information, it can be specifically implemented in the following manner: sorting the fresh meat products once based on the quality evaluation index.

[0076] Specifically, after determining that the quality monitoring result is abnormal quality and issuing the first alarm information, the quality monitoring result is determined to be fresh meat products with abnormal quality, and the fresh meat products with abnormal quality are sorted once.

[0077] The advantage of this setting is that the quality of fresh meat can be monitored in a timely manner, and fresh meat with abnormal quality can be sorted out in a timely manner, thereby ensuring the quality of fresh meat and improving the user experience.

[0078] In one embodiment, after determining that the quality monitoring result is abnormal quality and issuing a second alarm message, it can be specifically implemented in the following manner: performing secondary sorting of fresh meat products based on the target remaining storage period.

[0079] Specifically, after determining that the quality monitoring result is abnormal quality and issuing a second alarm message, fresh meat products whose target remaining storage period is less than a preset storage period are sorted a second time.

[0080] The advantage of this arrangement is that, on the basis of ensuring the quality of fresh meat, the target remaining storage period of fresh meat can be further monitored, and fresh meat whose target remaining storage period is less than the preset storage period can be sorted in time, to ensure that the storage period of fresh meat meets the requirements and enhance the user experience.

[0081] In one embodiment, the target remaining storage period is determined based on the quality evaluation index and the second prediction model, which can be specifically achieved in the following manner: the quality evaluation index is input into the second prediction model for training to determine the storage period prediction value; the target remaining storage period is determined based on the difference between the storage threshold and the storage period prediction value.

[0082] In this step, the storage period prediction value is the storage period of fresh meat determined by the quality evaluation index of fresh meat. The storage threshold is the maximum storage period of fresh meat set in advance, which can be, for example, one quarter, half a year, one year, etc., which is not limited in this embodiment.

[0083] In this step, the target remaining storage period mainly refers to the time interval from the current storage period of the packaged fresh meat under low temperature conditions to the time when it cannot be used or can be used.

[0084] Specifically, after determining the quality representation input of fresh meat, the quality evaluation index is first input into the second prediction model for training and prediction, the predicted storage period prediction value of the fresh meat is determined, and then the target remaining storage period is determined based on the difference between the storage threshold and the storage period prediction value.

[0085] For example, when the predicted storage period value is determined to be 80 days and the storage threshold is 90 days, the target remaining storage period of fresh meat is determined to be the difference between the storage threshold of 90 days and the predicted storage period value of 80 days, that is, the target remaining storage period of fresh meat is 10 days.

[0086] In this embodiment, the fresh meat product can be, for example, pork, mutton, beef, chicken, duck, or one of the commercially available fresh livestock and poultry meat low-temperature storage products. At the same time, the sampling part is any segmented part divided according to the national standard, industry standard, or landmark, and this embodiment does not limit this. In order to improve the accuracy of detection, the training samples of the fresh livestock and poultry meat and the fresh livestock and poultry meat to be detected are the same segmented parts of the same packaging form, the same packaging material, and the same meat type.

[0087] In this embodiment, the meat quality and target remaining storage period of the packaged fresh meat sample are calculated according to the first prediction model and the second prediction model, and the second alarm information or the first alarm information is triggered. If it is the first alarm information, the distance vector of the packaged fresh meat to be detected reaching the primary sorting device is determined, and if it is the second alarm information, the distance vector of the packaged fresh meat to be detected reaching the secondary sorting device is determined; the distance vector determined according to the corresponding alarm type is divided by the current transmission speed to obtain the time interval of the sample to be detected reaching the primary sorting device or the secondary sorting device. According to the alarm type, an activation signal is sent to the corresponding sorting device, and the time interval vector of the fresh meat to be detected reaching the sorting device is sent. After the sorting device is activated, the countdown begins. After the countdown returns to zero, the push rod pops out and changes the forward direction of the problematic sample to guide it into the designated area. After the sorting is completed, the push rod is reset, and the sorting device waits for the next activation signal.

[0088] The present invention provides a method, device and electronic device for monitoring the quality of fresh meat, which calculates the corresponding weighted grayscale mean vector according to the image information of fresh meat; determines the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model; wherein the quality prediction model is a model determined in advance according to the sample information of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat. The technical scheme of the present invention collects the image information of fresh meat, and based on the recognition processing of the image, uses the quality prediction model training to determine the quality monitoring result, and monitors the quality of fresh meat based on the quality monitoring result, thereby solving the vacancy of rapid non-destructive detection of the quality of fresh meat in the prior art, and at the same time avoids the shortcomings such as low sampling frequency, human judgment error and few detection indicators, improves the monitoring efficiency, ensures the quality of fresh meat, and enhances the user experience.

[0089] Figure 3 This is the third flow chart of the method for monitoring the quality of fresh meat provided by the present invention. The method for monitoring the quality of fresh meat provided by the present invention can be applied to the quality monitoring of fresh meat. The execution subject of this method can be an electronic device, or a fresh meat quality monitoring device set in the electronic device. The fresh meat quality monitoring device can be implemented by software, hardware or a combination of the two. Figure 3 As shown, the calculation of the corresponding weighted grayscale mean vector according to the fresh meat image information and the determination of the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model are further optimized. The fresh meat quality monitoring method includes steps 201 to 206.

[0090] Step 201: Acquire an image frame to be detected of any fresh meat product in a video stream of an image acquisition device at a preset angle.

[0091] In this step, the preset angle is a preset angle of an image frame to be detected of any fresh meat product in the video stream of the image acquisition device. The range of the preset angle also depends on the field of view width of the image acquisition device at different object distances. For example, image frames at 90 degrees can be collected as image frames to be detected of fresh meat products. Here, the image at 90 degrees can be an image directly above the fresh meat products in different packaging forms to be detected. For another example, images at 60 degrees or 120 degrees can be taken as image frames to be detected of fresh meat products, which are not specifically limited in this embodiment.

[0092] In this step, the acquisition of the image frame to be detected usually adopts a certain frame in the video stream at a specific sampling frequency. It should be noted that the interval between the image frames in the video stream of the packaged fresh meat to be detected is set according to the current conveyor belt speed obtained by the speed encoder. For example, when the conveyor belt speed is 50cm / s, the sampling frequency is to collect one image frame at an interval of 4 frames. When the speed is 100cm / s, the sampling frequency is adjusted to collect one frame at an interval of 6 frames, so as to ensure that the subsequent calculations can be completed before the acquisition protocol. Usually, an upper limit is set for the conveyor belt speed to ensure that the image acquisition frame rate is at least 10FPS to ensure the continuity of image acquisition. The present invention does not make specific requirements for the acquisition method and parameter setting requirements of the image frame to be detected, and can be modified accordingly according to the number of detection indicators and the level of computational complexity. Furthermore, for the acquisition of the image frame to be detected, the initial settings of the image acquisition device can be used. For example, the image data acquired by the USB3.0 CMOS camera has a format of BGR8, a width of 1920, a height of 1024, a bit depth of 24 bits, and a size of 1920×1024×3, and a data format of uint8.

[0093] The image frame to be detected can be obtained through an image acquisition device (such as a camera, a video camera, etc.), which is not specifically limited in this embodiment.

[0094] Specifically, an image frame to be detected of any fresh meat product in a video stream of an image acquisition device at a preset angle is obtained.

[0095] Further, obtain the image frame to be detected of any fresh meat product in the video stream of the image acquisition device at a preset angle, firstly obtain the current conveyor belt speed by parsing the hexadecimal code transmitted by the speed encoder; divide the horizontal coordinate of the centroid, the horizontal coordinate of the origin of the minimum circumscribed rectangle and the sum of the width of the minimum circumscribed rectangle by the width of the image frame to construct a distance ratio vector; multiply the vector by the actual field of view width of the image frame to obtain the actual distance from the front end, the centroid and the rear end of the interest area of ​​the sample to be tested to the dark box outlet respectively; according to the alarm type, add the vector to the distance from the first sorting or the second sorting to the dark box outlet, and the alarm type includes the first alarm information and the second alarm information; calculate the ratio of the distance of the first sorting or the second sorting to the current conveyor belt speed; the ratio represents the time required for the fresh meat product to be detected to reach the first sorting device or the second sorting device; after obtaining the time, the first sorting device or the second sorting device starts the countdown, and after the countdown ends, the sorting action is performed and reset, waiting for the next activation signal; for example, by accessing the register address "01 03 0005 00 01 94 0B", obtain hexadecimal data and convert it into decimal speed data V, with a unit of cm / s; according to the target binary matrix of the target object interest area of ​​the packaged fresh meat to be detected, obtain the coordinates of its centroid, the origin and the diagonal point of the minimum circumscribed rectangle, take the horizontal coordinates of the three points, divide them by the image width after downsampling, and construct a distance ratio vector; compare the distance ratio vector with the actual field of view width corresponding to the original image frame of the fresh meat to obtain the actual distance vector from the front end, the centroid and the rear end of the fresh meat to be detected to the dark box exit, wherein the actual field of view width can be associated with the image frame width by the actual measurement value, or the fixed measurement tool length can be divided by the ratio of the pixel length of the fixed measurement tool length in the image to the image frame width to obtain the actual width of the image frame to be detected, which is not specifically specified in the present invention.

[0096] Exemplarily, the packaged fresh meat can be placed on a conveyor belt passing through a dark box, and a diffuse reflective light-emitting diode (LED) lamp with a polarizing film attached to the surface is used as a light source. According to a preset angle, a complementary metal oxide semiconductor camera equipped with a polarizing film is used to collect the image frame to be detected. In the actual acquisition process of the image frame to be detected, the sampling rate of the digital signal can be reduced by downsampling, part of the signal noise can be filtered out, and the volume of the image data can be reduced. By scaling the height and width of the image frame, the space occupied by the image matrix in the memory during online detection can be reduced, the calculation complexity can be reduced, and the function operation speed can be accelerated. This embodiment does not make specific restrictions on this. There is no specific provision for the downsampling rate of the image frame to be detected. For example, if the original image frame size is 1920×1024×3, the image is scaled by 0.5, then the downsampling rate is 0.25, the image frame size is reduced to 960×512×3, and the data volume is 1 / 4 of the original image. This image matrix can be used as the image frame to be detected. For another example, when scaling an image by 0.3162, the image frame size is reduced to 192×102×3, the downsampling rate is 0.1, and the memory usage is 57.4KB.

[0097] Step 202: Acquire fresh meat image information according to the image frame to be detected.

[0098] Specifically, after obtaining the image frame to be detected, the foreground and background of the image frame to be detected are first separated to obtain the foreground. Specifically, the color space conversion is first performed on the downsampled image frame to be detected to obtain the grayscale image of the image frame to be detected, and a specific size median filter is performed to obtain a balanced processing image. The segmentation threshold for separating the foreground and background is determined, the grayscale values ​​of the non-zero pixels in the image frame to be detected are counted (only one is taken if the same), and sorted in descending order. The grayscale values ​​of a specific ratio are the segmentation threshold, and then the global threshold is calculated for each image frame in the video stream. The two are compared. If the global threshold of a single frame is greater than or equal to the segmentation threshold, the global threshold of the single frame is assigned to the segmentation threshold. Otherwise, the segmentation threshold remains unchanged. The segmentation threshold is used as a standard to obtain a binary image of the foreground image containing the target area. Further, this embodiment does not make specific provisions for the method of obtaining the balanced processing image. For example, the image frame to be detected can be converted to a color space such as a color opposition space (Lab colorspace, LAB), and a corresponding color space image can be obtained, or a layer in the image can be taken as the grayscale image of the image frame to be detected. For another example, after filtering the obtained grayscale image using methods such as median, mean, Gaussian, high-pass, and band-stop of specific sizes [3 3], [5 5], [7 7], and [9 9], a filtered image is obtained. It can be understood that by obtaining an image in a specific color space to retain the apparent color features of the image frame to be detected, and then filtering the image frame to be detected to remove black and white interference noise, a balanced image of the image frame to be detected is obtained, which is the fresh meat image information.

[0099] Furthermore, this embodiment does not make specific provisions for the setting, iteration or updating of the segmentation threshold. For example, the segmentation threshold can be calculated and determined by using a fixed value, a mean value method, a histogram method, an entropy value method, an adaptive threshold method, etc. For another example, pixel values ​​are sorted, and the grayscale values ​​of the last 10% are taken as the segmentation threshold. Then, a global threshold is calculated for the image frames to be detected in the video stream, and the global threshold of each frame is dynamically obtained. The two are then compared, and the maximum value is taken as the segmentation threshold.

[0100] Step 203: Determine an image binary matrix according to the fresh meat image information.

[0101] Specifically, after the fresh meat image information of the fresh meat is determined, filtering is performed according to the morphological attributes of the foreground object of the fresh meat image of the fresh meat to obtain the fresh meat target object in the foreground object.

[0102] In this step, the morphological attribute of the foreground object is mainly to obtain the area of ​​each fresh meat target object in the fresh meat image information, that is, the number of pixels of each fresh meat target object.

[0103] Specifically, a label matrix is ​​constructed from a binary matrix containing fresh meat targets, the number of fresh meat targets in the label matrix is ​​counted, the number of pixels is accumulated and arranged in descending order, and truncated according to a preset number of pixels. If the sum of the number of pixels of the fresh meat targets is greater than the preset number of pixels, the label is retained, otherwise the label is deleted. The preset number of pixels is the number of pixels of the fresh meat targets set in advance. Further, the retained labels are matched with the labels of the fresh meat targets in the label matrix. If the retained labels have the labels of the fresh meat targets, the pixel values ​​of the fresh meat targets are assigned true, otherwise they are assigned false, thereby converting to an image binary matrix of the fresh meat targets in the fresh meat image information. This embodiment does not specifically limit the method for obtaining the fresh meat targets.

[0104] Step 204: Determine the image color components according to the image binary matrix.

[0105] Specifically, after determining the binary matrix of the image, a specific attribute of the binary matrix of the image is obtained, and the color components of the image are statistically determined.

[0106] Step 205: Determine a weighted grayscale mean vector according to the image color components.

[0107] In one embodiment, a weighted grayscale mean vector is determined according to the color components of the image, which can be specifically implemented in the following manner: a gray interval is determined according to gray intensity; the image color components are allocated to corresponding grayscale intervals, and the pixel grayscale mean and the number of pixels corresponding to the grayscale interval are calculated and determined; a weight vector is determined according to the number of pixels; and a weighted grayscale mean vector is determined according to the product of the weight vector and the pixel grayscale mean.

[0108] Specifically, the gray interval is determined according to the gray intensity, the gray intensity range of 0-255 is divided into several gray intervals, the pixel grayscale in the image color component is determined, the number of non-zero pixels is counted according to the division of the gray interval, and the non-zero pixel grayscale values ​​falling into the corresponding gray interval are accumulated, and the pixel grayscale accumulated value of each gray interval is divided by the number of non-zero pixels in the corresponding gray interval to obtain the grayscale of the corresponding gray interval.

[0109] Exemplarily, the grayscale intensity range is divided into five grayscale intervals, namely [1 51], [52 102], [103153], [154 204], and [205 255]. The color components of the single area of ​​interest image are split into three color components: R, G, and B. The number of pixels in each component whose grayscale value falls into the five grayscale intervals is counted respectively, and the grayscale values ​​of the corresponding pixels are accumulated. The mean of the corresponding grayscale interval is obtained by adding the grayscale value of the corresponding pixel to the ratio of the number of pixels in the grayscale interval. The present invention does not specifically specify the method for dividing the grayscale interval.

[0110] Specifically, after determining the grayscale space, the image color components are allocated to corresponding grayscale intervals, and the pixel grayscale mean and the number of pixels corresponding to the grayscale intervals are calculated and determined, the weight vector is determined according to the number of pixels, and the weighted grayscale mean vector is determined according to the product of the weight vector and the pixel grayscale mean.

[0111] Step 206: Determine the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model.

[0112] In this step, the quality prediction model is a model that is pre-trained and determined based on sample information of fresh meat products, and the quality monitoring results are used to reflect the quality monitoring results of fresh meat products.

[0113] Specifically, after the weighted grayscale mean vector is determined, the weighted grayscale mean vector is input into the quality prediction model for training and prediction, and the quality monitoring result is output.

[0114] The present invention provides a method, device and electronic device for monitoring the quality of fresh meat, which obtains the image frame to be detected of any fresh meat in the video stream of the image acquisition device at a preset angle; obtains the image information of the fresh meat according to the image frame to be detected; determines the image binary matrix according to the image information of the fresh meat; determines the image color component according to the image binary matrix; determines the weighted grayscale mean vector according to the image color component; and determines the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model. The technical solution of the present invention collects the image information of the fresh meat, and based on the recognition processing of the image, determines the quality monitoring result by training the quality prediction model, and monitors the quality of the fresh meat based on the quality monitoring result, solves the vacancy of the prior art for rapid and non-destructive detection of the quality of fresh meat, ensures the quality of fresh meat, and improves the user experience.

[0115] The fresh meat quality monitoring device provided by the present invention is described below. The fresh meat quality monitoring device described below and the fresh meat quality monitoring method described above can be referred to each other.

[0116] Figure 4 is a schematic diagram of the structure of the fresh meat quality monitoring device provided by the present invention, referring to Figure 4 As shown, the quality monitoring device 300 for fresh meat includes: an information acquisition module 301, a mean value determination module 302 and a result determination module 303; wherein,

[0117] The information acquisition module 301 is used to acquire fresh meat image information of fresh meat;

[0118] A mean value calculation module 302 is used to calculate the corresponding weighted grayscale mean vector according to the fresh meat image information;

[0119] The result determination module 303 is used to determine the quality monitoring result according to the weighted gray mean vector and the quality prediction model; wherein the quality prediction model is a model pre-trained and determined according to the sample information of fresh meat products, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat products.

[0120] In an exemplary embodiment, the quality prediction model includes a first prediction model and a second prediction model, the first prediction model is a model pre-determined by training based on a weighted grayscale mean vector of sample images of fresh meat, and the second prediction model is a model pre-determined by training based on a storage period of sample images of fresh meat.

[0121] In an exemplary embodiment, the result determination module 303 is specifically used to: input the weighted grayscale mean vector into the first prediction model to predict and determine the quality evaluation index; when the quality evaluation index does not meet the preset index threshold, determine the quality monitoring result as quality abnormality and issue a first alarm message; wherein the first alarm message is used to remind that the quality of fresh meat is out of date; when the quality evaluation index meets the preset index threshold, determine the target remaining storage period according to the quality evaluation index and the second prediction model; when the target remaining storage period is less than the preset storage period, determine the quality monitoring result as quality abnormality and issue a second alarm message; wherein the second alarm message is used for fresh meat storage overdue; when the target remaining storage period is greater than or equal to the preset storage period, determine the quality monitoring result as normal.

[0122] In an exemplary embodiment, the device further includes a first sorting module, which is specifically used to: sort the fresh meat products based on the quality evaluation index after determining that the quality monitoring result is abnormal and issuing a first alarm message.

[0123] In an exemplary embodiment, the device further includes a second sorting module, which is specifically used to: after determining that the quality monitoring result is abnormal quality and issuing a second alarm message, perform secondary sorting on the fresh meat based on a target remaining storage period.

[0124] In an exemplary embodiment, the result determination module 303 determines the target remaining storage period based on the quality evaluation index and the second prediction model, and is specifically used to: input the quality evaluation index into the second prediction model to train and determine the storage period prediction value; determine the target remaining storage period based on the difference between the storage threshold and the storage period prediction value.

[0125] In an exemplary embodiment, the mean calculation module 302 is specifically used to: determine an image binary matrix according to the fresh meat image information; determine image color components according to the image binary matrix; and determine a weighted grayscale mean vector according to the image color components.

[0126] In an exemplary embodiment, the mean calculation module 302 determines a weighted grayscale mean vector according to the image color components, and is specifically used to: determine a gray interval according to gray intensity; allocate the image color components to corresponding grayscale intervals, and calculate and determine the pixel grayscale mean and the number of pixels corresponding to the grayscale interval; determine a weight vector according to the number of pixels; and determine a weighted grayscale mean vector according to the product of the weight vector and the pixel grayscale mean.

[0127] In an exemplary embodiment, the information acquisition module 301 is specifically used to: acquire an image frame to be detected of any fresh meat product in a video stream of an image acquisition device at a preset angle; and acquire fresh meat image information according to the image frame to be detected.

[0128] The device of this embodiment can be used to execute the method of any embodiment in the embodiment of the method for monitoring the quality of fresh meat products. Its specific implementation process and technical effects are similar to those in the embodiment of the method for monitoring the quality of fresh meat products. For details, please refer to the detailed description in the embodiment of the method for monitoring the quality of fresh meat products, which will not be repeated here.

[0129] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the quality monitoring method of fresh meat, the method comprising: obtaining fresh meat image information of fresh meat; calculating the corresponding weighted gray mean vector according to the fresh meat image information; determining the quality monitoring result according to the weighted gray mean vector and the quality prediction model; wherein the quality prediction model is a model determined by pre-training according to the sample information of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat.

[0130] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0131] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the fresh meat quality monitoring method provided by the above methods, the method including: obtaining fresh meat image information of the fresh meat; calculating the corresponding weighted grayscale mean vector based on the fresh meat image information; determining the quality monitoring result based on the weighted grayscale mean vector and a quality prediction model; wherein the quality prediction model is a model determined in advance based on sample information training of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat.

[0132] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the quality monitoring method for fresh meat provided by the above-mentioned methods, the method comprising: obtaining fresh meat image information of the fresh meat; calculating the corresponding weighted grayscale mean vector based on the fresh meat image information; determining the quality monitoring result based on the weighted grayscale mean vector and a quality prediction model; wherein the quality prediction model is a model determined in advance by training based on sample information of fresh meat, and the quality monitoring result is used to reflect the quality monitoring result of fresh meat.

[0133] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for monitoring the quality of fresh meat, characterized in that: include: Acquire fresh meat image information of fresh meat; Calculating a corresponding weighted grayscale mean vector according to the fresh meat image information; The quality monitoring result is determined according to the weighted grayscale mean vector and the quality prediction model; wherein the quality prediction model is a model determined in advance based on the sample information of the fresh meat product, and the quality monitoring result is used to reflect the quality monitoring result of the fresh meat product.

2. The method for monitoring the quality of fresh meat according to claim 1, characterized in that: The quality prediction model includes a first prediction model and a second prediction model, wherein the first prediction model is a model determined in advance by training the weighted grayscale mean vector of the sample image of the fresh meat product, and the second prediction model is a model determined in advance by training the storage period of the sample image of the fresh meat product; the quality monitoring result is determined according to the weighted grayscale mean vector and the quality prediction model, including: Inputting the weighted grayscale mean vector into a first prediction model to predict and determine a quality evaluation index; When the quality evaluation index does not meet the preset index threshold, the quality monitoring result is determined to be abnormal quality and a first alarm message is issued; wherein the first alarm message is used to remind that the quality of the fresh meat product is out of date; When the quality evaluation index meets the preset index threshold, determining a target remaining storage period according to the quality evaluation index and the second prediction model; When the target remaining storage period is less than the preset storage period, the quality monitoring result is determined to be abnormal quality and a second alarm message is issued; wherein the second alarm message is used for the storage of the fresh meat product exceeding the expiration date; When the target remaining storage period is greater than or equal to the preset storage period, the quality monitoring result is determined to be normal.

3. The method for monitoring the quality of fresh meat according to claim 2, characterized in that: After determining that the quality monitoring result is abnormal quality and issuing a first alarm message, the method further includes: The fresh meat is sorted based on the quality evaluation index.

4. The method for monitoring the quality of fresh meat according to claim 2, characterized in that: After determining that the quality monitoring result is abnormal quality and issuing a second alarm message, the method further includes: The fresh meat is sorted a second time based on the target remaining storage period.

5. The method for monitoring the quality of fresh meat according to claim 2, characterized in that: Determining the target remaining storage period according to the quality evaluation index and the second prediction model includes: Inputting the quality evaluation index into the second prediction model for training and determining a storage period prediction value; The target remaining storage period is determined according to the difference between the storage threshold value and the storage period prediction value.

6. The method for monitoring the quality of fresh meat according to claim 1, characterized in that: The step of calculating the corresponding weighted grayscale mean vector according to the fresh meat image information includes: Determine an image binary matrix according to the fresh meat image information; Determine the image color components according to the image binary matrix; The weighted grayscale mean vector is determined according to the image color components.

7. The method for monitoring the quality of fresh meat according to claim 6, characterized in that: The step of determining the weighted grayscale mean vector according to the image color components comprises: Determine the gray interval according to the gray intensity; Allocate the image color components to the corresponding grayscale intervals, and calculate and determine the pixel grayscale mean and the number of pixels corresponding to the grayscale intervals; Determining a weight vector according to the number of pixels; The weighted grayscale mean vector is determined according to the product of the weight vector and the pixel grayscale mean.

8. The method for monitoring the quality of fresh meat according to claim 1, characterized in that: The step of obtaining the fresh meat image information of the fresh meat includes: Acquire an image frame to be detected of any fresh meat product in a video stream of an image acquisition device at a preset angle; The fresh meat image information is acquired according to the image frame to be detected.

9. A device for monitoring the quality of fresh meat, characterized in that: include: An information acquisition module, used to acquire fresh meat image information of fresh meat; A mean calculation module, used to calculate a corresponding weighted grayscale mean vector according to the fresh meat image information; The result determination module is used to determine the quality monitoring result according to the weighted grayscale mean vector and the quality prediction model; wherein the quality prediction model is a model pre-trained and determined based on the sample information of the fresh meat product, and the quality monitoring result is used to reflect the quality monitoring result of the fresh meat product.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the fresh meat quality monitoring method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Product whole-process supervision method and system based on block chain

    CN119312986A

  • Meat marbling evaluation method, device and equipment and storage medium

    CN119827483A

  • Quality detection system and method for meat and meat products

    CN121558637A