CN115797345A - Seafood baking abnormity identification method - Google Patents
Seafood baking abnormity identification method Download PDFInfo
- 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
Links
- 235000014102 seafood Nutrition 0.000 title claims abstract description 179
- 238000000034 method Methods 0.000 title claims abstract description 51
- 239000011159 matrix material Substances 0.000 claims abstract description 105
- 230000002159 abnormal effect Effects 0.000 claims abstract description 17
- 230000005856 abnormality Effects 0.000 claims abstract description 17
- 238000001914 filtration Methods 0.000 claims description 42
- 239000013598 vector Substances 0.000 claims description 23
- 239000000203 mixture Substances 0.000 claims description 9
- 238000003064 k means clustering Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 description 6
- 230000011218 segmentation Effects 0.000 description 5
- 238000001514 detection method Methods 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 238000003709 image segmentation Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000001035 drying Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 241000238366 Cephalopoda Species 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- 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
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing 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
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:
wherein ,h, S, V,for initial setting of the region class center MThe color distribution matrix of the component images on the channel,for initial setting of the region class center MThe structural distribution matrix of the component images on the channels,is as followsThe first of said individual seafood areasThe color distribution matrix of the component images on the channel,is as followsThe first of said individual seafood areasThe structural distribution matrix of the component images on the channels,is a firstThe classification index between each of the individual seafood areas and the area classification center M is initially set,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:
wherein ,h, S, V,is as follows(ii) the center of each of the area classes AThe color distribution matrix of the component images on the channel,is as follows(ii) the center of each of the area classes AThe structural distribution matrix of the component images on the channels,for the area corresponding to the baked normal seafoodThe color distribution matrix of the component images on the channel,for the baking of the normal seafood areaThe structural distribution matrix of the component images on the channels,representing the pearson coefficients of the two matrices,is as followsCorresponding 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:
wherein ,is the color distribution matrix of the component images on the H channel of the target area a,as expected for the first sub-gaussian model,is the variance of the first sub-gaussian model,is the model weight of the first sub-gaussian model,is as followsThe expectation of a sub-gaussian model is,is as followsThe variance of the sub-gaussian models is,is as followsModel 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 aObtaining a color distribution matrix of the component image on the S channel of the target area aAnd a color distribution matrix of the component images on the V channel of the target area a。
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:
wherein ,is a pixel point atxThe second partial derivative of the direction is,is a pixel point atyThe second partial derivative of the direction is,is a pixel point atx、yMixed 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 horizontalAngle of rotationAs the filtering direction of the corresponding pixel pointAnd 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 valueAnd 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:
wherein ,a structural distribution matrix of the component images on the H channel which is the target area a,for the convolution vector corresponding to the first pixel point,for the convolution vector corresponding to the second pixel point,is a firstThe convolution vector corresponding to each pixel point,the total number of pixels in the target area a,is the inner product of the first pixel point and the first pixel point,is the inner product of the first pixel point and the second pixel point,is the first pixel point and the second pixel pointThe inner product corresponding to each pixel point,is as followsThe inner product of each pixel point and the corresponding first pixel point,is a firstThe inner product of each pixel point and the corresponding second pixel point,is as followsPixel point and the secondThe 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 aThe method of (1) obtaining a structural distribution matrix of the component image on the S channel of the target area aAnd a structural distribution matrix of the component images on the V channel of the target area a。
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、、Structural distribution matrix with target area a、、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:
wherein ,h, S, V,for initial setting of the region class center MThe color distribution matrix of the component images on the channel,for initial setting of the region class center MThe structural distribution matrix of the component images on the channels,is as followsThe first of said individual seafood areasThe color distribution matrix of the component images on the channel,is as followsThe first of said individual seafood areasThe structural distribution matrix of the component images on the channels,is a firstThe classification index between each of the individual seafood areas and the area classification center M is initially set,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:
wherein ,h, S, V,is as follows(ii) the center of each of the area classes AThe color distribution matrix of the component images on the channel,is a first(ii) the center of each of the area classes AThe structural distribution matrix of the component images on the channels,for the area corresponding to the baked normal seafoodThe color distribution matrix of the component images on the channels,for the baking of the normal seafood areaThe structural distribution matrix of the component images on the channels,representing the pearson coefficients of the two matrices,is as followsSimilarity 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 regionAnd。
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 setAndrespectively comparing with similarity threshold value when similarity is highAndwhen the values are all larger than the similarity threshold value, the similarity is explainedAndbaking all the seafood in the corresponding area category normally; when the similarity isAndwhen 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:
wherein ,h, S, V,for initial setting of the region class center MThe color distribution matrix of the component images on the channel,for initial setting of the region class center MThe structural distribution matrix of the component images on the channels,is as followsThe first of said individual seafood areasThe color distribution matrix of the component images on the channel,is as followsThe first of said individual seafood areasThe structural distribution matrix of the component images on the channels,is as followsThe classification index between each of the individual seafood areas and the area classification center M is initially set,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:
wherein ,h, S, V,is as follows(ii) the center of each of the area classes AThe color distribution matrix of the component images on the channel,is as follows(ii) the center of each of the area classes AThe structural distribution matrix of the component images on the channels,for the area corresponding to the baked normal seafoodThe color distribution matrix of the component images on the channels,for the baking of the normal seafood areaThe structural distribution matrix of the component images on the channels,representing the pearson coefficients of the two matrices,is a firstSimilarity 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.
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)
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 |
-
2023
- 2023-02-06 CN CN202310064897.3A patent/CN115797345B/en active Active
Patent Citations (11)
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)
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 |