CN116087195A - Fish freshness evaluation method and system - Google Patents
Fish freshness evaluation method and system Download PDFInfo
- Publication number
- CN116087195A CN116087195A CN202310201440.2A CN202310201440A CN116087195A CN 116087195 A CN116087195 A CN 116087195A CN 202310201440 A CN202310201440 A CN 202310201440A CN 116087195 A CN116087195 A CN 116087195A
- Authority
- CN
- China
- Prior art keywords
- value
- muscle
- fish
- image
- brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000011156 evaluation Methods 0.000 title claims abstract description 43
- 210000003205 muscle Anatomy 0.000 claims abstract description 214
- 241000251468 Actinopterygii Species 0.000 claims abstract description 195
- 210000001519 tissue Anatomy 0.000 claims abstract description 85
- 235000013372 meat Nutrition 0.000 claims abstract description 68
- 238000000034 method Methods 0.000 claims abstract description 25
- 238000005303 weighing Methods 0.000 claims abstract description 22
- 238000002845 discoloration Methods 0.000 claims abstract description 18
- 230000008569 process Effects 0.000 claims abstract description 16
- 210000000577 adipose tissue Anatomy 0.000 claims description 21
- 238000012549 training Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 11
- 210000000988 bone and bone Anatomy 0.000 claims description 10
- 230000008859 change Effects 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 9
- 210000003462 vein Anatomy 0.000 claims description 9
- 238000013528 artificial neural network Methods 0.000 claims description 5
- 238000004422 calculation algorithm Methods 0.000 claims description 5
- 238000001914 filtration Methods 0.000 claims description 5
- 235000013305 food Nutrition 0.000 abstract description 5
- 239000002344 surface layer Substances 0.000 abstract description 3
- 238000004519 manufacturing process Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 244000005700 microbiome Species 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 208000035404 Autolysis Diseases 0.000 description 1
- 238000012935 Averaging Methods 0.000 description 1
- 241000894006 Bacteria Species 0.000 description 1
- 206010057248 Cell death Diseases 0.000 description 1
- 108091005804 Peptidases Proteins 0.000 description 1
- 239000004365 Protease Substances 0.000 description 1
- 102100037486 Reverse transcriptase/ribonuclease H Human genes 0.000 description 1
- 235000021120 animal protein Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000002808 connective tissue Anatomy 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013209 evaluation strategy Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004660 morphological change Effects 0.000 description 1
- 235000015097 nutrients Nutrition 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000028043 self proteolysis Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 235000021122 unsaturated fatty acids Nutrition 0.000 description 1
- 150000004670 unsaturated fatty acids Chemical class 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01G—WEIGHING
- G01G19/00—Weighing apparatus or methods adapted for special purposes not provided for in the preceding groups
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/02—Food
- G01N33/12—Meat; Fish
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A40/00—Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
- Y02A40/80—Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in fisheries management
- Y02A40/81—Aquaculture, e.g. of fish
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Biochemistry (AREA)
- Food Science & Technology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Pathology (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Immunology (AREA)
- Analytical Chemistry (AREA)
- Medicinal Chemistry (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a fish freshness evaluation method and a fish freshness evaluation system, wherein the technical scheme of the invention utilizes the process that fish to be detected is placed in the center of a weighing scale for weighing, and the fish freshness evaluation method and the fish freshness evaluation system are used for collecting images without additional manufacturing of other experimental equipment, and are simple to operate and low in cost; the multi-dimensional evaluation is carried out on the muscle tissue area and the fat tissue area which are obtained by segmenting the acquired images, and the freshness evaluation of the fish meat to be detected is comprehensively calculated by utilizing the distance value between muscles caused by putrefaction deformation in the muscle tissue area and the brightness difference formed by the fat surface layer caused by putrefaction discoloration in the fat tissue area, so that the freshness evaluation of the fish meat to be detected is determined, the fish meat in supermarket selling can be accurately and rapidly carried out, powerful data support is provided for the supermarket selling of the fresh fish meat, and the living food safety of people is ensured.
Description
Technical Field
The invention relates to the technical field of big data processing, in particular to a fish freshness evaluation method and system.
Background
Fish is the most abundant aquatic resource and is an important source for promoting the development of fishery. With the continuous innovation of the cultivation technology, the fish yield is continuously increased, and the fish is delicious and rich in animal proteins and special unsaturated fatty acids, so that the fish is deeply favored by consumers. However, the following problems of fish quality and safety also occur continuously; along with the continuous improvement of the living standard of people, the requirements on the safety of fish meat are more and more strict.
In the process of transporting fish in supermarkets, fresh fish meat is transported to a selling place after being cut from a fishing place, but in the process of storing and transporting, the fresh fish meat is rich in nutrient substances and moisture, the connective tissues in muscle tissues are less, endogenous protease is active, the autolysis speed is high, and the fresh fish meat is easy to change in the aspects of physics, chemistry, microorganisms and the like, so that the fish body is spoiled and deteriorated, and the freshness is changed. In the spoilage process, the chromaticity of the fish surface is changed due to the action of microorganisms in the fish body, and the spoilage degree of the fish can be judged by observing the chromaticity change range and degree of the fish surface.
At present, in the supermarket selling process, after the cut fresh fish meat is transported to the supermarket, weighing and packaging the fish meat are carried out. In the processes of weighing and packaging, the degree of spoilage of the fish meat is judged by observing the smell of the fish meat by naked eyes of a worker; it is conceivable that the manual judgment method is not accurate enough and has low efficiency, and cannot meet the requirement of mass fish meat sold by supermarkets every day. Although the prior art has a strategy of judging freshness by calculating color difference of fish meat, the strategy is generally applied to laboratories, and a specimen substrate is required to be prepared in advance for detection, so that the method is complex in operation and high in cost, and cannot be suitable for a large number of practical application environments with low profits such as supermarkets.
Therefore, a fish freshness evaluation strategy is needed at present so as to solve the technical problem that in the prior art, freshness evaluation cannot be accurately and rapidly performed on fish sold in a supermarket, provide powerful data support for selling fresh fish in the supermarket, and guarantee living food safety of people.
Disclosure of Invention
The invention provides a fish freshness evaluation method and a fish freshness evaluation system, which can accurately and rapidly evaluate the freshness of fish sold in a supermarket, provide powerful data support for selling fresh fish in the supermarket and ensure the safety of living foods of people.
In order to solve the technical problems, the embodiment of the invention provides a fish freshness evaluation method, which comprises the following steps:
when fish meat to be detected is placed in the center of a weighing scale, determining a central area of the fish meat to be detected, and controlling a flash lamp to start so as to emit white light to the central area; meanwhile, acquiring an image of the fish to be detected to obtain a target fish image;
inputting the target fish image into a preset tissue recognition model to perform feature recognition on muscle venation, so that the tissue recognition model divides the target fish image into a muscle tissue area and an adipose tissue area according to the muscle venation to generate a tissue cutting image;
Extracting muscle tissue areas in the tissue cutting image to obtain a plurality of muscle subareas, respectively calculating a distance value between each target muscle subarea and each adjacent muscle subarea, and defining a difference value between the distance value and a preset distance threshold value as a sub-putrefaction value of putrefaction deformation of the target muscle subarea when the distance value reaches the preset distance threshold value;
calculating to obtain a first spoilage value of a muscle tissue region in the tissue cutting image according to sub spoilage values corresponding to all muscle sub-regions in the tissue cutting image;
extracting adipose tissue areas in the tissue cutting image to obtain a plurality of adipose subareas, respectively detecting brightness values in each target adipose subarea to obtain a brightness value sequence corresponding to each target adipose subarea, and determining a sub-putrefaction value of the target adipose subarea with putrefaction and discoloration according to the brightness value sequence;
calculating a second spoilage value of the adipose tissue region in the tissue cutting image according to the sub spoilage values corresponding to the adipose tissue regions in the tissue cutting image;
calculating to obtain a total spoilage value of the fish to be detected according to the first spoilage value and the second spoilage value, and determining that the freshness of the fish to be detected is stale when the total spoilage value reaches a preset spoilage threshold; otherwise, determining that the freshness of the fish meat to be detected is fresh.
Preferably, in the step of determining the central area of the fish to be detected, the method specifically includes:
collecting fish meat collection images of fish meat to be detected placed in the center of the weighing scale;
identifying the edge area of the fish to be detected in the fish collection image, and marking the corner positions in the edge area to obtain a plurality of corner marking points;
respectively connecting any two adjacent corner mark points to generate a corner line area;
and determining an inscribed circle area in the corner line area, and taking the inscribed circle center of the inscribed circle area as the center area of the fish meat to be detected.
Preferably, the process for establishing the tissue identification model specifically includes:
acquiring a historical fish image, and depicting muscle venation in the historical fish image to form a muscle venation image;
dividing the muscle context image into a historical muscle region and a historical fat region according to a closed loop of a region formed by a drawing line in the muscle context, and marking the historical muscle region and the historical fat region at the same time;
marking fish bone areas in the muscle vein image, and correlating historical muscle areas and historical fat areas adjacent to each fish bone area to generate a correlation area image;
And establishing an initial recognition model through a neural network algorithm, inputting the associated region image into the initial recognition model for training, and completing model training when the training times reach a frequency threshold and the training accuracy reaches an accurate threshold to obtain the tissue recognition model.
Preferably, in the step of calculating the distance value between each target muscle subregion and the adjacent muscle subregion, specifically:
respectively determining the edge area of each target muscle subregion, determining an inscribed circle of each target muscle subregion according to the edge area of each target muscle subregion, and establishing a space rectangular coordinate system by taking the circle center of the inscribed circle of each target muscle subregion as an origin;
determining coordinate points closest to an origin on the edge region in the space rectangular coordinate system according to the edge region of the target muscle subregion, and defining the coordinate points closest to the origin as datum points;
and respectively calculating the space distance between the datum point and any edge point on the edge area of the adjacent muscle subarea, and taking the absolute value of the space distance as the distance value between the target muscle subarea and the adjacent muscle subarea.
Preferably, in the step of calculating the first spoilage value of the muscle tissue region in the tissue cutting image according to the sub-spoilage values corresponding to the respective muscle sub-regions in the tissue cutting image, the method specifically includes:
taking the muscle subarea corresponding to the subarea with the sub-putrefaction value larger than the first preset value as a core area, and taking the rest of the muscle subareas as non-core areas;
respectively calculating the difference value between the sub-putrefaction values corresponding to each core region and all adjacent non-core regions, combining the corresponding non-core region with the core region when the difference value between the sub-putrefaction values is smaller than a second preset value, and taking the sub-putrefaction value corresponding to the core region as the sub-putrefaction value corresponding to the combined muscle sub-region;
and calculating the average value of the sub-putrefaction values corresponding to all the combined muscle sub-regions to obtain a first putrefaction value of the muscle tissue region in the tissue cutting image.
Preferably, in the step of determining the sub-putrefaction value of the target fat subregion, which is the putrefaction color, according to the brightness value sequence, the method specifically includes:
judging a corresponding brightness value sequence in the target fat subregion, and filtering brightness values with the numerical value smaller than a third preset value in the brightness value sequence to form a new brightness value sequence;
Determining the brightness value corresponding to the value larger than the fourth preset value in the new brightness value sequence as core brightness, and the rest brightness values as non-core brightness;
respectively determining the positions of the core brightness and the non-core brightness in the target fat subregion, and when the absolute value of the distance between the core brightness and the non-core brightness is smaller than a fifth preset value and the difference of the brightness values between the core brightness and the non-core brightness is smaller than a sixth preset value, merging the core brightness and the non-core brightness, and taking the brightness value corresponding to the core brightness as the merged brightness value;
and calculating the average value of all the combined brightness values to obtain the sub-putrefaction value of the target fat subregion with putrefaction color change.
Preferably, the calculation formula of the second spoilage value is as follows:
wherein,,a second spoilage value; />The sub-putrefaction value corresponding to the ith fat subregion is n, and the total number of the fat subregions is n; />And->Are all constant when->At > 20>Taking 1.2-1.8; when->< 20->Taking 0; when->When the number of the samples is =20,taking 1.
Preferably, the calculation formula of the spoilage total value is as follows:
Wherein,,is the total value of putrefaction; />Is a first spoilage value; />A second spoilage value; />And->Are all constant.
Correspondingly, another embodiment of the invention also provides a fish freshness evaluation system, which comprises: the device comprises an image acquisition module, an image dividing module, a distance calculating module, a muscle area module, a brightness detection module, a fat area module and a freshness evaluation module;
the image acquisition module is used for determining a central area of the fish flesh to be detected when the fish flesh to be detected is placed in the center of the weighing scale, and controlling the flash lamp to start so as to emit white light to the central area; meanwhile, acquiring an image of the fish to be detected to obtain a target fish image;
the image dividing module is used for inputting the target fish image into a preset tissue recognition model to perform feature recognition on muscle venation, so that the tissue recognition model divides the target fish image into a muscle tissue area and an adipose tissue area according to the muscle venation to generate a tissue cutting image;
the distance calculation module is used for extracting muscle tissue areas in the tissue cutting image to obtain a plurality of muscle subareas, calculating a distance value between each target muscle subarea and each adjacent muscle subarea respectively, and defining a difference value between the distance value and a preset distance threshold value as a sub-putrefaction value of putrefaction deformation of the target muscle subarea when the distance value reaches the preset distance threshold value;
The muscle area module is used for calculating a first spoilage value of a muscle tissue area in the tissue cutting image according to the sub spoilage values corresponding to the muscle subareas in the tissue cutting image;
the brightness detection module is used for extracting the adipose tissue region in the tissue cutting image to obtain a plurality of adipose subregions, detecting the brightness value in each target adipose subregion to obtain a brightness value sequence corresponding to each target adipose subregion, and determining the sub-putrefaction value of the target adipose subregion with putrefaction and discoloration according to the brightness value sequence;
the fat region module is used for calculating a second spoilage value of the fat tissue region in the tissue cutting image according to the sub spoilage values corresponding to the fat subregions in the tissue cutting image;
the freshness evaluation module is used for calculating a total spoilage value of the fish to be detected according to the first spoilage value and the second spoilage value, and determining that the freshness of the fish to be detected is stale when the total spoilage value reaches a preset spoilage threshold; otherwise, determining that the freshness of the fish meat to be detected is fresh.
As a preferred solution, the image acquisition module is used in the step of determining the central area of the fish meat to be detected, and is specifically used for: collecting fish meat collection images of fish meat to be detected placed in the center of the weighing scale; identifying the edge area of the fish to be detected in the fish collection image, and marking the corner positions in the edge area to obtain a plurality of corner marking points; respectively connecting any two adjacent corner mark points to generate a corner line area; and determining an inscribed circle area in the corner line area, and taking the inscribed circle center of the inscribed circle area as the center area of the fish meat to be detected.
Preferably, the process for establishing the tissue identification model specifically includes: acquiring a historical fish image, and depicting muscle venation in the historical fish image to form a muscle venation image; dividing the muscle context image into a historical muscle region and a historical fat region according to a closed loop of a region formed by a drawing line in the muscle context, and marking the historical muscle region and the historical fat region at the same time; marking fish bone areas in the muscle vein image, and correlating historical muscle areas and historical fat areas adjacent to each fish bone area to generate a correlation area image; and establishing an initial recognition model through a neural network algorithm, inputting the associated region image into the initial recognition model for training, and completing model training when the training times reach a frequency threshold and the training accuracy reaches an accurate threshold to obtain the tissue recognition model.
Preferably, the distance calculating module is configured to calculate a distance value between each target muscle subregion and each adjacent muscle subregion, and specifically configured to: respectively determining the edge area of each target muscle subregion, determining an inscribed circle of each target muscle subregion according to the edge area of each target muscle subregion, and establishing a space rectangular coordinate system by taking the circle center of the inscribed circle of each target muscle subregion as an origin; determining coordinate points closest to an origin on the edge region in the space rectangular coordinate system according to the edge region of the target muscle subregion, and defining the coordinate points closest to the origin as datum points; and respectively calculating the space distance between the datum point and any edge point on the edge area of the adjacent muscle subarea, and taking the absolute value of the space distance as the distance value between the target muscle subarea and the adjacent muscle subarea.
Preferably, the muscle area module is specifically configured to: taking the muscle subarea corresponding to the subarea with the sub-putrefaction value larger than the first preset value as a core area, and taking the rest of the muscle subareas as non-core areas; respectively calculating the difference value between the sub-putrefaction values corresponding to each core region and all adjacent non-core regions, combining the corresponding non-core region with the core region when the difference value between the sub-putrefaction values is smaller than a second preset value, and taking the sub-putrefaction value corresponding to the core region as the sub-putrefaction value corresponding to the combined muscle sub-region; and calculating the average value of the sub-putrefaction values corresponding to all the combined muscle sub-regions to obtain a first putrefaction value of the muscle tissue region in the tissue cutting image.
Preferably, the brightness detection module is used in the step of determining a sub-spoilage value of the target fat subregion with spoilage discoloration according to the brightness value sequence, and specifically is used for: judging a corresponding brightness value sequence in the target fat subregion, and filtering brightness values with the numerical value smaller than a third preset value in the brightness value sequence to form a new brightness value sequence; determining the brightness value corresponding to the value larger than the fourth preset value in the new brightness value sequence as core brightness, and the rest brightness values as non-core brightness; respectively determining the positions of the core brightness and the non-core brightness in the target fat subregion, and when the absolute value of the distance between the core brightness and the non-core brightness is smaller than a fifth preset value and the difference of the brightness values between the core brightness and the non-core brightness is smaller than a sixth preset value, merging the core brightness and the non-core brightness, and taking the brightness value corresponding to the core brightness as the merged brightness value; and calculating the average value of all the combined brightness values to obtain the sub-putrefaction value of the target fat subregion with putrefaction color change.
Preferably, the calculation formula of the second spoilage value is as follows:
wherein,,a second spoilage value; />The sub-putrefaction value corresponding to the ith fat subregion is n, and the total number of the fat subregions is n; />And->Are all constant when->At > 20>Taking 1.2-1.8; when->< 20->Taking 0; when->When the number of the samples is =20,taking 1.
Preferably, the calculation formula of the spoilage total value is as follows:
wherein,,is the total value of putrefaction; />Is a first spoilage value; />A second spoilage value; />And->Are all constant.
The embodiment of the invention also provides a computer readable storage medium, which comprises a stored computer program; wherein the computer program, when run, controls an apparatus in which the computer-readable storage medium is located to perform the fish meat freshness evaluation method according to any one of the above.
The embodiment of the invention also provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor realizes the fish freshness evaluation method according to any one of the above when executing the computer program.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
According to the technical scheme, the fish to be detected is placed in the center of the weighing scale for weighing, and the fish to be detected is subjected to image acquisition, so that other experimental equipment is not required to be additionally manufactured, the operation is simple, and the cost is low; the multi-dimensional evaluation is carried out on the muscle tissue area and the fat tissue area which are obtained by segmenting the acquired images, and the freshness evaluation of the fish meat to be detected is comprehensively calculated by utilizing the distance value between muscles caused by putrefaction deformation in the muscle tissue area and the brightness difference formed by the fat surface layer caused by putrefaction discoloration in the fat tissue area, so that the freshness evaluation of the fish meat to be detected is determined, the fish meat in supermarket selling can be accurately and rapidly carried out, powerful data support is provided for the supermarket selling of the fresh fish meat, and the living food safety of people is ensured.
Drawings
Fig. 1: the method for evaluating the freshness of the fish meat provided by the embodiment of the invention is a step flow chart;
fig. 2: the structure schematic diagram of the fish freshness evaluation system is provided for the embodiment of the invention;
fig. 3: the embodiment of the terminal equipment provided by the embodiment of the invention is a structural schematic diagram.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, a flowchart of steps of a fish freshness evaluation method according to an embodiment of the present invention includes steps 101 to 107, where the steps are specifically as follows:
step 101, when fish meat to be detected is placed in the center of a weighing scale, determining a center area of the fish meat to be detected, and controlling a flash lamp to start so as to emit white light to the center area; and meanwhile, carrying out image acquisition on the fish to be detected to obtain a target fish image.
In this embodiment, in the step of determining the center area of the fish to be detected, specifically: step 1011, collecting a fish meat collection image of the fish meat to be detected placed in the center of the metering scale; step 1012, identifying an edge region of the fish to be detected in the fish collection image, and marking corner positions in the edge region to obtain a plurality of corner marking points; step 1013, connecting any two adjacent corner mark points to generate a corner line area; and 1014, determining an inscribed circle area in the corner line area, and taking the inscribed circle center of the inscribed circle area as the central area of the fish meat to be detected.
Specifically, in the process of transporting and selling fresh fish in operation fields such as supermarkets, the fish is often required to be placed on a weighing scale for weighing, and then packaged for sale. In order to reduce the cost of the strategy and make the strategy more reasonable, a mode of image acquisition is adopted above the weighing scale, and the image acquisition is carried out on the fish to be detected which is sold. Because in practical application, operational environment illumination intensity is limited, and in addition, the fish flesh is in the corruption deformation, and the in-process that discolours, its change is comparatively careful, and the dim environment can't carry out accurate shooting to it. In order to improve the feature clarity of the surface of fish meat and expand the effect of spoilage, we choose to add a white light to the surface of fish meat by using a flash lamp in the process of image acquisition so as to improve the representation of the image features.
And 102, inputting the target fish image into a preset tissue recognition model to perform feature recognition on muscle venation, so that the tissue recognition model divides the target fish image into a muscle tissue area and an adipose tissue area according to the muscle venation, and generating a tissue cutting image.
In this embodiment, the process for establishing the tissue recognition model specifically includes: step 1021, acquiring a historical fish image, and drawing muscle veins in the historical fish image to form a muscle vein image; step 1022, dividing the muscle vein image into a historical muscle region and a historical fat region according to a closed loop of a region formed by the drawing lines in the muscle vein, and marking the historical muscle region and the historical fat region at the same time; step 1023, marking fish bone regions in the muscle vein image, and correlating historical muscle regions and historical fat regions adjacent to each fish bone region to generate a correlation region image; step 1024, an initial recognition model is established through a neural network algorithm, the associated area image is input into the initial recognition model for training, and when the training times reach a frequency threshold and the training accuracy reaches an accurate threshold, model training is completed, and a tissue recognition model is obtained.
Specifically, since the spoilage of fish is mainly reflected in deformation and discoloration, the deformation is a morphological change caused by the influence of the moisture loss and the like of muscle tissues; the discoloration is caused by the change of the color of the fish surface due to the action of the microorganisms. In order to accurately determine the putrefaction degree of fresh fish in the transportation process, it is necessary to detect the putrefaction deformation of the muscle tissue of the fish to be detected and the putrefaction discoloration of the fat tissue, so that the freshness of the fish to be detected can be accurately determined. Thus, in this step, we divide the target fish image into a muscle tissue region and an adipose tissue region using the closed loop of the region formed by the muscle venation, so that the deformation and discoloration of the target fish image can be determined in the subsequent step.
Step 103, extracting a muscle tissue region in the tissue cutting image to obtain a plurality of muscle subregions, respectively calculating a distance value between each target muscle subregion and the adjacent muscle subregions, and defining a difference value between the distance value and a preset distance threshold value as a sub-putrefaction value of putrefaction deformation of the target muscle subregion when the distance value reaches the preset distance threshold value.
In this embodiment, in the step of calculating the distance value between each target muscle subregion and the adjacent muscle subregion, specifically: step 1031, respectively determining edge regions of each target muscle subregion, determining inscribed circles of the target muscle subregions according to the edge regions of each target muscle subregion, and establishing a space rectangular coordinate system by taking the circle centers of the inscribed circles of the target muscle subregions as origin points; step 1032, determining a coordinate point closest to an origin point on the edge region in the space rectangular coordinate system according to the edge region of the target muscle subregion, and defining the coordinate point closest to the origin point as a reference point; and step 1033, calculating the space distance between the reference point and any edge point on the edge area of the adjacent muscle subregion respectively, and taking the absolute value of the space distance as the distance value between the target muscle subregion and the adjacent muscle subregion.
Specifically, by calculating the distance value between the muscle subregion and the adjacent muscle subregion, the degree of deformation can be determined. By using the application of the space rectangular coordinate system in the target muscle subregion, the specific position of the edge region of the muscle subregion can be accurately determined, the coordinate point closest to the origin is determined as the datum point, the space distance is calculated, and the absolute value of the space distance can be objectively judged as the distance value. The difference between the distance value and the preset distance threshold is thus defined as a sub-spoilage value for spoilage deformation of the target muscle subregion. It will be understood that the term "target muscle subregion" is used herein to refer to any one of all muscle subregions, and is used primarily to distinguish between relationships with "adjacent muscle subregions" without any other special significance.
And 104, calculating to obtain a first spoilage value of the muscle tissue region in the tissue cutting image according to the sub spoilage value corresponding to each muscle sub-region in the tissue cutting image.
In this embodiment, the step 104 specifically includes: step 1041, taking the muscle subarea corresponding to the subarea with the sub-putrefaction value larger than the first preset value as a core area, and taking the rest of the muscle subareas as non-core areas; step 1042, calculating the difference between the sub-spoilage values corresponding to each core region and all the neighboring non-core regions, when the difference between the sub-spoilage values is smaller than a second preset value, merging the corresponding non-core region with the core region, and taking the sub-spoilage value corresponding to the core region as the sub-spoilage value corresponding to the merged muscle subregion; step 1043, calculating an average value of sub-spoilage values corresponding to all the combined muscle sub-regions, to obtain a first spoilage value of the muscle tissue region in the tissue cutting image.
Specifically, after determining the sub-spoilage value of each sub-muscle region in the previous step, we need to make a comprehensive judgment on the spoilage of the whole muscle tissue region. As proved by a large number of experiments, due to the fact that the adjacent areas are too close, although part of the muscle subareas are divided into a plurality of independent areas due to the fact that the subareas are too close, the subareas can be actually regarded as the same area, so that errors are smaller when the first putrefaction value is calculated, and the accuracy of data is higher. We need to determine the core region in all muscle sub-regions and then use the difference between the non-core regions adjacent to the core region to select the merge region. After completion of the merger, the new muscle subregion formed can objectively and accurately express the overall degree of spoilage of the muscle tissue region, and the first spoilage value is determined by averaging.
Step 105, extracting the adipose tissue region in the tissue cutting image to obtain a plurality of adipose subregions, respectively detecting the brightness value in each target adipose subregion to obtain a brightness value sequence corresponding to each target adipose subregion, and determining the sub-putrefaction value of the target adipose subregion with putrefaction and discoloration according to the brightness value sequence.
In this embodiment, in the step of determining the sub-putrefaction value of the target fat subregion that is subjected to putrefaction discoloration according to the sequence of brightness values, the method specifically includes: step 1051, judging a corresponding brightness value sequence in the target fat subregion, and filtering brightness values with values smaller than a third preset value in the brightness value sequence to form a new brightness value sequence; step 1052, determining the luminance value corresponding to the value larger than the fourth preset value in the new luminance value sequence as the core luminance, and the rest luminance values as the non-core luminance; step 1053, determining the positions of the core luminance and the non-core luminance in the target fat subregion, respectively, when the absolute value of the distance between the core luminance and the non-core luminance is smaller than a fifth preset value and the difference of the luminance values between the core luminance and the non-core luminance is smaller than a sixth preset value, merging the core luminance and the non-core luminance, and taking the luminance value corresponding to the core luminance as the merged luminance value; and 1054, calculating the average value of all the combined brightness values to obtain the sub-spoilage value of the target fat subregion with spoilage discoloration.
Specifically, by detecting the brightness of the adipose tissue region, the degree of putrefaction discoloration of the adipose tissue region can be determined. Firstly, detecting the brightness value of each fat subregion, wherein the brightness values can be generated in the process of detecting the brightness value of each fat subregion because each fat subregion can be influenced by various factors such as bacteria and the like in the transportation process and can be changed in different regions to a certain extent, so that a brightness value sequence is formed. In actual operation, since the corruption is not caused when the non-luminance value is considered or the luminance value is too low, the value having the low luminance value is filtered to form a new luminance value sequence. Then, considering that the area too close to the data error is reduced, the accuracy of judgment is further improved. We combine with the absolute value of the distance being smaller than the fifth preset value and the difference of the luminance values being smaller than the sixth preset value. Finally, the average value is used as a sub-putrefaction value of the putrefaction color of the fat subregion. It should be understood that the first, second, third, etc. mentioned in this step are only for distinguishing between different data, and are not limited as data, and have no other special meaning.
And 106, calculating a second spoilage value of the fat tissue region in the tissue cutting image according to the sub spoilage values corresponding to the fat subregions in the tissue cutting image.
In this embodiment, the calculation formula of the second spoilage value is:
wherein,,a second spoilage value; />The sub-putrefaction value corresponding to the ith fat subregion is n, and the total number of the fat subregions is n; />And->Are all constant when->At > 20>Taking 1.2-1.8; when->< 20->Taking 0; when->When the number of the samples is =20,taking 1.
Specifically, through a large number of experimental support, the second putrefaction value of the adipose tissue region in the tissue cutting image can be objectively and accurately expressed through the formula for calculating the second putrefaction value, so that the degree of putrefaction and discoloration of the adipose tissue region is reflected.
Step 107, calculating to obtain a total spoilage value of the fish to be detected according to the first spoilage value and the second spoilage value, and determining that the freshness of the fish to be detected is stale when the total spoilage value reaches a preset spoilage threshold; otherwise, determining that the freshness of the fish meat to be detected is fresh.
In this embodiment, the calculation formula of the spoilage total value is:
Wherein,,is the total value of putrefaction; />Is a first spoilage value; />A second spoilage value; />And->Are all constant.
In particular, through a large number of experimental support, the total putrefaction value of the fish to be detected can be objectively and accurately expressed through the formula for calculating the total putrefaction value, the degree of putrefaction deformation and color change of the fish to be detected is reflected, and accordingly the freshness of the fish to be detected is determined.
According to the technical scheme, the fish to be detected is placed in the center of the weighing scale for weighing, and the fish to be detected is subjected to image acquisition, so that other experimental equipment is not required to be additionally manufactured, the operation is simple, and the cost is low; the multi-dimensional evaluation is carried out on the muscle tissue area and the fat tissue area which are obtained by segmenting the acquired images, and the freshness evaluation of the fish meat to be detected is comprehensively calculated by utilizing the distance value between muscles caused by putrefaction deformation in the muscle tissue area and the brightness difference formed by the fat surface layer caused by putrefaction discoloration in the fat tissue area, so that the freshness evaluation of the fish meat to be detected is determined, the fish meat in supermarket selling can be accurately and rapidly carried out, powerful data support is provided for the supermarket selling of the fresh fish meat, and the living food safety of people is ensured.
Example two
Referring to fig. 2, a schematic structural diagram of a fish freshness evaluation system according to another embodiment of the present invention includes: the device comprises an image acquisition module, an image dividing module, a distance calculating module, a muscle area module, a brightness detection module, a fat area module and a freshness evaluation module.
The image acquisition module is used for determining a central area of the fish flesh to be detected when the fish flesh to be detected is placed in the center of the weighing scale, and controlling the flash lamp to start so as to emit white light to the central area; and meanwhile, carrying out image acquisition on the fish to be detected to obtain a target fish image.
In this embodiment, the image acquisition module is configured to determine a center area of the fish to be detected, and is specifically configured to: collecting fish meat collection images of fish meat to be detected placed in the center of the weighing scale; identifying the edge area of the fish to be detected in the fish collection image, and marking the corner positions in the edge area to obtain a plurality of corner marking points; respectively connecting any two adjacent corner mark points to generate a corner line area; and determining an inscribed circle area in the corner line area, and taking the inscribed circle center of the inscribed circle area as the center area of the fish meat to be detected.
The image dividing module is used for inputting the target fish image into a preset tissue recognition model to perform feature recognition on muscle venation, so that the tissue recognition model divides the target fish image into a muscle tissue area and an adipose tissue area according to the muscle venation, and a tissue cutting image is generated.
In this embodiment, the process for establishing the tissue recognition model specifically includes: acquiring a historical fish image, and depicting muscle venation in the historical fish image to form a muscle venation image; dividing the muscle context image into a historical muscle region and a historical fat region according to a closed loop of a region formed by a drawing line in the muscle context, and marking the historical muscle region and the historical fat region at the same time; marking fish bone areas in the muscle vein image, and correlating historical muscle areas and historical fat areas adjacent to each fish bone area to generate a correlation area image; and establishing an initial recognition model through a neural network algorithm, inputting the associated region image into the initial recognition model for training, and completing model training when the training times reach a frequency threshold and the training accuracy reaches an accurate threshold to obtain the tissue recognition model.
The distance calculation module is used for extracting muscle tissue areas in the tissue cutting image to obtain a plurality of muscle subareas, calculating distance values between each target muscle subarea and adjacent muscle subareas respectively, and defining a difference value between the distance values and a preset distance threshold value as a sub-putrefaction value of putrefaction deformation of the target muscle subarea when the distance values reach the preset distance threshold value.
In this embodiment, the distance calculating module is configured to calculate, respectively, a distance value between each target muscle subregion and an adjacent muscle subregion, and specifically configured to: respectively determining the edge area of each target muscle subregion, determining an inscribed circle of each target muscle subregion according to the edge area of each target muscle subregion, and establishing a space rectangular coordinate system by taking the circle center of the inscribed circle of each target muscle subregion as an origin; determining coordinate points closest to an origin on the edge region in the space rectangular coordinate system according to the edge region of the target muscle subregion, and defining the coordinate points closest to the origin as datum points; and respectively calculating the space distance between the datum point and any edge point on the edge area of the adjacent muscle subarea, and taking the absolute value of the space distance as the distance value between the target muscle subarea and the adjacent muscle subarea.
And the muscle area module is used for calculating and obtaining a first spoilage value of the muscle tissue area in the tissue cutting image according to the sub spoilage value corresponding to each muscle subarea in the tissue cutting image.
In this embodiment, the muscle area module is specifically configured to: taking the muscle subarea corresponding to the subarea with the sub-putrefaction value larger than the first preset value as a core area, and taking the rest of the muscle subareas as non-core areas; respectively calculating the difference value between the sub-putrefaction values corresponding to each core region and all adjacent non-core regions, combining the corresponding non-core region with the core region when the difference value between the sub-putrefaction values is smaller than a second preset value, and taking the sub-putrefaction value corresponding to the core region as the sub-putrefaction value corresponding to the combined muscle sub-region; and calculating the average value of the sub-putrefaction values corresponding to all the combined muscle sub-regions to obtain a first putrefaction value of the muscle tissue region in the tissue cutting image.
The brightness detection module is used for extracting the adipose tissue region in the tissue cutting image to obtain a plurality of adipose subregions, detecting the brightness value in each target adipose subregion to obtain a brightness value sequence corresponding to each target adipose subregion, and determining the sub-putrefaction value of the target adipose subregion with putrefaction and discoloration according to the brightness value sequence.
In this embodiment, the brightness detection module is configured to determine, according to the brightness value sequence, a sub-spoilage value of the target fat subregion that is spoiled and discolored, where the sub-spoilage value is specifically configured to: judging a corresponding brightness value sequence in the target fat subregion, and filtering brightness values with the numerical value smaller than a third preset value in the brightness value sequence to form a new brightness value sequence; determining the brightness value corresponding to the value larger than the fourth preset value in the new brightness value sequence as core brightness, and the rest brightness values as non-core brightness; respectively determining the positions of the core brightness and the non-core brightness in the target fat subregion, and when the absolute value of the distance between the core brightness and the non-core brightness is smaller than a fifth preset value and the difference of the brightness values between the core brightness and the non-core brightness is smaller than a sixth preset value, merging the core brightness and the non-core brightness, and taking the brightness value corresponding to the core brightness as the merged brightness value; and calculating the average value of all the combined brightness values to obtain the sub-putrefaction value of the target fat subregion with putrefaction color change.
The fat region module is used for calculating a second spoilage value of the fat tissue region in the tissue cutting image according to the sub spoilage values corresponding to the fat subregions in the tissue cutting image.
In this embodiment, the calculation formula of the second spoilage value is:
wherein,,a second spoilage value; />The sub-putrefaction value corresponding to the ith fat subregion is n, and the total number of the fat subregions is n; />And->Are all constant when->At > 20>Taking 1.2-1.8; when->< 20->Taking 0; when->When the number of the samples is =20,taking 1.
The freshness evaluation module is used for calculating a total spoilage value of the fish to be detected according to the first spoilage value and the second spoilage value, and determining that the freshness of the fish to be detected is stale when the total spoilage value reaches a preset spoilage threshold; otherwise, determining that the freshness of the fish meat to be detected is fresh.
In this embodiment, the calculation formula of the spoilage total value is:
wherein,,is the total value of putrefaction; />Is a first spoilage value; />A second spoilage value; />And->Are all constant.
Example III
The embodiment of the invention also provides a computer readable storage medium, which comprises a stored computer program; wherein the computer program, when executed, controls a device in which the computer-readable storage medium is located to execute the fish meat freshness evaluation method according to any one of the above embodiments.
Example IV
Referring to fig. 3, a schematic structural diagram of an embodiment of a terminal device according to an embodiment of the present invention is provided, where the terminal device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the fish freshness evaluation method according to any one of the above embodiments when executing the computer program.
Preferably, the computer program may be divided into one or more modules/units (e.g., computer program) stored in the memory and executed by the processor to perform the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the terminal device.
The processor may be a central processing unit (Central Processing Unit, CPU), or may be other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., or the general purpose processor may be a microprocessor, or any conventional processor, which is the control center of the terminal device, that connects the various parts of the terminal device using various interfaces and lines.
The memory mainly includes a program storage area, which may store an operating system, an application program required for at least one function, and the like, and a data storage area, which may store related data and the like. In addition, the memory may be a high-speed random access memory, a nonvolatile memory such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), or the like, or may be other volatile solid-state memory devices.
It should be noted that the above-mentioned terminal device may include, but is not limited to, a processor, a memory, and those skilled in the art will understand that the above-mentioned terminal device is merely an example, and does not constitute limitation of the terminal device, and may include more or fewer components, or may combine some components, or different components.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.
Claims (10)
1. A fish freshness evaluation method, comprising:
when fish meat to be detected is placed in the center of a weighing scale, determining a central area of the fish meat to be detected, and controlling a flash lamp to start so as to emit white light to the central area; meanwhile, acquiring an image of the fish to be detected to obtain a target fish image;
inputting the target fish image into a preset tissue recognition model to perform feature recognition on muscle venation, so that the tissue recognition model divides the target fish image into a muscle tissue area and an adipose tissue area according to the muscle venation to generate a tissue cutting image;
extracting muscle tissue areas in the tissue cutting image to obtain a plurality of muscle subareas, respectively calculating a distance value between each target muscle subarea and each adjacent muscle subarea, and defining a difference value between the distance value and a preset distance threshold value as a sub-putrefaction value of putrefaction deformation of the target muscle subarea when the distance value reaches the preset distance threshold value;
calculating to obtain a first spoilage value of a muscle tissue region in the tissue cutting image according to sub spoilage values corresponding to all muscle sub-regions in the tissue cutting image;
Extracting adipose tissue areas in the tissue cutting image to obtain a plurality of adipose subareas, respectively detecting brightness values in each target adipose subarea to obtain a brightness value sequence corresponding to each target adipose subarea, and determining a sub-putrefaction value of the target adipose subarea with putrefaction and discoloration according to the brightness value sequence;
calculating a second spoilage value of the adipose tissue region in the tissue cutting image according to the sub spoilage values corresponding to the adipose tissue regions in the tissue cutting image;
calculating to obtain a total spoilage value of the fish to be detected according to the first spoilage value and the second spoilage value, and determining that the freshness of the fish to be detected is stale when the total spoilage value reaches a preset spoilage threshold; otherwise, determining that the freshness of the fish meat to be detected is fresh.
2. The fish meat freshness evaluation method according to claim 1, wherein in the step of determining the center region of the fish meat to be detected, specifically:
collecting fish meat collection images of fish meat to be detected placed in the center of the weighing scale;
identifying the edge area of the fish to be detected in the fish collection image, and marking the corner positions in the edge area to obtain a plurality of corner marking points;
Respectively connecting any two adjacent corner mark points to generate a corner line area;
and determining an inscribed circle area in the corner line area, and taking the inscribed circle center of the inscribed circle area as the center area of the fish meat to be detected.
3. The fish freshness evaluation method according to claim 1, wherein the process of establishing the tissue identification model specifically comprises:
acquiring a historical fish image, and depicting muscle venation in the historical fish image to form a muscle venation image;
dividing the muscle context image into a historical muscle region and a historical fat region according to a closed loop of a region formed by a drawing line in the muscle context, and marking the historical muscle region and the historical fat region at the same time;
marking fish bone areas in the muscle vein image, and correlating historical muscle areas and historical fat areas adjacent to each fish bone area to generate a correlation area image;
and establishing an initial recognition model through a neural network algorithm, inputting the associated region image into the initial recognition model for training, and completing model training when the training times reach a frequency threshold and the training accuracy reaches an accurate threshold to obtain the tissue recognition model.
4. The fish meat freshness evaluation method according to claim 1, wherein in the step of calculating the distance value between each target muscle subregion and its adjacent muscle subregion, respectively, specifically:
respectively determining the edge area of each target muscle subregion, determining an inscribed circle of each target muscle subregion according to the edge area of each target muscle subregion, and establishing a space rectangular coordinate system by taking the circle center of the inscribed circle of each target muscle subregion as an origin;
determining coordinate points closest to an origin on the edge region in the space rectangular coordinate system according to the edge region of the target muscle subregion, and defining the coordinate points closest to the origin as datum points;
and respectively calculating the space distance between the datum point and any edge point on the edge area of the adjacent muscle subarea, and taking the absolute value of the space distance as the distance value between the target muscle subarea and the adjacent muscle subarea.
5. The method for evaluating the freshness of fish meat according to claim 4, wherein the step of calculating the first spoilage value of the muscle tissue region in the tissue cutting image based on the sub-spoilage values corresponding to the respective muscle sub-regions in the tissue cutting image comprises:
Taking the muscle subarea corresponding to the subarea with the sub-putrefaction value larger than the first preset value as a core area, and taking the rest of the muscle subareas as non-core areas;
respectively calculating the difference value between the sub-putrefaction values corresponding to each core region and all adjacent non-core regions, combining the corresponding non-core region with the core region when the difference value between the sub-putrefaction values is smaller than a second preset value, and taking the sub-putrefaction value corresponding to the core region as the sub-putrefaction value corresponding to the combined muscle sub-region;
and calculating the average value of the sub-putrefaction values corresponding to all the combined muscle sub-regions to obtain a first putrefaction value of the muscle tissue region in the tissue cutting image.
6. The fish meat freshness evaluation method according to claim 1, wherein in the step of determining the sub-spoilage value of the target fat subregion, which is spoilage-colored, based on the sequence of luminance values, specifically:
judging a corresponding brightness value sequence in the target fat subregion, and filtering brightness values with the numerical value smaller than a third preset value in the brightness value sequence to form a new brightness value sequence;
determining the brightness value corresponding to the value larger than the fourth preset value in the new brightness value sequence as core brightness, and the rest brightness values as non-core brightness;
Respectively determining the positions of the core brightness and the non-core brightness in the target fat subregion, and when the absolute value of the distance between the core brightness and the non-core brightness is smaller than a fifth preset value and the difference of the brightness values between the core brightness and the non-core brightness is smaller than a sixth preset value, merging the core brightness and the non-core brightness, and taking the brightness value corresponding to the core brightness as the merged brightness value;
and calculating the average value of all the combined brightness values to obtain the sub-putrefaction value of the target fat subregion with putrefaction color change.
7. A fish meat freshness evaluation system, comprising: the device comprises an image acquisition module, an image dividing module, a distance calculating module, a muscle area module, a brightness detection module, a fat area module and a freshness evaluation module;
the image acquisition module is used for determining a central area of the fish flesh to be detected when the fish flesh to be detected is placed in the center of the weighing scale, and controlling the flash lamp to start so as to emit white light to the central area; meanwhile, acquiring an image of the fish to be detected to obtain a target fish image;
the image dividing module is used for inputting the target fish image into a preset tissue recognition model to perform feature recognition on muscle venation, so that the tissue recognition model divides the target fish image into a muscle tissue area and an adipose tissue area according to the muscle venation to generate a tissue cutting image;
The distance calculation module is used for extracting muscle tissue areas in the tissue cutting image to obtain a plurality of muscle subareas, calculating a distance value between each target muscle subarea and each adjacent muscle subarea respectively, and defining a difference value between the distance value and a preset distance threshold value as a sub-putrefaction value of putrefaction deformation of the target muscle subarea when the distance value reaches the preset distance threshold value;
the muscle area module is used for calculating a first spoilage value of a muscle tissue area in the tissue cutting image according to the sub spoilage values corresponding to the muscle subareas in the tissue cutting image;
the brightness detection module is used for extracting the adipose tissue region in the tissue cutting image to obtain a plurality of adipose subregions, detecting the brightness value in each target adipose subregion to obtain a brightness value sequence corresponding to each target adipose subregion, and determining the sub-putrefaction value of the target adipose subregion with putrefaction and discoloration according to the brightness value sequence;
the fat region module is used for calculating a second spoilage value of the fat tissue region in the tissue cutting image according to the sub spoilage values corresponding to the fat subregions in the tissue cutting image;
The freshness evaluation module is used for calculating a total spoilage value of the fish to be detected according to the first spoilage value and the second spoilage value, and determining that the freshness of the fish to be detected is stale when the total spoilage value reaches a preset spoilage threshold; otherwise, determining that the freshness of the fish meat to be detected is fresh.
8. The fish meat freshness evaluation system of claim 7, wherein the image acquisition module is configured to, in the step of determining the center region of the fish meat to be detected, specifically: collecting fish meat collection images of fish meat to be detected placed in the center of the weighing scale; identifying the edge area of the fish to be detected in the fish collection image, and marking the corner positions in the edge area to obtain a plurality of corner marking points; respectively connecting any two adjacent corner mark points to generate a corner line area; and determining an inscribed circle area in the corner line area, and taking the inscribed circle center of the inscribed circle area as the center area of the fish meat to be detected.
9. A computer readable storage medium, wherein the computer readable storage medium comprises a stored computer program; wherein the computer program, when run, controls an apparatus in which the computer-readable storage medium is located to perform the fish meat freshness evaluation method according to any one of claims 1 to 6.
10. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the fish meat freshness evaluation method according to any one of claims 1-6 when the computer program is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310201440.2A CN116087195B (en) | 2023-03-06 | 2023-03-06 | Fish freshness evaluation method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310201440.2A CN116087195B (en) | 2023-03-06 | 2023-03-06 | Fish freshness evaluation method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116087195A true CN116087195A (en) | 2023-05-09 |
CN116087195B CN116087195B (en) | 2023-06-16 |
Family
ID=86199268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310201440.2A Active CN116087195B (en) | 2023-03-06 | 2023-03-06 | Fish freshness evaluation method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116087195B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116519892A (en) * | 2023-06-29 | 2023-08-01 | 广东省农业科学院动物科学研究所 | Fish tenderness quality identification method and system |
CN118261492A (en) * | 2024-05-30 | 2024-06-28 | 绵阳梓兴食品科技有限公司 | Nondestructive testing method and system for comprehensive quality of fresh pork |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1603801A (en) * | 2004-11-02 | 2005-04-06 | 江苏大学 | Method and device for computer vision detection and classification of beef carcase quality |
JP2006177923A (en) * | 2004-11-29 | 2006-07-06 | Okayama Univ | Optical freshness identifying method and device thereof for tissue from living tissue |
US20180146947A1 (en) * | 2016-11-30 | 2018-05-31 | MuscleSound, LLC | Non-Invasive Determination of Muscle Tissue Quality and Intramuscular Fat |
CN109523561A (en) * | 2018-12-19 | 2019-03-26 | 睿仁佳心(上海)科技有限公司 | Muscle and fat image dividing method in automatic abdomen |
CN110322434A (en) * | 2019-06-17 | 2019-10-11 | 浙江省农业科学院 | A kind of squid freshness identification method based on color notation conversion space and pixel cluster |
CN111259926A (en) * | 2020-01-08 | 2020-06-09 | 珠海格力电器股份有限公司 | Meat freshness detection method and device, computing equipment and storage medium |
CN112634274A (en) * | 2021-03-10 | 2021-04-09 | 广东省农业科学院动物科学研究所 | Machine vision-based fattening pork quality evaluation method and system |
-
2023
- 2023-03-06 CN CN202310201440.2A patent/CN116087195B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1603801A (en) * | 2004-11-02 | 2005-04-06 | 江苏大学 | Method and device for computer vision detection and classification of beef carcase quality |
JP2006177923A (en) * | 2004-11-29 | 2006-07-06 | Okayama Univ | Optical freshness identifying method and device thereof for tissue from living tissue |
US20180146947A1 (en) * | 2016-11-30 | 2018-05-31 | MuscleSound, LLC | Non-Invasive Determination of Muscle Tissue Quality and Intramuscular Fat |
CN109523561A (en) * | 2018-12-19 | 2019-03-26 | 睿仁佳心(上海)科技有限公司 | Muscle and fat image dividing method in automatic abdomen |
CN110322434A (en) * | 2019-06-17 | 2019-10-11 | 浙江省农业科学院 | A kind of squid freshness identification method based on color notation conversion space and pixel cluster |
CN111259926A (en) * | 2020-01-08 | 2020-06-09 | 珠海格力电器股份有限公司 | Meat freshness detection method and device, computing equipment and storage medium |
CN112634274A (en) * | 2021-03-10 | 2021-04-09 | 广东省农业科学院动物科学研究所 | Machine vision-based fattening pork quality evaluation method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116519892A (en) * | 2023-06-29 | 2023-08-01 | 广东省农业科学院动物科学研究所 | Fish tenderness quality identification method and system |
CN116519892B (en) * | 2023-06-29 | 2023-08-25 | 广东省农业科学院动物科学研究所 | Fish tenderness quality identification method and system |
CN118261492A (en) * | 2024-05-30 | 2024-06-28 | 绵阳梓兴食品科技有限公司 | Nondestructive testing method and system for comprehensive quality of fresh pork |
Also Published As
Publication number | Publication date |
---|---|
CN116087195B (en) | 2023-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116087195B (en) | Fish freshness evaluation method and system | |
Mery et al. | Segmentation of colour food images using a robust algorithm | |
Antequera et al. | Evaluation of fresh meat quality by hyperspectral imaging (HSI), nuclear magnetic resonance (NMR) and magnetic resonance imaging (MRI): a review | |
Bercovich et al. | Development of an automatic cow body condition scoring using body shape signature and Fourier descriptors | |
Francis et al. | Identification of leaf diseases in pepper plants using soft computing techniques | |
Banwari et al. | Computer vision technique for freshness estimation from segmented eye of fish image | |
Zapotoczny et al. | Evaluation of the quality of cold meats by computer-assisted image analysis | |
Stewart et al. | Objective grading of eye muscle area, intramuscular fat and marbling in Australian beef and lamb | |
CN112991238B (en) | Food image segmentation method, system and medium based on texture and color mixing | |
Nunes et al. | Beef quality parameters estimation using ultrasound and color images | |
WO1992000523A1 (en) | Automatic carcass grading apparatus and method | |
Yudhana et al. | Fish Freshness Identification Using Machine Learning: Performance Comparison of k-NN and Naïve Bayes Classifier. | |
CN113450383B (en) | Quantitative analysis method, device, equipment and medium of immunochromatographic test paper | |
CN112634274B (en) | Machine vision-based fattening pork quality evaluation method and system | |
Lopes et al. | Dual Stage Image Analysis for a complex pattern classification task: Ham veining defect detection | |
CN103592031A (en) | Inferior-quality meat color determining device and inferior-quality meat determining method after livestock slaughter | |
CN116433643A (en) | Fish meat quality identification method and device based on computer vision | |
CN113588571B (en) | Hyperspectral imaging-based method and system for identifying fishy smell of aquatic product | |
Pintor et al. | Govocitos: A software tool for estimating fish fecundity based on digital analysis of histological images | |
Khan et al. | Segmentation of single and overlapping leaves by extracting appropriate contours | |
Wu et al. | Prediction method of large yellow croaker (Larimichthys crocea) freshness based on improved residual neural network | |
Balbin et al. | Assessment of the standard level of oreochromis niloticus and chanos chanos located in fish pen and wet market storage based on viola-jones, thresholding and L* a* b* color space | |
Valiente et al. | Standardization for export quality of Oreochromis niloticus and Chanos Chanos based on quality index method using integrated image processing algorithms | |
Aguil et al. | Freshness Assessment of Milkfish (Chanos Chanos) Using LabVIEW: Image Processing | |
Winiarti et al. | Determining feasibility level of beef quality based on histogram and k-means clustering |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |