Image processing method and device, readable storage medium and electronic equipment
By segmenting an image into multiple pieces and combining source domain and frequency domain features, the problem of low image blur detection accuracy in existing technologies is solved, and a more accurate blur detection effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IFLYTEK CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-06-30
Smart Images

Figure CN116030001B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image detection technology, specifically to an image processing method and apparatus, a readable storage medium, and an electronic device. Background Technology
[0002] Image quality is a crucial indicator for judging the performance and operational status of image acquisition equipment, and it is also frequently used in comparing the performance of image processing algorithms and optimizing system parameters. In recent years, with the development of image processing technology, numerous image blur detection algorithms have emerged. Traditional techniques primarily employ image processing algorithms, such as Fourier analysis, to extract features from images that can reflect image sharpness to a certain extent, using these features to evaluate the blurriness or sharpness of the image.
[0003] However, while using feature quantities to detect the blur level of an image has some effect, it generally suffers from low detection accuracy. Summary of the Invention
[0004] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide an image processing method and apparatus, a readable storage medium, and an electronic device.
[0005] In a first aspect, one embodiment of this application provides an image processing method, which includes: determining multiple image segments corresponding to a target image; determining image features of each of the multiple image segments based on the multiple image segments; and determining a blur detection result corresponding to the target image based on the image features of each of the multiple image segments, wherein the blur detection result can characterize the blur status of each of the multiple image segments.
[0006] In conjunction with the first aspect, in some implementations of the first aspect, determining the image features of each of the multiple image slices based on multiple image slices includes: determining the source domain features of each of the multiple image slices based on multiple image slices; determining the frequency domain features of each of the multiple image slices based on multiple image slices; and determining the image features of each of the multiple image slices based on both the source domain features and the frequency domain features of each of the multiple image slices.
[0007] In conjunction with the first aspect, in some implementations of the first aspect, determining the source domain features of each of the multiple image slices based on multiple image slices includes: for each of the multiple image slices, performing windowing processing on the target image based on the image slice to determine at least one local image corresponding to the image slice; and determining the source domain features of the image slice based on at least one local image.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, determining the frequency domain features of each of the multiple image slices based on multiple image slices includes: for each of the multiple image slices, performing windowing processing on the target image based on the image slice to determine at least one local image corresponding to the image slice; performing feature extraction on the at least one local image to determine the spectral image corresponding to each of the at least one local image; and determining the frequency domain features of the image slice based on the spectral image corresponding to each of the at least one local image.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, the target image contains at least one character, and determining multiple image slices corresponding to the target image includes: performing character detection on the target image to determine the image area information occupied by each of the at least one character contained in the target image; and dividing the target image based on the image area information occupied by each of the at least one character to obtain multiple image slices.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, character detection is performed on the target image to determine the image area information occupied by each of the at least one character contained in the target image, including: performing character detection on the target image to determine the bounding box of each of the at least one character contained in the target image; and determining the image area information occupied by each of the at least one character based on the bounding box of each of the at least one character contained in the target image.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the target image contains multiple characters. Based on the image area information occupied by at least one character, the target image is divided to obtain multiple image slices, including: calculating the average area information occupied by each of the multiple characters to obtain an average area; and dividing the target image based on the average area and a preset multiple value to obtain multiple image slices.
[0012] Secondly, one embodiment of this application provides an image processing apparatus, which includes: a first determining module for determining multiple image segments corresponding to a target image; a second determining module for determining image features of each of the multiple image segments based on the multiple image segments; and a third determining module for determining a blur detection result corresponding to the target image based on the image features of each of the multiple image segments, wherein the blur detection result can characterize the blur status of each of the multiple image segments.
[0013] Thirdly, one embodiment of this application provides a computer-readable storage medium storing a computer program for performing the methods mentioned in the first aspect above.
[0014] Fourthly, one embodiment of this application provides an electronic device, which includes: a processor and a memory for storing processor-executable instructions; the processor is used to perform the method mentioned in the first aspect above.
[0015] The image processing method provided in this application determines multiple image slices corresponding to a target image, determines the image features of each image slice based on the multiple image slices, and then determines the blur detection result corresponding to the target image based on the image features of each image slice. The blur detection result can characterize the blur status of each image slice. By segmenting the target image into multiple image slices for slice detection, the specific blur locations in the target image can be accurately detected, making the detection results more refined and greatly improving the accuracy and effect of blur detection. Attached Figure Description
[0016] Figure 1 The diagram shown is a system architecture schematic of an image processing method provided in a scenario example of an exemplary embodiment of this application.
[0017] Figure 2 The diagram shown is a system architecture schematic of an image processing method provided in a scenario example of another exemplary embodiment of this application.
[0018] Figure 3 The diagram shown is a flowchart illustrating an exemplary embodiment of the image processing method provided in this application.
[0019] Figure 4 The diagram shown is a schematic flowchart of determining the image features of multiple image segments based on multiple image segments according to an exemplary embodiment of this application.
[0020] Figure 5 The diagram shown is a flowchart illustrating the process of determining the image features of multiple image segments based on multiple image segments, as provided in another exemplary embodiment of this application.
[0021] Figure 6a The diagram shown is a schematic flowchart of determining the frequency domain features of multiple image segments based on multiple image segments according to an exemplary embodiment of this application.
[0022] Figure 6b The diagram shown is a flowchart of an image processing method provided in another exemplary embodiment of this application.
[0023] Figure 7 The diagram shown is a flowchart of an image processing method provided in another exemplary embodiment of this application.
[0024] Figure 8 The diagram shown is a flowchart illustrating the process of determining multiple image segments corresponding to a target image according to an exemplary embodiment of this application.
[0025] Figure 9 The diagram shown is a flowchart of an image processing method provided in another exemplary embodiment of this application.
[0026] Figure 10 The diagram shown is a structural schematic of an image processing apparatus provided in an embodiment of this application.
[0027] Figure 11 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. Detailed Implementation
[0028] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments.
[0029] Exemplary System
[0030] Figure 1 The diagram shown is a system architecture schematic of an image processing method provided in a scenario example of an exemplary embodiment of this application. For example... Figure 1 As shown, the application scenario mentioned in this embodiment includes server 1 and user terminal 2, wherein there is a communication connection between server 1 and user terminal 2.
[0031] Specifically, user terminal 2 includes, but is not limited to, devices such as mobile phones and personal computers. User terminal 2 can be equipped with a camera for capturing target images. The number of user terminals 2 can be one or more, and this application does not specifically limit the number of user terminals 2.
[0032] Server 1 can be a single server, a server group consisting of multiple servers, a virtualization platform, or a cloud computing service center. This application does not specifically limit the type of server 1. Server 1 is used to determine multiple image slices corresponding to the target image; based on the multiple image slices, determine the image features of each of the multiple image slices; based on the image features of each of the multiple image slices, determine the blur detection result corresponding to the target image, and the blur detection result can characterize the blur situation of each of the multiple image slices. That is, this scenario implements an image processing method.
[0033] because Figure 1 The above scenario demonstrates that the image processing method is implemented using server 1. Therefore, this scenario not only improves the adaptability of the scenario, but also effectively reduces the computational load on the user terminal 2.
[0034] It should be noted that this application also applies to another scenario. Figure 2The diagram shown is a system architecture schematic of an image processing method in a scenario example provided by another exemplary embodiment of this application. Specifically, the embodiments of this application are applicable to the scenario of online image recognition of a learning machine, which includes an image processing device 3 installed on the learning machine. The image processing device 3 includes an image acquisition module 30 and a calculation module 31, and there is a communication connection between the image acquisition module 30 and the calculation module 31.
[0035] Specifically, the image acquisition module 30 in the image processing device 3 is used to acquire the target image, and the calculation module 31 in the image processing device 3 is used to determine multiple image slices corresponding to the target image; based on the multiple image slices, the image features of each of the multiple image slices are determined; based on the image features of each of the multiple image slices, the blur detection result corresponding to the target image is determined, and the blur detection result can characterize the blur situation of each of the multiple image slices. That is, this scenario implements an image processing method.
[0036] because Figure 2 The scenario described above utilizes image processing device 3 to implement the image processing method, eliminating the need for data transmission operations with servers or other related devices. Therefore, Figure 2 The scenario described above ensures the real-time performance of the image processing method.
[0037] It should be understood that the embodiments provided in this application can be applied to other scenarios, such as printing document images or recognizing the content of scanned documents. This application does not specifically limit the application scenarios of the image processing method.
[0038] Exemplary methods
[0039] Figure 3 The diagram shown is a schematic flowchart of an image processing method provided in an exemplary embodiment of this application. Specifically, as... Figure 3 As shown in the embodiments of this application, the image processing method includes the following steps.
[0040] Step S310: Determine multiple image slices corresponding to the target image.
[0041] In this embodiment, the target image can be acquired in real time or periodically by an image acquisition device, and then the acquired target image can be segmented according to a preset rule to form multiple image slices. For example, after acquiring a target image from the image acquisition device, the target image can be divided into 16 regular regions, each region being an image slice, and the target image is divided into 16 image slices according to the rules. This application does not specifically limit the number and size of the image slices.
[0042] For example, the target image can be a text image, a person image, or a blank image. A text image can include at least one of the following: a document text image and a scene text image. A document text image refers to a text image with a neat layout, controlled lighting, and a relatively simple background. A scene text image refers to a text image with a more complex background, diverse text formats, and uncontrolled lighting. The text format in the text image includes any one of the following: text color, size, font, direction, and irregular layout. Irregular layout can include at least one of the following: curved, tilted, wrinkled, deformed, and incomplete.
[0043] Step S320: Based on multiple image segments, determine the image features of each of the multiple image segments.
[0044] For example, image features can be multimodal features. Multimodal features refer to features that describe image patches from multiple aspects or dimensions. Multimodal features can be obtained by feature extraction from image patches.
[0045] Step S330: Based on the image features of each of the multiple image slices, determine the blur detection result corresponding to the target image.
[0046] The blur detection result can characterize the blur status of each of the multiple image segments. For example, if the target image is regularly divided into 6 image segments, the blur prediction model is used to predict the image features of each of the multiple image segments, and the blur detection result is determined to be [0, 0, 1, 0, 0, 0]. The detection result of the 3rd image segment is blurry, and the detection results of the remaining image segments are clear.
[0047] The image processing method provided in this application determines multiple image segments corresponding to a target image, determines the image features of each of the multiple image segments, and then determines the blur detection result corresponding to the target image based on the image features of each of the multiple image segments. By dividing the target image into multiple image segments for segmented detection, the specific blur locations in the target image can be accurately detected, making the detection results more refined and greatly improving the accuracy and effectiveness of blur detection.
[0048] Figure 4 The diagram illustrates a flowchart of an exemplary embodiment of this application, illustrating the process of determining the image features of multiple image segments based on these segments. Specifically, in... Figure 3 Extending from the illustrated embodiment Figure 4 The illustrated embodiment will be described in detail below. Figure 4 The differences between the embodiment shown in Figure 3 and the embodiment shown in Figure 4 are not repeated here.
[0049] like Figure 4As shown, based on multiple image segments, the image features of each of the multiple image segments are determined (step S320), including the following steps.
[0050] Step S410: Based on multiple image slices, determine the source domain features of each of the multiple image slices.
[0051] Among them, source domain features refer to semantic features used to characterize the source domain information of image segments.
[0052] Step S420: Based on multiple image slices, determine the frequency domain features of each of the multiple image slices.
[0053] Among them, frequency domain features refer to semantic features used to characterize the frequency domain information of image slices.
[0054] Step S430: Based on the source domain features and frequency domain features of each of the multiple image slices, determine the image features of each of the multiple image slices.
[0055] For example, the source domain features and frequency domain features of multiple image slices are concatenated to determine the image features of each image slice. The image features can represent the semantic features of the image slices from both the source domain and frequency domain dimensions.
[0056] The image processing method provided in this application determines the image features of each of the multiple image slices based on their respective source domain features and frequency domain features, thereby achieving multimodal feature fusion. The fusion of the source domain features and frequency domain features of the multiple image slices is beneficial for detecting the features of the image slices, thus completing multimodal blur detection and greatly improving the accuracy of blur detection.
[0057] Figure 5 The diagram illustrates a flowchart of determining the image features of multiple image segments based on multiple image segments, as provided in another exemplary embodiment of this application. Specifically, in Figure 4 Extending from the illustrated embodiment Figure 5 The illustrated embodiment will be described in detail below. Figure 5 The illustrated embodiments and Figure 4 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0058] like Figure 5 As shown, in the image processing method provided in this embodiment, based on multiple image slices, the source domain features of each of the multiple image slices are determined (step S410). For each image slice in the multiple image slices, the following steps are included.
[0059] Step S510: Perform windowing processing on the target image based on image slicing to determine at least one local image corresponding to the image slice.
[0060] Specifically, with image slicing as the target, the target image is windowed using multiple different sizes to obtain multiple local images corresponding to the image slices, where each local image corresponds to a different size.
[0061] In some embodiments, the shapes and sizes of the multiple local images obtained by the windowing process may be the same or different. This application embodiment does not limit the shape and size of the local images obtained by the windowing process.
[0062] Step S520: Based on at least one local image, determine the source domain features of the image patch.
[0063] In some embodiments, a feature extraction model is first generated by training a pre-defined neural network model using labeled sample images. Optionally, the neural network can be a convolutional neural network (CNN), a deep neural network (DNN), or a recurrent neural network (RNN), etc. This application does not specifically limit this. The feature extraction model is used to extract source domain features from image patches based on at least one local image.
[0064] The image processing method provided in this application performs windowing processing on a target image based on image segmentation, determines at least one local image corresponding to each image segment, and determines the source domain features of the image segment based on the at least one local image. By performing windowing processing, local images with similar semantic information can be adaptively extracted, effectively improving the performance of the model without increasing computation.
[0065] Figure 6a The diagram illustrates a flowchart of an exemplary embodiment of this application, illustrating the process of determining the frequency domain features of multiple image segments. Specifically, in Figure 4 Extending from the illustrated embodiment Figure 6a The illustrated embodiment will be described in detail below. Figure 6a The illustrated embodiments and Figure 4 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0066] like Figure 6a As shown, the image processing method mentioned in the embodiments of this application determines the frequency domain features of each of the multiple image slices based on multiple image slices (step S420). For each image slice in the multiple image slices, the method includes the following steps.
[0067] Step S610: Perform windowing processing on the target image based on image slicing to determine at least one local image corresponding to the image slice.
[0068] Step S620: Perform feature extraction on at least one local image to determine the spectral image corresponding to each of the at least one local image.
[0069] For example, a Fast Fourier Transform (FFT) is performed on at least one local image to determine the spectral image corresponding to each of the at least one local image. The specific transformation is shown in Equation (1).
[0070]
[0071] Where k represents the x-coordinate of the source domain, l represents the y-coordinate of the source domain, M represents the length and width of the source domain image, N represents the width of the source domain image, m and n represent the coordinates in the frequency domain, and j represents the imaginary unit.
[0072] A spectrum image is used to reflect the distribution of frequency components in an image. The more high-frequency components there are, the less likely it is to be a blurry region, because blurry regions are mainly composed of low-frequency components.
[0073] Step S630: Determine the frequency domain features of the image slices based on the spectral images corresponding to at least one local image.
[0074] In some embodiments, the spectral images corresponding to at least one local image are used as input features of the neural network model to determine the frequency domain features of the image slices. Optionally, the neural network can be a convolutional neural network (CNN), a deep neural network (DNN), or a recurrent neural network (RNN), etc. This application does not specifically limit this approach.
[0075] The image processing method provided in this application extracts features from at least one local image, determines the spectral image corresponding to each of the at least one local image, and determines the frequency domain features of the image slice based on the spectral image corresponding to each of the at least one local image. The spectral image is very suitable as a feature input for the prediction model, which can further improve the prediction effect of the model. The frequency domain features of the image slice determined based on the spectral image can more accurately characterize the frequency domain information of the image slice.
[0076] Figure 6b The diagram shown is a flowchart illustrating an image processing method provided in another exemplary embodiment of this application. Figure 6bAs shown, a multi-scale pyramid multimodal prediction scheme is adopted. Based on image segmentation 4, the target image is windowed at multiple scales to obtain three local images 5 at multiple scales. Then, FFT transformation is performed on the three local images 5 to obtain three multi-scale spectral images 6. The three spectral images 6 are fed into the first CNN model 7 to obtain frequency domain features 9. Then, the three local images 5 are fed into the second CNN model 8 to obtain source domain features 11. The frequency domain features 9 and source domain features 11 are concatenated to obtain multimodal features 10. Finally, blur prediction is performed based on these multimodal features 10. If the prediction result is 0, it means that the image segment is clear. If the prediction result is 1, it means that the image segment is blurry.
[0077] Figure 7 The diagram shown is a schematic flowchart of an image processing method provided in another exemplary embodiment of this application. Specifically, in Figure 3 Extending from the illustrated embodiment Figure 7 The illustrated embodiment will be described in detail below. Figure 7 The illustrated embodiments and Figure 3 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0078] like Figure 7 As shown, the image processing method provided in this application embodiment, wherein the target image contains at least one character, determines multiple image segments corresponding to the target image (step S310), including the following steps.
[0079] Step S710: Perform character detection on the target image to determine the image area information occupied by each of the at least one character contained in the target image.
[0080] Step S720: Based on the image area information occupied by at least one character, the target image is divided to obtain multiple image slices.
[0081] Specifically, the target image is segmented. The number of segments to be divided into can be determined based on the size of the characters. Single-character detection is performed on the target image to obtain the image area information occupied by each character. Based on the image area information occupied by each character, segmentation rules are determined, and the target image is divided into multiple image segments.
[0082] The image processing method provided in this application performs character detection on a target image, determines the image area information occupied by at least one character in the target image, divides the target image based on the image area information occupied by at least one character, obtains multiple image slices, and performs slice detection based on multiple image slices. This can accurately detect the specific blurred positions in the target image, making the detection results more refined and greatly improving the accuracy and detection effect of blur detection.
[0083] Figure 8 The diagram illustrates a flowchart of determining multiple image segments corresponding to a target image according to an exemplary embodiment of this application. Specifically, in Figure 7 Extending from the illustrated embodiment Figure 8 The illustrated embodiment will be described in detail below. Figure 8 The illustrated embodiments and Figure 7 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0084] like Figure 8 As shown, the image processing method provided in this application embodiment performs character detection on a target image and determines the image area information occupied by each of at least one character contained in the target image (step S710), including the following steps.
[0085] Step S810: Perform character detection on the target image to determine the bounding box of each of at least one character contained in the target image.
[0086] A bounding box can be understood as an imaginary outer frame surrounding the character object being detected. The bounding box serves as the boundary that defines the edges of the target character during character detection.
[0087] Step S820: Based on the bounding boxes of at least one character contained in the target image, determine the image area information occupied by each of the at least one character.
[0088] By calculating the bounding box area of at least one character, the image area information occupied by each character is determined.
[0089] The image processing method provided in this application performs character detection on a target image, determines the bounding box of at least one character contained in the target image, and determines the image area information occupied by each character based on the bounding box of each character in the target image. Since bounding boxes have a simple structure and good accuracy in representing most text characters, determining the bounding box of each character in the target image can improve the accuracy and effectiveness of the segmentation results of the target object, thereby improving the accuracy of subsequent blur detection of the target image.
[0090] Figure 9 The diagram shown is a schematic flowchart of an image processing method provided in another exemplary embodiment of this application. Specifically, in Figure 7 Extending from the illustrated embodiment Figure 9 The illustrated embodiment will be described in detail below. Figure 9 The illustrated embodiments and Figure 7 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.
[0091] like Figure 9 As shown in the embodiment of this application, the image processing method provides that the target image contains multiple characters. Based on the image area information occupied by at least one character, the target image is divided to obtain multiple image slices (step S720), including the following steps.
[0092] Step S910: Calculate the average area of each character in the image to obtain the average area.
[0093] Step S920: Based on the average area and a preset multiplier, the target image is divided into multiple image slices.
[0094] In practical applications, single-character detection is performed on the target image to obtain the bounding box of each character. The average area of the bounding boxes of all characters in the entire target image is calculated, and the image is segmented based on the average area. If more refined detection results are required, the preset multiplier can be set to 5, and the segmentation can be set according to 5 times the average area. Generally, a multiplier of 15 is used. This application does not impose a specific limitation on the preset multiplier value, which can be set according to the actual situation.
[0095] The image processing method provided in this application calculates the average area of the image occupied by each of the multiple characters to obtain the average area. Based on the average area and a preset multiplier, the target image is divided, which can achieve the purpose of obtaining multiple image segments. Moreover, the preset multiplier can be reasonably set according to the actual situation to determine a more refined blur detection result.
[0096] The above text combined Figures 1 to 9 The method embodiments of this application are described in detail below, in conjunction with... Figure 10 and Figure 11 The present application provides a detailed description of the apparatus embodiments. It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments; therefore, any parts not described in detail can be found in the foregoing method embodiments.
[0097] Figure 10 The diagram shown is a structural schematic of an image processing apparatus provided in an embodiment of this application. Figure 10 As shown, the image processing apparatus 1000 provided in this application embodiment includes a first determining module 1001, a second determining module 1002, and a third determining module 1003. The first determining module 1001 is used to determine multiple image segments corresponding to a target image. The second determining module 1002 is used to determine the image features of each of the multiple image segments based on the multiple image segments. The third determining module 1003 is used to determine the blur detection result corresponding to the target image based on the image features of each of the multiple image segments, wherein the blur detection result can characterize the image blur situation of each of the multiple image segments.
[0098] In some embodiments, the second determining module 1002 is further configured to: determine source domain features of each of the multiple image slices based on the multiple image slices; determine frequency domain features of each of the multiple image slices based on the multiple image slices; and determine image features of each of the multiple image slices based on the source domain features and frequency domain features of each of the multiple image slices.
[0099] In some embodiments, the second determining module 1002 is further configured to: for each of the plurality of image slices, perform windowing processing on the target image based on the image slice to determine at least one local image corresponding to the image slice; and determine the source domain features of the image slice based on the at least one local image.
[0100] In some embodiments, the second determining module 1002 is further configured to: for each of the plurality of image slices, perform windowing processing on the target image based on the image slice to determine at least one local image corresponding to the image slice; perform feature extraction on the at least one local image to determine the spectral image corresponding to each of the at least one local image; and determine the frequency domain features of the image slice based on the spectral image corresponding to each of the at least one local image.
[0101] In some embodiments, the first determining module 1001 is further configured to perform character detection on the target image, determine the image area information occupied by each of the at least one character contained in the target image, and divide the target image based on the image area information occupied by each of the at least one character to obtain multiple image segments.
[0102] In some embodiments, the first determining module 1001 is further configured to perform character detection on the target image, determine the bounding box of each of the at least one character contained in the target image, and determine the image area information occupied by each of the at least one character based on the bounding box of each of the at least one character contained in the target image.
[0103] In some embodiments, the first determining module 1001 is further configured to: 1) calculate the average area of the image area occupied by each of the multiple characters in the target image; 2) divide the target image into multiple image segments based on the average area and a preset multiple value.
[0104] Below, for reference Figure 11 This describes an electronic device according to embodiments of the present application. Figure 11 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.
[0105] like Figure 11 As shown, the electronic device 1100 includes one or more processors 1101 and memory 1102.
[0106] The processor 1101 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1100 to perform desired functions.
[0107] The memory 1102 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1101 may execute the program instructions to implement the image processing methods of the various embodiments of this application mentioned above and / or other desired functions. Various contents, such as target images, may also be stored in the computer-readable storage medium.
[0108] In one example, the electronic device 1100 may also include an input device 1103 and an output device 1104, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0109] The input device 1103 may include, for example, a keyboard, a mouse, etc.
[0110] The output device 1104 can output various information to the outside, including fuzzy detection results. The output device 1104 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0111] Of course, for the sake of simplicity, Figure 11 Only some of the components of the electronic device 1100 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 1100 may include any other suitable components depending on the specific application.
[0112] In addition to the methods and apparatus described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the image processing methods according to the various embodiments of this application described above.
[0113] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0114] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the image processing methods according to the various embodiments of this application described above.
[0115] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0116] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0117] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0118] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0119] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0120] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. An image processing method, characterized in that, include: Determine multiple image slices corresponding to the target image; Based on the multiple image segments, the image features of each of the multiple image segments are determined; Based on the image features of each of the multiple image slices, a blur detection result corresponding to the target image is determined, and the blur detection result can characterize the image blur situation of each of the multiple image slices. Wherein, the target image contains at least one character, and determining the multiple image slices corresponding to the target image includes: Perform character detection on the target image to determine the bounding box of each of the at least one character contained in the target image; Based on the bounding boxes of each of the at least one character contained in the target image, determine the image area information occupied by each of the at least one character; Based on the image area information occupied by each of the at least one character, the target image is divided to obtain the multiple image slices; The target image contains multiple characters, and the process of dividing the target image into multiple image slices based on the image area information occupied by each of the at least one character includes: The average area of each of the multiple characters in the image is calculated by averaging their respective areas. Based on the average area and a preset multiplier, the target image is divided to obtain the multiple image slices.
2. The image processing method according to claim 1, characterized in that, The step of determining the image features of each of the multiple image segments based on the multiple image segments includes: Based on the multiple image segments, the source domain features of each of the multiple image segments are determined; Based on the multiple image segments, the frequency domain features of each of the multiple image segments are determined; Based on the source domain features and frequency domain features of each of the multiple image slices, the image features of each of the multiple image slices are determined.
3. The image processing method according to claim 2, characterized in that, The step of determining the source domain features of each of the multiple image segments based on the multiple image segments includes: For each of the plurality of image segments, the target image is subjected to windowing processing based on the image segment to determine at least one local image corresponding to the image segment; Based on the at least one local image, the source domain features of the image patch are determined.
4. The image processing method according to claim 2, characterized in that, The step of determining the frequency domain features of each of the multiple image slices includes: For each of the plurality of image segments, the target image is subjected to windowing processing based on the image segment to determine at least one local image corresponding to the image segment; Feature extraction is performed on the at least one local image to determine the spectral image corresponding to each of the at least one local image; The frequency domain features of the image slices are determined based on the spectral images corresponding to each of the at least one local image.
5. An image processing apparatus, characterized in that, include: The first determining module is used to determine multiple image slices corresponding to the target image; The second determining module is used to determine the image features of each of the multiple image segments based on the multiple image segments; The third determining module is used to determine the blur detection result corresponding to the target image based on the image features of each of the multiple image segments. The blur detection result can characterize the image blur situation of each of the multiple image segments. Wherein, the target image contains at least one character, and when the first determining module determines multiple image slices corresponding to the target image, it specifically includes: Perform character detection on the target image to determine the bounding box of each of the at least one character contained in the target image; Based on the bounding boxes of each of the at least one character contained in the target image, determine the image area information occupied by each of the at least one character; Based on the image area information occupied by each of the at least one character, the target image is divided to obtain the multiple image slices; The target image contains multiple characters, and the process of dividing the target image into multiple image slices based on the image area information occupied by each of the at least one character includes: The average area of each of the multiple characters in the image is calculated by averaging their respective areas. Based on the average area and a preset multiplier, the target image is divided to obtain the multiple image slices.
6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1 to 4.
7. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the method described in any one of claims 1 to 4.