Digital preprocessing method for image with complex background

CN119131420APending Publication Date: 2024-12-13LIDE (ZHONGSHAN) ENVIRONMENTAL TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311687805.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

During the digital preprocessing process of complex background images, the large amount of image information leads to a long time, low processing efficiency, poor recognition accuracy, and the preprocessing results cannot be guaranteed to be exactly the same as the original image, which affects the subsequent processing effect.

Method used

The image similarity evaluation model is used to evaluate the similarity between the restored image and the original image, combined with brightness and contrast, and build an image compression model through grayscale processing, denoising algorithm, edge detection, image segmentation and feature extraction, and use deep learning technology. Perform image reconstruction to ensure the accuracy of preprocessing results.

Benefits of technology

It improves the efficiency and recognition accuracy of image digital preprocessing, ensures the accuracy and consistency of preprocessing results, and improves the quality of image digital processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131420A_ABST
    Figure CN119131420A_ABST
Patent Text Reader

Abstract

The invention discloses a complex background image digital preprocessing method, and relates to the technical field of image digital processing. In order to solve the problems that in the prior art, in the digital graph processing process, due to the fact that images are complex and the information amount of the images is large, time is long, processing efficiency is low and recognition precision is poor in the preprocessing process. A digital preprocessing method for an image with a complex background comprises the steps of image acquisition, image enhancement, image segmentation, feature extraction, image compression and image reconstruction, and graying processing is carried out on the acquired color image, so that the dimension of the image is effectively reduced, the calculation amount is reduced, and the definition and resolution of the image are improved; the method is more suitable for subsequent analysis and processing, highlights target information in the image, weakens or removes unnecessary information, facilitates rapid extraction of target object features, improves the recognition precision, and effectively improves the image digital preprocessing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image digital processing, and in particular to a method for preprocessing digital images with complex backgrounds. Background Art

[0002] In the field of image processing, image processing for complex background environments has always been a difficult problem. Such images usually have the characteristics of high contrast, strong noise, and obstructions, which makes it difficult for traditional image processing methods to obtain ideal processing effects. There are relevant patents for digital preprocessing of images with complex backgrounds. For example, the Chinese patent with publication number CN106156691B discloses a method and device for processing complex background images, which obtains relevant images; grayscales and detects edges of relevant images; smoothes relevant images to remove edge information whose prior information is less than a preset threshold to generate a binary image; processes the binary image using a Sobel operator to generate a stroke feature image; performs an open operation on the stroke feature image and locates the text area of ​​the at least two stroke feature images; detects and filters the text area to update the position of the text area in the image; obtains a more accurate position of the text area in combination with the position of the text area in multiple stroke feature images; divides the text area and non-text area in the stroke feature image according to the more accurate position of the text area, and extracts and recognizes the text information of the text area.

[0003] Although the above patents improve the positioning accuracy and efficiency of text areas in images, the following problems still exist:

[0004] In the prior art, in the process of processing digital graphics, due to the complexity of the image and the large amount of image information, the preprocessing process takes a long time, the processing efficiency is low, and the recognition accuracy is poor. In addition, it is impossible to ensure that the feature extraction after the image digital preprocessing is completely consistent with the original image, resulting in the inability to accurately restore the image, affecting the subsequent processing of the image. Summary of the invention

[0005] The purpose of the present invention is to provide a method for preprocessing digital images of complex backgrounds, which evaluates the similarity between the restored image and the original image in structure, image and color through an image similarity evaluation model, and objectively evaluates the similarity between the restored image and the original image in combination with brightness and contrast, so as to ensure the accuracy of the preprocessing results, facilitate subsequent image processing, further improve the quality of image digital processing, and solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] The method for digital preprocessing of complex background images includes the following steps:

[0008] Step 1: Image acquisition: read the image to be processed, obtain the data type of the image, and grayscale the acquired color image;

[0009] Step 2: Image enhancement: Use a denoising algorithm to remove noise from the grayscale image, adjust the brightness and contrast of the image after denoising, perform edge detection on the adjusted image, and highlight the target object in the image;

