Visual detection method and device for bacterial distribution on surface of pig carcass

Through the combination of fluorescent light sources and visible light sources, combined with fluorescence imaging and image processing technology, the problem of low accuracy in microbial contamination detection on the surface of pig carcass is solved, and the rapid and accurate detection and visual display of bacterial distribution on the surface of pig carcass is achieved.

CN120293924APending Publication Date: 2025-07-11CHINA MEAT RES CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510271097.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, the detection method of microbial contamination on the surface of pig carcass is not accurate and it is difficult to meet production and sales needs.

Method used

Using a method of combining fluorescent light sources and visible light sources, fluorescent images and visible light images on the surface of pig carcass are obtained through fluorescent imaging technology and image processing technology, and the quantitative relationship between pre-established fluorescent intensity and bacterial content is used to realize visual detection of bacterial distribution.

Benefits of technology

It realizes rapid and accurate detection and visual display of bacterial distribution on the surface of pig carcass, improves the accuracy and visualization of detection, and can accurately control microbial contamination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120293924A_ABST
    Figure CN120293924A_ABST
Patent Text Reader

Abstract

The invention provides a visual detection method and device for bacterial distribution on the surface of a pig carcass, which are applied to the technical field of meat safety control, and the method comprises the following steps: acquiring a fluorescent image on the surface of the pig carcass obtained by irradiating the surface of the pig carcass with a fluorescent light source; performing signal extraction on the live pig carcass surface fluorescence image to obtain a signal area of the live pig carcass surface fluorescence image; in response to the obtained target area, determining the signal fluorescence intensity of the target area in the signal area; according to a pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, performing bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target area; obtaining a live pig carcass surface visible light image obtained by irradiating the pig carcass surface through a visible light source; based on the bacterial content of the target area, performing visual display on the visible light image on the surface of the live pig carcass; according to the invention, the accuracy and the visualization degree of live pig carcass surface bacterial distribution detection can be 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 meat safety control, and in particular to a detection method and device for visualizing the bacterial distribution on the surface of a pig carcass. Background Art

[0002] The microbial contamination of pork usually starts from the slaughter and processing link. Therefore, controlling the initial quantity of microbial contamination on the surface of livestock meat during the slaughter and processing process is crucial for ensuring the quality of livestock meat.

[0003] Currently, only physical means (such as rinsing) are allowed to reduce the microbial contamination on the surface of pig carcasses. However, due to the diversity and contamination degree of microorganisms on the surface of pig carcasses not being clear, existing rinsing equipment is difficult to perform precise cleaning and effective bacteria reduction according to the actual contamination situation, resulting in the microbial control effect being difficult to meet the production and sales requirements.

[0004] It can be seen that the microbial contamination detection method for the surface of pig carcasses in the related art has the technical problem of low accuracy. Summary of the Invention

[0005] The present invention provides a detection method and device for visualizing the bacterial distribution on the surface of a pig carcass, aiming to solve the defect of low accuracy in the microbial contamination detection method for the surface of pig carcasses in the prior art, and to improve the accuracy and visualization degree of the bacterial distribution detection on the surface of live pig carcasses.

[0006] The present invention provides a detection method for visualizing the bacterial distribution on the surface of a pig carcass, including the following steps. Obtain a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; perform signal extraction on the fluorescence image of the surface of the live pig carcass to obtain a signal area of the fluorescence image of the surface of the live pig carcass; in response to the obtained target area, determine the signal fluorescence intensity of the target area in the signal area; according to the quantitative relationship established in advance between the signal fluorescence intensity and the bacterial content, perform bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target area; obtain a visible light image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; based on the bacterial content of the target area, perform visual display on the visible light image of the surface of the live pig carcass.

[0007] A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention. Extracting the signal from the fluorescence image of the pig carcass surface to obtain the signal region of the fluorescence image of the pig carcass surface includes: converting the hue, saturation, and lightness formats of the fluorescence image of the pig carcass surface to obtain a target format image; generating a signal mask based on the target format image according to preset hue threshold, saturation threshold, and lightness threshold; and extracting the signal from the fluorescence image of the pig carcass surface based on the signal mask to obtain the signal region of the fluorescence image of the pig carcass surface.

[0008] A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention. Determining the signal fluorescence intensity of the target region in the signal region includes: traversing the gray values of the non-zero pixel points in the target region of the signal region to obtain the signal fluorescence intensity of each pixel point in the target region.

[0009] A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention. Before converting the signal fluorescence intensity to the bacterial content according to the quantitative relationship established in advance between the signal fluorescence intensity and the bacterial content to obtain the bacterial content of the target region, the method further includes: determining the quantitative relationship between the signal fluorescence intensity and the bacterial content by linear fitting and exponential fitting respectively based on the order of magnitude of the bacterial content: when the order of magnitude of the bacterial content is less than the preset order of magnitude threshold, determining the quantitative relationship between the signal fluorescence intensity and the bacterial content by linear fitting; when the order of magnitude of the bacterial content is greater than the preset order of magnitude threshold, determining the quantitative relationship between the signal fluorescence intensity and the bacterial content by exponential fitting.

[0010] A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention. Visualizing and displaying on the visible light image of the pig carcass surface based on the bacterial content of the target region includes: visualizing and displaying on the visible light image of the pig carcass surface based on the bacterial content of the target region according to the mapping relationship between the bacterial species and the color species, and the mapping relationship between the bacterial quantity and the color depth.

[0011] A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention. The fluorescence light source is an ultraviolet light-emitting diode lamp, the wavelength of the fluorescence light source is in the range of 320 nanometers to 400 nanometers, and the fluorescence image of the pig carcass surface is obtained by a charge-coupled device camera equipped with a microbial species filter in a darkroom environment.

[0012] The present invention also provides a detection device for visualizing the bacterial distribution on the surface of a pig carcass, including the following modules: an acquisition module for acquiring a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; an extraction module for extracting signals from the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; a fluorescence module for determining the signal fluorescence intensity of a target region in the signal region in response to the acquired target region; a conversion module for converting the signal fluorescence intensity into a bacterial content according to a pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content to obtain the bacterial content of the target region; the acquisition module is further configured to acquire a visible light image of the surface of a pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; a visualization module for visually displaying on the visible light image of the surface of the pig carcass based on the bacterial content of the target region.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the detection method for visualizing the bacterial distribution on the surface of a pig carcass as described in any one of the above when executing the program.

[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the detection method for visualizing the bacterial distribution on the surface of a pig carcass as described in any one of the above.

[0015] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the detection method for visualizing the bacterial distribution on the surface of a pig carcass as described in any one of the above.

[0016] The detection method and device for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention can excite the fluorescence signals of bacteria or contaminants on the surface of the pig carcass through the irradiation of a fluorescence light source, and can quickly capture the presence of microorganisms on the surface of the pig carcass; by extracting the signal regions in the fluorescence image, the positions where fluorescence signals exist on the surface of the pig carcass can be accurately identified, which helps to exclude background interference and improve the accuracy of detection; by positioning the target region, the analysis scope can be narrowed down to a specific signal region, avoiding unnecessary processing of the entire fluorescence image; by using the pre-established quantitative relationship model between the fluorescence intensity and the bacterial content, the fluorescence intensity value can be converted into a specific bacterial content value, realizing the quantitative detection of bacterial contamination; by obtaining the visible light image of the surface of the pig carcass, the overall appearance information of the pig carcass can be provided, providing a basic image for subsequent visual display; by superimposing the bacterial content information on the visible light image, the distribution of bacteria on the surface of the pig carcass can be intuitively displayed. Thus, through the combination of fluorescence imaging technology and image processing technology, the rapid, accurate detection and visual display of the bacterial distribution on the surface of the pig carcass are realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce each of the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 It is a schematic flowchart of the detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention.

[0019] Figure 2 It is the overall flowchart of the detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention.

[0020] Figure 3 It is a schematic diagram of the modules of the detection device for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention.

[0021] Figure 4 It is a schematic structural diagram of the detection device for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention.

[0022] Figure 5 It is a schematic physical structure diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.

[0024] Pork is deeply loved by consumers because it is rich in nutrients such as protein, vitamins, and minerals necessary for human growth and metabolism. However, due to its rich nutrition, microorganisms and pathogenic bacteria are likely to grow on the surface of pork, which may not only cause product spoilage or foodborne diseases, but also seriously affect the circulation range, safety quality, and consumer rights and interests of livestock meat. The microbial contamination of pork usually starts from the slaughter and processing link. Therefore, controlling the initial quantity of microbial contamination on the surface of livestock meat during the slaughter and processing process is crucial for ensuring the quality of livestock meat.

[0025] Currently, only physical means (such as rinsing) are allowed to reduce the microbial contamination on the surface of pig carcasses. However, due to the diversity and contamination degree of microorganisms on the surface of pig carcasses not being clear, existing rinsing equipment is difficult to perform precise cleaning and effective bacterium reduction according to the actual contamination situation, resulting in the microbial control effect being difficult to meet the production and sales requirements. Therefore, a method and device capable of visually detecting the bacterial distribution on the surface of pig carcasses are needed to provide technical support and equipment guarantee for precise microbial control.

[0026] The present invention provides a detection method for visualizing the bacterial distribution on the surface of pig carcasses, which can perform real-time, non-destructive, and rapid detection of the microbial contamination situation on the surface of pig carcasses and realize the visualization of the distribution.

[0027] Optionally, the detection method for visualizing the bacterial distribution on the surface of pig carcasses in the embodiments of the present application can be executed by a server, or by a terminal device, or jointly by a server and a terminal device. Taking the server executing the detection method for visualizing the bacterial distribution on the surface of pig carcasses in this embodiment as an example.

[0028] Figure 1 is a schematic flowchart of the detection method for visualizing the bacterial distribution on the surface of pig carcasses provided by the present invention. As Figure 1 shown, the method includes the following: Step 101, obtain a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source.

[0029] In the embodiments of the present invention, the surface of the pig carcass is irradiated with a fluorescence light source, and a charge-coupled device (CCD) camera is used to obtain an image of the surface of the pig carcass; A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention uses an ultraviolet light-emitting diode lamp as the fluorescent light source, and the wavelength of the fluorescent light source is in the range of 320 nanometers to 400 nanometers. The fluorescent image of the pig carcass surface is obtained by a charge-coupled device camera equipped with a microbial species filter in a darkroom environment.

[0030] In an embodiment of the present invention, the resolution of the CCD camera needs to be able to obtain a clear fluorescent image. The CCD camera can be optionally configured with a filter corresponding to the microbial species to obtain a characteristic microbial fluorescent image.

[0031] In some embodiments, a UV-LED lamp with a wavelength range of 320 nanometers to 400 nanometers is selected to ensure that the light source is uniform and stable; a CCD camera equipped with a microbial species filter is used, and the filter needs to match the wavelength of the fluorescent signal to effectively capture the fluorescent signal; ensure that the shooting environment is completely light-proof to avoid interference from external light sources.

[0032] Place the UV-LED lamp in an appropriate position to ensure uniform illumination of the pig carcass surface and avoid shadows or overexposure. Adjust the focal length, aperture, and exposure time of the CCD camera to ensure that the image is clear and the fluorescent signal is obvious. Use a microbial species filter to filter out the background light and only retain the target fluorescent signal. Ensure that the surface of the pig carcass is clean to avoid interference from dirt or impurities in the collection of the fluorescent signal.

[0033] Through the embodiment of the present invention, a high-quality fluorescent image of the pig carcass surface can be obtained. Combining the characteristics of the microbial species filter, the distribution and contamination of microorganisms on the pig carcass surface can be further analyzed.

[0034] Step 102: Extract the signal from the fluorescent image of the pig carcass surface to obtain the signal area of the fluorescent image of the pig carcass surface.

[0035] In some embodiments, Gaussian filtering or median filtering is used to remove the noise in the fluorescent image of the pig carcass surface and retain the fluorescent signal; and the fluorescent image of the pig carcass surface (color fluorescent image) is converted into a grayscale image for subsequent processing.

[0036] Use the maximum inter-class variance method or manually set the threshold to binarize the grayscale image to distinguish the fluorescent signal area and the background.

[0037] In some embodiments, a deep learning model (such as U-Net, Mask R-CNN) is used to perform semantic segmentation on the fluorescent signal area, and the fluorescent signal area is marked as training data. Use the trained model to segment the fluorescent image and extract the signal area.

[0038] A detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention extracts signals from the fluorescence image of the pig carcass surface to obtain the signal region of the fluorescence image of the pig carcass surface, including: Convert the hue, saturation, and value formats of the fluorescence image of the pig carcass surface to obtain an image in the target format; Based on the preset hue threshold, saturation threshold, and value threshold, generate a signal mask based on the image in the target format; Extract signals from the fluorescence image of the pig carcass surface based on the signal mask to obtain the signal region of the fluorescence image of the pig carcass surface.

[0039] In the embodiment of the present invention, the obtained fluorescence image of the pig carcass surface is converted from the original format (such as RGB) to the HSV format. The HSV format is a color space, where H represents hue, S represents saturation, and V represents value. During the conversion process, an image processing software or algorithm is used to convert the RGB value of each pixel into the corresponding HSV value.

[0040] Set the thresholds of hue, saturation, and value according to experiments or prior knowledge. These thresholds are used to distinguish the fluorescence signal from background noise or other non-target information. The hue threshold is used to screen the fluorescence signal of a specific color; the saturation threshold is used to ensure that the selected signal has sufficient color purity; and the value threshold is used to exclude overly bright or overly dark pixels.

[0041] Based on the preset HSV thresholds, perform a pixel-by-pixel comparison on the converted HSV image to generate a binary signal mask. In the mask, the pixels that meet the threshold conditions are set to 1 (indicating the signal region), and the pixels that do not meet the conditions are set to 0 (indicating the background region).

[0042] Use the generated signal mask to perform a masking operation on the original fluorescence image, that is, only retain the information corresponding to the pixels with a value of 1 in the mask, and set the pixels with a value of 0 in the mask to black or transparent to obtain an image only containing the signal region of the fluorescence image of the pig carcass surface.

[0043] Through the embodiment of the present invention, through the HSV format conversion and threshold setting, the fluorescence signal on the surface of the pig carcass can be more effectively identified and analyzed, reducing the interference of background noise and other non-target information.

[0044] Step 103, in response to the obtained target region, determine the signal fluorescence intensity of the target region in the signal region.

[0045] After extracting the signal region of the fluorescence image of the pig carcass surface, it is next necessary to determine the signal fluorescence intensity of a specific target region in this signal region.

[0046] Here, the target area can be a specific anatomical site, a suspected contaminated area, or a reference area for comparison, which can be determined according to the actual application scenario.

[0047] In some embodiments, on the signal region image, image processing software or manual methods (such as using a mouse or touch screen) are used to mark or demarcate the target area. For example, draw one or more bounding boxes, polygons, or free-form areas on the image as the target area, and for each pixel within the target area, extract its fluorescence intensity value.

[0048] According to a detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention, determining the signal fluorescence intensity of the target area in the signal region includes: Traverse the gray values of the non-zero pixel points of the target area in the signal region to obtain the signal fluorescence intensity of each pixel point in the target area.

[0049] In the embodiments of the present invention, the fluorescence image is converted from color to grayscale. In the grayscale image, the intensity of each pixel is represented by a single value (gray value), and the value range is usually from 0 (black) to 255 (white).

[0050] On the grayscale image, use the previously generated signal mask or manual annotation to determine the boundary of the target area; set up a data structure (such as an array or list) to store the gray values of each pixel point in the target area.

[0051] Traverse all pixel points within the target area. For each pixel point: check whether its gray value is non-zero (or not a certain preset small threshold to exclude possible noise); if the gray value is non-zero, record it in the previously set data structure.

[0052] In some embodiments, according to the signal fluorescence intensity of the target area, visualization tools such as intensity histograms, intensity distribution maps, or intensity heat maps are generated to more intuitively display the spatial distribution and changes of the fluorescence intensity.

[0053] Through the embodiments of the present invention, the non-zero pixel points of the target area in the signal region can be accurately traversed, and their gray values are extracted as an approximate representation of the signal fluorescence intensity.

[0054] Step 104, according to the quantitative relationship established in advance between the signal fluorescence intensity and the bacterial content, perform bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target area.

[0055] In the embodiments of the present invention, a quantitative relationship between the fluorescence intensity (x) and the bacterial content (y) is established for subsequent prediction.

[0056] A detection method for visualizing the bacterial distribution on the surface of a pig carcass. Before converting the signal fluorescence intensity into the bacterial content of the target area according to the quantitative relationship established in advance between the signal fluorescence intensity and the bacterial content, the method further includes: Based on the order of magnitude of the bacterial content, determine the quantitative relationship between the signal fluorescence intensity and the bacterial content through linear fitting and exponential fitting respectively: When the order of magnitude of the bacterial content is less than the preset order-of-magnitude threshold, determine the quantitative relationship between the signal fluorescence intensity and the bacterial content through linear fitting; When the order of magnitude of the bacterial content is greater than the preset order-of-magnitude threshold, determine the quantitative relationship between the signal fluorescence intensity and the bacterial content through exponential fitting.

[0057] In some embodiments, a series of samples with known bacterial contents are obtained, and the signal fluorescence intensity of the samples is measured to ensure that the samples cover different orders of magnitude of the bacterial content. Based on the data distribution of the bacterial content, determine the order-of-magnitude threshold, which can divide the data into two distinct parts: one part has a lower bacterial content and is suitable for linear fitting; the other part has a higher bacterial content and is suitable for exponential fitting.

[0058] For samples with a bacterial content order of magnitude less than the preset threshold, use a linear regression model for fitting; for samples with a bacterial content order of magnitude greater than the preset threshold, use an exponential regression model for fitting.

[0059] In the embodiments of the present invention, under the condition of simply representing bacterial products, measure the fluorescence intensity (x) corresponding to different bacterial contents (y).

[0060] Under the condition of simply bacterial products (such as laboratory-cultured bacterial samples), exclude other interference factors (such as environmental background fluorescence, non-bacterial products, etc.), and measure the relationship between the fluorescence intensity x and the bacterial content y through experiments.

[0061] Prepare a series of samples with known bacterial contents (y, unit: CFU / cm 2 )), use a fluorescence detection device to measure the fluorescence intensity x of each sample, and record the corresponding data of x and y.

