Image processing method, device, electronic device and storage medium
By obtaining and analyzing the multi-dimensional annotation parameters of images during image processing, the accuracy and rationality problems caused by unreasonable image annotation are solved, and the accuracy and rationality of image processing are improved.
Patent Information
- Application Number
- CN202111054581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2041-09-09
AI Technical Summary
The image annotation in existing image processing methods is unreasonable, resulting in low accuracy and rationality of image quality determination, which in turn affects the accuracy and rationality of image processing.
By obtaining the target area image of the image to be processed, its multi-dimensional image annotation parameters, such as image clarity, symmetry and noise, are determined. Based on the weights of these parameters and the area annotation results, the target image annotation results of the image to be processed are calculated.
The accuracy and rationality of image quality determination are improved, thereby improving the accuracy and rationality of image processing.
Smart Images

Figure CN113781428B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to an image processing method, apparatus, computer equipment and storage medium. Background Art
[0002] In today's society, pictures and videos have become increasingly important as information carriers, and image processing has become a widespread and fundamental issue. Existing image processing usually uses image annotation to determine image quality, thereby achieving image processing. However, the image annotation in existing image processing methods is unreasonable, resulting in low accuracy and rationality in determining image quality, which in turn leads to low accuracy and rationality in image processing. Summary of the invention
[0003] The embodiments of the present invention provide an image processing method, an apparatus, an electronic device and a storage medium, which can improve the accuracy and rationality of image quality determination, and further improve the accuracy and rationality of image processing.
[0004] In a first aspect, an embodiment of the present invention provides an image processing method, including:
[0005] Acquire a target area image of the image to be processed;
[0006] Determine multi-dimensional image annotation parameters of the target area image;
[0007] Determine a region annotation result of the target region image according to the image annotation parameters; wherein the multi-dimensional image annotation parameters include at least one of image clarity, image symmetry, image brightness and image noise;
[0008] Determining the weight of each of the image annotation parameters;
[0009] The target image annotation result of the image to be processed is determined according to the weight of the image annotation parameter and the region annotation result.
[0010] In a second aspect, an embodiment of the present invention further provides an image processing device, including:
[0011] A target area image acquisition module is used to acquire a target area image of the image to be processed;
[0012] An image annotation parameter determination module, used to determine the multi-dimensional image annotation parameters of the target area image;
[0013] A region annotation result determination module, used to determine the region annotation result of the target region image according to the image annotation parameters; wherein the multi-dimensional image annotation parameters include at least one of image clarity, image symmetry, image brightness and image noise;
[0014] An image annotation parameter weight determination module, used to determine the weight of each of the image annotation parameters;
[0015] The target image annotation result determination module is used to determine the target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] A storage device for storing one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method provided by any embodiment of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the image processing method provided by any embodiment of the present invention is implemented.
[0021] The embodiment of the present invention obtains a target area image of an image to be processed and determines multi-dimensional image annotation parameters of the target area image, so as to determine a region annotation result of the target area image according to the image annotation parameters. After determining the weights of each image annotation parameter, the target image annotation result of the image to be processed is determined according to the weights of the image annotation parameters and the region annotation result. This solves the problems of poor accuracy and rationality of image processing caused by unreasonable image annotation in existing image processing methods, and can determine image quality according to the multi-dimensional image annotation parameters, thereby improving the accuracy and rationality of image quality determination, and further improving the accuracy and rationality of image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flowchart of an image processing method provided by Embodiment 1 of the present invention;
[0023] Figure 2 is a schematic diagram of an image processing device provided by Embodiment 2 of the present invention;
[0024] Figure 3 It is a structural schematic diagram of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention.
[0026] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0027] The terms "first" and "second" and the like in the description, claims and drawings of the embodiments of the present invention are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0028] Embodiment 1
[0029] Figure 1 is a flowchart of an image processing method provided by the first embodiment of the present invention. This embodiment can be applied to the case where the image quality is determined according to the multi-dimensional image annotation parameters to process the image. The method can be executed by an image processing device, which can be implemented by software and / or hardware, and can generally be directly integrated into an electronic device that executes the method. Figure 1 As shown, the image processing method may include the following steps:
[0030] S110, obtaining a target area image of the image to be processed.
[0031] The image to be processed may be any image to be processed, such as a picture image or a video image, etc. The embodiment of the present invention does not limit the specific image content of the image to be processed. The target area image may be an image of a certain area of the image to be processed, such as a pre-set area image or a randomly selected area image, etc. The embodiment of the present invention does not limit this.
[0032] In the embodiment of the present invention, the target area image of the image to be processed may be obtained by acquiring the image to be processed stored in the database, or further acquiring the target area image of the image to be processed after acquiring the image to be processed captured in real time. The embodiment of the present invention does not limit the method of acquiring the image to be processed.
[0033] In an optional implementation of an embodiment of the present invention, before obtaining the target area image of the image to be processed, it may also include: obtaining the original grayscale image of the image to be processed; dividing the original grayscale image into a first set number of area images; and normalizing each area image to obtain the target area image.
[0034] Among them, the original grayscale image can be an original image represented by grayscale. The first set number can be a set number, for example, it can be a certain value, or it can also be a value determined according to a specific application scenario, etc., and the embodiment of the present invention does not limit this. The regional image can be an image obtained by dividing the original grayscale image, for example, it can be an image of the same size, or it can also be an image of different sizes. The embodiment of the present invention does not limit the size of the regional image. Normalization processing can be an image conversion method that reduces or even eliminates grayscale inconsistencies in the image while retaining grayscale differences with diagnostic value.
[0035] Specifically, obtaining the original grayscale image of the image to be processed may be obtaining the original grayscale image stored in a database, or obtaining the original grayscale image taken in real time, etc. After obtaining the original grayscale image of the image to be processed, the original grayscale image may be further divided into a first set number of regional images, and each regional image may be normalized to obtain a target regional image, thereby processing the target regional image. Optionally, the original grayscale image may be divided into nine regional images of the same size. Exemplarily, if the size of the original grayscale image is 3M*3N, the size of the regional image obtained after the division is M*N.
[0036] S120. Determine a multi-dimensional image annotation parameter of the target area image; wherein the multi-dimensional image annotation parameter includes at least one of image clarity, image symmetry, image brightness, and image noise.
[0037] The image annotation parameter may be any parameter that can characterize the image quality, such as image clarity or image symmetry, etc., which is not limited in this embodiment.
[0038] In an embodiment of the present invention, after acquiring the target region image of the image to be processed, a multi-dimensional image annotation parameter of the target region image may be further determined, so as to determine the region annotation result of the target region image according to the image annotation parameter, thereby realizing the processing of the image to be processed. Optionally, the multi-dimensional image annotation parameter may include at least one of image clarity, image symmetry, image brightness, and image noise.
[0039] S130: Determine a region annotation result of the target region image according to the image annotation parameters.
[0040] The region annotation result may be an annotation result determined according to image annotation parameters.
[0041] In an embodiment of the present invention, after determining the multi-dimensional image annotation parameters of the target area image, the region annotation result of the target area image can be further determined according to the image annotation parameters, so as to determine the annotation result of the image to be processed according to the region annotation result, thereby realizing image processing of the image to be processed. Exemplarily, when it is determined that the image annotation parameters of the target area image include image clarity, the region annotation result of the target area image can be further determined according to the image clarity. When it is determined that the image annotation parameters of the target area image include image symmetry, the region annotation result of the target area image can be further determined according to the image symmetry. When it is determined that the image annotation parameters of the target area image include image brightness, the region annotation result of the target area image can be further determined according to the image brightness. When it is determined that the image annotation parameters of the target area image include image noise, the region annotation result of the target area image can be further determined according to the image noise.
[0042] S140: Determine the weight of each image annotation parameter.
[0043] In the embodiment of the present invention, after determining the region annotation result of the target region image according to the image annotation parameters, the weights of the image annotation parameters may be further calculated to determine the target image annotation result of the image to be processed according to the weights of the image annotation parameters and the region annotation result.
[0044] In an optional implementation of an embodiment of the present invention, determining the weight of an image annotation parameter may include: obtaining sample images for determining the weight of the image annotation parameter; obtaining expected annotation results of the image annotation parameters of each sample image; and determining the weight of the image annotation parameter according to the expected annotation results.
[0045] The sample image may be an image that can be used as a sample and is determined through screening. The expected annotation result may be an annotation result obtained by annotating the sample image.
[0046] Specifically, sample images for determining weights of image annotation parameters are obtained, and the image annotation parameters of the obtained sample images are annotated to obtain expected annotation results of the image annotation parameters of each sample image, thereby determining the weights of the image annotation parameters according to the expected annotation results.
[0047] Optionally, obtaining the expected annotation result of the image annotation parameters of each sample image may be to obtain multiple annotation results of the image annotation of each sample image, and perform weighted averaging after preprocessing the multiple annotation results, so as to obtain the expected annotation result according to the weighted average annotation result. Exemplarily, 100 annotation results of the image annotation of each sample image are obtained, and the 100 annotation results are weighted averaged after preprocessing, so as to obtain the expected annotation result by multiplying the weighted average annotation result by 100.
[0048] S150: Determine a target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result.
[0049] Among them, the target image annotation result can be the annotation result of the image to be processed, which can be used to determine the image quality. For example, the target image annotation result can be excellent or unqualified, etc., and the embodiment of the present invention does not limit this.
[0050] In an embodiment of the present invention, after determining the weight of each image annotation parameter, the target image annotation result of the image to be processed can be further determined according to the weight of the image annotation parameter and the region annotation result to determine the image quality, thereby realizing image processing. Exemplarily, if the target image annotation result is excellent, it can be determined that the image quality of the image to be processed is good. If the target image annotation result is unqualified, it can be determined that the image quality of the image to be processed is poor.
[0051] In an optional implementation of an embodiment of the present invention, determining a target image annotation result of an image to be processed based on weights of image annotation parameters and region annotation results may include: obtaining grayscale values of pixels in each target region image; calculating image clarity values, image symmetry values, image brightness values, and image noise values of each target region image based on the grayscale values of pixels in each target region image; and determining the target image annotation result of the image to be processed based on the image clarity values, image symmetry values, image brightness values, and image noise values of each target region image and the weights of each image annotation parameter.
[0052] The image clarity value may be the value of the image in the clarity dimension. The image symmetry value may be the value of the image in the symmetry dimension. The image brightness value may be the value of the image in the brightness dimension. The image noise value may be the value of the image in the noise dimension.
[0053] Specifically, by obtaining the grayscale value of each target area image pixel, the image clarity value, image symmetry value, image brightness value and image noise value of each target area image can be further calculated according to the grayscale value of each target area image pixel, so as to determine the target image annotation result of the image to be processed according to the image clarity value, image symmetry value, image brightness value and image noise value of each target area image and the weight of each image annotation parameter. Exemplarily, if the image clarity value of target area image 1 is A1, the image symmetry value is B1, the image brightness value is C1 and the image noise value is D1, and the weight corresponding to the image clarity is a1, the weight corresponding to the image symmetry is b1, the weight corresponding to the image brightness is c1 and the weight corresponding to the image noise is d1, then the annotation result of target area image 1 is a1*A1+b1*B1+c1*C1+d1*D1.
[0054] Optionally, determining the target image annotation result of the image to be processed based on the image clarity value, image symmetry value, image brightness value and image noise value of each target area image and the weights of each image annotation parameter can include: obtaining the regional image position of each target area image in the image to be processed; calculating the normalized grayscale difference of the image clarity value, image symmetry value, image brightness value and image noise value of each target area image based on the regional image position; determining the initial regional annotation result of the normalized grayscale difference based on the weights of each image annotation parameter; and determining the target image annotation result of the image to be processed based on the initial regional annotation result of each target area image.
[0055] Among them, the regional image position can be the position of the target regional image in the image to be processed, for example, it can be the upper left corner position of the image to be processed, or it can be the middle position of the image to be processed, etc., and the embodiment of the present invention is not limited to this. The normalized grayscale difference can be the difference between the grayscale values before and after the image normalization process. Exemplarily, if the grayscale value before the image normalization process is X1, and the grayscale value after the normalization process is X2, then the normalized grayscale difference can be |X1-X2|. The initial region annotation result can be an annotation result determined according to the normalized grayscale difference of the image annotation parameters.
[0056] Specifically, after calculating the image clarity value, image symmetry value, image brightness value and image noise value of each target area image according to the grayscale values of the pixels of each target area image, the regional image position of each target area image in the image to be processed can be further obtained, and the normalized grayscale difference of the image clarity value, image symmetry value, image brightness value and image noise value of each target area image can be calculated according to the regional image position, so as to determine the initial regional annotation result of the normalized grayscale difference according to the weight of each image annotation parameter, thereby determining the target image annotation result of the image to be processed according to the initial regional annotation result of each target area image. Exemplarily, if the normalized grayscale difference of the image clarity value of the target area image 1 is AA1, the normalized grayscale difference of the image symmetry value is BB1, the normalized grayscale difference of the image brightness value is CC1, and the normalized grayscale difference of the image noise value is DD1, and the weight corresponding to the image clarity is a1, the weight corresponding to the image symmetry is b1, the weight corresponding to the image brightness is c1, and the weight corresponding to the image noise is d1, then the initial area annotation result of the target area image 1 is a1*AA1+b1*BB1+c1*CC1+d1*DD1.
[0057] Optionally, determining the target image annotation result of the image to be processed based on the initial area annotation results of each target area image may include: determining the initial area annotation results and values of any second set number of target area images; and determining the target image annotation result of the image to be processed based on the initial area annotation results and values.
[0058] The second set number may be another set number, for example, a certain value, or a value determined according to a specific application scenario, etc., and the embodiment of the present invention does not limit this.
[0059] Specifically, after determining the initial region annotation result of the normalized grayscale difference according to the weight of each image annotation parameter, the sum of the initial region annotation results of any second set number of target region images can be further determined to determine the target image annotation result of the image to be processed according to the sum of the initial region annotation results. Optionally, the second set number can be 6. That is, determining the sum of the initial region annotation results of any second set number of target region images can be determining the sum of the initial expected annotation results of any 6 target region images.
[0060] Optionally, determining the target image annotation result of the image to be processed based on the initial area annotation result and value may include: when it is determined that the initial area annotation result and value are greater than a first preset threshold, determining that the target image annotation result is a first target image annotation result; when it is determined that the initial area annotation result and value are less than or equal to the first preset threshold and greater than the second preset threshold, determining that the target image annotation result is a second target image annotation result; when it is determined that the initial area annotation result and value are less than or equal to the second preset threshold and greater than the third preset threshold, determining that the target image annotation result is a third target image annotation result; when it is determined that the initial area annotation result and value are less than or equal to the third preset threshold and greater than the fourth preset threshold, determining that the target image annotation result is a fourth target image annotation result; when it is determined that the initial area annotation result and value are less than or equal to the fourth preset threshold, determining that the target image annotation result is a fifth target image annotation result.
[0061] Among them, the first preset threshold value may be a preset arbitrary threshold value, which may be used to first determine the target image annotation result. Optionally, the first preset threshold value may be 550. The first target image annotation result may be a target image annotation result determined according to the first preset threshold value. Optionally, the first target image annotation result may be a fine product image. The second preset threshold value may be another preset arbitrary threshold value, which may be used to determine the second target image annotation result. Optionally, the second preset threshold value may be 540. The second target image annotation result may be another target image annotation result determined according to the first preset threshold value and the second preset threshold value. Optionally, the second target image annotation result may be an excellent image. The third preset threshold value may be another preset arbitrary threshold value, which may be used to determine the third target image annotation result. Optionally, the third preset threshold value may be 480. The third target image annotation result may be another target image annotation result determined according to the second preset threshold value and the third preset threshold value. Optionally, the third target image annotation result may be a good product image. The fourth preset threshold value may be another preset arbitrary threshold value, which may be used to determine the fourth target image annotation result. Optionally, the fourth preset threshold value may be 360. The fourth target image annotation result may be another target image annotation result determined according to the third preset threshold and the fourth preset threshold. Optionally, the fourth target image annotation result may be a qualified image. The fifth target image annotation result may be another target image annotation result determined according to the fourth preset threshold. Optionally, the fifth target image annotation result may be an unqualified image.
[0062] Specifically, after determining the initial region annotation results and values of any second set number of target region images, the threshold range of the initial region annotation results and values can be further determined to determine the target image annotation results. If the initial region annotation results and values are greater than the first preset threshold, the target image annotation results can be determined to be the first target image annotation results. If the initial region annotation results and values are less than or equal to the first preset threshold and greater than the second preset threshold, the target image annotation results can be determined to be the second target image annotation results. If the initial region annotation results and values are less than or equal to the second preset threshold and greater than the third preset threshold, the target image annotation results can be determined to be the third target image annotation results. If the initial region annotation results and values are less than or equal to the third preset threshold and greater than the fourth preset threshold, the target image annotation results can be determined to be the fourth target image annotation results. If the initial region annotation results and values are less than or equal to the fourth preset threshold, the target image annotation results can be determined to be the fifth target image annotation results. Exemplarily, if the initial region annotation results and values are greater than 550, the target image annotation results can be determined to be a fine image. If the initial region annotation results and values are less than or equal to 550 and greater than 540, the target image annotation results can be determined to be an excellent image. If the sum of the initial region annotation results is less than or equal to 540 and greater than 480, the target image annotation result can be determined to be a good image. If the sum of the initial region annotation results is less than or equal to 480 and greater than 360, the target image annotation result can be determined to be a qualified image. If the sum of the initial region annotation results is less than or equal to 360, the target image annotation result can be determined to be an unqualified image.
[0063] The technical solution of this embodiment obtains a target area image of an image to be processed and determines multi-dimensional image annotation parameters of the target area image, so as to determine a region annotation result of the target area image according to the image annotation parameters. After determining the weights of each image annotation parameter, the target image annotation result of the image to be processed is determined according to the weights of the image annotation parameters and the region annotation result. This solves the problems of poor accuracy and rationality of image processing caused by unreasonable image annotation in existing image processing methods, and can determine image quality according to multi-dimensional image annotation parameters, thereby improving the accuracy and rationality of image quality determination, and further improving the accuracy and rationality of image processing.
[0064] Embodiment 2
[0065] Figure 2 is a schematic diagram of an image processing device provided by Embodiment 2 of the present invention, such as Figure 2As shown, the device includes: a target area image acquisition module 210, an image annotation parameter determination module 220, a region annotation result determination module 230, an image annotation parameter weight determination module 240 and a target image annotation result determination module 250, wherein:
[0066] The target area image acquisition module 210 is used to acquire the target area image of the image to be processed;
[0067] An image annotation parameter determination module 220, configured to determine a multi-dimensional image annotation parameter of the target area image; wherein the multi-dimensional image annotation parameter includes at least one of image clarity, image symmetry, image brightness and image noise;
[0068] A region labeling result determination module 230, configured to determine a region labeling result of a target region image according to the image labeling parameters;
[0069] An image annotation parameter weight determination module 240, used to determine the weight of each of the image annotation parameters;
[0070] The target image annotation result determination module 250 is used to determine the target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result.
[0071] The technical solution of this embodiment obtains a target area image of an image to be processed and determines multi-dimensional image annotation parameters of the target area image, so as to determine a region annotation result of the target area image according to the image annotation parameters. After determining the weights of each image annotation parameter, the target image annotation result of the image to be processed is determined according to the weights of the image annotation parameters and the region annotation result. This solves the problems of poor accuracy and rationality of image processing caused by unreasonable image annotation in existing image processing methods, and can determine image quality according to multi-dimensional image annotation parameters, thereby improving the accuracy and rationality of image quality determination, and further improving the accuracy and rationality of image processing.
[0072] Optionally, the image annotation parameter weight determination module 240 may be specifically used for:
[0073] Obtain sample images for determining weights of image annotation parameters; obtain expected annotation results of the image annotation parameters of each sample image; and determine the weights of the image annotation parameters according to the expected annotation results.
[0074] Optionally, the target area image acquisition module 210 may be specifically used for:
[0075] The original grayscale image of the image to be processed is obtained; the original grayscale image is divided into a first set number of regional images; and each regional image is normalized to obtain a target regional image.
[0076] Optionally, the target image annotation result determination module 250 may be specifically used for:
[0077] Obtain the grayscale value of each target area image pixel; calculate the image clarity value, image symmetry value, image brightness value and image noise value of each target area image according to the grayscale value of each target area image pixel; determine the target image annotation result of the image to be processed according to the image clarity value, image symmetry value, image brightness value and image noise value of each target area image and the weight of each image annotation parameter.
[0078] Optionally, the target image annotation result determination module 250 may also be specifically used for:
[0079] The regional image position of each target region image in the target region image is obtained; the normalized grayscale difference of the image clarity value, image symmetry value, image brightness value and image noise value of each target region image is calculated according to the regional image position; the initial regional annotation result of the normalized grayscale difference is determined according to the weight of each image annotation parameter; the target image annotation result of the image to be processed is determined according to the initial regional annotation result of each target region image.
[0080] Optionally, the target image annotation result determination module 250 may be further used to:
[0081] Determine the initial region labeling results and values of any second set number of target region images; and determine the target image labeling results of the image to be processed according to the initial region labeling results and values.
[0082] Optionally, the target image annotation result determination module 250 may be further configured to:
[0083] When it is determined that the sum of the initial area annotation results is greater than the first preset threshold, the target image annotation result is determined to be the first target image annotation result; when it is determined that the sum of the initial area annotation results is less than or equal to the first preset threshold and greater than the second preset threshold, the target image annotation result is determined to be the second target image annotation result; when it is determined that the sum of the initial area annotation results is less than or equal to the second preset threshold and greater than the third preset threshold, the target image annotation result is determined to be the third target image annotation result; when it is determined that the sum of the initial area annotation results is less than or equal to the third preset threshold and greater than the fourth preset threshold, the target image annotation result is determined to be the fourth target image annotation result; when it is determined that the sum of the initial area annotation results is less than or equal to the fourth preset threshold, the target image annotation result is determined to be the fifth target image annotation result.
[0084] The above-mentioned image processing device can execute the image processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the image processing method provided by any embodiment of the present invention.
[0085] Since the image processing device described above is a device that can execute the image processing method in the embodiment of the present invention, based on the image processing method described in the embodiment of the present invention, a person skilled in the art can understand the specific implementation of the image processing device in the embodiment and its various variations, so how the image processing device implements the image processing method in the embodiment of the present invention is not described in detail here. As long as a person skilled in the art implements the device used by the image processing method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0086] Embodiment 3
[0087] Figure 3 It is a structural schematic diagram of an electronic device provided in Embodiment 3 of the present invention. Figure 3 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 3 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0088] like Figure 3 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors 16, a memory 28, and a bus 18 that connects various system components (including the memory 28 and the processor 16).
[0089] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0090] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0091] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, usually called a "hard drive"). Although Figure 3 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0092] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0093] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 through the bus 18. It should be understood that although Figure 3 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0094] The processor 16 executes various functional applications and data processing by running the program stored in the memory 28 to implement the image processing method provided by the embodiment of the present invention: obtaining a target area image of the image to be processed; determining a multi-dimensional image annotation parameter of the target area image; wherein the multi-dimensional image annotation parameter includes at least one of image clarity, image symmetry, image brightness and image noise; determining a region annotation result of the target area image according to the image annotation parameter; determining a weight of each of the image annotation parameters; and determining a target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result.
[0095] Embodiment 4
[0096] Embodiment 4 of the present invention further provides a computer storage medium storing a computer program, wherein the computer program is used to execute the image processing method described in any one of the above embodiments of the present invention when executed by a computer processor: obtaining a target area image of an image to be processed; determining multi-dimensional image annotation parameters of the target area image; wherein the multi-dimensional image annotation parameters include at least one of image clarity, image symmetry, image brightness and image noise; determining a region annotation result of the target area image according to the image annotation parameters; determining the weight of each of the image annotation parameters; and determining the target image annotation result of the image to be processed according to the weight of the image annotation parameters and the region annotation result.
[0097] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0098] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0099] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0100] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0101] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An image processing method, It is characterized in that include: Acquire a target area image of the image to be processed; Determining a multi-dimensional image annotation parameter of the target area image; wherein the multi-dimensional image annotation parameter includes at least one of image clarity, image symmetry, image brightness and image noise; Determining a region annotation result of the target region image according to the image annotation parameters; Determining the weight of each of the image annotation parameters; Determining a target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result; Wherein, determining the weight of each of the image annotation parameters includes: Obtaining a sample image for determining weights of image annotation parameters; Obtaining expected annotation results of image annotation parameters of each of the sample images; Determining the weight of the image annotation parameter according to the expected annotation result; Wherein, the obtaining of expected annotation results of the image annotation parameters of each of the sample images includes: Obtaining multiple annotation results of the image annotation of each of the sample images; Preprocessing the plurality of annotation results and performing weighted averaging, and obtaining the expected annotation result according to the weighted averaged annotation result; Wherein, determining the target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result includes: Obtaining the grayscale value of each pixel in the target area image; Calculate the image clarity value, image symmetry value, image brightness value and image noise value of each target area image according to the grayscale value of each target area image pixel; The target image annotation result of the image to be processed is determined according to the image clarity value, image symmetry value, image brightness value and image noise value of each target area image and the weight of each image annotation parameter.
2. The method according to claim 1, It is characterized in that Before obtaining the target area image of the image to be processed, the method further includes: Obtaining an original grayscale image of the image to be processed; Dividing the original grayscale image into a first set number of regional images; Each of the region images is normalized to obtain the target region image.
3. The method according to claim 1, It is characterized in that Determining the target image annotation result of the image to be processed according to the image clarity value, image symmetry value, image brightness value and image noise value of each target area image and the weight of each image annotation parameter includes: Acquire the regional image position of each target region image in the image to be processed; Calculating the normalized grayscale difference of the image clarity value, image symmetry value, image brightness value and image noise value of each of the target area images according to the area image position; Determining an initial region annotation result of the normalized grayscale difference according to the weight of each of the image annotation parameters; The target image annotation result of the image to be processed is determined according to the initial region annotation result of each of the target region images.
4. The method according to claim 3, It is characterized in that The step of determining the target image annotation result of the image to be processed according to the initial region annotation result of each target region image comprises: Determine initial region labeling results and values of any second set number of target region images; The target image annotation result of the image to be processed is determined according to the initial region annotation result and value.
5. The method according to claim 4, It is characterized in that The step of determining the target image annotation result of the image to be processed according to the initial region annotation result and value includes: In the case where it is determined that the initial region annotation result and value are greater than a first preset threshold, determining that the target image annotation result is a first target image annotation result; In the case where it is determined that the initial region annotation result and value are less than or equal to a first preset threshold and greater than a second preset threshold, determining that the target image annotation result is a second target image annotation result; In the case where it is determined that the initial region annotation result and value are less than or equal to the second preset threshold and greater than the third preset threshold, determining that the target image annotation result is a third target image annotation result; In the case where it is determined that the initial region annotation result and value are less than or equal to a third preset threshold and greater than a fourth preset threshold, determining that the target image annotation result is a fourth target image annotation result; When it is determined that the initial region annotation result and value are less than or equal to a fourth preset threshold, the target image annotation result is determined to be a fifth target image annotation result.
6. An image processing device, It is characterized in that include: A target area image acquisition module is used to acquire a target area image of the image to be processed; An image annotation parameter determination module, used to determine the multi-dimensional image annotation parameters of the target area image; wherein the multi-dimensional image annotation parameters include at least one of image clarity, image symmetry, image brightness and image noise; A region labeling result determination module, used to determine a region labeling result of the target region image according to the image labeling parameters; An image annotation parameter weight determination module, used to determine the weight of each of the image annotation parameters; A target image annotation result determination module, used to determine the target image annotation result of the image to be processed according to the weight of the image annotation parameter and the region annotation result; Wherein, the image annotation parameter weight determination module is specifically used for: Obtaining a sample image for determining weights of image annotation parameters; Obtaining expected annotation results of image annotation parameters of each of the sample images; Determining the weight of the image annotation parameter according to the expected annotation result; Wherein, the image annotation parameter weight determination module is also used for: Obtaining multiple annotation results of the image annotation of each of the sample images; Preprocessing the plurality of annotation results and performing weighted averaging, and obtaining the expected annotation result according to the weighted averaged annotation result; Wherein, the target image annotation result determination module is specifically used for: Obtaining the grayscale value of each pixel in the target area image; Calculate the image clarity value, image symmetry value, image brightness value and image noise value of each target area image according to the grayscale value of each target area image pixel; The target image annotation result of the image to be processed is determined according to the image clarity value, image symmetry value, image brightness value and image noise value of each target area image and the weight of each image annotation parameter.
7. An electronic device, It is characterized in that The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described in any one of claims 1 to 5.
8. A computer storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the image processing method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Image quality evaluation method and device
CN107481238A
Image quality evaluation method, electronic equipment and computer readable storage medium
CN111079740A
Method, device and equipment for determining image quality evaluation result
CN112102309A