[0010] Step 3: Image segmentation: Use image segmentation technology to divide the image into different regions based on image characteristics, and separate the target object from the background in each region image;

[0011] Step 4: Feature extraction: extracting features of the extracted target object, the features of the target object include color features, texture features and shape features, wherein the color feature is represented as the grayscale of the target object;

[0012] Step 5: Image compression: construct an image compression model to compress the extracted target object and its corresponding source image, obtain a compressed image, and transmit and store the compressed image;

[0013] Step 6: Image reconstruction: Image restoration is performed based on the extracted feature information of the target object, and the restored image is compared and evaluated with the target object in the source image to determine the evaluation result.

[0014] Furthermore, the color image obtained in step 1 is grayed out, specifically:

[0015] Acquire a color image through an image input device, and at the same time, acquire the data format and data parameters of the color image;

[0016] Based on the color space conversion algorithm, the color space conversion is performed on each pixel, the pixel value of the RGB color space is converted into the pixel value of the LAB color space, and the brightness value of each pixel is obtained by calculating the brightness component of the pixel in the LAB color space;

[0017] The brightness value of each pixel is mapped to the corresponding grayscale level, the grayscale level of each pixel is determined, the pixel value is converted from the LAB color space back to the RGB color space, and the processed grayscale image is output through the image output device.

[0018] Furthermore, the denoising algorithm used in step 2 to remove the noise in the grayscale image specifically includes:

[0019] Perform noise detection on the grayscale image, calculate the mean and variance of the grayscale image based on the brightness value of each pixel, and determine the type and degree of noise in the grayscale image based on the calculation results and the detected noise information;

[0020] De-noising is performed based on the noise type and degree in the grayscale image matching the corresponding denoising algorithm, wherein the denoising algorithm includes: smoothing filtering, median filtering, Gaussian filtering and bilateral filtering.

[0021] Furthermore, performing edge detection on the adjusted image in step 2 further includes:

[0022] Sharpen the denoised image and enhance the high-frequency components to reduce the blurry parts of the edge parts in the image, so as to obtain clear edge features;

[0023] Edge points reflecting grayscale changes in the image are extracted, and the edge points are connected to form a smooth curve and highlighted.

[0024] Furthermore, the specific steps for image segmentation in step 3 include:

[0025] The original image is divided into regular and equal-sized grids, and data features of each grid are calculated according to each grid, wherein the data features include grayscale mean, grayscale variance and grayscale jump difference;

[0026] Based on the data features, each grid is judged for its properties, and based on the judgment results, a merging and splitting process is performed to obtain sub-regions with consistent data features;

[0027] A thresholding process is performed on each of the sub-regions, and the grayscale distribution characteristics of each sub-region are displayed in the image.

[0028] Furthermore, the specific steps for image compression in step 5 include:

[0029] Construct an image compression model, train the constructed image compression model based on a neural network, and evaluate the obtained image compression model;

[0030] Compressing the image, after obtaining the image to be compressed, transforming the image based on the image compression model, the pixel value of the image is quantized to reduce the amount of image data, and the quantized image data is converted into symbols and encoded;

[0031] Compressed image storage is based on the transmission and storage of encoded image data, and when the image needs to be viewed or used, the encoded symbols are decoded to restore the original image data to obtain the compressed image.

[0032] Furthermore, the constructed image compression model is trained based on the neural network, specifically:

[0033] A large number of high-resolution images are collected from the Internet to form a training set, the high-resolution images in the training set are reduced to a uniform pixel size, and the reduced high-resolution images are cropped into training images with a uniform appearance format, and input into an image compression model for training;

[0034] After the model training is completed, a benchmark dataset independent of the training dataset is used to evaluate and compare the obtained model and verify the effect of the image compression model.

[0035] Furthermore, when the effect of the image compression model does not meet the preset requirements, the image compression model is trained in a cyclic training manner until the effect of the image compression model meets the preset requirements.

[0036] Furthermore, the specific steps for image reconstruction in step six include:

[0037] Using deep learning technology to identify the features of the extracted target object, and classifying the image data corresponding to the target object based on the identification result;

[0038] Based on the classification results, diversified differences are generated, and similarity extraction is performed to obtain an image data set, and the image data set is input into an adversarial network for adversarial training to restore the restored image data corresponding to the features of the target object;

[0039] An image similarity evaluation model is constructed, the restored image data and the source image data are input into the image similarity evaluation model for comparison, a comparison result is determined, and the restoration degree of the image in the comparison result is evaluated.

[0040] Furthermore, the image similarity evaluation model is used to evaluate the similarity between the restored image and the original image in structure, image, and color, and combines the similarity between the restored image and the original image in terms of brightness and contrast. The range of image similarity is -1 to 1. When the value of the image similarity evaluation model is equal to 1, the two images are consistent.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] 1. By graying the acquired color image, the dimension of the image is effectively reduced, the amount of calculation is reduced, the clarity and resolution of the image are improved, making it more suitable for subsequent analysis and processing, highlighting the target information in the image, weakening or removing unnecessary information, facilitating the rapid extraction of target object features, improving recognition accuracy, and effectively improving the efficiency of image digital preprocessing;

[0043] 2. The image similarity evaluation model is used to evaluate the similarity between the restored image and the original image in terms of structure, image, and color. The brightness and contrast are combined to objectively evaluate the similarity between the restored image and the original image to ensure the accuracy of the preprocessing results, facilitate subsequent image processing, and further improve the quality of image digital processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a flow chart of the method for digital preprocessing of complex background images of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] In order to solve the technical problems in the prior art of processing digital graphics, due to the complexity of the image and the large amount of image information, the pre-processing process takes a long time, the processing efficiency is low, and the recognition accuracy is poor, please refer to Figure 1 , this embodiment provides the following technical solutions:

[0047] The method for digital preprocessing of complex background images includes the following steps:

[0048] Step 1: Image acquisition: read the image to be processed, obtain the data type of the image, and grayscale the acquired color image;

[0049] The color image obtained in step 1 is grayed out, specifically:

[0050] Acquire a color image through an image input device, and at the same time, acquire the data format and data parameters of the color image;

[0051] Based on the color space conversion algorithm, the color space conversion is performed on each pixel, the pixel value of the RGB color space is converted into the pixel value of the LAB color space, and the brightness value of each pixel is obtained by calculating the brightness component of the pixel in the LAB color space;

[0052] Map the brightness value of each pixel obtained to the corresponding grayscale level, determine the grayscale level of each pixel, convert the pixel value from the LAB color space back to the RGB color space, and output the processed grayscale image through an image output device;

[0053] Specifically, by receiving a color image, calculating the brightness component of each pixel, mapping the brightness component to a grayscale level, and converting the mapped pixel value back to the RGB color space, and outputting a grayscale image, the color and detail information in the original image can be more accurately retained while avoiding the problems of color distortion and detail loss. Calculation in the LAB color space can also reduce the problems caused by color overflow in the RGB color space.

[0054] Step 2: Image enhancement: Use a denoising algorithm to remove noise from the grayscale image, adjust the brightness and contrast of the image after denoising, perform edge detection on the adjusted image, and highlight the target object in the image;

[0055] In one embodiment, a denoising algorithm such as a median filter or a Gaussian filter is used to filter the grayscale image. The median filter can effectively remove the impulse noise, and the Gaussian filter can smooth the image and reduce the noise impact.

[0056] Specifically, the contrast of the grayscale image is adjusted through contrast stretching or histogram equalization. Contrast stretching can stretch the dark area in the image to make the image clearer; histogram equalization can balance the overall contrast of the image and improve the overall visual effect.

[0057] The denoising algorithm used in step 2 to remove noise from the grayscale image specifically includes:

[0058] Perform noise detection on the grayscale image, calculate the mean and variance of the grayscale image based on the brightness value of each pixel, and determine the type and degree of noise in the grayscale image based on the calculation results and the detected noise information;