[0062] According to the order of magnitude of the bacterial content, divide the data into two groups. Among them, the low-bacterial-content group: y < 10 5 CFU / cm 2 , and the high-bacterial-content group: y > 10 5 CFU / cm 2 .

[0063] For the low-bacterial-content group, use linear fitting, and the expression is: y = ax + b. For the high-bacterial-content group, use exponential fitting, and the expression is y = ax +b, where y represents the bacterial content, x represents the fluorescence intensity, and a and b represent the regression coefficients respectively.

[0064] Through the embodiments of the present invention, a quantitative relationship between the fluorescence intensity and the bacterial content is established, and by combining the linear fitting and exponential fitting models, the bacterial content in the target area can be predicted efficiently and accurately.

[0065] Step 105: Obtain a visible light image of the surface of a pig carcass obtained by irradiating the surface of the pig carcass with a visible light source.

[0066] In the embodiments of the present invention, a visible light image of the surface of a pig carcass is obtained using a visible light source, where the detection camera device is the same as the fluorescence image acquisition device. Before visually displaying the bacterial distribution according to the result of the bacterial content in the target area, it is necessary to locate the region of interest based on the image under natural light.

[0067] Step 106: Visually display on the visible light image of the surface of the pig carcass based on the bacterial content in the target area.

[0068] In the embodiments of the present invention, a visible light image of the surface of the pig carcass and data on the bacterial content in the target area (such as the bacterial content value of each pixel or area, with the unit of CFU / cm²) are obtained.

[0069] Align the bacterial content data with the pixel coordinates of the visible light image to ensure that each bacterial content value corresponds to the correct position on the image. If the resolution of the bacterial content data is lower than the image resolution, an interpolation method (such as bilinear interpolation) can be used to generate a bacterial content distribution map consistent with the image resolution.

