CN115797345A - Seafood baking abnormity identification method - Google Patents

Seafood baking abnormity identification method Download PDF

Info

Publication number
CN115797345A
CN115797345A CN202310064897.3A CN202310064897A CN115797345A CN 115797345 A CN115797345 A CN 115797345A CN 202310064897 A CN202310064897 A CN 202310064897A CN 115797345 A CN115797345 A CN 115797345A
Authority
CN
China
Prior art keywords
seafood
area
distribution matrix
baking
similarity
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
Application number
CN202310064897.3A
Other languages
Chinese (zh)
Other versions
CN115797345B (en
Inventor
刘勤
孙树杰
李鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Jiameiyang Food Co ltd
Original Assignee
Qingdao Jiameiyang Food Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Qingdao Jiameiyang Food Co ltd filed Critical Qingdao Jiameiyang Food Co ltd
Priority to CN202310064897.3A priority Critical patent/CN115797345B/en
Publication of CN115797345A publication Critical patent/CN115797345A/en
Application granted granted Critical
Publication of CN115797345B publication Critical patent/CN115797345B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image data processing, in particular to a seafood baking abnormity identification method. The method comprises the following steps: obtaining a baked seafood image, wherein the seafood image comprises at least two single seafood areas and the seafood types are consistent; converting the single seafood area to an HSV color space and obtaining a component image on each channel; selecting any one single seafood area as a target area; acquiring a color distribution matrix according to the channel value distribution characteristics of the target area on the component image; acquiring a structural distribution matrix according to the channel value gradient change characteristics of the target area in the component image; taking the color distribution matrix and the structure distribution matrix as characteristic matrices; obtaining a classification index according to the characteristic matrix of a single seafood area, and obtaining an area category according to the classification index; and identifying the abnormal region type according to the similarity between the region type and the baked normal seafood region, thereby improving the accuracy and efficiency of seafood baking abnormality identification.

Description

Seafood baking abnormity identification method
Technical Field
The invention relates to the technical field of image data processing, in particular to a seafood baking abnormity identification method.
Background
At present, the total yield of seafood in China is 3500 million tons, seafood products in China are developing towards deep processing, the product competitiveness is improved by means of technical innovation, and the seafood is subjected to technical innovation by adopting a new method, a new process and a new technology on the basis of the existing processing technology. Baking and drying marine products are used as a special and important link in the processing of marine products, and the baked marine products can keep fresh and delicious taste and prolong the shelf life of the marine products. However, seafood needs to be carefully dried in the process of drying, so that the materials are ensured not to deform, deteriorate, discolor and oxidize, the baked seafood is full in shape, and the appearance and color are good. Therefore, the baked seafood needs to be detected and screened before leaving the factory, and the abnormal seafood dried products are identified, so that the abnormal seafood dried products are prevented from entering the market.
In the prior art, for baked seafood, an image acquisition device is used for acquiring a baked seafood image, acquiring color features, texture features and shape features in the seafood image, and comparing the color features, the texture features and the shape features with a baked normal seafood image to judge whether the seafood image is abnormal. The method has the defects that the identification is inaccurate, a plurality of seafood products exist in one seafood image, and a few baked abnormal seafood products in one seafood image can cause the abnormality of the whole seafood image, so that the seafood products in the whole seafood image are processed again, a large amount of repeated work is caused, and the identification efficiency is reduced. Meanwhile, errors caused by color approaching, unclear texture and the like exist in the process of directly obtaining color features, texture features and shape features in the seafood images, and accordingly recognition is inaccurate.
Disclosure of Invention
In order to solve the problem that the recognition efficiency is reduced due to inaccurate recognition of the existing seafood baking abnormity, the invention provides a seafood baking abnormity recognition method, which adopts the following technical scheme:
the invention provides a seafood baking abnormity identification method, which comprises the following steps:
obtaining a baked seafood image, wherein the seafood image comprises at least two single seafood areas and the seafood types are consistent;
converting the single seafood area into an HSV color space to obtain a component image on each channel in the HSV color space; selecting any one of the single seafood areas as a target area;
acquiring a color distribution matrix of a corresponding component image according to the channel value distribution characteristics of the target area on each component image;
obtaining a filtering direction according to the gradient change characteristics of the channel value of the target area in each component image, and performing convolution filtering operation on the target area by using at least two filtering cores with different sizes according to the filtering direction to obtain a structure distribution matrix on the corresponding component image;
taking the color distribution matrix and the structure distribution matrix as feature matrices of the target area on corresponding component images;
obtaining a classification index according to the characteristic matrix difference between the single seafood areas, and classifying all the single seafood areas according to the classification index to obtain at least two area categories;
and identifying the abnormal area type according to the similarity of the characteristic matrix between the area type center and the baked normal seafood area.
Further, the method for obtaining the color distribution matrix includes:
fitting the channel value of each pixel point on the target area in each component image to obtain a Gaussian mixture model, and acquiring the characteristic parameters of each sub-Gaussian model in the Gaussian mixture model; the characteristic parameters include expectation, variance, and model weight; and arranging vectors formed by the characteristic parameters of all the sub-Gaussian models to obtain the color distribution matrix of the corresponding component image.
Further, the method for obtaining the structure distribution matrix includes:
acquiring a Hessian matrix corresponding to each pixel point in the target area in each component image, acquiring a characteristic value of each Hessian matrix, and selecting the direction of a characteristic vector corresponding to the minimum characteristic value as the filtering direction of a corresponding pixel point;
each filtering kernel performs convolution filtering on the pixel points according to the filtering direction corresponding to the pixel points to obtain a convolution value of each pixel point, and all the convolution values of each pixel point form a convolution vector; and taking the product of convolution vectors of any two pixel points as an inner product, and arranging the inner product to obtain the structure distribution matrix of the corresponding component image.
Further, the method for acquiring the region category includes:
and clustering the single seafood area according to the classification index by using a K-means clustering algorithm to obtain the area category.
Further, the method for obtaining the classification index includes:
obtaining the classification index according to a classification index formula, wherein the classification index formula comprises:
Figure SMS_1
wherein ,
Figure SMS_5
h, S, V,
Figure SMS_8
for initial setting of the region class center M
Figure SMS_12
The color distribution matrix of the component images on the channel,
Figure SMS_4
for initial setting of the region class center M
Figure SMS_9
The structural distribution matrix of the component images on the channels,
Figure SMS_14
is as follows
Figure SMS_15
The first of said individual seafood areas
Figure SMS_2
The color distribution matrix of the component images on the channel,
Figure SMS_6
is as follows
Figure SMS_10
The first of said individual seafood areas
Figure SMS_13
The structural distribution matrix of the component images on the channels,
Figure SMS_3
is a first
Figure SMS_7
The classification index between each of the individual seafood areas and the area classification center M is initially set,
Figure SMS_11
is the L2 distance between the two matrices.
Further, the method for acquiring the similarity includes:
obtaining the similarity according to a similarity formula, wherein the similarity formula comprises:
Figure SMS_16
wherein ,
Figure SMS_18
h, S, V,
Figure SMS_21
is as follows
Figure SMS_25
(ii) the center of each of the area classes A
Figure SMS_19
The color distribution matrix of the component images on the channel,
Figure SMS_24
is as follows
Figure SMS_26
(ii) the center of each of the area classes A
Figure SMS_29
The structural distribution matrix of the component images on the channels,
Figure SMS_17
for the area corresponding to the baked normal seafood
Figure SMS_23
The color distribution matrix of the component images on the channel,
Figure SMS_27
for the baking of the normal seafood area
Figure SMS_30
The structural distribution matrix of the component images on the channels,
Figure SMS_20
representing the pearson coefficients of the two matrices,
Figure SMS_22
is as follows
Figure SMS_28
Corresponding to the center of each of the area categoriesSimilarity between the single seafood area and the baked normal seafood area.
Further, the method for identifying the abnormal region category according to the similarity includes:
setting a similarity threshold, and when the similarity is greater than the similarity threshold, baking the seafood corresponding to the area category normally; and when the similarity is smaller than or equal to the similarity threshold value, baking abnormality of the seafood corresponding to the region category.
The invention has the following beneficial effects: obtaining a baked seafood image, wherein the seafood image comprises at least two single seafood areas, and the single seafood areas are segmented, so that the influence of irrelevant areas can be effectively avoided, and the accuracy of seafood baking abnormity identification is improved; converting the single seafood area into an HSV color space to obtain a component image on each channel in the HSV color space, and performing feature extraction on the component images to enable the features of the single seafood area to be more accurate; selecting any single seafood area as a target area, acquiring a color distribution matrix of a corresponding component image according to a channel value distribution characteristic of the target area on each component image, and accurately acquiring a color characteristic on each component image; obtaining a filtering direction according to the gradient change characteristics of the channel value of the target area in each component image, and fully obtaining structural texture information in the component images; performing convolution filtering operation on a target area by using at least two filtering cores with different sizes according to a filtering direction to obtain a structure distribution matrix on a corresponding component image, and accurately obtaining the structure characteristics on each component image; the color distribution matrix and the structure distribution matrix are used as feature matrices of the target area on the corresponding component images, and the features of the target area are accurately obtained through the feature matrices, so that the target area can be accurately divided; obtaining a classification index according to the characteristic matrix difference between the single seafood areas, classifying all the single seafood areas according to the classification index, accurately dividing the single seafood areas, obtaining at least two area categories, and identifying abnormal area categories according to the similarity of the characteristic matrix between the area category center and the baked normal seafood areas. The method has the advantages that the single seafood area is accurately classified according to the classification index to obtain the area type, the baking abnormity identification efficiency and accuracy of the seafood can be improved by identifying the area type, and meanwhile, the data volume of repeated detection of the seafood by the system is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a seafood baking abnormality identification method according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects of the present invention for achieving the predetermined purpose, the following detailed description of the specific implementation, structure, characteristics and effects of the seafood baking abnormality recognition method according to the present invention will be provided with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The specific scheme of the seafood baking abnormity identification method provided by the invention is specifically described below by combining the attached drawings.
Referring to fig. 1, a schematic flow chart of a seafood baking abnormality recognition method according to an embodiment of the present invention is shown, where the method includes the following steps:
s1: obtaining a baked seafood image, wherein the seafood image comprises at least two single seafood areas and the seafood types are consistent.
Specifically, the embodiment of the invention deploys image acquisition equipment to acquire images of baked seafood as basic data for identifying baking abnormality of subsequent seafood, the image acquisition equipment mainly comprises a light source, a camera, a placing table and the like, the specific equipment deployment and camera view angle and the like are set, and an implementer can set the equipment according to actual conditions. The embodiment of the invention aims at performing baking abnormity identification on the seafood such as the squid, the dried fish and the like, and performing image acquisition on a large amount of baked seafood to obtain the baked seafood image.
In order to improve the baking abnormity identification precision of seafood and avoid the influence of noise and the like in the image acquisition process, the embodiment of the invention removes noise points in the seafood image through the Gaussian smoothing filter algorithm, improves the contrast of the seafood image through histogram equalization, highlights the detail texture characteristic information of the seafood image and avoids the problem of uneven brightness of the seafood image caused by uneven illumination in the seafood image acquisition process.
The gaussian smoothing filter algorithm and the histogram equalization are known techniques, and are not described herein in detail.
It should be noted that, baked seafood is included in the seafood images, and at least two baked seafood of the same type are included in one seafood image, and based on the seafood images, the embodiment of the present invention detects and identifies the seafood with abnormal baking.
In order to reduce the detection amount of the system, improve the detection speed and avoid the influence of irrelevant areas on the baking detection of seafood, the embodiment of the invention carries out image segmentation on the seafood image to obtain a single seafood area, the image segmentation method comprises a semantic segmentation network, a threshold segmentation algorithm and the like, and an implementer can select the image segmentation method by himself to obtain the single seafood area in the seafood image. In the embodiment of the invention, a threshold segmentation algorithm is used for acquiring a single seafood area in the seafood image.
The semantic segmentation network and the threshold segmentation algorithm are well-known technologies, and are not described in detail herein.
S2: converting the single seafood area into an HSV color space to obtain a component image on each channel in the HSV color space; and selecting any one of the single seafood areas as a target area.
Specifically, in order to better fit human visual features, the embodiment of the invention performs color space conversion on a single seafood area to obtain a corresponding HSV color space, wherein the HSV color space comprises three channels of hue H, saturation S and lightness V, each channel corresponds to one component image, and the component images on each channel, namely the component image on the H channel, the component image on the S channel and the component image on the V channel, are obtained through the HSV color space. It should be noted that the image acquired by the camera according to the embodiment of the present invention is an RGB image, and the conversion of the RGB image into an HSV color space is a well-known technical means for those skilled in the art, and is not described herein again.
And selecting any one single seafood area as a target area, and carrying out detailed analysis on the characteristics of the target area according to the component image of the target area.
S3: and acquiring a color distribution matrix of the corresponding component image according to the channel value distribution characteristics of the target area on each component image.
The process of obtaining the color distribution matrix is as follows:
fitting the channel value of each pixel point on the target area in each component image to obtain a Gaussian mixture model, and acquiring the characteristic parameters of each sub-Gaussian model in the Gaussian mixture model; the characteristic parameters include expectation, variance, and model weight; and arranging vectors formed by the characteristic parameters of all the sub-Gaussian models to obtain the color distribution matrix of the corresponding component image.
Taking the component image on the H channel of the target region a as an example, the embodiment of the present invention performs fitting based on the channel value of each pixel point in the component image on the H channel of the target region a to obtain a gaussian mixture model, and obtains the number N of sub-gaussian models in the gaussian mixture model, where N is a positive integer. And estimating the characteristic parameters of each sub-Gaussian model by an EM algorithm, wherein the characteristic parameters comprise expectation, variance and model weight. The shape and position of the sub-Gaussian model can be determined according to expectation and variance, and the distribution probability of each pixel point in each sub-Gaussian model can be determined according to the model weight, so that the three parameters can be used as characteristic parameters for describing the characteristics of the sub-Gaussian model.
The gaussian mixture model and the EM algorithm are well known technologies, and are not described here.
The feature parameters of the sub-gaussian models are used to characterize the channel value distribution condition in the component image on the H channel of the target region a, and therefore, the vectors formed based on the feature parameters of the N sub-gaussian models are arranged to obtain the color distribution matrix of the component image on the H channel:
Figure SMS_31
wherein ,
Figure SMS_33
is the color distribution matrix of the component images on the H channel of the target area a,
Figure SMS_35
as expected for the first sub-gaussian model,
Figure SMS_38
is the variance of the first sub-gaussian model,
Figure SMS_34
is the model weight of the first sub-gaussian model,
Figure SMS_37
is as follows
Figure SMS_39
The expectation of a sub-gaussian model is,
Figure SMS_41
is as follows
Figure SMS_32
The variance of the sub-gaussian models is,
Figure SMS_36
is as follows
Figure SMS_40
Model weights for the sub-gaussian models.
According to the color distribution matrix of the component image on the H channel of the acquired target area a
Figure SMS_42
Obtaining a color distribution matrix of the component image on the S channel of the target area a
Figure SMS_43
And a color distribution matrix of the component images on the V channel of the target area a
Figure SMS_44
S4: and obtaining a filtering direction according to the gradient change characteristics of the channel value of the target area in each component image, and performing convolution filtering operation on the target area by using at least two filtering cores with different sizes according to the filtering direction to obtain a structure distribution matrix on the corresponding component image.
Specifically, in order to improve the feature extraction precision of a single seafood area and realize accurate recognition of seafood baking abnormality, the embodiment of the invention further extracts the structural features of the single seafood area, and is used for classifying the single seafood area and realizing recognition of seafood baking abnormality.
The process of obtaining the structural distribution matrix is as follows:
acquiring a Hessian matrix corresponding to each pixel point in the target area in each component image, acquiring a characteristic value of each Hessian matrix, and selecting the direction of a characteristic vector corresponding to the minimum characteristic value as the filtering direction of a corresponding pixel point; each filtering kernel performs convolution filtering on the pixel points according to the filtering direction corresponding to the pixel points to obtain a convolution value of each pixel point, and all the convolution values of each pixel point form a convolution vector; and taking the product of convolution vectors of any two pixel points as an inner product, and arranging the inner product to obtain the structure distribution matrix of the corresponding component image.
Taking the component image on the H channel of the target area a as an example, a Gabor filter is set, and a convolution filtering operation is performed on the component image on the H channel of the target area a, and in order to improve the extraction accuracy of the structure detail information, the embodiment of the invention sets the adaptive Gabor filter. For different single seafood areas, if a fixed filtering direction is set, the extraction of the structure detail information of some single seafood areas is not complete enough, so that the filtering direction of the Gabor filter is set adaptively according to the channel value of the pixel point.
The process of setting the filtering direction includes:
performing partial derivative calculation in different directions on each pixel point in the component image on the H channel based on the target area a to obtain a Hessian matrix of each pixel point
Figure SMS_45
Figure SMS_46
wherein ,
Figure SMS_47
is a pixel point atxThe second partial derivative of the direction is,
Figure SMS_48
is a pixel point atyThe second partial derivative of the direction is,
Figure SMS_49
is a pixel point atxyMixed partial derivatives of direction.
Among them, the hessian matrix is a well-known technology, and will not be described in detail here.
And selecting any one Hessian matrix as a target Hessian matrix, and acquiring the characteristic value of the target Hessian matrix. The characteristic value can be used for representing the channel value distribution change degree of the pixel point in the direction of the characteristic value corresponding to the characteristic vector of the pixel point, when the characteristic value is smaller, the channel value distribution change degree of the pixel point in the direction corresponding to the characteristic vector is gentler, the texture information of the pixel point is more sufficient, and the acquired structural characteristic of the pixel point is more accurate; when the feature value is larger, the larger the channel value distribution change degree of the pixel point in the direction corresponding to the feature vector is, the more insufficient the texture information of the pixel point is, and the more inaccurate the acquired structural feature of the pixel point is.
Therefore, the minimum eigenvalue of the target hessian matrix is selected, the direction of the eigenvector corresponding to the minimum eigenvalue is obtained, and the direction is used as the structural distribution trend of the corresponding pixel point, namely the direction of the texture information of the corresponding pixel point. Obtaining the angle of the direction relative to the horizontal
Figure SMS_50
Angle of rotation
Figure SMS_51
As the filtering direction of the corresponding pixel point
Figure SMS_52
And then, obtaining the filtering direction corresponding to each pixel point.
The filtering kernels with different sizes are set, 5 filtering kernels with different sizes are set in the embodiment of the invention, and an implementer can set the filtering kernels according to the actual situation. Based on the filtering direction, 5 filtering checks with different sizes are checked to carry out convolution filtering operation on each pixel point, each pixel point can obtain 5 convolution values, and the 5 convolution values of each pixel point form one convolution value
Figure SMS_53
And the convolution vector is used for representing the structural detail and texture detail features of the pixel points, acquiring the convolution vector of each pixel point, and taking the product of the convolution vectors of any two pixel points as an inner product, wherein the inner product represents the feature association degree between the convolution vectors corresponding to the two pixel points. Overall structural distribution of component images on H channel for obtaining target area aAnd (4) arranging the inner products to construct a structural distribution matrix of the component images on the H channel. The structure distribution matrix is specifically as follows:
Figure SMS_54
wherein ,
Figure SMS_57
a structural distribution matrix of the component images on the H channel which is the target area a,
Figure SMS_60
for the convolution vector corresponding to the first pixel point,
Figure SMS_69
for the convolution vector corresponding to the second pixel point,
Figure SMS_56
is a first
Figure SMS_71
The convolution vector corresponding to each pixel point,
Figure SMS_61
the total number of pixels in the target area a,
Figure SMS_65
is the inner product of the first pixel point and the first pixel point,
Figure SMS_63
is the inner product of the first pixel point and the second pixel point,
Figure SMS_70
is the first pixel point and the second pixel point
Figure SMS_55
The inner product corresponding to each pixel point,
Figure SMS_64
is as follows
Figure SMS_58
The inner product of each pixel point and the corresponding first pixel point,
Figure SMS_67
is a first
Figure SMS_59
The inner product of each pixel point and the corresponding second pixel point,
Figure SMS_66
is as follows
Figure SMS_62
Pixel point and the second
Figure SMS_68
The inner product corresponding to each pixel point.
The filtering kernel in the Gabor filter, the setting of other parameters, and the convolution filtering process are all known technologies, and are not described in detail here.
According to the structural distribution matrix of the component image on the H channel of the target area a
Figure SMS_72
The method of (1) obtaining a structural distribution matrix of the component image on the S channel of the target area a
Figure SMS_73
And a structural distribution matrix of the component images on the V channel of the target area a
Figure SMS_74
S5: and taking the color distribution matrix and the structure distribution matrix as feature matrices of the target area on corresponding component images.
Taking the target area a as an example, the color distribution matrix of the target area a
Figure SMS_75
Figure SMS_76
Figure SMS_77
Structural distribution matrix with target area a
Figure SMS_78
Figure SMS_79
Figure SMS_80
The target area a is a feature matrix of the serial numbers of the three channels H, S, V.
And acquiring the characteristic matrix of all the single seafood areas according to the method for acquiring the characteristic matrix of the target area a.
S6: and obtaining a classification index according to the characteristic matrix difference between the single seafood areas, and classifying all the single seafood areas according to the classification index to obtain at least two area categories.
Obtaining classification indexes of the two single seafood areas according to the characteristic matrix difference between the two single seafood areas, and clustering the single seafood areas according to the classification indexes by using a K-means clustering algorithm to obtain the area categories.
Specifically, in the embodiment of the invention, the K value in the K-means clustering algorithm is set to be 2, and an implementer can set the K value in an actual situation. And selecting a single seafood area as an initial setting area category center, wherein the initial setting area category center is an initial setting clustering center. Obtaining a classification index according to the characteristic matrix difference between the single seafood area and the initially set clustering center, clustering all the single seafood areas into corresponding area categories according to the classification index, and obtaining two clustered area categories.
The K-means clustering algorithm is a well-known technique, and will not be described in detail here.
Obtaining the classification index according to a classification index formula, wherein the classification index formula comprises:
Figure SMS_81
wherein ,
Figure SMS_84
h, S, V,
Figure SMS_89
for initial setting of the region class center M
Figure SMS_92
The color distribution matrix of the component images on the channel,
Figure SMS_82
for initial setting of the region class center M
Figure SMS_87
The structural distribution matrix of the component images on the channels,
Figure SMS_90
is as follows
Figure SMS_94
The first of said individual seafood areas
Figure SMS_85
The color distribution matrix of the component images on the channel,
Figure SMS_88
is as follows
Figure SMS_93
The first of said individual seafood areas
Figure SMS_95
The structural distribution matrix of the component images on the channels,
Figure SMS_83
is a first
Figure SMS_86
The classification index between each of the individual seafood areas and the area classification center M is initially set,
Figure SMS_91
is the L2 distance between the two matrices.
It should be noted that, when the classification index is smaller, it is indicated that the difference of the feature matrix between the single seafood area and the initially set clustering center is smaller, and the L2 distance is shorter, and the single seafood area belongs to the area category in which the initially set clustering center is located.
S7: and identifying the abnormal area type according to the similarity of the characteristic matrix between the area type center and the baked normal seafood area.
Specifically, the centers of the two finally clustered region categories are obtained, and the feature matrix of the centers is characterized as the feature matrix of each single seafood region in the corresponding region category. In order to accurately identify the seafood which is abnormally baked, the embodiment of the invention respectively calculates the similarity between the two centers and the area of the seafood which is normally baked.
Obtaining the similarity according to a similarity formula, wherein the similarity formula comprises:
Figure SMS_96
wherein ,
Figure SMS_99
h, S, V,
Figure SMS_103
is as follows
Figure SMS_108
(ii) the center of each of the area classes A
Figure SMS_100
The color distribution matrix of the component images on the channel,
Figure SMS_102
is a first
Figure SMS_107
(ii) the center of each of the area classes A
Figure SMS_110
The structural distribution matrix of the component images on the channels,
Figure SMS_97
for the area corresponding to the baked normal seafood
Figure SMS_101
The color distribution matrix of the component images on the channels,
Figure SMS_105
for the baking of the normal seafood area
Figure SMS_109
The structural distribution matrix of the component images on the channels,
Figure SMS_98
representing the pearson coefficients of the two matrices,
Figure SMS_104
is as follows
Figure SMS_106
Similarity between the single seafood area corresponding to each of the area category centers and the baked normal seafood area.
It should be noted that, when the pearson coefficient corresponding to the feature matrix between the area category center and the baked normal seafood area is larger, it is indicated that the difference of the feature matrix between the area category center and the baked normal seafood area is smaller, the similarity between the area category center and the baked normal seafood area is larger, and the area category where the area category center is located is more normal.
According to the method for obtaining the similarity, two are respectively obtainedSimilarity between individual region type center and baked normal seafood region
Figure SMS_111
And
Figure SMS_112
setting a similarity threshold, and when the similarity is greater than the similarity threshold, baking the seafood corresponding to the region category normally; and when the similarity is smaller than or equal to the similarity threshold, baking of the seafood corresponding to the region category is abnormal.
The implementer can set the similarity threshold according to the actual situation, in the embodiment of the invention, the similarity threshold is set to be 0.7, and the similarity is set
Figure SMS_115
And
Figure SMS_116
respectively comparing with similarity threshold value when similarity is high
Figure SMS_118
And
Figure SMS_114
when the values are all larger than the similarity threshold value, the similarity is explained
Figure SMS_117
And
Figure SMS_119
baking all the seafood in the corresponding area category normally; when the similarity is
Figure SMS_120
And
Figure SMS_113
when one of the areas is smaller than or equal to the similarity threshold, the seafood baking abnormity exists in the seafood images, wherein the area category corresponding to the similarity smaller than or equal to the similarity threshold is an abnormal areaA category. And processing all the seafood in the abnormal area category again or taking corresponding measures for treatment.
Thus, the abnormal seafood is accurately identified.
In summary, the seafood images which are baked are obtained in the embodiment of the invention, the seafood images comprise at least two single seafood areas, and the types of the seafood are consistent; converting the single seafood area to an HSV color space and obtaining a component image on each channel; selecting any one single seafood area as a target area; acquiring a color distribution matrix according to the channel value distribution characteristics of the target area on the component image; acquiring a structural distribution matrix according to the channel value gradient change characteristics of the target area in the component image; taking the color distribution matrix and the structure distribution matrix as characteristic matrices; obtaining a classification index according to the characteristic matrix of a single seafood area, and obtaining an area category according to the classification index; and identifying the abnormal region type according to the similarity between the region type and the baked normal seafood region, thereby improving the accuracy and efficiency of seafood baking abnormality identification.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. The processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.

Claims (7)

1. A seafood baking abnormality recognition method is characterized by comprising the following steps:
obtaining a baked seafood image, wherein the seafood image comprises at least two single seafood areas and the seafood types are consistent;
converting the single seafood area into an HSV color space to obtain a component image on each channel in the HSV color space; selecting any one of the single seafood areas as a target area;
acquiring a color distribution matrix of a corresponding component image according to the channel value distribution characteristics of the target area on each component image;
obtaining a filtering direction according to the gradient change characteristics of the channel value of the target area in each component image, and performing convolution filtering operation on the target area by using at least two filtering cores with different sizes according to the filtering direction to obtain a structure distribution matrix on the corresponding component image;
taking the color distribution matrix and the structure distribution matrix as feature matrices of the target area on corresponding component images;
obtaining a classification index according to the characteristic matrix difference between the single seafood areas, and classifying all the single seafood areas according to the classification index to obtain at least two area categories;
and identifying the abnormal area type according to the similarity of the characteristic matrix between the area type center and the baked normal seafood area.
2. The seafood baking abnormality recognition method of claim 1, wherein the acquisition method of the color distribution matrix includes:
fitting the channel value of each pixel point on the target area in each component image to obtain a Gaussian mixture model, and acquiring the characteristic parameters of each sub-Gaussian model in the Gaussian mixture model; the characteristic parameters include expectation, variance, and model weight; and arranging vectors formed by the characteristic parameters of all the sub-Gaussian models to obtain the color distribution matrix of the corresponding component image.
3. The seafood baking anomaly identification method as claimed in claim 1, wherein the acquisition method of the structure distribution matrix comprises:
acquiring a Hessian matrix corresponding to each pixel point in the target area in each component image, acquiring a characteristic value of each Hessian matrix, and selecting the direction of a characteristic vector corresponding to the minimum characteristic value as the filtering direction of a corresponding pixel point;
each filtering kernel performs convolution filtering on the pixel points according to the filtering direction corresponding to the pixel points to obtain a convolution value of each pixel point, and all the convolution values of each pixel point form a convolution vector; and taking the product of convolution vectors of any two pixel points as an inner product, and arranging the inner product to obtain the structure distribution matrix of the corresponding component image.
4. The seafood baking abnormality recognition method as claimed in claim 1, wherein said region category acquisition method comprises:
and clustering the single seafood area according to the classification index by using a K-means clustering algorithm to obtain the area category.
5. The seafood baking abnormality recognition method of claim 4, wherein the obtaining method of the classification index comprises:
obtaining the classification index according to a classification index formula, wherein the classification index formula comprises:
Figure QLYQS_1
wherein ,
Figure QLYQS_5
h, S, V,
Figure QLYQS_9
for initial setting of the region class center M
Figure QLYQS_13
The color distribution matrix of the component images on the channel,
Figure QLYQS_3
for initial setting of the region class center M
Figure QLYQS_6
The structural distribution matrix of the component images on the channels,
Figure QLYQS_10
is as follows
Figure QLYQS_14
The first of said individual seafood areas
Figure QLYQS_2
The color distribution matrix of the component images on the channel,
Figure QLYQS_7
is as follows
Figure QLYQS_12
The first of said individual seafood areas
Figure QLYQS_15
The structural distribution matrix of the component images on the channels,
Figure QLYQS_4
is as follows
Figure QLYQS_8
The classification index between each of the individual seafood areas and the area classification center M is initially set,
Figure QLYQS_11
is the L2 distance between the two matrices.
6. The seafood baking abnormality recognition method of claim 1, wherein the acquisition method of the similarity includes:
obtaining the similarity according to a similarity formula, wherein the similarity formula comprises:
Figure QLYQS_16
wherein ,
Figure QLYQS_18
h, S, V,
Figure QLYQS_21
is as follows
Figure QLYQS_25
(ii) the center of each of the area classes A
Figure QLYQS_19
The color distribution matrix of the component images on the channel,
Figure QLYQS_23
is as follows
Figure QLYQS_28
(ii) the center of each of the area classes A
Figure QLYQS_29
The structural distribution matrix of the component images on the channels,
Figure QLYQS_17
for the area corresponding to the baked normal seafood
Figure QLYQS_24
The color distribution matrix of the component images on the channels,
Figure QLYQS_27
for the baking of the normal seafood area
Figure QLYQS_30
The structural distribution matrix of the component images on the channels,
Figure QLYQS_20
representing the pearson coefficients of the two matrices,
Figure QLYQS_22
is a first
Figure QLYQS_26
Similarity between the single seafood area corresponding to each of the area category centers and the baked normal seafood area.
7. The seafood baking abnormality recognition method of claim 1, wherein said method of recognizing the abnormality region category based on said similarity comprises:
setting a similarity threshold, and when the similarity is greater than the similarity threshold, baking the seafood corresponding to the region category normally; and when the similarity is smaller than or equal to the similarity threshold, baking of the seafood corresponding to the region category is abnormal.
CN202310064897.3A 2023-02-06 2023-02-06 Seafood baking abnormality identification method Active CN115797345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310064897.3A CN115797345B (en) 2023-02-06 2023-02-06 Seafood baking abnormality identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310064897.3A CN115797345B (en) 2023-02-06 2023-02-06 Seafood baking abnormality identification method

Publications (2)

Publication Number Publication Date
CN115797345A true CN115797345A (en) 2023-03-14
CN115797345B CN115797345B (en) 2023-04-25

Family

ID=85429921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310064897.3A Active CN115797345B (en) 2023-02-06 2023-02-06 Seafood baking abnormality identification method

Country Status (1)

Country Link
CN (1) CN115797345B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101665210A (en) * 2008-09-03 2010-03-10 株式会社日立制作所 Image recognition device
CN104050645A (en) * 2014-06-23 2014-09-17 小米科技有限责任公司 Image processing method and device
WO2019001070A1 (en) * 2017-06-28 2019-01-03 浙江大学 Adjacency matrix-based connection information organization system, image feature extraction system, and image classification system and method
EP3796210A1 (en) * 2019-09-19 2021-03-24 Siemens Healthcare GmbH Spatial distribution of pathological image patterns in 3d image data
CN113920528A (en) * 2020-07-08 2022-01-11 顺丰科技有限公司 Subject object detection method and device, computer equipment and storage medium
CN114334013A (en) * 2021-12-31 2022-04-12 武汉大学 Single cell clustering method, device, equipment and readable storage medium
CN114549522A (en) * 2022-04-24 2022-05-27 启东新朋莱纺织科技有限公司 Textile quality detection method based on target detection
WO2022142219A1 (en) * 2020-12-31 2022-07-07 上海商汤智能科技有限公司 Image background processing method, apparatus, electronic device, and storage medium
CN115512123A (en) * 2022-10-19 2022-12-23 上海第二工业大学 Multi-period key growth characteristic extraction and time period classification method for hypsizygus marmoreus
CN115661757A (en) * 2022-11-14 2023-01-31 北京京港地铁有限公司 Automatic detection method for pantograph arcing
CN115660964A (en) * 2022-08-18 2023-01-31 贵州大学 Nighttime road image enhancement method based on threshold partition weighted brightness component

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101665210A (en) * 2008-09-03 2010-03-10 株式会社日立制作所 Image recognition device
CN104050645A (en) * 2014-06-23 2014-09-17 小米科技有限责任公司 Image processing method and device
WO2019001070A1 (en) * 2017-06-28 2019-01-03 浙江大学 Adjacency matrix-based connection information organization system, image feature extraction system, and image classification system and method
EP3796210A1 (en) * 2019-09-19 2021-03-24 Siemens Healthcare GmbH Spatial distribution of pathological image patterns in 3d image data
CN113920528A (en) * 2020-07-08 2022-01-11 顺丰科技有限公司 Subject object detection method and device, computer equipment and storage medium
WO2022142219A1 (en) * 2020-12-31 2022-07-07 上海商汤智能科技有限公司 Image background processing method, apparatus, electronic device, and storage medium
CN114334013A (en) * 2021-12-31 2022-04-12 武汉大学 Single cell clustering method, device, equipment and readable storage medium
CN114549522A (en) * 2022-04-24 2022-05-27 启东新朋莱纺织科技有限公司 Textile quality detection method based on target detection
CN115660964A (en) * 2022-08-18 2023-01-31 贵州大学 Nighttime road image enhancement method based on threshold partition weighted brightness component
CN115512123A (en) * 2022-10-19 2022-12-23 上海第二工业大学 Multi-period key growth characteristic extraction and time period classification method for hypsizygus marmoreus
CN115661757A (en) * 2022-11-14 2023-01-31 北京京港地铁有限公司 Automatic detection method for pantograph arcing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHUANG WANG ETAL.: "Abnormal object detection and recognition in the complex construction site via cloud computing" *
山毓俊: "证书分拣盖章机器人图像识别的研究与实现" *

Also Published As

Publication number Publication date
CN115797345B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
Waghmare et al. Detection and classification of diseases of grape plant using opposite colour local binary pattern feature and machine learning for automated decision support system
US8774503B2 (en) Method for color feature extraction
CN102117413B (en) Method for automatically filtering defective image based on multilayer feature
CN113808138B (en) Artificial intelligence-based wire and cable surface defect detection method
CN109829914A (en) The method and apparatus of testing product defect
CN106778517A (en) A kind of monitor video sequence image vehicle knows method for distinguishing again
CN105320970B (en) A kind of potato disease diagnostic device, diagnostic system and diagnostic method
Sidehabi et al. Classification on passion fruit's ripeness using K-means clustering and artificial neural network
Agrawal et al. Survey on image segmentation techniques and color models
CN115994907B (en) Intelligent processing system and method for comprehensive information of food detection mechanism
CN111259756A (en) Pedestrian re-identification method based on local high-frequency features and mixed metric learning
Angel et al. Assessing the state of maturation of the pineapple in its perolera variety using computer vision techniques
CN115082451A (en) Stainless steel soup ladle defect detection method based on image processing
US8498496B2 (en) Method and apparatus for filtering red and/or golden eye artifacts
CN115205194B (en) Image processing-based method, system and device for detecting coverage rate of armyworm plate
CN115272350A (en) Method for detecting production quality of computer PCB mainboard
Halac et al. Almonds classification using supervised learning methods
CN117152159B (en) Method and system for detecting printing flaws of complex cloth
CN108875572B (en) Pedestrian re-identification method based on background suppression
CN115082449B (en) Electronic component defect detection method
CN115797345B (en) Seafood baking abnormality identification method
Shweta et al. External feature based quality evaluation of Tomato using K-means clustering and support vector classification
CN110348530B (en) Method for identifying lipstick number
CN114494405A (en) Strawberry shape estimation and automatic grading method and device and computer storage medium
CN113505757A (en) Smoke and fire detection convolution network and method based on static analytic features and electronic equipment

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