[0059] De-noising is performed based on the noise type and degree in the grayscale image, and the corresponding denoising algorithm is matched, wherein the denoising algorithm includes: smoothing filter, median filter, Gaussian filter and bilateral filter;

[0060] The edge detection based on the adjusted image in step 2 also includes:

[0061] Sharpen the denoised image and enhance the high-frequency components to reduce the blurry parts of the edge parts in the image, so as to obtain clear edge features;

[0062] Extracting edge points reflecting grayscale changes in the image, connecting the edge points to form a smooth curve and highlighting the curve;

[0063] Specifically, it can not only effectively remove the noise in the grayscale image, but also select the most appropriate filtering algorithm according to the type and degree of noise, thereby improving the denoising effect and processing speed, and preventing noise from interfering with the visual effect of the image and affecting subsequent processing; by sharpening the image, the edge points that reflect the grayscale change are further clarified, the accuracy and efficiency of edge detection are improved, and the consumption of computing resources and time is reduced;

[0064] Step 3: Image segmentation: Based on the image characteristics, the image is divided into different regions using image segmentation techniques, such as threshold segmentation, edge detection, etc., to facilitate subsequent specific processing. The target object in each regional image is separated from the background, and a pre-processed image with high clarity, moderate contrast, and obvious separation of the target object can be obtained, thereby improving the accuracy and efficiency of processing;

[0065] The specific steps for image segmentation in step three include:

[0066] The original image is divided into regular and equal-sized grids, and data features of each grid are calculated according to each grid, wherein the data features include grayscale mean, grayscale variance and grayscale jump difference;

[0067] Based on the data features, each grid is judged for its properties, and based on the judgment results, a merging and splitting process is performed to obtain sub-regions with consistent data features;

[0068] Performing threshold processing on each of the sub-regions, and displaying the grayscale distribution characteristics of each sub-region in the image;

[0069] In one embodiment, in an actual image, a grayscale distribution histogram of each small area is obtained, the grayscale histogram is smoothed, and the current rate value is replaced by the frequency mean of the neighboring points. For a small area corresponding to a histogram with obvious double peaks, the threshold search range is narrowed to between the double peaks, and the maximum conditional entropy algorithm is used to calculate the optimal threshold to better reflect the grayscale distribution characteristics;

[0070] Step 4: Feature extraction: extracting features of the extracted target object, the features of the target object include color features, texture features and shape features, wherein the color feature is represented as the grayscale of the target object;

[0071] In one embodiment, color feature information is extracted from an image to identify and classify color-related target objects in the image; texture feature information is extracted from an image to identify and classify target objects with specific textures; shape feature information is extracted from an image to identify and classify target objects with specific shapes, depending on specific processing requirements and characteristics of the target object;

[0072] Step 5: Image compression: construct an image compression model to compress the extracted target object and its corresponding source image, obtain a compressed image, and transmit and store the compressed image;

[0073] Step 6: Image reconstruction: Image restoration is performed based on the extracted feature information of the target object, and the restored image is compared and evaluated with the target object in the source image to determine the evaluation result.

[0074] Specifically, the acquired color image is grayed out to effectively reduce the dimension of the image and the amount of calculation. A denoising algorithm is used to remove noise from the grayscale image, and the brightness and contrast are adjusted. The image is divided into different areas using image segmentation technology to improve the clarity and resolution of the image, making it more suitable for subsequent analysis and processing, highlighting the target information in the image, weakening or removing unnecessary information, facilitating the rapid extraction of target object features, improving recognition accuracy, and effectively improving the efficiency of image digital preprocessing.

[0075] In order to solve the technical problem that the feature extraction after the image digitization preprocessing cannot be guaranteed to be completely consistent with the original image in the existing technology, resulting in the inability to accurately restore the image and affecting the subsequent processing of the image, please refer to Figure 1 , this embodiment provides the following technical solutions:

[0076] The specific steps for image compression in step 5 include:

[0077] Construct an image compression model, train the constructed image compression model based on a neural network, and evaluate the obtained image compression model;