[0070] Map the bacterial content values to colors (for example, from blue to red indicates that the bacterial content increases from low to high), generate a heat map, and overlay the heat map on the visible light image in a semi - transparent manner, retaining the details of the original image while showing the bacterial content distribution.

[0071] According to a detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention, a visual display is performed on the visible light image of the surface of the pig carcass based on the bacterial content in the target area, including: Based on the mapping relationship between the bacterial species and the color types, and the mapping relationship between the bacterial quantity and the color depth, a visual display is performed on the visible light image of the surface of the pig carcass based on the bacterial content in the target area.

[0072] In the embodiments of the present invention, a color is assigned to each type of bacteria (for example, red represents Escherichia coli, green represents Salmonella, etc.), and the bacterial quantity is mapped to the depth of the color (the more the quantity, the deeper the color).

[0073] Align the bacterial content data with the pixel coordinates of the visible light image to ensure that each bacterial content value corresponds to the correct position on the image. Generate corresponding colors for each pixel point according to the bacterial species and quantity. Superimpose the generated color map on the visible light image in a semi-transparent manner, retaining the details of the original image while showing the distribution of bacterial species and quantity.

[0074] Through the embodiments of the present invention, through color and shade mapping, different types of bacteria and their quantities are visually displayed on the visible light image. The superimposed display retains the details of the original visible light image while highlighting the distribution of bacterial species and quantity.

[0075] Through the above steps of the embodiments of the present invention, by irradiating the surface of the pig carcass with a fluorescent light source, the fluorescent signals of bacteria or contaminants on the surface of the pig carcass can be excited, and the presence of microorganisms on the surface of the pig carcass can be quickly captured. Extracting the signal area in the fluorescent image can accurately identify the positions where fluorescent signals exist on the surface of the pig carcass, which helps to eliminate background interference and improve the accuracy of detection. Locating the target area can narrow the analysis range to a specific signal area and avoid unnecessary processing of the entire fluorescent image. Utilizing the pre-established quantitative relationship model between fluorescent intensity and bacterial content, the fluorescent intensity value can be converted into a specific bacterial content value, realizing the quantitative detection of bacterial contamination. Obtaining the visible light image of the surface of the pig carcass can provide the overall appearance information of the pig carcass and provide a basic image for subsequent visual display. Superimposing the bacterial content information on the visible light image can visually show the distribution of bacteria on the surface of the pig carcass. Thus, through the combination of fluorescent imaging technology and image processing technology, the rapid, accurate detection and visual display of the distribution of bacteria on the surface of the pig carcass are realized.

[0076] Reference Figure 2 , Figure 2 is the overall flowchart of the detection method for visualizing the distribution of bacteria on the surface of a pig carcass provided by the present invention, which includes: S1: Obtain the fluorescent image of the surface of the pig carcass. S2: Extract the signal area as the region of interest. S3: Traverse the signal area for feature extraction to obtain the fluorescent intensity of the signal in the region of interest. S4: According to the quantitative relationship between the signal fluorescent intensity and the bacterial content, obtain the bacterial content of the region of interest. S5: Use the visible light source to obtain the image of the live pig carcass and perform visual display of the bacterial distribution according to the bacterial content results of the region of interest. Specifically as follows.

[0077] Step 1: Irradiate the surface of the pig carcass with a fluorescent light source, and use a CCD camera to obtain an image of the pig carcass surface. The fluorescent light source is a UV-LED lamp with a wavelength in the range of 320 nm - 400 nm. The resolution of the CCD camera should be able to obtain clear fluorescent images. The CCD camera can be optionally equipped with a filter corresponding to the microbial species to obtain a characteristic microbial fluorescent image. The process of obtaining the fluorescent image occurs in a darkroom environment to avoid interference from other stray light and increase the visibility of the fluorescence.

[0078] Step 2: For the obtained fluorescent image of the surface of the live pig carcass, extract the signal area as the region of interest. The method for extracting the signal area is as follows: Convert the original image into an HSV-format image, create a signal mask by adjusting the thresholds of the three channels (H / S / V) of the image, and use the mask to extract the signal area.

[0079] Step 3: Traverse the signal area for feature extraction to obtain the fluorescence intensity of the signal in the region of interest. Specifically, by traversing the gray values of the non-zero pixel points in the signal area, the fluorescence intensity of each pixel point in the signal area is obtained.

[0080] Step 4: According to the quantitative relationship between the signal fluorescence intensity and the bacterial content, obtain the bacterial content in the region of interest. The quantitative relationship between the signal fluorescence intensity and the bacterial content is obtained using linear fitting and exponential fitting, and the prediction method is distinguished according to the order of magnitude of the bacterial content. The linear fitting expression is y = ax + b, where y is the bacterial content, with the unit of CFU / cm 2 , x is the fluorescence intensity, and the order of magnitude of y is less than 10 5 CFU / cm 2 ; The exponential fitting expression is y = a x +b, where y is the bacterial content, with the unit of CFU / cm 2 , x is the fluorescence intensity, and the order of magnitude of y is greater than 10 5 CFU / cm 2 . Before establishing the relationship between the fluorescence intensity and the bacterial content, it is necessary to establish the relationship between the fluorescence intensity and the bacterial content under the condition of simply representing bacterial products. The quantitative relationship between the signal fluorescence intensity and the bacterial content used is verified according to the actual bacterial content and fluorescence intensity on the surface of the pig carcass.

