Product identification method and system based on fuzzy motion image
By collecting and processing fuzzy moving images of fruit products, generating clear feature images, and using preset recognition models for identification, the problem of low recognition accuracy in the prior art is solved, and efficient and accurate fruit product recognition is achieved.
Patent Information
- Application Number
- CN202510435649.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art relies on manual sorting and original fuzzy image recognition in fruit product recognition, resulting in low recognition accuracy and cannot meet the fruit industry's demand for efficient recognition.
By collecting fuzzy moving images of fruit products at different moments, identifying and performing abnormal processing, combining image enhancement processing and feature fusion algorithms, clear fruit product feature images are generated, and finally accurately recognized through the preset recognition model.
It improves the accuracy of fruit product recognition, reduces the interference of image abnormalities on recognition, enhances image quality and feature expressivity, and achieves accurate type prediction of fruit product.
Smart Images

Figure CN119964150A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a product recognition method and system based on blurred motion images. Background Art
[0002] With the rapid development of the fruit industry, the fruit industry has become an important pillar of the agricultural and food industries. While the types and quantities of fruit products are constantly increasing, higher requirements are also put forward for the sorting, management, and production of fruit products. The premise of sorting, management, and production of fruit products is to realize the identification of fruit products. At the same time, in the fields of smart agriculture, unmanned retail, and cold chain logistics related to the fruit industry, it is necessary to further promote industrial upgrading through the identification of fruit products.
[0003] At present, the identification of fruit products is mostly done through manual identification and sorting. This method is prone to low accuracy in fruit product identification when facing the increasing number of fruit types and quantities, which is not conducive to the further development of the fruit industry. Therefore, there are also methods that use high-speed motion cameras to collect fruit images and then identify the fruits. However, such original images are blurred and unclear, resulting in inaccurate identification of fruit products. Therefore, there is an urgent need for a product identification method and system based on blurred motion images to solve the defects of the existing technology. Summary of the invention
[0004] The present invention aims to provide a product recognition method and system based on blurred motion images to solve the above technical problems. By performing exception processing, image enhancement and image fusion on blurred motion images of fruit products at different times, the recognition accuracy of fruit products is improved.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a product recognition method based on blurred motion images, comprising: Collecting a plurality of blurred motion images of the fruit product at different times, determining an abnormal area of the blurred motion image based on pixel point information of the blurred motion image and the acquisition time, and performing abnormal processing on the abnormal area to obtain a first blurred motion image corresponding to each blurred motion image; Acquire an image enhancement processing model, and perform image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images; According to a preset image feature fusion algorithm, the clear fruit product image is fused to determine a feature image of the fruit product; The characteristic image of the fruit product is input into a preset fruit product recognition model, and the fruit product is recognized in combination with a preset product recognition algorithm to determine the type information of the fruit product.
[0006] It can be understood that, compared with the prior art, the present invention can accurately identify the anomalies of the blurred motion images caused by the external environment by collecting several blurred motion images of fruit products at different times, and then identifying the abnormal areas of the blurred motion images and performing abnormal processing, thereby reducing the interference of image anomalies on subsequent fruit product recognition. Then, by performing image enhancement processing on the first blurred motion image, the image quality of the first blurred motion image can be enhanced, thereby improving the expressiveness of the features in the clear fruit product image; then, by fusing the clear fruit product images at different times, the feature information in different clear fruit product images can be integrated, enriching the feature richness of the feature image, so that the feature information of the fruit product in the process of transmission, production, etc. can be reflected through the feature image, avoiding the information loss caused by a single image, and then the type information of the fruit product is identified through a preset fruit product recognition model, so that the fruit product recognition model can effectively perform accurate type prediction based on the feature image, thereby realizing accurate recognition of the fruit product.
[0007] As a preferred solution, the method of determining the abnormal area of the blurred motion image based on the pixel point information and the acquisition time of the blurred motion image, and performing abnormal processing on the abnormal area to obtain the first blurred motion image corresponding to each blurred motion image specifically includes: Constructing a pixel point coordinate system of each blurred motion image, and determining the coordinates of each pixel point in each blurred motion image based on the pixel point coordinate system, wherein the pixel point coordinates are a two-dimensional coordinate system; Acquire pixel information of each blurred motion image, wherein the pixel information of the blurred motion image includes: a color channel value; Performing weighted summation on the color channel values of each blurred motion image to determine the brightness value of each pixel in each blurred motion image, and determining the brightness value standard deviation of each blurred motion image based on the brightness value of each pixel; Compare the brightness values of the pixels with the same coordinates in the blurred motion image corresponding to the previous acquisition moment and the blurred motion image corresponding to the current acquisition moment in sequence to obtain a brightness difference value. If the brightness difference value is greater than the standard deviation of the brightness value of the blurred motion image corresponding to the current moment, take the pixel with the same coordinates in the blurred motion image corresponding to the current moment as an abnormal coordinate point. After all the pixels in the blurred motion image corresponding to the current moment are compared, take all the abnormal coordinate points in the blurred motion image corresponding to the current moment as the abnormal area of the blurred motion image corresponding to the current moment, and then determine the abnormal area of each blurred motion image. Obtain an exception processing pixel window, modify the center point of the exception processing pixel window to the exception coordinate point, calculate the window brightness average of all pixels in the exception processing pixel window, and replace the brightness value of the exception coordinate point with the window brightness average, then update the center point of the exception processing pixel window until the brightness values of all exception coordinate points are replaced, complete the exception processing of the abnormal area, and obtain the first blurred motion image corresponding to each of the blurred motion images.
[0008] This preferred solution can achieve accurate spatial alignment of blurred motion image pixels at different times by constructing a two-dimensional pixel coordinate system, thereby eliminating inaccurate subsequent abnormal area detection caused by pixel offset; the standard deviation of the brightness value is used as a dynamic threshold to replace the traditional fixed threshold, so as to accurately reflect the brightness fluctuation characteristics of the blurred motion image, and then dynamically adjust the abnormal area detection threshold based on the adaptability of the external environment, thereby improving the accuracy of abnormal area detection; through the abnormal processing pixel point window for brightness averaging, it can not only use local context information to repair the abnormal area, but also avoid excessive repair caused by overbalancing, effectively increasing the image accuracy and feature expression of the first blurred motion image, providing an accurate image basis for subsequent fruit recognition, thereby improving the recognition accuracy of fruit products.
[0009] As a preferred solution, the acquiring of the image enhancement processing model and performing image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images specifically includes: Acquire an image enhancement processing model, wherein the image enhancement processing model includes: a first convolution layer, a group convolution layer, a normalization layer, a first point convolution layer, a second point convolution layer, and a second convolution layer; Inputting each of the first blurred motion images into the first convolution layer, adjusting the number of channels of each of the first blurred motion images through the first convolution layer, and then extracting low-order features of each of the first blurred motion images to obtain a plurality of second blurred motion images; Inputting each of the second blurred motion images into the grouped convolution layer, and grouping the channels of each of the second blurred motion images through the grouped convolution layer to obtain a plurality of third blurred motion images; Inputting each of the third blurred motion images into the normalization layer, and performing normalization processing on the feature map of each channel in each of the third blurred motion images through the normalization layer to obtain a plurality of fourth blurred motion images; Input each of the fourth blurred motion images into the first point convolution layer, perform feature dimension upscaling processing on each of the fourth blurred motion images through the first point convolution layer, and perform nonlinear processing on each of the fourth blurred motion images through a preset ReLU activation function, so as to obtain a plurality of fifth blurred motion images; Inputting each of the fifth blurred motion images into the second point convolution layer, and performing feature dimension reduction processing on each of the fifth blurred motion images through the second point convolution layer to obtain a plurality of sixth blurred motion images; Inputting each of the sixth blurred motion images into the second convolution layer, and adjusting the number of channels of each of the sixth blurred motion images to the number of channels of the corresponding first blurred motion image through the second convolution layer, to obtain a plurality of seventh blurred motion images; Performing residual connection processing on each of the seventh blurred motion images and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image; The clear motion image corresponding to each first blurred motion image is used as the clear fruit product image corresponding to each first blurred motion image.
[0010] This preferred solution can effectively restore the contour distortion and surface texture loss caused by motion blur through the connection design of the convolution layer and the normalization layer of the image enhancement processing model, thereby achieving efficient and high-precision blurred image restoration. Through multiple convolution layers, the noise characteristics in the first blurred motion image can be suppressed, thereby highlighting the core features in the first blurred motion image that are closely related to the fruit products, providing an accurate image basis for subsequent fruit recognition, thereby improving the recognition accuracy of fruit products.
[0011] As a preferred solution, the clear fruit product image is fused according to a preset image feature fusion algorithm to determine the feature image of the fruit product, specifically including: Converting the color space of each clear fruit product image into a grayscale space to obtain a grayscale clear fruit product image corresponding to each clear fruit product image; Obtaining the grayscale value of each pixel in each grayscale clear fruit product image, and calculating the gradient value of each pixel in each grayscale clear fruit product image according to a preset gradient algorithm; Obtaining a gradient value screening interval, and screening the pixel points of each grayscale clear fruit product image according to the gradient value screening interval and the gradient value of each pixel point in each grayscale clear fruit product image to obtain edge pixel points of each grayscale clear fruit product image; Constructing an edge feature image of each grayscale clear fruit product image based on edge pixel points of each grayscale clear fruit product image; Performing denoising on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image; All edge denoised feature images are processed with residual connections to obtain feature images of fruit products.
[0012] This preferred solution can reduce the subsequent calculation complexity and avoid errors caused by excessive calculation complexity by converting color space into grayscale space; by constructing edge feature images of grayscale clear fruit product images through gradient values, the edges and backgrounds in the grayscale clear fruit product images can be effectively distinguished; and by denoising the edge feature images, the feature expression ability of the edge denoised feature images can be improved, thereby improving the accuracy of subsequent fruit recognition; by performing residual connection processing on all edge denoised feature images, the feature images can fully reflect different image information at multiple acquisition times, effectively integrating local edge and global contour features, improving the semantic integrity of the feature images, and improving the recognition accuracy of fruit products.
[0013] As a preferred solution, the grayscale value of each pixel in each grayscale clear fruit product image is obtained, and the gradient value of each pixel in each grayscale clear fruit product image is calculated according to a preset gradient algorithm, specifically including: Obtain the gray value, horizontal gradient calculation matrix and vertical gradient calculation matrix of each pixel in each gray clear fruit product image; Performing a convolution operation on the grayscale value of each pixel and the horizontal gradient calculation matrix to obtain the horizontal gradient value of each pixel; Performing a convolution operation on the grayscale value of each pixel and the vertical gradient calculation matrix to obtain the vertical gradient value of each pixel; The horizontal gradient value and the vertical gradient value of each pixel are weighted summed to determine the gradient value of each pixel.
[0014] This preferred solution calculates the gradient values of pixels in the horizontal direction and the vertical direction respectively through the horizontal gradient calculation matrix and the vertical gradient calculation matrix, which can accurately capture the directional texture features in the grayscale clear fruit product image of the fruit product; through the weighted summation of the horizontal gradient value and the vertical gradient value, the feature imbalance caused by the gradient value calculation in a single direction is avoided, thereby improving the feature accuracy of the edge feature image and improving the recognition accuracy of the fruit product.
[0015] As a preferred solution, performing denoising on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image specifically includes: Get the noise sliding window; Sliding the noise sliding window on each of the edge feature images, calculating the median of the grayscale values of the pixels in the noise sliding window after each sliding, and using the median as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the edge feature images, and obtaining a first edge feature image corresponding to each of the edge feature images; Generate a Gaussian convolution kernel in combination with a preset Gaussian function according to the size of the noise sliding window and the preset Gaussian standard deviation; The noise sliding window is slid on each of the first edge feature images, and the grayscale values of all pixels in the noise sliding window are weightedly calculated based on the Gaussian convolution kernel to obtain a weighted grayscale value, and the weighted grayscale value is used as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the first edge feature images, and an edge denoising feature image corresponding to each of the edge feature images is obtained.
[0016] This preferred solution can effectively suppress the noise in the image through the combination of median filtering and Gaussian filtering. The sliding window processing of the median filter can better retain the edge sharpness in the image, and combined with the smoothing effect of the Gaussian filter, it can significantly improve the feature expressiveness of the edge denoising feature image, thereby improving the accuracy of subsequent fruit product recognition.
[0017] As a preferred solution, the feature image of the fruit product is input into a preset fruit product recognition model, and the fruit product is recognized in combination with a preset product recognition algorithm to determine the type information of the fruit product, specifically including: Performing size transformation and normalization processing on the characteristic image of the fruit product according to a preset image preprocessing method to obtain the image of the fruit product to be identified; The preset fruit product recognition model includes several neural network models; Input the image to be identified into each of the neural network models respectively, and obtain the predicted category label output by each of the neural network models; Counting the predicted category labels, and selecting the predicted category labels with the largest number as the category labels of the fruit products; A preset fruit product database is queried according to the category label to determine the category information of the fruit product.
[0018] This preferred solution uses different neural network models to identify fruit products, which can fully consider the differences between different models, and can fully integrate the advantages of multiple models by counting and screening the predicted category labels, thereby improving the accuracy of fruit product identification.
[0019] Accordingly, an embodiment of the present invention provides a product recognition system based on blurred motion images, comprising: an image abnormality processing module, an image enhancement processing module, an image fusion module and a product recognition module; The image abnormality processing module is used to collect a number of blurred motion images of fruit products at different times, determine the abnormal area of the blurred motion image based on the pixel point information of the blurred motion image and the collection time, and perform abnormal processing on the abnormal area to obtain a first blurred motion image corresponding to each blurred motion image; The image enhancement processing module is used to obtain an image enhancement processing model, and perform image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images; The image fusion module is used to perform image fusion on the clear fruit product image according to a preset image feature fusion algorithm to determine the feature image of the fruit product; The product recognition module is used to input the characteristic image of the fruit product into a preset fruit product recognition model, and recognize the fruit product in combination with a preset product recognition algorithm to determine the type information of the fruit product.
[0020] As a preferred solution, the image abnormality processing module includes: an image abnormality processing unit; The image anomaly processing unit is used to construct a pixel point coordinate system of each blurred motion image, and determine the coordinates of each pixel point in each blurred motion image based on the pixel point coordinate system, wherein the pixel point coordinates are a two-dimensional coordinate system; Acquire pixel information of each blurred motion image, wherein the pixel information of the blurred motion image includes: a color channel value; Performing weighted summation on the color channel values of each blurred motion image to determine the brightness value of each pixel in each blurred motion image, and determining the brightness value standard deviation of each blurred motion image based on the brightness value of each pixel; Compare the brightness values of the pixels with the same coordinates in the blurred motion image corresponding to the previous acquisition moment and the blurred motion image corresponding to the current acquisition moment in sequence to obtain a brightness difference value. If the brightness difference value is greater than the standard deviation of the brightness value of the blurred motion image corresponding to the current moment, take the pixel with the same coordinates in the blurred motion image corresponding to the current moment as an abnormal coordinate point. After all the pixels in the blurred motion image corresponding to the current moment are compared, take all the abnormal coordinate points in the blurred motion image corresponding to the current moment as the abnormal area of the blurred motion image corresponding to the current moment, and then determine the abnormal area of each blurred motion image. Obtain an exception processing pixel window, modify the center point of the exception processing pixel window to the exception coordinate point, calculate the window brightness average of all pixels in the exception processing pixel window, and replace the brightness value of the exception coordinate point with the window brightness average, then update the center point of the exception processing pixel window until the brightness values of all exception coordinate points are replaced, complete the exception processing of the abnormal area, and obtain the first blurred motion image corresponding to each of the blurred motion images.
[0021] As a preferred solution, the image enhancement processing module includes: an image enhancement processing unit; The image enhancement processing unit is used to obtain an image enhancement processing model, and the image enhancement processing model includes: a first convolution layer, a group convolution layer, a normalization layer, a first point convolution layer, a second point convolution layer and a second convolution layer; Inputting each of the first blurred motion images into the first convolution layer, adjusting the number of channels of each of the first blurred motion images through the first convolution layer, and then extracting low-order features of each of the first blurred motion images to obtain a plurality of second blurred motion images; Inputting each of the second blurred motion images into the grouped convolution layer, and grouping the channels of each of the second blurred motion images through the grouped convolution layer to obtain a plurality of third blurred motion images; Inputting each of the third blurred motion images into the normalization layer, and performing normalization processing on the feature map of each channel in each of the third blurred motion images through the normalization layer to obtain a plurality of fourth blurred motion images; Input each of the fourth blurred motion images into the first point convolution layer, perform feature dimension upscaling processing on each of the fourth blurred motion images through the first point convolution layer, and perform nonlinear processing on each of the fourth blurred motion images through a preset ReLU activation function, so as to obtain a plurality of fifth blurred motion images; Inputting each of the fifth blurred motion images into the second point convolution layer, and performing feature dimension reduction processing on each of the fifth blurred motion images through the second point convolution layer to obtain a plurality of sixth blurred motion images; Inputting each of the sixth blurred motion images into the second convolution layer, and adjusting the number of channels of each of the sixth blurred motion images to the number of channels of the corresponding first blurred motion image through the second convolution layer, to obtain a plurality of seventh blurred motion images; Performing residual connection processing on each of the seventh blurred motion images and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image; The clear motion image corresponding to each first blurred motion image is used as the clear fruit product image corresponding to each first blurred motion image.
[0022] It can be understood that, compared with the prior art, the system can accurately identify the anomalies of the blurred motion images caused by the external environment by collecting several blurred motion images of fruit products at different times, and then identifying the abnormal areas of the blurred motion images and performing abnormal processing, thereby reducing the interference of image anomalies on subsequent fruit product recognition. Then, by performing image enhancement processing on the first blurred motion image, the image quality of the first blurred motion image can be enhanced, thereby improving the expressiveness of the features in the clear fruit product image; then, by fusing the clear fruit product images at different times, the feature information in different clear fruit product images can be integrated, enriching the feature richness of the feature image, so that the feature information of the fruit product in the transmission, production and other processes can be reflected through the feature image, avoiding the information loss caused by a single image, and then identifying the type information of the fruit product through a preset fruit product recognition model, so that the fruit product recognition model can effectively make accurate type prediction based on the feature image, thereby realizing accurate recognition of the fruit product. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 : A flowchart of a method for identifying a product based on blurred motion images provided by an embodiment of the present invention; Figure 2 : A specific connection diagram of an image enhancement processing model provided by an embodiment of the present invention; Figure 3 : A structural schematic diagram of a product recognition system based on fuzzy motion images provided by an embodiment of the present invention; Among them, 201: image abnormality processing module; 202: image enhancement processing module; 203: image fusion module; 204: product identification module. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Embodiment 1 Please refer to Figure 1 , is a flowchart of a product recognition method based on blurred motion images provided by an embodiment of the present invention, including steps S101 to S104.
[0026] Step S101: collecting a number of blurred motion images of fruit products at different times, determining abnormal areas of the blurred motion images based on pixel information of the blurred motion images and the collection time, and performing abnormal processing on the abnormal areas to obtain a first blurred motion image corresponding to each blurred motion image.
[0027] In an optional embodiment, several blurred motion images of fruit products at different times are collected. This embodiment takes the movement of fruit products on a conveyor belt as an example. High-speed cameras are arranged around the conveyor belt, and multiple blurred motion images of fruit products are continuously captured by the high-speed cameras. The shooting time of each blurred motion image is recorded, and the shooting time is recorded as the collection time of the blurred motion image. For the same fruit product, this embodiment collects 5 blurred motion images through the high-speed camera. Since they are captured by the same high-speed camera, these blurred motion images have the same size and resolution.
[0028] In this embodiment, the abnormal area of the blurred motion image is determined based on the pixel point information and the acquisition time of the blurred motion image, and the abnormal area is processed abnormally to obtain the first blurred motion image corresponding to each blurred motion image, which specifically includes: Constructing a pixel point coordinate system of each blurred motion image, and determining the coordinates of each pixel point in each blurred motion image based on the pixel point coordinate system, wherein the pixel point coordinates are a two-dimensional coordinate system; Acquire pixel information of each blurred motion image, wherein the pixel information of the blurred motion image includes: a color channel value; Performing weighted summation on the color channel values of each blurred motion image to determine the brightness value of each pixel in each blurred motion image, and determining the brightness value standard deviation of each blurred motion image based on the brightness value of each pixel; Compare the brightness values of the pixels with the same coordinates in the blurred motion image corresponding to the previous acquisition moment and the blurred motion image corresponding to the current acquisition moment in sequence to obtain a brightness difference value. If the brightness difference value is greater than the standard deviation of the brightness value of the blurred motion image corresponding to the current moment, take the pixel with the same coordinates in the blurred motion image corresponding to the current moment as an abnormal coordinate point. After all the pixels in the blurred motion image corresponding to the current moment are compared, take all the abnormal coordinate points in the blurred motion image corresponding to the current moment as the abnormal area of the blurred motion image corresponding to the current moment, and then determine the abnormal area of each blurred motion image. Obtain an exception processing pixel window, modify the center point of the exception processing pixel window to the exception coordinate point, calculate the window brightness average of all pixels in the exception processing pixel window, and replace the brightness value of the exception coordinate point with the window brightness average, then update the center point of the exception processing pixel window until the brightness values of all exception coordinate points are replaced, complete the exception processing of the abnormal area, and obtain the first blurred motion image corresponding to each of the blurred motion images.
[0029] In an optional embodiment, for each blurred motion image, a two-dimensional coordinate system is constructed with the lower left vertex of the blurred motion image as the origin of the pixel coordinate system, with the horizontal axis being the X axis and the vertical axis being the Y axis, so the coordinates of each pixel are in the form of ; Since the color space of the blurred motion image is the RGB color space, each pixel in each blurred motion image has three color channels, namely red, green, and blue. Then, the color channel values are weighted and summed. The formula for the weighted sum of the color channel values is: ; In this formula, is the brightness value, is the red color channel value, is the green color channel value, is the blue color channel value; after calculating the brightness value of each pixel, the standard deviation of the brightness value of each blurred motion image is calculated; Then compare the brightness values of the pixels with the same coordinates in the blurred motion image at the previous moment and the blurred motion image at the current moment. Specifically, take the 5 blurred motion images collected above as an example, sort the blurred motion images in the order of the collection moments. When the first collection moment (i.e., the first blurred motion image) is taken as the current moment, the fifth collection moment is taken as its previous collection moment (i.e., the fifth blurred motion image); when the second collection moment (i.e., the second blurred motion image) is taken as the current collection moment, the first collection moment (i.e., the first blurred motion image) is taken as its previous collection moment; and so on, so that each collection moment has a corresponding previous collection moment. Taking the first collection moment as the current collection moment as an example, compare the first blurred motion image and the fifth blurred motion image, and first extract the pixels with coordinates from the first blurred motion image and the fifth blurred motion image. , compare the brightness values of the two pixels, perform the difference and then take the absolute value operation to obtain the brightness difference; compare the brightness difference with the standard deviation of the brightness value of the first blurred motion image. If the brightness difference is greater than the standard deviation of the brightness value of the first blurred motion image, then the coordinate is as the abnormal coordinate point; then continuously extract other pixel points in the first blurred motion image and the fifth blurred motion image for comparison, and when all pixel points in the first blurred motion image are compared, the abnormal coordinate point corresponding to the first blurred motion image is taken as the abnormal area of the first blurred motion image; then the second blurred motion image is taken as the blurred motion image at the current acquisition moment, and the pixel brightness value is compared with the first blurred motion image, and so on, until all blurred motion images have completed the comparison of pixel brightness values, and the abnormal area of each blurred motion image is obtained; Then get the exception processing pixel window, the size of which is set to ; Assume that the abnormal area in the first blurred motion image includes the coordinates , ; Traverse the pixels in the first blurred motion image from left to right and from bottom to top in the abnormal processing pixel window. , change the center point of the exception processing pixel window to At this time, the average brightness of all pixels in the abnormal processing pixel window is calculated, that is, the brightness values of the pixels at the coordinate points (-1, 2), (0, 2), (1, 2), (-1, 1), (0, 1), (1, 1), (-1, 0), (0, 0), and (1, 0) are added and averaged to obtain the average brightness of the window. The average brightness of the window is then used as the abnormal coordinate point ; then the abnormal processing pixel window continues to traverse the first blurred motion image, so as to update the brightness value of the pixel with coordinate point (3,7), thereby completing the abnormal processing of the first blurred motion image; then, by analogy, the brightness value update operation of the abnormal coordinate points is performed on the remaining blurred motion images, and after completing the abnormal processing of all blurred motion images, the first blurred motion image corresponding to each blurred motion image is obtained.
[0030] In particular, since the pixel coordinate system of this embodiment takes the lower left vertex of the blurred motion image as the origin, there are no pixels in the region of the negative X-axis and the negative Y-axis. As described above, there may be coordinate points in the exception processing pixel window that are located in the region of the negative X-axis and the negative Y-axis. Therefore, this embodiment sets the brightness values of these coordinate points to 0, for example, setting the brightness values of (-1, 2), (-1, 1), and (-1, 0) mentioned above to 0.
[0031] This embodiment can achieve accurate spatial alignment of blurred motion image pixels at different times by constructing a two-dimensional pixel coordinate system, thereby eliminating inaccurate subsequent abnormal area detection caused by pixel offset; the standard deviation of the brightness value is used as a dynamic threshold to replace the traditional fixed threshold, so as to accurately reflect the brightness fluctuation characteristics of the blurred motion image, and then dynamically adjust the abnormal area detection threshold based on the adaptability of the external environment, thereby improving the accuracy of abnormal area detection; through the abnormal processing pixel point window for brightness averaging, it is possible to use local context information to repair the abnormal area, and also avoid excessive repair caused by overbalancing, effectively increasing the image accuracy and feature expression of the first blurred motion image, providing an accurate image basis for subsequent fruit recognition, thereby improving the recognition accuracy of fruit products.
[0032] Step S102: Acquire an image enhancement processing model, and perform image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images.
[0033] In this embodiment, the acquiring of the image enhancement processing model and performing image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images specifically includes: Acquire an image enhancement processing model, wherein the image enhancement processing model includes: a first convolution layer, a group convolution layer, a normalization layer, a first point convolution layer, a second point convolution layer, and a second convolution layer; Inputting each of the first blurred motion images into the first convolution layer, adjusting the number of channels of each of the first blurred motion images through the first convolution layer, and then extracting low-order features of each of the first blurred motion images to obtain a plurality of second blurred motion images; Inputting each of the second blurred motion images into the grouped convolution layer, and grouping the channels of each of the second blurred motion images through the grouped convolution layer to obtain a plurality of third blurred motion images; Inputting each of the third blurred motion images into the normalization layer, and performing normalization processing on the feature map of each channel in each of the third blurred motion images through the normalization layer to obtain a plurality of fourth blurred motion images; Input each of the fourth blurred motion images into the first point convolution layer, perform feature dimension upscaling processing on each of the fourth blurred motion images through the first point convolution layer, and perform nonlinear processing on each of the fourth blurred motion images through a preset ReLU activation function, so as to obtain a plurality of fifth blurred motion images; Inputting each of the fifth blurred motion images into the second point convolution layer, and performing feature dimension reduction processing on each of the fifth blurred motion images through the second point convolution layer to obtain a plurality of sixth blurred motion images; Inputting each of the sixth blurred motion images into the second convolution layer, and adjusting the number of channels of each of the sixth blurred motion images to the number of channels of the corresponding first blurred motion image through the second convolution layer, to obtain a plurality of seventh blurred motion images; Performing residual connection processing on each of the seventh blurred motion images and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image; The clear motion image corresponding to each first blurred motion image is used as the clear fruit product image corresponding to each first blurred motion image.
[0034] In an alternative embodiment, please refer to Figure 2 , is a specific connection diagram of an image enhancement processing model provided by an embodiment of the present invention; Figure 2The image enhancement processing model described in this embodiment is a CNN model, which includes, from left to right, the first convolution layer (first Conv), the grouped convolution layer (GroupConv), the normalization layer (LN, LayerNormalization), the first point convolution layer (first PointConv), the second point convolution layer (second PointConv) and the second convolution layer (second Conv); Input represents input data, Output represents output data; ReLU represents activation function. The first blurred motion image is used as input data and input into the first convolution layer (first Conv), and the number of channels of the first blurred motion image is changed from 3 to 64, thereby extracting low-order features of each of the first blurred motion images to obtain a number of second blurred motion images; then, each second blurred motion image is input into the grouped convolution layer (GroupConv), and the channels of each second blurred motion image are grouped to obtain a number of third blurred motion images; then, each third blurred motion image is input into the normalization layer (LN, Layer Normalization), normalize the feature map of each channel in each third blurred motion image to obtain a number of fourth blurred motion images; then input each fourth blurred motion image into the first point convolution layer (the first PointConv), increase the number of channels of each fourth blurred motion image to 256, thereby realizing the feature dimension increase processing of each fourth blurred motion image, and perform nonlinear processing on each fourth blurred motion image through a preset ReLU activation function to obtain a number of fifth blurred motion images; then input each fifth blurred motion image into the second point convolution layer (the second PointConv), reduce the number of channels of each fifth blurred motion image to 64, thereby realizing the feature dimension reduction processing of each fifth blurred motion image, and obtain a number of sixth blurred motion images; then input each sixth blurred motion image into the second convolution layer (the second Conv), adjust the number of channels of each sixth blurred motion image to 3, and obtain a number of seventh blurred motion images; perform residual connection between each seventh blurred motion image and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image, and use the clear motion image as output data, and as a clear fruit product image corresponding to each first blurred motion image.
[0035] It should be noted that the CNN model (Convolutional Neural Networks) is a model specifically used for processing images. It usually includes structures such as convolutional layer (Convolutional Layer, Conv), normalization layer (Layer Normalization, LN), point convolution layer (Pointwise Convolutional Layer, PointConv), and ReLU activation function.
[0036] This embodiment can effectively restore the contour distortion and surface texture loss caused by motion blur through the connection design of the convolution layer and the normalization layer of the image enhancement processing model, and realizes efficient and high-precision blurred image restoration. Through multiple convolution layers, the noise characteristics in the first blurred motion image can be suppressed, thereby highlighting the core features in the first blurred motion image that are closely related to the fruit products, providing an accurate image basis for subsequent fruit recognition, thereby improving the recognition accuracy of the fruit products.
[0037] Step S103: performing image fusion on the clear fruit product image according to a preset image feature fusion algorithm to determine a feature image of the fruit product.
[0038] In this embodiment, the image fusion is performed on the clear fruit product image according to a preset image feature fusion algorithm to determine the feature image of the fruit product, specifically including: Converting the color space of each clear fruit product image into a grayscale space to obtain a grayscale clear fruit product image corresponding to each clear fruit product image; Obtaining the grayscale value of each pixel in each grayscale clear fruit product image, and calculating the gradient value of each pixel in each grayscale clear fruit product image according to a preset gradient algorithm; Obtaining a gradient value screening interval, and screening the pixel points of each grayscale clear fruit product image according to the gradient value screening interval and the gradient value of each pixel point in each grayscale clear fruit product image to obtain edge pixel points of each grayscale clear fruit product image; Constructing an edge feature image of each grayscale clear fruit product image based on edge pixel points of each grayscale clear fruit product image; Performing denoising on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image; All edge denoised feature images are processed with residual connections to obtain feature images of fruit products.
[0039] In an optional embodiment, the gradient value screening interval is set to 185 to 225, and the pixel points whose gradient values are within the gradient value screening interval are screened out as edge pixel points.
[0040] This embodiment can reduce the complexity of subsequent calculations by converting color space into grayscale space, and avoid errors caused by excessive calculation complexity; by constructing an edge feature image of a grayscale clear fruit product image through gradient values, it can effectively distinguish the edge and background in the grayscale clear fruit product image, and by denoising the edge feature image, it can improve the feature expression ability of the edge denoised feature image, thereby improving the accuracy of subsequent fruit recognition; by performing residual connection processing on all edge denoised feature images, the feature image can fully reflect different image information at multiple acquisition times, effectively integrate local edge and global contour features, improve the semantic integrity of the feature image, and improve the recognition accuracy of fruit products.
[0041] In this embodiment, the grayscale value of each pixel in each grayscale clear fruit product image is obtained, and the gradient value of each pixel in each grayscale clear fruit product image is calculated according to a preset gradient algorithm, specifically including: Obtain the gray value, horizontal gradient calculation matrix and vertical gradient calculation matrix of each pixel in each gray clear fruit product image; Performing a convolution operation on the grayscale value of each pixel and the horizontal gradient calculation matrix to obtain the horizontal gradient value of each pixel; Performing a convolution operation on the grayscale value of each pixel and the vertical gradient calculation matrix to obtain the vertical gradient value of each pixel; The horizontal gradient value and the vertical gradient value of each pixel are weighted summed to determine the gradient value of each pixel.
[0042] In an optional embodiment, the horizontal gradient calculation matrix is specifically: ; The vertical gradient calculation matrix is specifically: ; Then, the grayscale value of each pixel is convolved with the horizontal gradient calculation matrix to obtain the horizontal gradient value of each pixel; the grayscale value of each pixel is convolved with the vertical gradient calculation matrix to obtain the vertical gradient value of each pixel; the weight of the horizontal gradient value is set to 0.5, the weight of the vertical gradient value is set to 0.5, and the horizontal gradient value and the vertical gradient value of each pixel are weighted summed to determine the gradient value of each pixel.
[0043] This embodiment calculates the gradient values of pixels in the horizontal direction and the vertical direction respectively through the horizontal gradient calculation matrix and the vertical gradient calculation matrix, and can accurately capture the directional texture features in the grayscale clear fruit product image of the fruit product; by performing weighted summation of the horizontal gradient value and the vertical gradient value, the feature imbalance caused by the gradient value calculation in a single direction is avoided, thereby improving the feature accuracy of the edge feature image and improving the recognition accuracy of the fruit product.
[0044] In this embodiment, the denoising process is performed on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image, specifically including: Get the noise sliding window; Sliding the noise sliding window on each of the edge feature images, calculating the median of the grayscale values of the pixels in the noise sliding window after each sliding, and using the median as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the edge feature images, and obtaining a first edge feature image corresponding to each of the edge feature images; Generate a Gaussian convolution kernel in combination with a preset Gaussian function according to the size of the noise sliding window and the preset Gaussian standard deviation; The noise sliding window is slid on each of the first edge feature images, and the grayscale values of all pixels in the noise sliding window are weightedly calculated based on the Gaussian convolution kernel to obtain a weighted grayscale value, and the weighted grayscale value is used as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the first edge feature images, and an edge denoising feature image corresponding to each of the edge feature images is obtained.
[0045] In an optional embodiment, a noise sliding window is obtained, and the size of the noise sliding window is set to ; Then, the noise sliding window is slid on each edge feature image, specifically, the sliding window is slid from bottom to top, from left to right, and each time the window slides one unit coordinate (i.e., the value of the noise sliding window on the horizontal coordinate or the vertical coordinate increases by 1); after each sliding, the grayscale values of the pixels in the noise sliding window are sorted, and the middle value of the sorted grayscale values is taken as the median, and the median is taken as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each edge feature image, and a first edge feature image corresponding to each of the edge feature images is obtained; Then set the Gaussian standard deviation to , the preset Gaussian function is ; Based on the size of the noise sliding window, the Gaussian standard deviation, and the Gaussian function, a Gaussian convolution kernel is generated. The Gaussian convolution kernel is specifically: ; Then, the noise sliding window is slid on each first edge feature image, specifically, the sliding window is slid from top to bottom, from right to left, and by one unit coordinate each time (i.e., the value of the noise sliding window on the horizontal coordinate or the vertical coordinate increases by 1); after each sliding, the grayscale values of all pixels in the noise sliding window are convolved with the Gaussian convolution kernel, and then added to obtain a weighted grayscale value; the weighted grayscale value is used as the grayscale value of the pixel corresponding to the center point of the current noise sliding window, until the noise sliding window traverses the pixel points of each first edge feature image, and an edge denoising feature image corresponding to each of the edge feature images is obtained; This embodiment can effectively suppress the noise in the image through the combination of median filtering and Gaussian filtering. The sliding window processing of the median filter can better retain the edge sharpness in the image, and combined with the smoothing effect of the Gaussian filter, it can significantly improve the feature expressiveness of the edge denoising feature image, thereby improving the accuracy of subsequent fruit product recognition.
[0046] Step S104: inputting the characteristic image of the fruit product into a preset fruit product recognition model, and identifying the fruit product in combination with a preset product recognition algorithm to determine the type information of the fruit product.
[0047] In this embodiment, the feature image of the fruit product is input into a preset fruit product recognition model, and the fruit product is recognized in combination with a preset product recognition algorithm to determine the type information of the fruit product, specifically including: Performing size transformation and normalization processing on the characteristic image of the fruit product according to a preset image preprocessing method to obtain the image of the fruit product to be identified; The preset fruit product recognition model includes several neural network models; Input the image to be identified into each of the neural network models respectively, and obtain the predicted category label output by each of the neural network models; Counting the predicted category labels, and selecting the predicted category labels with the largest number as the category labels of the fruit products; A preset fruit product database is queried according to the category label to determine the category information of the fruit product.
[0048] In an optional embodiment, the preset fruit product recognition model includes several neural network models. Specifically, the fruit product recognition model includes: Vision Transformer model, EfficientNet model and VGGNet model. The image to be recognized is input into each of the neural network models respectively to obtain the predicted category label output by each of the neural network models. Then, the predicted category labels are counted, and the same predicted category label with the largest number is used as the category label of the fruit product. Then, the fruit product database is queried to find the type information of the fruit product corresponding to the category label.
[0049] It should be noted that the Vision Transformer (VIT) model successfully migrates the Transformer model in the field of natural language processing (NLP) to computer vision tasks. Its core idea is to regard the image as a sequence of multiple image patches. The core idea of the EfficientNet model is to optimize the depth (number of layers), width (number of channels) and input resolution of the network through the compound scaling method (Compound Scaling) to achieve a balance between model efficiency and performance. The core idea of the VGGNet model (Visual Geometry Group) is to construct a deep convolutional neural network by stacking small convolution kernels (3x3) and maximum pooling layers (2x2). In addition, the model type used in this embodiment is only an adaptive description, and technicians in this field can modify the number and type of models according to actual needs.
[0050] This embodiment uses different neural network models to identify fruit products, which can fully consider the differences between different models, and can fully integrate the advantages of multiple models by counting and screening the predicted category labels, thereby improving the accuracy of fruit product identification.
[0051] This embodiment collects several blurred motion images of fruit products at different times, then identifies abnormal areas of the blurred motion images and performs abnormal processing, and can accurately identify abnormalities of blurred motion images caused by the external environment, thereby reducing the interference of image abnormalities on subsequent fruit product recognition. Then, by performing image enhancement processing on the first blurred motion image, the image quality of the first blurred motion image can be enhanced, thereby improving the expressiveness of features in the clear fruit product image; then, by fusing clear fruit product images at different times, the feature information in different clear fruit product images can be integrated, and the feature richness of the feature image can be enriched, so that the feature information of the fruit product in the process of transmission and production can be reflected through the feature image, avoiding information loss caused by a single image, and then identifying the type information of the fruit product through a preset fruit product recognition model, so that the fruit product recognition model can effectively perform accurate type prediction based on the feature image, thereby achieving accurate recognition of the fruit product.
[0052] Embodiment 2 Please refer to Figure 3 , is a structural schematic diagram of a product recognition system based on blurred motion images provided by an embodiment of the present invention, including an image abnormality processing module 201, an image enhancement processing module 202, an image fusion module 203 and a product recognition module 204.
[0053] The image anomaly processing module 201 is used to collect several blurred motion images of fruit products at different times, determine the abnormal area of the blurred motion image based on the pixel point information of the blurred motion image and the collection time, and perform anomaly processing on the abnormal area to obtain a first blurred motion image corresponding to each blurred motion image.
[0054] In this embodiment, the image abnormality processing module 201 includes: an image abnormality processing unit; The image anomaly processing unit is used to construct a pixel point coordinate system of each blurred motion image, and determine the coordinates of each pixel point in each blurred motion image based on the pixel point coordinate system, wherein the pixel point coordinates are a two-dimensional coordinate system; Acquire pixel information of each blurred motion image, wherein the pixel information of the blurred motion image includes: a color channel value; Performing weighted summation on the color channel values of each blurred motion image to determine the brightness value of each pixel in each blurred motion image, and determining the brightness value standard deviation of each blurred motion image based on the brightness value of each pixel; Compare the brightness values of the pixels with the same coordinates in the blurred motion image corresponding to the previous acquisition moment and the blurred motion image corresponding to the current acquisition moment in sequence to obtain a brightness difference value. If the brightness difference value is greater than the standard deviation of the brightness value of the blurred motion image corresponding to the current moment, take the pixel with the same coordinates in the blurred motion image corresponding to the current moment as an abnormal coordinate point. After all the pixels in the blurred motion image corresponding to the current moment are compared, take all the abnormal coordinate points in the blurred motion image corresponding to the current moment as the abnormal area of the blurred motion image corresponding to the current moment, and then determine the abnormal area of each blurred motion image. Obtain an exception processing pixel window, modify the center point of the exception processing pixel window to the exception coordinate point, calculate the window brightness average of all pixels in the exception processing pixel window, and replace the brightness value of the exception coordinate point with the window brightness average, then update the center point of the exception processing pixel window until the brightness values of all exception coordinate points are replaced, complete the exception processing of the abnormal area, and obtain the first blurred motion image corresponding to each of the blurred motion images.
[0055] The image enhancement processing module 202 is used to obtain an image enhancement processing model, and perform image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images.
[0056] In this embodiment, the image enhancement processing module 202 includes: an image enhancement processing unit; The image enhancement processing unit is used to obtain an image enhancement processing model, and the image enhancement processing model includes: a first convolution layer, a group convolution layer, a normalization layer, a first point convolution layer, a second point convolution layer and a second convolution layer; Inputting each of the first blurred motion images into the first convolution layer, adjusting the number of channels of each of the first blurred motion images through the first convolution layer, and then extracting low-order features of each of the first blurred motion images to obtain a plurality of second blurred motion images; Inputting each of the second blurred motion images into the grouped convolution layer, and grouping the channels of each of the second blurred motion images through the grouped convolution layer to obtain a plurality of third blurred motion images; Inputting each of the third blurred motion images into the normalization layer, and performing normalization processing on the feature map of each channel in each of the third blurred motion images through the normalization layer to obtain a plurality of fourth blurred motion images; Input each of the fourth blurred motion images into the first point convolution layer, perform feature dimension upscaling processing on each of the fourth blurred motion images through the first point convolution layer, and perform nonlinear processing on each of the fourth blurred motion images through a preset ReLU activation function, so as to obtain a plurality of fifth blurred motion images; Inputting each of the fifth blurred motion images into the second point convolution layer, and performing feature dimension reduction processing on each of the fifth blurred motion images through the second point convolution layer to obtain a plurality of sixth blurred motion images; Inputting each of the sixth blurred motion images into the second convolution layer, and adjusting the number of channels of each of the sixth blurred motion images to the number of channels of the corresponding first blurred motion image through the second convolution layer, to obtain a plurality of seventh blurred motion images; Performing residual connection processing on each of the seventh blurred motion images and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image; The clear motion image corresponding to each first blurred motion image is used as the clear fruit product image corresponding to each first blurred motion image.
[0057] The image fusion module 203 is used to perform image fusion on the clear fruit product images according to a preset image feature fusion algorithm to determine the feature image of the fruit product.
[0058] In this embodiment, the image fusion module 203 includes: an image fusion unit; The image fusion unit is used to convert the color space of each clear fruit product image into a grayscale space to obtain a grayscale clear fruit product image corresponding to each clear fruit product image; Obtaining the grayscale value of each pixel in each grayscale clear fruit product image, and calculating the gradient value of each pixel in each grayscale clear fruit product image according to a preset gradient algorithm; Obtaining a gradient value screening interval, and screening the pixel points of each grayscale clear fruit product image according to the gradient value screening interval and the gradient value of each pixel point in each grayscale clear fruit product image to obtain edge pixel points of each grayscale clear fruit product image; Constructing an edge feature image of each grayscale clear fruit product image based on edge pixel points of each grayscale clear fruit product image; Performing denoising on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image; All edge denoised feature images are processed with residual connections to obtain feature images of fruit products.
[0059] In this embodiment, the image fusion unit includes: a gradient value calculation subunit; The gradient value calculation subunit is used to obtain the gray value of each pixel point in each gray-scale clear fruit product image, the horizontal direction gradient calculation matrix and the vertical direction gradient calculation matrix; Performing a convolution operation on the grayscale value of each pixel and the horizontal gradient calculation matrix to obtain the horizontal gradient value of each pixel; Performing a convolution operation on the grayscale value of each pixel and the vertical gradient calculation matrix to obtain the vertical gradient value of each pixel; The horizontal gradient value and the vertical gradient value of each pixel are weighted summed to determine the gradient value of each pixel.
[0060] In this embodiment, the image fusion unit includes: an image denoising subunit; The image denoising subunit is used to obtain a noise sliding window; Sliding the noise sliding window on each of the edge feature images, calculating the median of the grayscale values of the pixels in the noise sliding window after each sliding, and using the median as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the edge feature images, and obtaining a first edge feature image corresponding to each of the edge feature images; Generate a Gaussian convolution kernel in combination with a preset Gaussian function according to the size of the noise sliding window and the preset Gaussian standard deviation; The noise sliding window is slid on each of the first edge feature images, and the grayscale values of all pixels in the noise sliding window are weightedly calculated based on the Gaussian convolution kernel to obtain a weighted grayscale value, and the weighted grayscale value is used as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the first edge feature images, and an edge denoising feature image corresponding to each of the edge feature images is obtained.
[0061] The product recognition module 204 is used to input the feature image of the fruit product into a preset fruit product recognition model, and recognize the fruit product in combination with a preset product recognition algorithm to determine the type information of the fruit product.
[0062] In this embodiment, the product identification module 204 includes: a product identification unit; The product identification unit is used to perform size transformation and normalization processing on the characteristic image of the fruit product according to a preset image preprocessing method to obtain the image to be identified of the fruit product; The preset fruit product recognition model includes several neural network models; Input the image to be identified into each of the neural network models respectively, and obtain the predicted category label output by each of the neural network models; Counting the predicted category labels, and selecting the predicted category labels with the largest number as the category labels of the fruit products; A preset fruit product database is queried according to the category label to determine the category information of the fruit product.
[0063] This embodiment collects several blurred motion images of fruit products at different times, then identifies abnormal areas of the blurred motion images and performs abnormal processing, and can accurately identify abnormalities of blurred motion images caused by the external environment, thereby reducing the interference of image abnormalities on subsequent fruit product recognition. Then, by performing image enhancement processing on the first blurred motion image, the image quality of the first blurred motion image can be enhanced, thereby improving the expressiveness of features in the clear fruit product image; then, by fusing clear fruit product images at different times, the feature information in different clear fruit product images can be integrated, and the feature richness of the feature image can be enriched, so that the feature information of the fruit product in the process of transmission and production can be reflected through the feature image, avoiding information loss caused by a single image, and then identifying the type information of the fruit product through a preset fruit product recognition model, so that the fruit product recognition model can effectively perform accurate type prediction based on the feature image, thereby achieving accurate recognition of the fruit product.
[0064] In summary, the embodiment of the present invention can accurately identify the anomalies of the blurred motion image caused by the external environment by collecting several blurred motion images of fruit products at different times, and then identify the abnormal areas of the blurred motion images and perform abnormal processing, thereby reducing the interference of the image anomalies on the subsequent fruit product recognition. Then, by performing image enhancement processing on the first blurred motion image, the image quality of the first blurred motion image can be enhanced, thereby improving the expressiveness of the features in the clear fruit product image; then, by fusing the clear fruit product images at different times, the feature information in different clear fruit product images can be integrated, and the feature richness of the feature image is enriched, so that the feature information of the fruit product in the process of transmission and production can be reflected through the feature image, avoiding the information loss caused by a single image, and then the type information of the fruit product is identified through a preset fruit product recognition model, so that the fruit product recognition model can effectively perform accurate type prediction based on the feature image, thereby realizing accurate recognition of the fruit product.
[0065] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A product recognition method based on fuzzy motion images, characterized in that: include: Collecting a plurality of blurred motion images of the fruit product at different times, determining an abnormal area of the blurred motion image based on pixel point information of the blurred motion image and the acquisition time, and performing abnormal processing on the abnormal area to obtain a first blurred motion image corresponding to each blurred motion image; Acquire an image enhancement processing model, and perform image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images; According to a preset image feature fusion algorithm, the clear fruit product image is fused to determine a feature image of the fruit product; The characteristic image of the fruit product is input into a preset fruit product recognition model, and the fruit product is recognized in combination with a preset product recognition algorithm to determine the type information of the fruit product.
2. A product recognition method based on blurred motion images as claimed in claim 1, characterized in that: The determining of the abnormal area of the blurred motion image based on the pixel point information and the acquisition time of the blurred motion image, and performing abnormal processing on the abnormal area to obtain a first blurred motion image corresponding to each blurred motion image specifically includes: Constructing a pixel point coordinate system of each blurred motion image, and determining the coordinates of each pixel point in each blurred motion image based on the pixel point coordinate system, wherein the pixel point coordinates are a two-dimensional coordinate system; Acquire pixel information of each blurred motion image, wherein the pixel information of the blurred motion image includes: a color channel value; Performing weighted summation on the color channel values of each blurred motion image to determine the brightness value of each pixel in each blurred motion image, and determining the brightness value standard deviation of each blurred motion image based on the brightness value of each pixel; Compare the brightness values of the pixels with the same coordinates in the blurred motion image corresponding to the previous acquisition moment and the blurred motion image corresponding to the current acquisition moment in sequence to obtain a brightness difference value. If the brightness difference value is greater than the standard deviation of the brightness value of the blurred motion image corresponding to the current moment, take the pixel with the same coordinates in the blurred motion image corresponding to the current moment as an abnormal coordinate point. After all the pixels in the blurred motion image corresponding to the current moment are compared, take all the abnormal coordinate points in the blurred motion image corresponding to the current moment as the abnormal area of the blurred motion image corresponding to the current moment, and then determine the abnormal area of each blurred motion image. Obtain an exception processing pixel window, modify the center point of the exception processing pixel window to the exception coordinate point, calculate the window brightness average of all pixels in the exception processing pixel window, and replace the brightness value of the exception coordinate point with the window brightness average, then update the center point of the exception processing pixel window until the brightness values of all exception coordinate points are replaced, complete the exception processing of the abnormal area, and obtain the first blurred motion image corresponding to each of the blurred motion images.
3. A product recognition method based on blurred motion images as claimed in claim 2, characterized in that: The acquiring of the image enhancement processing model, and performing image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images, specifically includes: Acquire an image enhancement processing model, wherein the image enhancement processing model includes: a first convolution layer, a group convolution layer, a normalization layer, a first point convolution layer, a second point convolution layer, and a second convolution layer; Inputting each of the first blurred motion images into the first convolution layer, adjusting the number of channels of each of the first blurred motion images through the first convolution layer, and then extracting low-order features of each of the first blurred motion images to obtain a plurality of second blurred motion images; Inputting each of the second blurred motion images into the grouped convolution layer, and grouping the channels of each of the second blurred motion images through the grouped convolution layer to obtain a plurality of third blurred motion images; Inputting each of the third blurred motion images into the normalization layer, and performing normalization processing on the feature map of each channel in each of the third blurred motion images through the normalization layer to obtain a plurality of fourth blurred motion images; Input each of the fourth blurred motion images into the first point convolution layer, perform feature dimension upscaling processing on each of the fourth blurred motion images through the first point convolution layer, and perform nonlinear processing on each of the fourth blurred motion images through a preset ReLU activation function, so as to obtain a plurality of fifth blurred motion images; Inputting each of the fifth blurred motion images into the second point convolution layer, and performing feature dimension reduction processing on each of the fifth blurred motion images through the second point convolution layer to obtain a plurality of sixth blurred motion images; Inputting each of the sixth blurred motion images into the second convolution layer, and adjusting the number of channels of each of the sixth blurred motion images to the number of channels of the corresponding first blurred motion image through the second convolution layer, to obtain a plurality of seventh blurred motion images; Performing residual connection processing on each of the seventh blurred motion images and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image; The clear motion image corresponding to each first blurred motion image is used as the clear fruit product image corresponding to each first blurred motion image.
4. The product recognition method based on blurred motion images according to claim 1, characterized in that: The performing image fusion on the clear fruit product image according to a preset image feature fusion algorithm to determine the feature image of the fruit product specifically includes: Converting the color space of each clear fruit product image into a grayscale space to obtain a grayscale clear fruit product image corresponding to each clear fruit product image; Obtaining the grayscale value of each pixel in each grayscale clear fruit product image, and calculating the gradient value of each pixel in each grayscale clear fruit product image according to a preset gradient algorithm; Obtaining a gradient value screening interval, and screening the pixel points of each grayscale clear fruit product image according to the gradient value screening interval and the gradient value of each pixel point in each grayscale clear fruit product image to obtain edge pixel points of each grayscale clear fruit product image; Constructing an edge feature image of each grayscale clear fruit product image based on edge pixel points of each grayscale clear fruit product image; Performing denoising on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image; All edge denoised feature images are processed with residual connections to obtain feature images of fruit products.
5. The product recognition method based on blurred motion images as claimed in claim 4, characterized in that: The step of obtaining the grayscale value of each pixel in each grayscale clear fruit product image and calculating the gradient value of each pixel in each grayscale clear fruit product image according to a preset gradient algorithm specifically includes: Obtain the gray value, horizontal gradient calculation matrix and vertical gradient calculation matrix of each pixel in each gray clear fruit product image; Performing a convolution operation on the grayscale value of each pixel and the horizontal gradient calculation matrix to obtain the horizontal gradient value of each pixel; Performing a convolution operation on the grayscale value of each pixel and the vertical gradient calculation matrix to obtain the vertical gradient value of each pixel; The horizontal gradient value and the vertical gradient value of each pixel are weighted summed to determine the gradient value of each pixel.
6. The product recognition method based on blurred motion images as claimed in claim 4, characterized in that: The denoising process is performed on each edge feature image according to a preset noise processing method to obtain an edge denoising feature image corresponding to each edge feature image, specifically comprising: Get the noise sliding window; Sliding the noise sliding window on each of the edge feature images, calculating the median of the grayscale values of the pixels in the noise sliding window after each sliding, and using the median as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the edge feature images, and obtaining a first edge feature image corresponding to each of the edge feature images; Generate a Gaussian convolution kernel in combination with a preset Gaussian function according to the size of the noise sliding window and the preset Gaussian standard deviation; The noise sliding window is slid on each of the first edge feature images, and the grayscale values of all pixels in the noise sliding window are weightedly calculated based on the Gaussian convolution kernel to obtain a weighted grayscale value, and the weighted grayscale value is used as the grayscale value of the pixel corresponding to the center point of the noise sliding window, until the noise sliding window traverses the pixel points of each of the first edge feature images, and an edge denoising feature image corresponding to each of the edge feature images is obtained.
7. The product recognition method based on blurred motion images according to claim 1, characterized in that: The step of inputting the characteristic image of the fruit product into a preset fruit product recognition model, and identifying the fruit product in combination with a preset product recognition algorithm to determine the type information of the fruit product specifically includes: Performing size transformation and normalization processing on the characteristic image of the fruit product according to a preset image preprocessing method to obtain the image of the fruit product to be identified; The preset fruit product recognition model includes several neural network models; Input the image to be identified into each of the neural network models respectively, and obtain the predicted category label output by each of the neural network models; Counting the predicted category labels, and selecting the predicted category labels with the largest number as the category labels of the fruit products; A preset fruit product database is queried according to the category label to determine the category information of the fruit product.
8. A product recognition system based on blurred motion images, characterized in that: include: Image anomaly processing module, image enhancement processing module, image fusion module and product recognition module; The image abnormality processing module is used to collect a number of blurred motion images of fruit products at different times, determine the abnormal area of the blurred motion image based on the pixel point information of the blurred motion image and the collection time, and perform abnormal processing on the abnormal area to obtain a first blurred motion image corresponding to each blurred motion image; The image enhancement processing module is used to obtain an image enhancement processing model, and perform image enhancement processing on each of the first blurred motion images based on the image enhancement processing model to obtain a clear fruit product image corresponding to each of the first blurred motion images; The image fusion module is used to perform image fusion on the clear fruit product image according to a preset image feature fusion algorithm to determine the feature image of the fruit product; The product recognition module is used to input the characteristic image of the fruit product into a preset fruit product recognition model, and recognize the fruit product in combination with a preset product recognition algorithm to determine the type information of the fruit product.
9. A product recognition system based on blurred motion images as claimed in claim 8, characterized in that: The image abnormality processing module comprises: an image abnormality processing unit; The image anomaly processing unit is used to construct a pixel point coordinate system of each blurred motion image, and determine the coordinates of each pixel point in each blurred motion image based on the pixel point coordinate system, wherein the pixel point coordinates are a two-dimensional coordinate system; Acquire pixel information of each blurred motion image, wherein the pixel information of the blurred motion image includes: a color channel value; Performing weighted summation on the color channel values of each blurred motion image to determine the brightness value of each pixel in each blurred motion image, and determining the brightness value standard deviation of each blurred motion image based on the brightness value of each pixel; Compare the brightness values of the pixels with the same coordinates in the blurred motion image corresponding to the previous acquisition moment and the blurred motion image corresponding to the current acquisition moment in sequence to obtain a brightness difference value. If the brightness difference value is greater than the standard deviation of the brightness value of the blurred motion image corresponding to the current moment, take the pixel with the same coordinates in the blurred motion image corresponding to the current moment as an abnormal coordinate point. After all the pixels in the blurred motion image corresponding to the current moment are compared, take all the abnormal coordinate points in the blurred motion image corresponding to the current moment as the abnormal area of the blurred motion image corresponding to the current moment, and then determine the abnormal area of each blurred motion image. Obtain an exception processing pixel window, modify the center point of the exception processing pixel window to the exception coordinate point, calculate the window brightness average of all pixels in the exception processing pixel window, and replace the brightness value of the exception coordinate point with the window brightness average, then update the center point of the exception processing pixel window until the brightness values of all exception coordinate points are replaced, complete the exception processing of the abnormal area, and obtain the first blurred motion image corresponding to each of the blurred motion images.
10. A product recognition system based on blurred motion images as claimed in claim 9, characterized in that: The image enhancement processing module comprises: an image enhancement processing unit; The image enhancement processing unit is used to obtain an image enhancement processing model, and the image enhancement processing model includes: a first convolution layer, a group convolution layer, a normalization layer, a first point convolution layer, a second point convolution layer and a second convolution layer; Inputting each of the first blurred motion images into the first convolution layer, adjusting the number of channels of each of the first blurred motion images through the first convolution layer, and then extracting low-order features of each of the first blurred motion images to obtain a plurality of second blurred motion images; Inputting each of the second blurred motion images into the grouped convolution layer, and grouping the channels of each of the second blurred motion images through the grouped convolution layer to obtain a plurality of third blurred motion images; Inputting each of the third blurred motion images into the normalization layer, and performing normalization processing on the feature map of each channel in each of the third blurred motion images through the normalization layer to obtain a plurality of fourth blurred motion images; Input each of the fourth blurred motion images into the first point convolution layer, perform feature dimension upscaling processing on each of the fourth blurred motion images through the first point convolution layer, and perform nonlinear processing on each of the fourth blurred motion images through a preset ReLU activation function, so as to obtain a plurality of fifth blurred motion images; Inputting each of the fifth blurred motion images into the second point convolution layer, and performing feature dimension reduction processing on each of the fifth blurred motion images through the second point convolution layer to obtain a plurality of sixth blurred motion images; Inputting each of the sixth blurred motion images into the second convolution layer, and adjusting the number of channels of each of the sixth blurred motion images to the number of channels of the corresponding first blurred motion image through the second convolution layer, to obtain a plurality of seventh blurred motion images; Performing residual connection processing on each of the seventh blurred motion images and its corresponding first blurred motion image to obtain a clear motion image corresponding to each first blurred motion image; The clear motion image corresponding to each first blurred motion image is used as the clear fruit product image corresponding to each first blurred motion image.
Citation Information
Patent Citations
Convolutional neural network fuzzy image classification method based on image enhancement
CN110070122A
Image processing and recognition method
CN111080560A
Target identification method and device
CN112597887A
Cigarette carton detection method based on image enhancement and color perception
CN117218072A
Unmanned aerial vehicle electric power inspection obstacle identification method based on visual deblurring
CN117710840A