[0078] The constructed image compression model is trained based on the neural network, specifically:

[0079] A large number of high-resolution images are collected from the Internet to form a training set, the high-resolution images in the training set are reduced to a uniform pixel size, and the reduced high-resolution images are cropped into training images with a uniform appearance format, and input into an image compression model for training;

[0080] After the model training is completed, the obtained model is evaluated and compared using a benchmark dataset independent of the training dataset, and the effect of the image compression model is verified;

[0081] When the effect of the image compression model does not meet the preset requirements, the image compression model is trained in a cyclic training manner until the effect of the image compression model meets the preset requirements;

[0082] Compressing the image, after obtaining the image to be compressed, transforming the image based on the image compression model, the pixel value of the image is quantized to reduce the amount of image data, and the quantized image data is converted into symbols and encoded;

[0083] Compressed image storage, based on the transmission and storage of encoded image data, and when the image needs to be viewed or used, the encoding symbols are decoded to restore the original image data to obtain the compressed image;

[0084] Specifically, by using the existing deep learning framework to build a model, multi-level feature extraction and compression coding can be performed, while ensuring image quality, a higher compression ratio can be achieved. A large number of image data sets are used to train the deep learning model, so that the model can effectively perform feature extraction and compression coding, and can perform effective coding based on the sparsity and continuity of features. It can adaptively process images of different sizes and resolutions, and has broad application prospects.

[0085] The specific steps for image reconstruction in step six include:

[0086] Using deep learning technology to identify the features of the extracted target object, and classifying the image data corresponding to the target object based on the identification result;

[0087] Based on the classification results, diversified differences are generated, and similarity extraction is performed to obtain an image data set, and the image data set is input into an adversarial network for adversarial training to restore the restored image data corresponding to the features of the target object;

[0088] Constructing an image similarity evaluation model, inputting the restored image data and the source image data into the image similarity evaluation model for comparison, determining a comparison result, and evaluating the restoration degree of the image in the comparison result;

[0089] The image similarity evaluation model is used to evaluate the similarity between the restored image and the original image in structure, image, and color. The similarity between the restored image and the original image is combined with brightness and contrast. The range of image similarity is -1 to 1. When the value of the image similarity evaluation model is equal to 1, the two images are consistent.

[0090] Specifically, the image similarity evaluation model is used to evaluate the similarity between the restored image and the original image in terms of structure, image, and color. The brightness and contrast are combined to objectively evaluate the similarity between the restored image and the original image to ensure the accuracy of the preprocessing results, facilitate subsequent image processing, and further improve the quality of image digitization processing.

[0091] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A digital preprocessing method for complex background images, characterized by: The following steps are involved: Step 1: Image acquisition: read the image to be processed, obtain the data type of the image, and grayscale the acquired color image; Step 2: Image enhancement: Use a denoising algorithm to remove noise from the grayscale image, adjust the brightness and contrast of the image after denoising, perform edge detection on the adjusted image, and highlight the target object in the image; Step 3: Image segmentation: Use image segmentation technology to divide the image into different regions based on image characteristics, and separate the target object from the background in each region image; Step 4: Feature extraction: extracting features of the extracted target object, the features of the target object include color features, texture features and shape features, wherein the color feature is represented as the grayscale of the target object; Step 5: Image compression: construct an image compression model to compress the extracted target object and its corresponding source image, obtain a compressed image, and transmit and store the compressed image; Step 6: Image reconstruction: Image restoration is performed based on the extracted feature information of the target object, and the restored image is compared and evaluated with the target object in the source image to determine the evaluation result.

2. The method for digital preprocessing of complex background images as claimed in claim 1, characterized in that: The color image obtained in step 1 is grayed out, specifically: Acquire a color image through an image input device, and at the same time, acquire the data format and data parameters of the color image; Performing color space conversion on each pixel based on the color space conversion algorithm, converting the pixel value of the RGB color space into the pixel value of the LAB color space, and obtaining the brightness value of each pixel by calculating the brightness component of the pixel in the LAB color space; The brightness value of each pixel is mapped to the corresponding grayscale level, the grayscale level of each pixel is determined, the pixel value is converted from the LAB color space back to the RGB color space, and the processed grayscale image is output through the image output device.