[0081] Step 5: Use a visible light source to obtain an image of the live pig carcass, and perform a visual display of the bacterial distribution according to the results of the bacterial content in the region of interest. When using a visible light source to obtain an image of the live pig carcass, the detection camera device is the same as the device for obtaining the fluorescent image. Before performing a visual display of the bacterial distribution according to the results of the bacterial content in the region of interest, it is necessary to locate the region of interest according to the image under natural light. For the visual display of the bacterial distribution according to the results of the bacterial content in the region of interest, different types of bacteria are represented by different colors, and the high and low bacterial content is distinguished by the depth of the color.

[0082] Reference Figure 3 , Figure 3 is a schematic diagram of the modules of the detection device for visualizing the distribution of bacteria on the surface of a pig carcass provided by the present invention, including a dark box, which includes: a diversion module, a control and display module, and an information acquisition module. Among them, the diversion module includes: an external connection unit and a drainage unit; the control and display module includes a region of interest extraction unit, a target prediction unit, a bacterial content display unit, and an information acquisition control unit; the information acquisition module includes: a fluorescence light source, a camera, a natural light source, an adjustable constant voltage and constant current unit group, a heat dissipation unit, and a positioning sensor.

[0083] Specifically, the dark box is used to provide a dark environment for the fluorescence image on the surface of the pig carcass to avoid the influence of other light on the acquisition of the fluorescence image. The diversion module and the information acquisition module are installed inside the dark box, and the control and display module is installed outside. The internal material of the dark box is light-absorbing velvet to avoid the influence of reflected light; The diversion module includes: The external connection unit is used to externally connect to the slaughter production line to ensure the slaughter and processing of pig carcasses; The drainage unit is used to fix the position for obtaining the pig carcass image to ensure the acquisition of the pig carcass surface image.

[0084] The information acquisition module includes: The fluorescence light source is a UV-LED lamp with a wavelength in the range of 320nm - 400nm. The number and position of the fluorescence light sources should meet the requirement of covering the surface of the pig carcass; The natural light source is an LED lamp, and the number and position are the same as those of the fluorescence light source, meeting the requirement for obtaining the carcass surface image; The camera has a pixel count of no less than 8 million pixels and is placed on both sides of the dark box to ensure the complete acquisition of the pig carcass surface image; The adjustable constant voltage and constant current unit group is used to ensure the stability of the power supply voltage and current of the light sources; The heat dissipation unit is used to ensure the stable operation of the light sources and provide heat dissipation support for the device; The positioning sensor is used to obtain the signal of the carcass entering the dark box and transmit the signal to the control and display module.

[0085] The control and display module includes: The information acquisition control unit controls the information acquisition module to acquire images according to the sensor signal; The region of interest extraction unit obtains the region of interest based on the acquired fluorescence image of the pig carcass surface and locates the pig carcass according to the natural light image; The target prediction unit extracts the fluorescence signal intensity of the region of interest based on the acquired region of interest and calculates the target bacterial content; The bacterial content display unit displays according to the target bacterial content obtained by the target prediction unit and the natural light image of the pig carcass obtained by the region of interest extraction unit. It differentiates the microbial species according to the color and differentiates the content level according to the color depth.

[0086] The following describes an example of the detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention in actual application.

[0087] Step 1: Select a three-way crossbred pig carcass as the research object. In a darkroom environment, irradiate the surface of the pig carcass with a UV LED light source having a central wavelength of 400 nm, a half-width of 16 nm, and a light-emitting angle of 60°. Use a CCD camera with 1200w pixels to obtain images of both sides of the pig carcass surface. The normal operating voltage and current conditions of the LED light source are 3.3 v and 500 mA. A custom filter is set on the CCD camera lens to retain the wavelength bands of 400 - 440 nm, 470 - 550 nm, and 600 - 665 nm. Set the exposure time of the camera to 100 ms to ensure the clarity of the fluorescence image. Use a camera lens focal length of 50 mm to ensure that the entire surface image of the pig carcass can be captured.

[0088] Step 2: Convert the obtained fluorescence image of the pig carcass surface into an HSV format image. Create a signal mask by adjusting the thresholds of the H, S, and V channels of the image, and extract the signal region using the mask. The thresholds of the H, S, and V channels are 60°, 0.4 (after normalization), and 0.3 (after normalization), respectively.

[0089] Step 3: Obtain the fluorescence intensity of each pixel point in the signal region by traversing the gray values of the non-zero pixel points in the signal region.

