A method and system for automatically labeling image objects based on image grayscale values
Through the automatic labeling method based on image grayscale values, combined with multi-dimensional feature extraction and deep learning models, the problems of accuracy and robustness in automatic labeling of image targets are solved, and efficient and accurate automatic labeling of targets is achieved in complex scenarios.
Patent Information
- Application Number
- CN202411173374.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The prior art has insufficient accuracy, robustness and multi-scale analysis capabilities in automatic labeling of image targets, especially when processing grayscale images, insufficient extraction of texture and shape features, poor adaptability, and at different scales and lighting conditions. The performance under the slightest is unstable.
Using an automatic labeling method based on image grayscale values, multi-scale and multi-resolution analysis is performed through image enhancement and preprocessing, multi-dimensional grayscale value feature extraction, adaptive threshold adjustment and deep learning fusion model, combined with convolutional neural network. Texture, edge, and shape features are extracted and image analysis is performed on different scales to achieve accurate automatic labeling of the goals.
Improve the accuracy and robustness of automatic labeling of image targets, maintain good performance under conditions of light changes and low contrast, enhance adaptability to different brightness and contrast conditions, and significantly improve labeling accuracy and recognition capabilities.
Smart Images

Figure CN118692089B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for automatically labeling image objects based on image grayscale values. Background Art
[0002] Automatic object annotation aims to identify objects in images and assign appropriate labels. Traditional image annotation methods rely on simple image processing techniques such as color, brightness, and simple texture analysis, which often fail to accurately identify complex or occluded objects in images. In addition, these methods lack multi-scale analysis of images, making it difficult to accurately identify objects with significant features at different scales. Another major drawback of traditional methods is that they usually do not include deep learning techniques, which limits their ability to learn high-level, complex feature representations in images.
[0003] In the processing of grayscale images, existing methods often fail to fully utilize the rich texture and shape features contained in grayscale information. In addition, most existing technologies lack effective multi-scale and multi-resolution analysis mechanisms, which limits their ability to identify details and shape features at different scales and are unstable under changing lighting and contrast conditions. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a method for automatic image target annotation based on image grayscale values, which can solve the shortcomings of accuracy, robustness and multi-scale analysis of automatic image target annotation in complex scenes. It overcomes the problems of insufficient texture and shape feature extraction, poor adaptability and limitations in multi-scale analysis in the prior art when processing grayscale images.
[0006] In order to solve the above technical problems, the present invention provides the following technical solution, a method for automatically labeling image objects based on image grayscale values, comprising:
[0007] Perform image enhancement and preprocessing on the input image, extract multi-dimensional grayscale features from the preprocessed image, including texture analysis, edge detection and shape feature extraction, and construct a multi-dimensional feature space;
[0008] Adopt adaptive gray value threshold adjustment, dynamically adjust the threshold according to the image features, apply deep learning and gray value fusion model, use convolutional neural network CNN to learn high-level feature representation of the image, and combine the features with gray value features;
[0009] Multi-scale and multi-resolution analysis is performed based on the feature combination results. Through scale space theory and multi-resolution analysis technology, images are analyzed at different scales and resolutions, and the objects in the images are accurately and automatically labeled.
[0010] As a preferred solution of the method for automatic image target labeling based on image grayscale value described in the present invention, the image enhancement and preprocessing includes calculating the grayscale histogram of the original image, adjusting the grayscale distribution of the image by histogram equalization technology, then calculating the cumulative distribution function CDF, and using the CDF to map each pixel value in the original image to a new grayscale level, and applying the median filtering technology to denoise the image, including selecting a neighborhood window for each pixel in the image, and replacing the current pixel value with the median of the pixel value in the window, using a convolutional neural network CNN to learn to generate a mapping of a high-resolution image from a low-resolution image, and enhancing the resolution of the image by super-resolution technology.
[0011] As a preferred solution of the image target automatic labeling method based on image gray value of the present invention, the multi-dimensional gray value feature extraction includes designing a multi-dimensional gray value feature extraction model using gray level co-occurrence matrix GLCM, local binary pattern LBP, Sobel operator, Canny edge detection method and Hough transform or shape context algorithm, which is specifically as follows:
[0012] ,
[0013] in, It is a higher integration function based on GLCM, which is used to deal with the complexity of texture features; It is a parameter to adjust the accuracy of texture analysis; It is a summation function used to analyze the details of LBP features; is the threshold parameter of the local binary pattern; It is a complex information filtering function for images processed by the Sobel operator; is the sensitivity parameter of edge detection; is the input image; is the gray-level co-occurrence matrix of the image, is a local binary pattern; This is the image processed by the Sobel operator; Shape features extracted by Hough transform or shape context algorithm; is the result of Canny edge detection, is the parameter corresponding to Canny edge detection; is the total number of pixels in the image; represents the domain of the entire image;
[0014] Use GLCM to describe the spatial relationship of gray levels in an image and extract texture features from it. The specific expression is:
[0015] ,
[0016] in, Indicates the distance The GLCM calculated above, Contrast and Homogeneity represent the contrast and homogeneity features extracted from GLCM respectively; The local binary pattern compares each pixel of the image with the pixels of its surrounding neighborhood to generate a binary number, which is specifically expanded as:
[0017] ,
[0018] in, is the gray value of the center pixel, is the number of pixels around the center pixel. The gray value of the neighboring pixels, is the number of neighborhood pixels, is a sign function;
[0019] Complex information filtering function It is used to process the image processed by the Sobel operator and evaluate the clarity and strength of the image edge. The specific expansion is:
[0020] ,
[0021] in, is the Sobel operator after processing at position The pixel value of
[0022] Shape characteristics Extracted by Hough transform or shape context algorithm, the specific expansion is:
[0023] ,
[0024] in, is the Dirac function used to detect straight lines in Hough space, and are the angle and distance parameters of the line respectively.
[0025] As a preferred solution of the method for automatic image target annotation based on image grayscale value of the present invention, the adaptive grayscale value threshold adjustment includes automatically adjusting the grayscale threshold according to the brightness, contrast and size of the target object of the image to construct an adaptive grayscale value threshold model. is the input image, is the brightness of the image, is the contrast of the image, is the size of the target object, then the adaptive grayscale threshold It is expressed as follows:
[0026] ,
[0027] in, The image contrast A complex integral function of is used to smooth the changes in contrast in different image regions; It is a logarithmic function of image brightness, which is used to adjust the effect of brightness on the threshold; is the threshold adjusted according to the size of the target object, where is the preset size parameter used to adjust the sensitivity of the target size; Normalize the effect of contrast to [ - 0.5,0.5] interval to ensure that the output of the entire formula is within a reasonable range;
[0028] in, Higher values mean using a higher grayscale threshold in images with higher brightness, higher contrast, or larger target objects, and vice versa.
[0029] As a preferred solution of the method for automatic image target labeling based on image grayscale value of the present invention, the deep learning and grayscale value fusion model includes constructing the deep learning and grayscale value fusion model according to the results of feature extraction and adaptive grayscale value threshold adjustment, which is constructed as follows:
[0030] set up is the input image, Indicates that Model parameters Convolutional neural network defined for images The processing result is For images The gray value feature function is used to extract the features corresponding to the gray value. The fusion model is expressed as:
[0031] ,
[0032] in, represents the normalization function, which is used to map the fused features into a specific range; and is the weight parameter used to adjust The weights of features and gray value features in the fusion process; Represents the image The gray value features are integrated as a whole to capture the overall gray information of the image; It is a tuning parameter used to balance the contribution of logarithmic terms and enhance the nonlinear expression ability of the model; Represents the modulus of CNN features, providing information about the strength of high-level features of the image; the range of the formula is determined by the normalization function Decision, usually [0,1] or ;
[0033] Gray value characteristic function Aims to The grayscale-related features are extracted from the image. The features include grayscale histogram, grayscale statistics, and grayscale-based texture features. The specific expansion is as follows:
[0034] ,
[0035] in, is the total number of pixels in the image, It is The gray value of a pixel, is the average gray value of the image.
[0036] As a preferred solution of the method for automatic image target annotation based on image grayscale value of the present invention, the multi-scale and multi-resolution analysis includes creating a multi-scale representation of the image using scale space theory, which is achieved by applying a series of Gaussian filters of different sizes to the image, each filter corresponding to a specific scale:
[0037] ,
[0038] in, Indicated in scale The image at is a Gaussian filter, is the original image, Represents the convolution operation;
[0039] At each scale, the key features of the image are extracted by applying edge detection operators or corner detection algorithms;
[0040] Use wavelet transform to perform multi-resolution analysis on the image, including approximate parts and detailed parts:
[0041] ,
[0042] in, It is The approximate part of the level, It is Level details.
[0043] As a preferred solution of the method for automatic image target annotation based on image grayscale value of the present invention, the multi-scale and multi-resolution analysis also includes analyzing and evaluating the image, and the edge strength evaluation uses the Sobel operator to calculate the gradient amplitude of the image. , calculate the average value of the gradient magnitude ; Texture complexity evaluation uses local binary pattern LBP to extract the texture features of the image and calculate the entropy of the texture features ; Shape contrast evaluation calculates the matching score between shape features and predefined shape templates through shape matching algorithm , Comprehensive significance score Based on the evaluation indicators, a comprehensive significance score is defined :
[0044] ,
[0045] in, is the weight coefficient, are the maximum possible values of gradient magnitude, texture entropy, and shape matching score, respectively, to normalize the contribution of each indicator;
[0046] Setting Thresholds ,if , the image feature is considered significant; otherwise, the feature is considered insignificant; the edge strength, texture complexity, and shape contrast are classified and evaluated. The size of and This means that the high-contrast target features are significant at multiple scales; if and This means that the detail features are significant at smaller scales but blurred at larger scales; if and This indicates that the target size has significant changes at different scales; the determination of the smaller scale and the larger scale is obtained through multi-scale comparison;
[0047] When the target features are significant at multiple scales and have high contrast, edge detection algorithms are used to enhance edge information. If the target shape is obvious, shape matching technology is further used to identify targets with specific shapes. At the same time, feature-based classifiers are used to combine shape and edge features to identify and annotate the targets. Feature fusion technology is used to combine shape and edge features to improve the accuracy of classification and recognition.
[0048] If the detailed features of the target are significant at a smaller scale but become blurred at a larger scale, wavelet transform or local binary pattern LBP is used to extract the detailed features at a smaller scale, and texture analysis methods and local shape analysis techniques are used to identify areas with similar textures or shapes at a smaller scale. A deep learning model is used to learn the complex relationship between detailed features and target categories, and to perform accurate recognition and labeling of targets. Among them, special emphasis is placed on capturing texture and shape details at a smaller scale, and using deep learning methods to automatically learn the mapping relationship between features and target categories.
[0049] If the target size varies significantly at different scales, the smaller-scale detail feature extraction method and the larger-scale shape feature extraction method are used in combination, and a multi-level feature fusion technique is adopted to fuse the shape and detail features at different scales. A multi-scale target detection framework is applied to identify and label targets at different scales, focusing on capturing all-round information of the target at each scale, and integrating information through an advanced deep learning framework to achieve effective recognition and accurate labeling of targets of different sizes.
[0050] Another object of the present invention is to provide an automatic image target labeling system based on image grayscale values, which can solve the problems of insufficient accuracy, robustness and multi-scale analysis capabilities of automatic image target labeling in complex scenes by constructing an automatic image target labeling system.
[0051] To solve the above technical problems, the present invention provides the following technical solutions: an automatic image target labeling system based on image grayscale values, the system comprising an image acquisition unit, an image processing module, a system logic unit, an algorithm module and an information transmission module; the image acquisition unit is used to acquire environmental information and image information, and synchronize the information to the image processing module; the image processing module is used to process and analyze the environmental information and image information; the system logic unit is used to design system operation procedures and operation strategies, and match corresponding operation strategies according to actual conditions; the algorithm module is used to carry the required algorithm model, and perform calculations and outputs; the information transmission module is used to receive and feedback user-end information, and complete information transmission between modules and units.
[0052] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, steps of a method for automatically labeling image targets based on image grayscale values are implemented.
[0053] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of a method for automatically labeling image targets based on image grayscale values are implemented.
[0054] Beneficial effects of the present invention: The method of the present invention can more accurately capture the details and texture information of the target through multi-dimensional feature extraction of grayscale values, and can maintain good performance even under conditions of lighting changes or low contrast. Secondly, the use of adaptive grayscale thresholds greatly enhances the adaptability of the method to images under different brightness and contrast conditions. In addition, the application of deep learning and grayscale value fusion models enables the present invention to learn and express high-level features in images, significantly improving the accuracy and robustness of annotation. Finally, through multi-scale and multi-resolution analysis, the present invention can effectively identify and annotate targets with significant features at different scales, thereby achieving efficient and accurate automatic target annotation in complex image scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0056] Figure 1 A schematic flow chart of a method for automatically labeling image objects based on image grayscale values provided by an embodiment of the present invention.
[0057] Figure 2 A schematic diagram of modules of a system for automatically labeling image objects based on image grayscale values provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0060] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0061] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0062] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0063] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0064] Example 1
[0065] Reference Figure 1 , which is the first embodiment of the present invention, provides a method for automatically labeling image objects based on image grayscale values, comprising:
[0066] S1: Perform image enhancement and preprocessing on the input image, perform multi-dimensional grayscale value feature extraction on the preprocessed image, including texture analysis, edge detection and shape feature extraction, and construct a multi-dimensional feature space.
[0067] The image enhancement and preprocessing includes calculating the grayscale histogram of the original image, adjusting the grayscale distribution of the image by using the histogram equalization technology, then calculating the cumulative distribution function CDF, and using the CDF to map each pixel value in the original image to a new grayscale level, and applying the median filtering technology to denoise the image, including selecting a neighborhood window for each pixel in the image and replacing the current pixel value with the median of the pixel value in the window, using the convolutional neural network CNN to learn the mapping of generating a high-resolution image from a low-resolution image, and enhancing the resolution of the image by using the super-resolution technology.
[0068] The multidimensional grayscale value feature extraction includes designing a multidimensional grayscale value feature extraction model using a gray level co-occurrence matrix GLCM, a local binary pattern LBP, a Sobel operator, a Canny edge detection method, and a Hough transform or a shape context algorithm, as follows:
[0069] ,
[0070] in, It is a higher integration function based on GLCM, which is used to deal with the complexity of texture features; It is a parameter to adjust the accuracy of texture analysis; It is a summation function used to analyze the details of LBP features; is the threshold parameter of the local binary pattern; It is a complex information filtering function for images processed by the Sobel operator; is the sensitivity parameter of edge detection; is the input image; is the gray-level co-occurrence matrix of the image, is a local binary pattern; This is the image processed by the Sobel operator; Shape features extracted by Hough transform or shape context algorithm; is the result of Canny edge detection, is the parameter corresponding to Canny edge detection; is the total number of pixels in the image; represents the domain of the entire image;
[0071] Use GLCM to describe the spatial relationship of gray levels in an image and extract texture features from it. The specific expression is:
[0072] ,
[0073] in, Indicates the distance The GLCM calculated above, Contrast and Homogeneity represent the contrast and homogeneity features extracted from GLCM respectively; The local binary pattern compares each pixel of the image with the pixels of its surrounding neighborhood to generate a binary number, which is specifically expanded as:
[0074] ,
[0075] in, is the gray value of the center pixel, is the number of pixels around the center pixel. The gray value of the neighboring pixels, is the number of neighborhood pixels, is a sign function;
[0076] Complex information filtering function It is used to process the image processed by the Sobel operator and evaluate the clarity and strength of the image edge. The specific expansion is:
[0077] ,
[0078] in, is the Sobel operator after processing at position The pixel value of
[0079] Shape characteristics Extracted by Hough transform or shape context algorithm, the specific expansion is:
[0080] ,
[0081] in, is the Dirac function used to detect straight lines in Hough space, and are the angle and distance parameters of the line respectively.
[0082] S2: Adaptive gray value threshold adjustment is adopted to dynamically adjust the threshold according to the image features, and a deep learning and gray value fusion model is applied to learn the high-level feature representation of the image using a convolutional neural network (CNN), and the features are combined with the gray value features.
[0083] The adaptive gray value threshold adjustment includes automatically adjusting the gray value threshold according to the brightness and contrast of the image and the size of the target object to construct an adaptive gray value threshold model. is the input image, is the brightness of the image, is the contrast of the image, is the size of the target object, then the adaptive grayscale threshold It is expressed as follows:
[0084] ,
[0085] in, The image contrast A complex integral function of is used to smooth the changes in contrast in different image regions; It is a logarithmic function of image brightness, which is used to adjust the effect of brightness on the threshold; is the threshold adjusted according to the size of the target object, where is the preset size parameter used to adjust the sensitivity of the target size; Normalize the effect of contrast to [ - 0.5,0.5] interval to ensure that the output of the entire formula is within a reasonable range;
[0086] in, Higher values mean using a higher grayscale threshold in images with higher brightness, higher contrast, or larger target objects, and vice versa.
[0087] The deep learning and gray value fusion model includes constructing the deep learning and gray value fusion model according to the results of feature extraction and adaptive gray value threshold adjustment, and the construction is as follows:
[0088] set up is the input image, Indicates that Model parameters Convolutional neural network defined for images The processing result is For images The gray value feature function is used to extract the features corresponding to the gray value. The fusion model is expressed as:
[0089] ,
[0090] in, represents the normalization function, which is used to map the fused features into a specific range; and is the weight parameter used to adjust The weights of features and gray value features in the fusion process; Represents the image The gray value features are integrated as a whole to capture the overall gray information of the image; It is a tuning parameter used to balance the contribution of logarithmic terms and enhance the nonlinear expression ability of the model; Represents the modulus of CNN features, providing information about the strength of high-level features of the image; the range of the formula is determined by the normalization function Decision, usually [0,1] or ;
[0091] Gray value characteristic function Aims to The grayscale-related features are extracted from the image. The features include grayscale histogram, grayscale statistics, and grayscale-based texture features. The specific expansion is as follows:
[0092] ,
[0093] in, is the total number of pixels in the image, It is The gray value of a pixel, is the average gray value of the image.
[0094] S3: Perform multi-scale and multi-resolution analysis based on the feature combination results. Through scale space theory and multi-resolution analysis technology, analyze images at different scales and resolutions, and accurately and automatically annotate the objects in the images.
[0095] The multiscale and multiresolution analysis involves using scale space theory to create a multiscale representation of the image by applying a series of Gaussian filters of different sizes to the image, each filter corresponding to a specific scale:
[0096] ,
[0097] in, Indicated in scale The image at is a Gaussian filter, is the original image, Represents the convolution operation;
[0098] At each scale, the key features of the image are extracted by applying edge detection operators or corner detection algorithms;
[0099] Use wavelet transform to perform multi-resolution analysis on the image, including approximate parts and detailed parts:
[0100] ,
[0101] in, It is The approximate part of the level, It is Level details.
[0102] The multi-scale and multi-resolution analysis also includes analyzing and evaluating the image, and the edge strength evaluation uses the Sobel operator to calculate the gradient amplitude of the image. , calculate the average value of the gradient magnitude ; Texture complexity evaluation uses local binary pattern LBP to extract the texture features of the image and calculate the entropy of the texture features ; Shape contrast evaluation calculates the matching score between shape features and predefined shape templates through shape matching algorithm , Comprehensive significance score Based on the evaluation indicators, a comprehensive significance score is defined :
[0103] ,
[0104] in, is the weight coefficient, are the maximum possible values of gradient magnitude, texture entropy, and shape matching score, respectively, to normalize the contribution of each indicator;
[0105] Setting Thresholds ,if , the image feature is considered significant; otherwise, the feature is considered insignificant; the edge strength, texture complexity, and shape contrast are classified and evaluated. The size of and This means that the high-contrast target features are significant at multiple scales; if and This means that the detail features are significant at smaller scales but blurred at larger scales; if and This indicates that the target size has significant changes at different scales; the determination of the smaller scale and the larger scale is obtained through multi-scale comparison;
[0106] When the target features are significant at multiple scales and have high contrast, edge detection algorithms are used to enhance edge information. If the target shape is obvious, shape matching technology is further used to identify targets with specific shapes. At the same time, feature-based classifiers are used to combine shape and edge features to identify and annotate the targets. Feature fusion technology is used to combine shape and edge features to improve the accuracy of classification and recognition.
[0107] If the detailed features of the target are significant at a smaller scale but become blurred at a larger scale, wavelet transform or local binary pattern LBP is used to extract the detailed features at a smaller scale, and texture analysis methods and local shape analysis techniques are used to identify areas with similar textures or shapes at a smaller scale. A deep learning model is used to learn the complex relationship between detailed features and target categories, and to perform accurate recognition and labeling of targets. Among them, special emphasis is placed on capturing texture and shape details at a smaller scale, and using deep learning methods to automatically learn the mapping relationship between features and target categories.
[0108] If the target size varies significantly at different scales, the smaller-scale detail feature extraction method and the larger-scale shape feature extraction method are used in combination, and a multi-level feature fusion technique is adopted to fuse the shape and detail features at different scales. A multi-scale target detection framework is applied to identify and label targets at different scales, focusing on capturing all-round information of the target at each scale, and integrating information through an advanced deep learning framework to achieve effective recognition and accurate labeling of targets of different sizes.
[0109] Example 2
[0110] As an embodiment of the present invention, a method for automatic labeling of image objects based on image grayscale values is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.
[0111] The experimental design aims to evaluate and compare the performance of the proposed method with traditional image annotation methods in image preprocessing, feature extraction, adaptive threshold adjustment, deep learning fusion model, multi-scale and multi-resolution analysis, etc.
[0112] Two datasets were selected for the experiment: one is natural scene images with complex backgrounds and diverse lighting conditions, and the other is urban street scene images with different scales and occlusions. Each dataset contains 1,000 high-resolution images. The experiment was conducted on a computing platform with high-performance GPU acceleration to ensure the efficiency of deep learning model training and testing.
[0113] In order to make effective comparisons, the following evaluation indicators are defined: labeling accuracy, labeling efficiency, and model generalization. Labeling accuracy is calculated by comparing the consistency between the automatic labeling results and the true labels, labeling efficiency is evaluated by calculating the average time required to process a single image, and model generalization is evaluated by performance on unseen images.
[0114] Firstly, grayscale histogram equalization and median filter denoising techniques are applied to all images. For the method of the present invention, a dynamic grayscale adjustment technique based on cumulative distribution function (CDF) is also introduced to adapt to different lighting conditions.
[0115] Multidimensional grayscale feature extraction techniques such as gray-level co-occurrence matrix (GLCM), local binary pattern (LBP), Sobel operator and Canny edge detection are used to extract texture, edge and shape features from images. In contrast, traditional methods mainly rely on simple color and brightness features.
[0116] The present invention analyzes the brightness and contrast information of the image and dynamically adjusts the grayscale threshold to improve the sensitivity and accuracy of target detection. The traditional method uses a fixed threshold setting.
[0117] A convolutional neural network (CNN) is used to learn high-level features of the image and combine these features with grayscale features to achieve accurate object labeling. This step reflects the significant difference between the present invention and traditional methods, which lack the application of deep learning technology.
[0118] The present invention uses scale space theory and wavelet transform technology to perform multi-scale and multi-resolution analysis on images to capture significant target features at different scales, which are often ignored by traditional methods. The experimental results are shown in Table 1.
[0119] Table 1 Comparison of experimental results
[0120]
[0121] By comprehensively applying multi-dimensional grayscale feature extraction, including texture, edge, shape features, etc., the present invention can capture detailed information in the image more comprehensively. Especially when processing images with complex backgrounds or significant lighting changes, this method can effectively distinguish between targets and backgrounds and improve the accuracy of annotation. In addition, the application of deep learning and grayscale fusion models makes feature representation more advanced and abstract, which helps the model capture more complex patterns and relationships, thereby achieving higher annotation accuracy on diverse image data.
[0122] The optimization of the annotation efficiency of the method of the present invention not only improves the processing speed, but more importantly, reduces the demand for computing resources. This optimization is achieved thanks to the improvement and optimization of the image preprocessing step. Through dynamic grayscale adjustment and median filtering denoising, the computational burden of subsequent processing steps is reduced, which not only improves the accuracy of feature extraction, but also ensures an efficient data processing flow. This is particularly important for application scenarios that require real-time or near real-time processing of large amounts of image data.
[0123] The high model generalization capability demonstrated by the method of the present invention enables the model to learn rich feature representations and complex methods of distinguishing between targets and backgrounds through training on large-scale data sets. Through the adaptive grayscale threshold adjustment mechanism, a method for dynamically adapting to different image features is provided, further enhancing the applicability and robustness of the model in changing environments.
[0124] In summary, the present invention has significant advantages in automatic image object annotation, and improves the reliability and application scope of image annotation technology in practical applications.
[0125] Example 3
[0126] Reference Figure 2 , which is the third embodiment of the present invention, provides an automatic image target annotation system based on image grayscale values, the system includes an image acquisition unit, an image processing module, a system logic unit, an algorithm module and an information transmission module.
[0127] The image acquisition unit is used to collect environmental information and picture information, and synchronize the information to the image processing module.
[0128] The image processing module is used to process and analyze environmental information and image information.
[0129] The system logic unit is used to design system operation processes and operation strategies, and match corresponding operation strategies according to actual conditions.
[0130] The algorithm module is used to carry the required algorithm model and perform calculations and outputs.
[0131] The information transmission module is used to receive and feedback user-side information, and complete information transmission between modules and units.
[0132] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0133] Example 4
[0134] The fourth embodiment of the present invention is different from the first three embodiments in that:
[0135] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0136] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present application may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0137] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0140] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0141] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for automatically labeling image objects based on image grayscale values, characterized by: include, Perform image enhancement and preprocessing on the input image, extract multi-dimensional grayscale features from the preprocessed image, including texture analysis, edge detection and shape feature extraction, and construct a multi-dimensional feature space; Adopt adaptive gray value threshold adjustment, dynamically adjust the threshold according to image features, apply deep learning and gray value fusion model, use convolutional neural network CNN to learn high-level feature representation of images, and combine the high-level features with gray value features; Perform multi-scale and multi-resolution analysis based on the feature combination results. Use scale space theory and multi-resolution analysis technology to analyze images at different scales and resolutions, and accurately and automatically annotate the objects in the images. The multi-scale and multi-resolution analysis includes creating a multi-scale representation of the image using scale space theory, analyzing and evaluating the image, using the Sobel operator to evaluate the edge strength, and calculating the gradient magnitude M of the image, and calculating the average value of the gradient magnitude. Texture complexity evaluation uses local binary pattern LBP to extract texture features of the image and calculates the entropy E of the texture features; shape contrast evaluation uses a shape matching algorithm to calculate the matching score S1 between the shape features and the predefined shape template. Based on the evaluation indicators, a comprehensive significance score Q is defined: Among them, w1, w2, w3 are weight coefficients, M max 、E max , are the maximum possible values of gradient amplitude, texture entropy and shape matching score, respectively, to normalize the contribution of each indicator, and determine the corresponding target recognition and labeling scheme according to the relationship between the comprehensive significance score Q and the threshold, as well as the size relationship among w1, w2 and w3.
2. The method for automatically labeling image objects based on image grayscale values according to claim 1, characterized in that: The image enhancement and preprocessing includes calculating the grayscale histogram of the original image, adjusting the grayscale distribution of the image through the histogram equalization technology, and calculating the cumulative distribution function CDF, using the CDF to map each pixel value in the original image to a new grayscale level, and applying the median filtering technology to denoise the image, including selecting a neighborhood window for each pixel in the image and replacing the current pixel value with the median of the pixel value in the window, using the convolutional neural network CNN to learn and generate a mapping of the resolution image that meets the preset requirements, and enhancing the resolution of the image through the super-resolution technology.
3. The method for automatically labeling image objects based on image grayscale values according to claim 2, characterized in that: The multidimensional grayscale value feature extraction includes designing a multidimensional grayscale value feature extraction model using a gray level co-occurrence matrix GLCM, a local binary pattern LBP, a Sobel operator, a Canny edge detection method, and a Hough transform or a shape context algorithm, as follows: Among them, f is a higher integral function based on GLCM, which is used to deal with the complexity of texture features; λ is a parameter for adjusting the accuracy of texture analysis; g is a summation function for analyzing the details of LBP features; α is a threshold parameter for local binary patterns; h is a complex information filtering function for images processed by the Sobel operator; β is a sensitivity parameter for edge detection; I is the input image; G is the gray level co-occurrence matrix of the image, L is the local binary pattern; S is the image processed by the Sobel operator; H is the shape feature extracted by the Hough transform or shape context algorithm; C is the result of Canny edge detection, γ is the corresponding parameter of Canny edge detection; N is the total number of pixels in the image; Ω represents the domain of the entire image; GLCM is used to describe the spatial relationship of gray levels in an image and extract texture features from it. The specific expression of f is: Where G(τ) represents the GLCM calculated at the distance τ, Contrast and Homogeneity represent the contrast and homogeneity features extracted from the GLCM, respectively; The local binary pattern compares each pixel of the image with the pixels in the surrounding neighborhood and generates a binary number, which is expanded as follows: Among them, I i is the gray value of the center pixel, is the gray value of the kth neighboring pixel around the center pixel, P is the number of neighboring pixels, and sgn is the sign function; The complex information filter function h is used to process the image after the Sobel operator is used to evaluate the clarity and strength of the image edge. The specific expansion is: Among them, S(x,y) is the pixel value at position (x,y) after processing by the Sobel operator; The shape feature H is extracted by Hough transform, which is specifically expanded as follows: Among them, δ is the Dirac function used to detect straight lines in Hough space, and θ and ρ are the angle and distance parameters of the line, respectively.
4. The method for automatically labeling image objects based on image grayscale values according to claim 3, characterized in that: The adaptive gray value threshold adjustment includes automatically adjusting the gray value threshold according to the brightness and contrast of the image and the size of the target object to construct an adaptive gray value threshold model. Let I be the input image, B(I) be the brightness of the image, C1(I) be the contrast of the image, and D be the size of the target object. The adaptive gray value threshold T is expressed as follows: Among them, ∫0 1 C1(I,t)dt is a complex integral function of the image contrast C1(I), which is used to smooth the changes in contrast in different image regions; log(1+B(I)) is a logarithmic function of image brightness, which is used to adjust the effect of brightness on the threshold; -(D-&) is to adjust the threshold according to the size of the target object, where & is the preset size parameter used to adjust the sensitivity of the target size; Normalize the effect of contrast to the interval [-0.5, 0.5] to ensure that the output of the entire formula is within a reasonable range; Among them, a higher T(I) value means that a higher gray value threshold is used in an image with higher brightness, higher contrast or larger target object, and vice versa.
5. The method for automatically labeling image objects based on image grayscale values according to claim 4, characterized in that: The deep learning and gray value fusion model includes constructing the deep learning and gray value fusion model according to the results of feature extraction and adaptive gray value threshold adjustment, and the construction is as follows: Let X be the input image, F CNN (X; θ1) represents the processing result of the convolutional neural network defined by the CNN model parameter θ1 on the image X. Let G(X) be the gray value feature function of the image X, extract the features corresponding to the gray value, and the fusion model is expressed as: H(X)=σ(α1F CNN (X;θ1)+β1∫ Ω G(X)dΩ)+γ1ln(1+|F CNN (X;θ1)|) Among them, σ represents the normalization function, which is used to map the fused features into a specific range; α1 and β1 are weight parameters, which are used to adjust the weights of CNN features and grayscale features in the fusion process; ∫ Ω G(X)dΩ represents the overall integration of the grayscale value features of image X, capturing the overall grayscale information of the image; γ1 is an adjustment parameter used to balance the contribution of the logarithmic term and enhance the nonlinear expression ability of the model; |F CNN (X; θ1)| represents the modulus of the CNN feature, providing information about the strength of high-level features of the image; the range of the formula is determined by the normalization function σ, which is [0,1] or (-1,1); The gray value feature function G(X) extracts gray-scale related features from the image X. The features include gray-scale histogram, gray-scale statistics, and gray-scale-based texture features. The specific expansion is: Where N is the total number of pixels in the image, x i is the gray value of the i-th pixel, is the average gray value of the image.
6. The method for automatically labeling image objects based on image grayscale values according to claim 5, characterized in that: The multiscale and multiresolution analysis involves using scale space theory to create a multiscale representation of the image by applying a series of Gaussian filters of different sizes to the image, each filter corresponding to a specific scale: L(x,y,μ)=G(x,y,μ)*I(x,y) Where L(x,y,μ) represents the image at scale μ, G(x,y,μ) is the Gaussian filter, I(x,y) is the original image, and * represents the convolution operation; At each scale, the key features of the image are extracted by applying edge detection operators or corner detection algorithms; Use wavelet transform to perform multi-resolution analysis on the image, including approximate parts and detailed parts: Among them, A m (x,y) is the mth level approximation, D m (x,y) is the detail part at level m.
7. The method for automatically labeling image objects based on image grayscale values according to claim 6, characterized in that: The multi-scale and multi-resolution analysis also includes setting a threshold ∝, if Q≥∝, the image feature is considered significant; otherwise, the feature is considered insignificant; classifying and evaluating edge strength, texture complexity, and shape contrast, comparing the sizes of w1, w2, and w3, if w1>w2≥w3 and Q≥∝, it means that the high-contrast target feature is significant at multiple scales; if w2>w1≥w3 and Q≥∝, it means that the detail feature is significant at a smaller scale and blurred at a larger scale; if w3>w1≥w2 and Q≥∝, it means that the target size has significant changes at different scales; the determination of the smaller scale and the larger scale is obtained by multi-scale comparison; When the target features are significant at multiple scales and have high contrast, edge detection algorithms are used to enhance edge information. If the target shape is obvious, shape matching technology is further used to identify targets with specific shapes. At the same time, feature-based classifiers are used to combine shape and edge features to identify and annotate the targets. Feature fusion technology is used to combine shape and edge features to improve the accuracy of classification and recognition. If the detailed features of the target are significant at a smaller scale but become blurred at a larger scale, wavelet transform or local binary pattern LBP is used to extract the detailed features at a smaller scale, and texture analysis methods and local shape analysis techniques are used to identify areas with similar textures or shapes at a smaller scale. A deep learning model is used to learn the complex relationship between detailed features and target categories, and to perform accurate recognition and labeling of targets. If the target size varies significantly at different scales, the smaller-scale detail feature extraction method and the larger-scale shape feature extraction method are used in combination, and a multi-level feature fusion technique is adopted to fuse the shape and detail features at different scales. A multi-scale target detection framework is applied to identify and label targets at different scales, focusing on capturing all-round information of the target at each scale, and integrating information through an advanced deep learning framework to achieve effective recognition and accurate labeling of targets of different sizes.
8. A system using the method for automatic image target labeling based on image grayscale values as described in any one of claims 1 to 7, characterized in that: The system includes an image acquisition unit, an image processing module, a system logic unit, an algorithm module and an information transmission module; The image acquisition unit is used to collect environmental information and picture information, and synchronize the information to the image processing module; The image processing module is used to process and analyze environmental information and picture information; The system logic unit is used to design system operation procedures and operation strategies, and match corresponding operation strategies according to actual conditions; The algorithm module is used to carry the required algorithm model and perform calculations and outputs; The information transmission module is used to receive and feed back user-side information, and complete information transmission between modules and units.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