3. The method for digital preprocessing of complex background images as claimed in claim 2, characterized in that: The denoising algorithm used in step 2 to remove noise from the grayscale image specifically includes: Perform noise detection on the grayscale image, calculate the mean and variance of the grayscale image based on the brightness value of each pixel, and determine the type and degree of noise in the grayscale image based on the calculation results and the detected noise information; De-noising is performed based on the noise type and degree in the grayscale image matching the corresponding denoising algorithm, wherein the denoising algorithm includes: smoothing filtering, median filtering, Gaussian filtering and bilateral filtering.

4. The method for digital preprocessing of complex background images as claimed in claim 3, characterized in that: The edge detection based on the adjusted image in step 2 also includes: Sharpen the denoised image and enhance the high-frequency components to reduce the blurry parts of the edge parts in the image, so as to obtain clear edge features; Edge points reflecting grayscale changes in the image are extracted, and the edge points are connected to form a smooth curve and highlighted.

5. The method for digital preprocessing of complex background images as claimed in claim 4, characterized in that: The specific steps for image segmentation in step three include: The original image is divided into regular and equal-sized grids, and data features of each grid are calculated according to each grid, wherein the data features include grayscale mean, grayscale variance and grayscale jump difference; Based on the data features, each grid is judged for its properties, and based on the judgment results, a merging and splitting process is performed to obtain sub-regions with consistent data features; A thresholding process is performed on each of the sub-regions, and the grayscale distribution characteristics of each sub-region are displayed in the image.

6. The method for digital preprocessing of complex background images as claimed in claim 5, characterized in that: The specific steps for image compression in step 5 include: Construct an image compression model, train the constructed image compression model based on a neural network, and evaluate the obtained image compression model; Compressing the image, after obtaining the image to be compressed, transforming the image based on the image compression model, the pixel value of the image is quantized to reduce the amount of image data, and the quantized image data is converted into symbols and encoded; Compressed image storage is based on the transmission and storage of encoded image data, and when the image needs to be viewed or used, the encoded symbols are decoded to restore the original image data to obtain the compressed image.

7. The method for digital preprocessing of complex background images as claimed in claim 6, characterized in that: The constructed image compression model is trained based on the neural network, specifically: A large number of high-resolution images are collected from the Internet to form a training set, the high-resolution images in the training set are reduced to a uniform pixel size, and the reduced high-resolution images are cropped into training images with a uniform appearance format, and input into an image compression model for training; After the model training is completed, a benchmark dataset independent of the training dataset is used to evaluate and compare the obtained model and verify the effect of the image compression model.

8. The method for digital preprocessing of complex background images as claimed in claim 7, characterized in that: When the effect of the image compression model does not meet the preset requirements, the image compression model is trained in a cyclic training manner until the effect of the image compression model meets the preset requirements.

9. The method for digital preprocessing of complex background images as claimed in claim 8, characterized in that: The specific steps for image reconstruction in step six include: Using deep learning technology to identify the features of the extracted target object, and classifying the image data corresponding to the target object based on the identification result; Based on the classification results, diversified differences are generated, and similarity extraction is performed to obtain an image data set, and the image data set is input into an adversarial network for adversarial training to restore the restored image data corresponding to the features of the target object; An image similarity evaluation model is constructed, the restored image data and the source image data are input into the image similarity evaluation model for comparison, a comparison result is determined, and the restoration degree of the image in the comparison result is evaluated.

10. The method for digital preprocessing of complex background images according to claim 9, characterized in that: The image similarity evaluation model is used to evaluate the similarity between the restored image and the original image in structure, image, and color. The similarity between the restored image and the original image is combined with brightness and contrast. The range of image similarity is -1 to 1. When the value of the image similarity evaluation model is equal to 1, the two images are consistent.