[0090] Step 4: The microbial flora on the surface of the pig carcass mainly includes Pseudomonas, Escherichia coli, etc. After fluorescence irradiation, porphyrin substances, indole compounds, and bacterial luciferin in the bacterial metabolites will produce fluorescence colors. In this embodiment, the fluorescence intensity relationship formulas for pure indole compounds and porphyrin compounds are constructed as follows: y 吲哚 = -0.04102x + 201.7684, with a determination coefficient of 0.994, y 卟啉 = 0.03697x + 185.3269, with a determination coefficient of 0.987, where y 吲哚 is the concentration of indole compounds, y 卟啉 is the concentration of porphyrin compounds, and x is the fluorescence intensity. This experiment is the fluorescence intensity of indole compounds and porphyrin compound solutions obtained by applying the method of the present invention, and the actual concentration is obtained by diluting pure products. Then, bacterial solutions with different concentrations of Pseudomonas and Escherichia coli were cultured, and the relationship between the fluorescence intensity of the bacterial solution and the bacterial concentration was established. In the Escherichia coli concentration range (0 - 10 6CFU / ml), the linear relationship was y = -0.04678x + 57.8904, and the coefficient of determination was 0.992. In the Pseudomonas concentration range (0 - 10 6 CFU / ml), the linear relationship was y = 0.07541x + 60.7683, and the coefficient of determination was 0.994, where y was the bacterial concentration (CFU / ml) and x was the fluorescence intensity. Subsequently, using steps 1 - 3 of the present method, the surface fluorescence image of the pig carcass was obtained and the fluorescence intensity of the region of interest was extracted. Subsequently, the bacteria on the surface of the pig carcass were collected by the smearing method, and the actual content of the bacteria on the surface of the pig carcass was obtained by culturing using the directional medium. Comparing with the predicted values obtained using the above relationship, the coefficients of determination for the fitting of the true values and the predicted values were 0.964 and 0.972 respectively.

[0091] Step 5: Turn off the fluorescence light source, turn on the natural light LED lamp to irradiate the surface of the sample, and obtain the sample image with a camera. Among them, the positions and quantities of the LED lamps were compared. Each position on the surface of the pig carcass was located in the fluorescence image, and parts such as bones were deducted. Color display was performed according to the predicted content obtained in step 4, and the bacterial content in different regions of interest was characterized by the depth of the color.

[0092] The following describes an example of the detection device for visualizing the distribution of bacteria on the surface of a pig carcass provided by the present invention in actual application.

[0093] Reference Figure 4 , Figure 4 is a schematic structural diagram of the detection device for visualizing the distribution of bacteria on the surface of a pig carcass provided by the present invention. It includes: a dark box, a positioning sensor, a drainage unit, an adjustable constant pressure and constant current unit group, a heat dissipation unit, a control display module, a fluorescence light source, a natural light source, a camera, and an external unit.

[0094] For the detection device for visualizing the distribution of bacteria on the surface of a pig carcass, the size of the dark box is 2m in length, 1m in width, and 1.5m in height. Turn on the power supply to ensure normal communication between the control display module and information acquisition modules such as the camera, positioning sensor, and light source. If the communication is normal, the device is allowed to run. If there is a communication error, the hardware connection and software operation conditions need to be checked.

[0095] When the device starts to run, the fluorescence LED light source is in the on state. When the positioning sensor detects that the pig carcass enters the dark box, it transmits the information to the control display module. The positioning sensor is an infrared sensor with a response time less than 0.1s. The information acquisition control unit controls the camera to obtain the fluorescence image of the pig carcass and controls the fluorescence light source to turn off and the natural light source to turn on to obtain the natural light image of the pig carcass.

[0096] After the pig carcass image acquisition is completed, it is exported from the dark box through the diversion module and enters the next slaughter and processing technological process.

[0097] Based on the acquired fluorescence image and natural light image of the pig carcass, the control and display module uses the region of interest extraction unit, target prediction unit, and bacterial content display unit to calculate and display the bacterial content in different regions of the pig carcass, and mark it on the control and display module.

[0098] The detection device for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention will be described below. The detection device for visualizing the bacterial distribution on the surface of a pig carcass described below can be correspondingly referred to in relation to the detection method for visualizing the bacterial distribution on the surface of a pig carcass described above.

[0099] An acquisition module, configured to acquire a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; An extraction module, configured to extract signals from the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; A fluorescence module, configured to determine the signal fluorescence intensity of the target region in the signal region in response to the acquired target region; A conversion module, configured to perform bacterial content conversion on the signal fluorescence intensity according to a pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, to obtain the bacterial content of the target region; The acquisition module is further configured to acquire a visible light image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; A visualization module, configured to perform visualization display on the visible light image of the surface of the live pig carcass based on the bacterial content of the target region.

[0100] Specifically, the detection device for visualizing the bacterial distribution on the surface of a pig carcass provided by the present invention can implement all the method steps achieved by the above-mentioned embodiments of the detection method for visualizing the bacterial distribution on the surface of a pig carcass, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be specifically described in this embodiment.

[0101] Figure 5 is a schematic physical structure diagram of the electronic device provided by the present invention, as Figure 5As shown in the figure, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communications interface 520, and the memory 530 complete communication with each other through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the detection method for visualizing the bacterial distribution on the surface of a pig carcass. The method includes: obtaining a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; extracting signals from the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; in response to the obtained target region, determining the signal fluorescence intensity of the target region in the signal region; according to the pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, performing a bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target region; obtaining a visible light image of the surface of the pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; and performing a visual display on the visible light image of the surface of the pig carcass based on the bacterial content of the target region.

