Visual dish processing detection system
Through the collection, analysis and processing module of the dish visual processing and detection system, dynamic adjustments are made to the actual situation of product label images, solving the problems of accurate and inefficient information recognition in the prior art, realizing more efficient information recognition and reducing human resource consumption.
Patent Information
- Application Number
- CN202411612461.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The prior art fails to determine targeted analysis and processing methods based on the actual situation of the acquired product label images, resulting in inaccuracy and efficiency of information identification, which in turn leads to consumption of human resources in actual work scenarios.
Provides a dish visual processing and detection system, including acquisition and analysis module, key analysis module, data analysis module, secondary processing module and character analysis module. The system dynamically adjusts the image processing method and character recognition process to adapt to actual conditions by performing acquisition quality detection, abnormal character analysis, image processing, and character recognition on key tag images.
It improves the accuracy of the identification results of key tag image information, reduces the dependence on personnel identification, and improves work efficiency.
Smart Images

Figure CN119559657A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing, and in particular to a dish visualization processing and detection system. Background Art
[0003] Chinese patent publication number CN116863483A discloses a text recognition method and a pre-packaged food label intelligent review method and system, which can perform semantic analysis on complex typesetting image documents, and can realize label review in combination with the pre-packaged label standard information library. The recognition method of the present invention, in view of the defect that the existing OCR text recognition algorithm has poor recognition effect on super large images, first cuts the large image into small images, performs text detection on the small images and merges the detection results, and finally uses the merged detection results to intercept and recognize the text of the original image, but the above scheme has the following problems: it fails to determine a targeted analysis and processing method based on the actual situation of the acquired product label image, resulting in low accuracy and efficiency of information recognition, which in turn leads to the consumption of human resources in actual work scenarios. Summary of the invention
[0004] To this end, the present invention provides a dish visualization processing and detection system to overcome the problem that the prior art fails to determine a targeted analysis and processing method according to the actual situation of the acquired product label image, resulting in low accuracy and efficiency of information recognition, and further leading to the consumption of human resources in actual work scenarios.
[0005] To achieve the above object, the present invention provides a dish visualization processing detection system, comprising:
[0006] The acquisition and analysis module is used to perform quality inspection and key label image acquisition on randomly selected target inspection products, and to detect the acquisition quality coefficient of each character image in the key label image, and determine the category of the character image according to the acquisition quality coefficient;
[0007] A key analysis module, which is connected to the acquisition and analysis module, is used to respond to whether there is an abnormal character image in the key label image to determine whether to perform abnormal key coefficient analysis on each character block in the key label;
[0008] A data analysis module connected to the acquisition and analysis module, for determining the processing method to detect the contrast reference value and the reflective area ratio of the key label image or to detect the character ink range difference value of each abnormal character area according to the abnormal character ratio corresponding to the corresponding processing condition;
[0009] A secondary processing module, which is connected to the acquisition and analysis module and the data analysis module respectively, for determining the character area to be adjusted and performing area adjustment, and responding to the contrast reference value and the reflective area ratio corresponding to the processing conditions to determine the image processing method accordingly;
[0010] A character analysis module is respectively connected to the acquisition and analysis module, the secondary processing module and the data analysis module, and is used to respond to the abnormal key coefficient corresponding to the set conditions to correspondingly determine the character recognition method as feature extraction for each abnormal character image in the character block, or to determine the character information of the abnormal character image based on the character information of the character block of the same information category.
[0011] Furthermore, the acquisition and analysis module performs quality inspection on the randomly selected target inspection products to obtain quality inspection results;
[0012] For a single target detection product,
[0013] The acquisition condition responded by the acquisition and analysis module is that if the detection result of any type of detection is not within the preset result range, it is determined to perform key label image acquisition for the target detection product.
[0014] Furthermore, the acquisition and analysis module detects the acquisition quality coefficient of each character image in the key label image of the target detection product, and determines the category of the corresponding character image according to the acquisition quality coefficient;
[0015] For a single character image, if the classification condition responded by the image analysis module is that the acquisition quality coefficient is less than or equal to the preset acquisition quality coefficient, the character image is determined to be an abnormal character image;
[0016] The classification condition responded by the image analysis module is that the acquisition quality coefficient is greater than the preset acquisition quality coefficient, and the character image is determined to be a standard character image;
[0017] The acquisition quality coefficient is determined according to the similarity between the character image and each reference character image.
[0018] Furthermore, the analysis condition responded by the key analysis module is that there is an abnormal character image in the key label image of the target detection product, and then it is determined to perform abnormal key coefficient analysis on each character block in the key label, including:
[0019] The character information in the key tag is divided into character blocks according to preset rules, and the abnormal character image ratio of each character block and the key coefficient of each abnormal character in each character block are detected, and the abnormal key coefficient of the corresponding character block is determined according to the abnormal character image ratio of each character block and the average key coefficient;
[0020] The abnormal key coefficient is positively correlated with the abnormal character image proportion and the average key coefficient.
[0021] Furthermore, the key analysis module determines the key coefficient of the abnormal character at the corresponding character position according to the character repetition coefficient of each character position in the character block of the same information category in the current production cycle, and records the key coefficient of each abnormal character in the character block as the average key coefficient of the corresponding character block;
[0022] The key coefficient of the abnormal character is negatively correlated with the character repetition coefficient of the corresponding character position.
[0023] Furthermore, if the processing condition responded by the data analysis module is that the abnormal character ratio of the key label image is greater than the preset abnormal character ratio, the image processing module is determined to detect the contrast reference value and the reflective area ratio of the key label image;
[0024] The image processing condition responded by the secondary processing module is that the contrast reference value of the key label image is greater than the preset contrast reference value and the reflective area ratio is less than or equal to the preset reflective area ratio, then it is determined to perform grayscale transformation on the key label image, and divide the key label image into a plurality of sub-image areas, and detect the optimal threshold value of each sub-image area;
[0025] The image processing module responds to an image processing condition that the contrast reference value is less than or equal to a preset contrast reference value or the reflective area ratio is greater than a preset reflective area ratio, and then determines to perform similarity analysis on each pixel in the key label image.
[0026] Furthermore, the processing condition responded by the data analysis module is that the abnormal character ratio of the key label image is less than or equal to the preset abnormal character ratio, then it is determined to detect the character ink range difference value of each abnormal character area;
[0027] For a single abnormal character area, if the adjustment condition responded by the secondary processing module is that the character ink range difference value is greater than the preset character ink range difference value, then the adjacent character area of the abnormal character area is determined to be the character area to be adjusted;
[0028] For a single character area to be adjusted, the area border and adjustment distance for adjusting the character area are determined according to the adjacent directions of the adjacent abnormal character areas and the character ink range difference values.
[0029] Further, the character analysis module responds to the recognition condition and determines to perform character recognition on each abnormal character image;
[0030] For a single character block with an abnormal character image,
[0031] The setting condition of the character analysis module response is that the abnormal key coefficient of the character block is greater than the preset abnormal key coefficient, then it is determined that the first analysis unit performs feature extraction on each abnormal character image in the character block;
[0032] The setting condition of the character analysis module response is that the abnormal key coefficient of the character block is less than or equal to the preset abnormal key coefficient, then the second analysis unit is determined to determine the character information of the abnormal character image in the character block based on the character information of the character block of the same information category in the current production cycle;
[0033] The recognition condition is that each character region to be adjusted has completed region adjustment.
[0034] Further, the first analysis unit performs feature extraction for each abnormal character image in the character block in response to the feature extraction condition;
[0035] For a single abnormal character image, the first analysis unit compares the extracted character features with the character features of each reference character image to determine the feature overlap, and determines the suspected character according to the feature overlap;
[0036] The feature extraction condition is that the character analysis module determines that the first analysis unit performs feature extraction on each abnormal character image in the character block.
[0037] Further, the first analysis unit responds to the matching condition and determines to perform product quality matching for the corresponding character block. The product quality matching process includes:
[0038] Determine a number of tag information to be determined based on each suspected character.
[0039] For a single tag information to be determined, the difference in quality parameters between the target detection product to which the tag information to be determined belongs and the detection product associated with the tag information to be determined is detected;
[0040] Setting a priority coefficient for the tag information to be determined according to the difference in quality parameters;
[0041] The matching condition is that each abnormal character image in the character block completes the determination of the suspected character.
[0042] Compared with the prior art, the beneficial effect of the present invention lies in that the technical solution of the present invention makes targeted adjustments to the subsequent image processing and information recognition process according to the actual situation of the key label images of the abnormal products collected, so that the selected image processing method and information recognition process are more in line with the actual situation, so as to improve the accuracy of the information recognition results of the key label images with abnormal character images, thereby reducing the dependence on personnel identification.
[0043] Furthermore, in the present invention, when there is an abnormal character image in the key label image, the character information in the key label is divided into character blocks, and the abnormal key coefficient of the corresponding character block is determined according to the abnormal character ratio of each character block and the average key coefficient. Since the information of some characters in the character information is fixed in the same production cycle, adding this factor to the determination process of the abnormal key coefficient can effectively determine the degree of information loss and the difficulty of information recognition of each character block, thereby making the subsequent determination of the character recognition method more in line with the actual situation.
[0044] Furthermore, in the present invention, if the proportion of abnormal characters in the key label image is greater than the preset abnormal character proportion, the contrast reference value and the reflective area proportion of the key label image are detected, and the image processing method is determined according to the contrast reference value and the reflective area proportion. If the proportion of abnormal characters is too large, it is likely that the image acquisition quality is poor, resulting in most of the character images being unrecognizable. In addition, since there are differences between the positions of the key labels and the packaging backgrounds of different target detection products, the image processing method is determined according to the contrast reference value and the reflective area proportion. The present invention improves the effectiveness of the image processing process.
[0045] Furthermore, in the present invention, if the proportion of abnormal characters in the key label image is less than or equal to the preset abnormal character proportion, the associated influencing parameter detection is performed on each abnormal character area, and when the character ink range difference value is greater than the preset character ink range difference value, the character area to be adjusted is adjusted. Since printing failures are prone to occur during the printing process of the key label of the product packaging, the ink range is expanded, which in turn affects the adjacent character areas. Therefore, the character area is adjusted according to the adjacent directions of each adjusted character area and its abnormal character area and the character ink range difference value, which can effectively reduce the influence of abnormal characters on the information recognition process of adjacent characters, thereby improving the work efficiency of the information recognition process.
[0046] Furthermore, in the present invention, for character blocks with abnormal character images, the character recognition method is determined according to the abnormal key coefficient of the character block. For character blocks with smaller abnormal key coefficients, the character information of the abnormal characters can be determined based on the character information in character blocks of the same information category in the current production cycle. For character blocks with larger abnormal key coefficients, suspected characters are obtained by comparing the acquired character features, and the character information can be further determined through product quality matching. The present invention improves the accuracy of information recognition results. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a module connection diagram of the dish visualization processing detection system of the present invention;
[0048] Figure 2is a module structure block diagram of the character analysis module of the present invention;
[0049] Figure 3 A flow chart of determining the category of a corresponding character image according to an acquisition quality coefficient of the present invention;
[0050] Figure 4 The present invention is a flow chart of determining a processing method according to the proportion of abnormal characters. DETAILED DESCRIPTION
[0051] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0052] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0053] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0054] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0055] See also Figures 1 to 4 As shown, the present invention provides a dish visualization processing detection system, comprising:
[0056] The acquisition and analysis module is used to perform quality inspection and key label image acquisition on randomly selected target inspection products, and to detect the acquisition quality coefficient of each character image in the key label image, and determine the category of the character image according to the acquisition quality coefficient;
[0057] A key analysis module, which is connected to the acquisition and analysis module, is used to respond to whether there is an abnormal character image in the key label image to determine whether to perform abnormal key coefficient analysis on each character block in the key label;
[0058] A data analysis module connected to the acquisition and analysis module, for determining the processing method to detect the contrast reference value and the reflective area ratio of the key label image or to detect the character ink range difference value of each abnormal character area according to the abnormal character ratio corresponding to the corresponding processing condition;
[0059] A secondary processing module, which is connected to the acquisition and analysis module and the data analysis module respectively, for determining the character area to be adjusted and performing area adjustment, and responding to the contrast reference value and the reflective area ratio corresponding to the processing conditions to determine the image processing method accordingly;
[0060] A character analysis module is respectively connected to the acquisition and analysis module, the secondary processing module and the data analysis module, and is used to respond to the abnormal key coefficient corresponding to the set conditions to correspondingly determine the character recognition method as feature extraction for each abnormal character image in the character block, or to determine the character information of the abnormal character image based on the character information of the character block of the same information category.
[0061] Among them, the application scenario of the present invention is product inspection of pre-prepared dishes, the target inspection product is a completed pre-prepared dish product, the key label is the information printed on the packaging of the pre-prepared dish product, the information of the key label represents the production batch of the corresponding pre-prepared dish product and other relevant information, the user randomly draws the target inspection product, and performs quality inspection based on the drawn target inspection product, and simultaneously collects the key label image, which is the image of the complete printing area of the key label.
[0062] Specifically, the acquisition and analysis module performs quality inspection on randomly selected target inspection products to obtain quality inspection results;
[0063] For a single target detection product,
[0064] The acquisition condition responded by the acquisition and analysis module is that if the detection result of any type of detection is not within the preset result range, it is determined to perform key label image acquisition for the target detection product.
[0065] Among them, the process of quality inspection for the target detection product includes several types of inspections, including but not limited to packaging sealing inspection for the target detection product and content microbial inspection for the target detection product. For a single type of inspection, if the numerical value of the inspection result is less than or equal to the maximum value of the preset result range and greater than the minimum value of the preset result range, then the inspection result of this type of inspection is determined to be within the preset result range; if the numerical value of the inspection result is greater than the maximum value of the preset result range or less than or equal to the minimum value of the preset result range, then the inspection result of this type of inspection is determined to be not within the preset result range. How to set the preset result range for the inspection results of each type of inspection is easy for technical personnel in this field to understand and will not be elaborated here.
[0066] Specifically, the acquisition and analysis module detects the acquisition quality coefficient of each character image in the key label image of the target detection product, and determines the category of the corresponding character image according to the acquisition quality coefficient;
[0067] For a single character image, if the classification condition responded by the image analysis module is that the acquisition quality coefficient is less than or equal to the preset acquisition quality coefficient, the character image is determined to be an abnormal character image;
[0068] The classification condition responded by the image analysis module is that the acquisition quality coefficient is greater than the preset acquisition quality coefficient, and the character image is determined to be a standard character image;
[0069] The acquisition quality coefficient is determined according to the similarity between the character image and each reference character image.
[0070] The categories of the character images include abnormal character images and standard character images, and the characters in the abnormal character images are recorded as abnormal characters, and the characters in the standard character images are recorded as standard characters;
[0071] In the present invention, character regions are divided for key label images. There is only a single character in a character region, and the image corresponding to each character region is recorded as the character image of the corresponding character. For a single character image, the acquisition quality coefficient is positively correlated with the baseline similarity of the character image. The baseline similarity is the maximum value of the similarity between the character image and each baseline character image. The user sets a baseline character image for each character that may exist in the key label. The user can record images in the historical records of various types of character information that have no truncation or missing parts and have clear character edges, and no blur or deformation as the baseline character image of the corresponding character. The characters in the present invention may be numbers or letters. The character information The types include but are not limited to 1, 2, 3, A and B. The user can set the value of the preset acquisition quality coefficient according to actual needs and historical records. The higher the user's requirements for the accuracy of the information recognition results of the key label image, the larger the value of the preset acquisition quality coefficient. A method for setting the value of the preset acquisition quality coefficient is provided, and the minimum value of the acquisition quality coefficient of each character image that can directly identify the character information in the historical records that meet the user's requirements for the accuracy of the information recognition results of the key label image is recorded as the preset acquisition quality coefficient. How to detect the similarity between the character image and each benchmark character image is easy for technical personnel in this field to understand and will not be elaborated here.
[0072] Specifically, the analysis condition responded by the key analysis module is that there is an abnormal character image in the key label image of the target detection product, and then it is determined to perform abnormal key coefficient analysis on each character block in the key label, including:
[0073] The character information in the key tag is divided into character blocks according to preset rules, and the abnormal character image ratio of each character block and the key coefficient of each abnormal character in each character block are detected, and the abnormal key coefficient of the corresponding character block is determined according to the abnormal character image ratio of each character block and the average key coefficient;
[0074] The abnormal key coefficient is positively correlated with the abnormal character image proportion and the average key coefficient.
[0075] Specifically, the key analysis module determines the key coefficient of the abnormal character at the corresponding character position according to the character repetition coefficient of each character position in the character block of the same information category in the current production cycle, and records the key coefficient of each abnormal character in the character block as the average key coefficient of the corresponding character block;
[0076] The key coefficient of the abnormal character is negatively correlated with the character repetition coefficient of the corresponding character position.
[0077] The preset rules are adaptively set according to the printing rules of key labels in actual working scenarios. The preset rules can clearly indicate the setting order of character blocks of each information category. The character blocks divided according to the preset rules only fully represent one type of information category. The information categories of the character blocks include but are not limited to years, months and dates. For example, if the printing rule of the key label is "year month date", and a key label is "2024 09 30", the key label can be divided into three character blocks of "2024", "09" and "30". For a single character block, the proportion of abnormal character images = the number of abnormal character images / the number of character images in the character block;
[0078] The user can set the duration of the production cycle according to actual needs. The higher the user's requirements for the accuracy of the information recognition results of the key label image, the shorter the production cycle. A value of the production cycle is provided, and the value of the production cycle is 24 hours. The information categories of the character block include but are not limited to year, month and date. For any character position of a single character block, the character repetition coefficient = the maximum number of character repetitions at the character position / the number of different key labels in the production cycle. The character repetition number is the number of times each type of character information appears at the character position in the current cycle.
[0079] Specifically, the processing condition responded by the data analysis module is that the abnormal character ratio of the key label image is greater than the preset abnormal character ratio, then the image processing module is determined to detect the contrast reference value and the reflective area ratio of the key label image;
[0080] The image processing condition responded by the secondary processing module is that the contrast reference value of the key label image is greater than the preset contrast reference value and the reflective area ratio is less than or equal to the preset reflective area ratio, then it is determined to perform grayscale transformation on the key label image, and divide the key label image into a plurality of sub-image areas, and detect the optimal threshold value of each sub-image area;
[0081] The image processing module responds to an image processing condition that the contrast reference value is less than or equal to a preset contrast reference value or the reflective area ratio is greater than a preset reflective area ratio, and then determines to perform similarity analysis on each pixel in the key label image.
[0082] Among them, the abnormal character ratio of the key label image = the number of abnormal character images in the key label image / the number of character images in the key label image. The user can set the value of the preset abnormal character ratio according to actual needs and historical records. The higher the user's requirements for the accuracy of the information recognition result of the key label image, the smaller the value of the preset abnormal character ratio. A method for determining the value of the preset abnormal character ratio is provided. The historical records of image processing for the key label image are recorded as the ratio reference records. The minimum value of the abnormal character ratio of each key label image in the ratio reference records that meet the user's requirements for the accuracy of the information recognition result of the key label image is recorded as the preset abnormal character ratio. A value of the preset abnormal character ratio is provided, and the value of the preset abnormal character ratio is 0.6;
[0083] The contrast reference value is the absolute value of the difference between the maximum grayscale value and the minimum grayscale value of the key label image. The reflective area ratio = the sum of the areas of each reflective area / the area of the key label image. The reflective area is an area with a higher brightness value formed in the image due to light reflection. How to determine the contrast reference value and the reflective area is easy for technicians in this field to understand and will not be elaborated here.
[0084] The preset contrast reference value and the preset reflective area ratio can be set by the user according to actual needs and historical records. The higher the user's requirements for the accuracy of the information recognition result of the key label image, the larger the value of the preset contrast reference value and the smaller the value of the preset reflective area ratio. A method for determining the preset contrast reference value is provided, in which the historical record of determining the filter value according to the similarity between each pixel point is recorded as an image reference record, and the maximum value of the contrast reference value of each key label image in the image reference record that meets the user's requirements for the accuracy of the information recognition result of the key label image is recorded as the preset contrast reference value. A method for determining the preset reflective area ratio is provided, in which the minimum value of the reflective area ratio of each key label image in the image reference record that meets the user's requirements for the accuracy of the information recognition result of the key label image is recorded as the preset reflective area ratio;
[0085] If the contrast reference value of the key label image is greater than the preset contrast reference value and the reflective area ratio is less than or equal to the preset reflective area ratio, a grayscale transformation is performed on the key label image. The grayscale change process includes transforming the grayscale value of each pixel of the input image. For a single pixel, the grayscale value obtained by the transformation is the product of the γ power of the original grayscale value and the preset change coefficient. γ is a transformation factor to control the degree of adjustment in the change process. The user can set the value of the transformation factor according to the original grayscale value of the pixel. By performing grayscale transformation on each pixel in the key label image, the clarity of the key label image can be effectively improved to solve the problem of low contrast of the reflective area and the image. After completing the grayscale transformation, a local threshold analysis is performed on the key label image. In the present invention, an adaptive binary method is used to perform local threshold analysis to segment the key label graphics. How to set the transformation factor according to the original grayscale value of the pixel, how to set the preset change coefficient, and how to use the adaptive binary method to perform local threshold analysis are contents that are easy to understand for those skilled in the art and will not be elaborated here.
[0086] If the contrast reference value is less than or equal to the preset contrast reference value or the reflective area ratio is greater than the preset reflective area ratio, the similarity of each pixel in the key label image is calculated, and the search window and the matching window are set according to the preset search window side length and the preset matching window side length. The process of similarity analysis for a single pixel includes: extracting a matching window centered on the pixel and extracting a matching window of the same size in the key label image according to the search window, calculating the similarity of the two matching windows according to the Euclidean distance, and determining the weight coefficient according to the obtained similarity. The size of the weight coefficient is positively correlated with the similarity, and all weight coefficients are normalized. The normalized processing is performed to ensure that the sum of the weight coefficients is 1, and the weighted average value of all pixels in the search window is calculated according to the normalized weight coefficients, and the calculated weighted average value is assigned to the pixel currently being processed; wherein, the user can adaptively set the value of the preset search window side length and the preset matching window side length according to the actual working situation. In the present invention, the weight coefficient is determined according to the similarity based on the Gaussian function. How to set the preset search window side length and the preset matching window side length, how to calculate the similarity of the two matching windows according to the Euclidean distance, and how to determine the weight coefficient based on the Gaussian function are contents that are easy to understand for those skilled in the art and are not described in detail here.
[0087] Specifically, the processing condition responded by the data analysis module is that the abnormal character ratio of the key label image is less than or equal to the preset abnormal character ratio, and then it is determined to detect the character ink range difference value of each abnormal character area;
[0088] For a single abnormal character area, if the adjustment condition responded by the secondary processing module is that the character ink range difference value is greater than the preset character ink range difference value, then the adjacent character area of the abnormal character area is determined to be the character area to be adjusted;
[0089] For a single character area to be adjusted, the area border and adjustment distance for adjusting the character area are determined according to the adjacent directions of the adjacent abnormal character areas and the character ink range difference values.
[0090] Wherein, for a single abnormal character area, the character ink range difference value is the difference value obtained by subtracting the character ink width of the abnormal character area from the reference character ink width. In the present invention, a number of detection points are randomly selected for the characters in the abnormal character area, and the character line width of the detection point is detected. The character ink width is the average value of the character line widths detected at different detection points, and the reference character ink width is the average value of the character ink widths of the characters in each reference character image. The user can set the value of the preset character ink range difference value according to actual needs and historical records. The higher the user's accuracy requirements for the information recognition results of the key label image, the smaller the value of the preset character ink range difference value. A method for setting the preset character ink range difference value is provided, and the records of the adjacent character areas of the abnormal character area without character area adjustment are recorded as ink reference records, and the minimum value of the character ink range difference values of each abnormal character area in the ink reference records that meet the user's accuracy requirements for the information recognition results of the key label image is recorded as the preset character ink range difference value. For a single abnormal character area, there is no character area between the abnormal character area and any of its adjacent character areas.
[0091] For a single character area to be adjusted, the area border and adjustment distance for character area adjustment are determined according to the adjacent direction of its adjacent abnormal character area and the character ink range difference value. The adjacent direction is the direction of the character area to be adjusted relative to the adjacent abnormal character area. If the character area to be adjusted is located on the right side of its adjacent abnormal character area, the left side border position of the character area to be adjusted is adjusted, that is, the left side border position is adjusted to the right. If the character area to be adjusted is located on the upper side of its adjacent abnormal character area, the lower side border position of the character area to be adjusted is adjusted, that is, the lower side border position is adjusted upwards. The adjustment distance is positively correlated with the character ink range difference value.
[0092] Specifically, the character analysis module responds to the recognition condition and determines to perform character recognition on each abnormal character image;
[0093] For a single character block with an abnormal character image,
[0094] The setting condition of the character analysis module response is that the abnormal key coefficient of the character block is greater than the preset abnormal key coefficient, then it is determined that the first analysis unit performs feature extraction on each abnormal character image in the character block;
[0095] The setting condition of the character analysis module response is that the abnormal key coefficient of the character block is less than or equal to the preset abnormal key coefficient, then the second analysis unit is determined to determine the character information of the abnormal character image in the character block based on the character information of the character block of the same information category in the current production cycle;
[0096] The recognition condition is that each character region to be adjusted has completed region adjustment.
[0097] Among them, the second analysis unit determines the character information of the abnormal character image in the character block based on the character information of the character block of the same information category in the current production cycle. For a single abnormal character, the character information corresponding to the maximum number of character repetitions at the character position where the character is located is recorded as the character information of the abnormal character.
[0098] Specifically, the first analysis unit performs feature extraction for each abnormal character image in the character block in response to the feature extraction condition;
[0099] For a single abnormal character image, the first analysis unit compares the extracted character features with the character features of each reference character image to determine the feature overlap, and determines the suspected character according to the feature overlap;
[0100] The feature extraction condition is that the character analysis module determines that the first analysis unit performs feature extraction on each abnormal character image in the character block.
[0101] Among them, in the present invention, a number of character features are set for the benchmark character images corresponding to each type of character information. The feature overlap between a single abnormal character image and any benchmark character image = the number of identical character features of the two character images / the number of character features of the benchmark character image. The characters corresponding to the benchmark character images whose feature overlap is greater than the preset feature overlap are recorded as suspected characters. The user can set the value of the preset feature overlap according to actual needs and historical records. The higher the user's accuracy requirements for the information recognition results of the key label image, the larger the value of the preset feature overlap. A method for setting the value of the preset feature overlap is provided, and the average value of the feature overlap of the benchmark character images corresponding to each suspected character in the historical records that meets the user's accuracy requirements for the information recognition results of the key label image is recorded as the preset feature overlap. How to set character features for the benchmark character images corresponding to each type of character information and how to compare character features are contents that are easy to understand for technicians in this field and will not be elaborated here.
[0102] Specifically, the first analysis unit responds to the matching condition and determines to perform product quality matching on the corresponding character block. The product quality matching process includes:
[0103] Determine a number of tag information to be determined based on each suspected character.
[0104] For a single tag information to be determined, the difference in quality parameters between the target detection product to which the tag information to be determined belongs and the detection product associated with the tag information to be determined is detected;
[0105] Setting a priority coefficient for the tag information to be determined according to the difference in quality parameters;
[0106] The matching condition is that each abnormal character image in the character block completes the determination of the suspected character.
[0107] Among them, for all the character blocks with suspected characters determined for the existing abnormal character images, the suspected characters of each abnormal character image are combined to obtain the label information to be determined. For example, there is a character block containing an abnormal character image, and the character block is "2xxx". The character images at the second, third and fourth positions are abnormal character images. The suspected characters of the abnormal character image at the second position are 3 and 6, the suspected characters of the abnormal character image at the third position are 1 and 7, and the suspected characters of the abnormal character image at the fourth position are 9 and 8. Therefore, the label information to be determined that can be obtained by this character block includes but is not limited to "2319", "2318" and "2378".
[0108] For a single tag information to be determined, combine it with other character blocks to obtain the key tag information to be determined. The associated detection product is the target detection product that is closest to the production time represented by the key tag information to be determined and has a quality detection result. The quality parameter difference is the sum of the product of the result difference value of each type of detection and the influence coefficient corresponding to each type of detection. The user can set the value of the influence coefficient corresponding to the result difference value of each type of detection according to actual needs. If the quality detection process for the target detection product includes Salmonella content detection and nitrite content detection, quality parameter difference = Salmonella content difference value × influence coefficient corresponding to Salmonella content difference value + The nitrite content difference value × the influence coefficient corresponding to the nitrite content difference value, the Salmonella content difference value is the absolute value of the difference in the Salmonella content detected by the two target detection products, the nitrite content difference value is the absolute value of the difference in the nitrite content detected by the two target detection products, and a value of the influence coefficient corresponding to the Salmonella content difference value and the nitrite content difference value is provided, the value of the influence coefficient corresponding to the Salmonella content difference value is 0.5, and the value of the influence coefficient corresponding to the nitrite content difference value is 0.5; the setting priority coefficient is negatively correlated with the quality parameter difference, and the to-be-determined label information with a larger setting priority coefficient is set as the character information of the corresponding character block.
[0109] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A visual processing and detection system for dishes, characterized in that: include: The acquisition and analysis module is used to perform quality inspection and key label image acquisition on randomly selected target inspection products, and to detect the acquisition quality coefficient of each character image in the key label image, and determine the category of the character image according to the acquisition quality coefficient; A key analysis module, which is connected to the acquisition and analysis module, is used to respond to whether there is an abnormal character image in the key label image to determine whether to perform abnormal key coefficient analysis on each character block in the key label; A data analysis module connected to the acquisition and analysis module, for determining the processing method to detect the contrast reference value and the reflective area ratio of the key label image or to detect the character ink range difference value of each abnormal character area according to the abnormal character ratio corresponding to the corresponding processing condition; A secondary processing module, which is connected to the acquisition and analysis module and the data analysis module respectively, for determining the character area to be adjusted and performing area adjustment, and responding to the contrast reference value and the reflective area ratio corresponding to the processing conditions to determine the image processing method accordingly; A character analysis module is respectively connected to the acquisition and analysis module, the secondary processing module and the data analysis module, and is used to respond to the abnormal key coefficient corresponding to the set conditions to correspondingly determine the character recognition method as feature extraction for each abnormal character image in the character block, or to determine the character information of the abnormal character image based on the character information of the character block of the same information category.
2. The dish visualization processing and detection system according to claim 1, characterized in that: The acquisition and analysis module performs quality inspection on randomly selected target inspection products to obtain quality inspection results; For a single target detection product, The acquisition condition responded by the acquisition and analysis module is that if the detection result of any type of detection is not within the preset result range, it is determined to perform key label image acquisition for the target detection product.
3. The dish visualization processing and detection system according to claim 2, characterized in that: The acquisition and analysis module detects the acquisition quality coefficient of each character image in the key label image of the target detection product, and determines the category of the corresponding character image according to the acquisition quality coefficient; For a single character image, if the classification condition responded by the image analysis module is that the acquisition quality coefficient is less than or equal to the preset acquisition quality coefficient, the character image is determined to be an abnormal character image; The classification condition responded by the image analysis module is that the acquisition quality coefficient is greater than the preset acquisition quality coefficient, and the character image is determined to be a standard character image; The acquisition quality coefficient is determined according to the similarity between the character image and each reference character image.
4. The dish visualization processing and detection system according to claim 3 is characterized in that: The analysis condition responded by the key analysis module is that there are abnormal character images in the key label image of the target detection product, and then the abnormal key coefficient analysis is performed on each character block in the key label, including: The character information in the key tag is divided into character blocks according to preset rules, and the abnormal character image ratio of each character block and the key coefficient of each abnormal character in each character block are detected, and the abnormal key coefficient of the corresponding character block is determined according to the abnormal character image ratio of each character block and the average key coefficient; The abnormal key coefficient is positively correlated with the abnormal character image proportion and the average key coefficient.
5. The dish visualization processing and detection system according to claim 4, characterized in that: The key analysis module determines the key coefficient of the abnormal character at the corresponding character position according to the character repetition coefficient of each character position in the character block of the same information category in the current production cycle, and records the key coefficient of each abnormal character in the character block as the average key coefficient of the corresponding character block; The key coefficient of the abnormal character is negatively correlated with the character repetition coefficient of the corresponding character position.
6. The dish visualization processing and detection system according to claim 5, characterized in that: The processing condition responded by the data analysis module is that the abnormal character ratio of the key label image is greater than the preset abnormal character ratio, then the image processing module is determined to detect the contrast reference value and the reflective area ratio of the key label image; The image processing condition responded by the secondary processing module is that the contrast reference value of the key label image is greater than the preset contrast reference value and the reflective area ratio is less than or equal to the preset reflective area ratio, then it is determined to perform grayscale transformation on the key label image, and divide the key label image into a plurality of sub-image areas, and detect the optimal threshold value of each sub-image area; The image processing module responds to an image processing condition that the contrast reference value is less than or equal to a preset contrast reference value or the reflective area ratio is greater than a preset reflective area ratio, and then determines to perform similarity analysis on each pixel in the key label image.
7. The dish visualization processing and detection system according to claim 6, characterized in that: The processing condition responded by the data analysis module is that the abnormal character ratio of the key label image is less than or equal to the preset abnormal character ratio, then it is determined to detect the character ink range difference value of each abnormal character area; For a single abnormal character area, if the adjustment condition responded by the secondary processing module is that the character ink range difference value is greater than the preset character ink range difference value, then the adjacent character area of the abnormal character area is determined to be the character area to be adjusted; For a single character area to be adjusted, the area border and adjustment distance for adjusting the character area are determined according to the adjacent directions of the adjacent abnormal character areas and the character ink range difference values.
8. The dish visualization processing and detection system according to claim 7, characterized in that: The character analysis module responds to the recognition condition and determines to perform character recognition on each abnormal character image; For a single character block with an abnormal character image, The setting condition of the character analysis module response is that the abnormal key coefficient of the character block is greater than the preset abnormal key coefficient, then it is determined that the first analysis unit performs feature extraction on each abnormal character image in the character block; The setting condition of the character analysis module response is that the abnormal key coefficient of the character block is less than or equal to the preset abnormal key coefficient, then the second analysis unit is determined to determine the character information of the abnormal character image in the character block based on the character information of the character block of the same information category in the current production cycle; The recognition condition is that each character region to be adjusted has completed region adjustment.
9. The dish visualization processing and detection system according to claim 8, characterized in that: The first analysis unit performs feature extraction for each abnormal character image in the character block in response to the feature extraction condition; For a single abnormal character image, the first analysis unit compares the extracted character features with the character features of each reference character image to determine the feature overlap, and determines the suspected character according to the feature overlap; The feature extraction condition is that the character analysis module determines that the first analysis unit performs feature extraction on each abnormal character image in the character block.
10. The dish visualization processing and detection system according to claim 9, characterized in that: The first analysis unit responds to the matching condition and determines to perform product quality matching on the corresponding character block. The product quality matching process includes: Determine a number of tag information to be determined based on each suspected character. For a single tag information to be determined, the difference in quality parameters between the target detection product to which the tag information to be determined belongs and the detection product associated with the tag information to be determined is detected; Setting a priority coefficient for the tag information to be determined according to the difference in quality parameters; The matching condition is that each abnormal character image in the character block completes the determination of the suspected character.
Citation Information
Patent Citations
Character recognition method and pre-packaged food label intelligent auditing method and system
CN116863483A
Simulation license plate picture and character level label generation method
CN115497084A
Printing label quality detection method and system
CN117975168A
Image processor, abnormity detection method, program, and recording medium
JP2007081699A
Apparatus and method for detecting placement condition of bundled paper sheets
WO2015133326A1