[0102] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.

[0103] 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 detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the above-mentioned various methods. The method includes: obtaining a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; extracting signals from the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; in response to the obtained target region, determining the signal fluorescence intensity of the target region in the signal region; according to the pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, performing a bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target region; obtaining a visible light image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; and performing a visual display on the visible light image of the surface of the live pig carcass based on the bacterial content of the target region.

[0104] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the detection method for visualizing the bacterial distribution on the surface of a pig carcass provided by the above-mentioned various methods. The method includes: obtaining a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; extracting signals from the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; in response to the obtained target region, determining the signal fluorescence intensity of the target region in the signal region; according to the pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, performing a bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target region; obtaining a visible light image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; and performing a visual display on the visible light image of the surface of the live pig carcass based on the bacterial content of the target region.

[0105] The device embodiments described above are merely illustrative. 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, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0106] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment 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 such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0107] 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 them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A detection method for visualizing the distribution of bacteria on the surface of a pig carcass, characterized in that, Including: Obtaining a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; Performing signal extraction on the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; In response to the obtained target region, determining the signal fluorescence intensity of the target region in the signal region; According to the pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, performing bacterial content conversion on the signal fluorescence intensity to obtain the bacterial content of the target region; Obtaining a visible light image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; Based on the bacterial content of the target region, performing visual display on the visible light image of the surface of the live pig carcass.

2. The detection method for visualizing the bacterial distribution on the surface of a pig carcass according to claim 1, characterized in that, The performing signal extraction on the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass includes: Performing format conversion of hue, saturation, and lightness on the fluorescence image of the surface of the live pig carcass to obtain a target format image; According to a preset hue threshold, saturation threshold, and lightness threshold, generating a signal mask based on the target format image; Performing signal extraction on the fluorescence image of the surface of the live pig carcass based on the signal mask to obtain a signal region of the fluorescence image of the surface of the live pig carcass.

3. The detection method for visualizing the bacterial distribution on the surface of a pig carcass according to claim 1, wherein, The determining the signal fluorescence intensity of the target region in the signal region includes: Traversing the gray values of the non-zero pixel points of the target region in the signal region to obtain the signal fluorescence intensity of each pixel point of the target region.

4. The detection method for visualizing the bacterial distribution on the surface of a pig carcass according to claim 1, characterized in that, Before the performing bacterial content conversion on the signal fluorescence intensity according to the pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content to obtain the bacterial content of the target region, the method further includes: Based on the order of magnitude of the bacterial content, respectively determining the quantitative relationship between the signal fluorescence intensity and the bacterial content through linear fitting and exponential fitting: When the order of magnitude of the bacterial content is less than a preset order of magnitude threshold, determining the quantitative relationship between the signal fluorescence intensity and the bacterial content through linear fitting; When the order of magnitude of the bacterial content is greater than a preset order of magnitude threshold, determining the quantitative relationship between the signal fluorescence intensity and the bacterial content through exponential fitting.

5. The detection method for visualizing the bacterial distribution on the surface of a pig carcass according to claim 1, characterized in that, The performing visual display on the visible light image of the surface of the live pig carcass based on the bacterial content of the target region includes: According to the mapping relationship between the bacterial species and the color species, and the mapping relationship between the bacterial quantity and the color depth, performing visual display on the visible light image of the surface of the live pig carcass based on the bacterial content of the target region.

6. The detection method for visualizing the bacterial distribution on the surface of a pig carcass according to claim 1, characterized in that, The fluorescence light source is an ultraviolet light-emitting diode lamp, the wavelength of the fluorescence light source is in the range of 320 nanometers to 400 nanometers, and the fluorescence image of the surface of the live pig carcass is obtained by a charge-coupled device camera equipped with a microbial species filter in a darkroom environment.

7. A detection device for visualizing the distribution of bacteria on the surface of a pig carcass, characterized in that, Including: An acquisition module for obtaining a fluorescence image of the surface of a live pig carcass obtained by irradiating the surface of the pig carcass with a fluorescence light source; An extraction module for performing signal extraction on the fluorescence image of the surface of the live pig carcass to obtain a signal region of the fluorescence image of the surface of the live pig carcass; A fluorescence module, configured to determine the signal fluorescence intensity of the target area in the signal area in response to the acquired target area; A conversion module, configured to convert the signal fluorescence intensity into the bacterial content of the target area according to the pre-established quantitative relationship between the signal fluorescence intensity and the bacterial content, to obtain the bacterial content of the target area; The acquisition module is further configured to acquire a visible light image of the surface of a pig carcass obtained by irradiating the surface of the pig carcass with a visible light source; A visualization module, configured to perform visual display on the visible light image of the surface of the pig carcass based on the bacterial content of the target area.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the detection method for visualizing the bacterial distribution on the surface of a pig carcass according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the detection method for visualizing the bacterial distribution on the surface of a pig carcass according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the detection method for visualizing the bacterial distribution on the surface of a pig carcass according to any one of claims 1 to 6.