CN111243046B - Image quality detection method, device, electronic equipment and storage medium - Google Patents

Image quality detection method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111243046B
CN111243046B CN202010052529.3A CN202010052529A CN111243046B CN 111243046 B CN111243046 B CN 111243046B CN 202010052529 A CN202010052529 A CN 202010052529A CN 111243046 B CN111243046 B CN 111243046B
Authority
CN
China
Prior art keywords
image
detected
image quality
size
compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010052529.3A
Other languages
Chinese (zh)
Other versions
CN111243046A (en
Inventor
张萌杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010052529.3A priority Critical patent/CN111243046B/en
Publication of CN111243046A publication Critical patent/CN111243046A/en
Application granted granted Critical
Publication of CN111243046B publication Critical patent/CN111243046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure relates to an image quality detection method, an image quality detection device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a to-be-detected image and a first image size of the to-be-detected image; compressing the image to be detected according to the quality parameter of the target image to obtain a compressed intermediate image; and calculating the second image size of the intermediate image, and determining that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size. According to the method and the device, the image to be detected and the first image size of the image to be detected are obtained, the image to be detected is compressed according to the quality parameters of the target image, the compressed intermediate image is obtained, the second image size of the intermediate image is calculated, when the second image size is smaller than the first image size, the requirement that the image to be detected meets the quality parameters of the target image is determined, and therefore the quality of the image to be detected is rapidly detected.

Description

Image quality detection method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of image processing, and in particular relates to an image quality detection method, an image quality detection device, electronic equipment and a storage medium.
Background
With the rapid development of imaging and multimedia communication technologies, image quality detection has an increasingly important application value in fields such as image transmission, compression, image recovery, digital watermarking and the like. Image quality is mainly expressed in terms of both the intelligibility and the fidelity of the image. The greater the image intelligibility or fidelity indicates a higher image quality and vice versa.
At present, the image quality detection indexes are more, including image size, resolution and the like, and respectively have different detection methods, so that the image quality detection method is messy and complicated, and the detection methods for various indexes are complex, and the detection results obtained by different detection indexes can have contradiction, so that the conventional image quality detection method is not suitable for a scene in which various conditions need to be comprehensively considered and the detection results are quickly made.
Disclosure of Invention
The disclosure provides an image quality detection method, an image quality detection device, an electronic device and a storage medium, so as to at least solve the problem that the related technology is not suitable for a scene for quickly making a detection result. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided an image quality detection method including: acquiring a to-be-detected image and a first image size of the to-be-detected image; compressing the image to be detected according to the quality parameter of the target image to obtain a compressed intermediate image; and calculating the second image size of the intermediate image, and determining that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size.
In one embodiment, after calculating the second image size of the intermediate image, further comprising: and when the second image size is larger than the first image size, determining that the image to be detected does not meet the requirement of the target image quality parameter.
In one embodiment, compressing an image to be detected according to a target image quality parameter to obtain a compressed intermediate image, including: drawing an image to be detected to obtain a first drawn image; performing first compression processing on the first image according to the target image quality parameter to obtain a second image after the first compression processing; and carrying out second compression processing on the second image to obtain a compressed intermediate image.
In one embodiment, performing a first compression process on a first image according to a target image quality parameter includes: acquiring RGB gray values of each pixel point in a first image; and mapping the RGB gray scale values of each pixel point according to the target image quality parameters to obtain the mapped RGB gray scale values of each pixel point.
In one embodiment, performing a second compression process on the second image to obtain a compressed intermediate image, including: acquiring RGB gray values of each pixel point in the second image; and according to the continuity of the RGB gray values in space, carrying out compression coding on the RGB gray values of each pixel point in the second image to obtain a compressed and coded intermediate image.
According to a second aspect of embodiments of the present disclosure, there is provided an image quality detection apparatus including an image to be detected acquisition module, a compression module, and a quality detection module, wherein the image to be detected acquisition module is configured to perform acquisition of an image to be detected and a first image size of the image to be detected; the compression module is configured to compress the image to be detected according to the target image quality parameter to obtain a compressed intermediate image; and the quality detection module is configured to execute calculation of a second image size of the intermediate image, and determine that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size.
In one embodiment, the quality detection module is further configured to perform determining that the image to be detected does not meet the requirement of the target image quality parameter when the second image size is larger than the first image size after calculating the second image size of the intermediate image.
In one embodiment, the compression module comprises: the image drawing device comprises an image drawing unit, a first compression unit and a second compression unit, wherein the image drawing unit is configured to draw an image to be detected, and a first drawn image is obtained; the first compression unit is configured to perform first compression processing on the first image according to the target image quality parameter to obtain a second image after the first compression processing; the second compression unit is configured to perform a second compression process on the second image, resulting in a compressed intermediate image.
In one embodiment, the first compression unit includes: a first gray value acquisition subunit and a gray value mapping subunit, wherein the first gray value acquisition subunit is configured to perform acquisition of RGB gray values of each pixel point in the first image; the gray value mapping subunit is configured to map the RGB gray values of each pixel point according to the target image quality parameter, so as to obtain the mapped RGB gray values of each pixel point.
In one embodiment, the second compression unit includes: a second gray value acquisition subunit and an encoding subunit, wherein the second gray value acquisition subunit is configured to perform acquisition of an RGB gray value of each pixel point in the second image; the encoding subunit is configured to perform compression encoding on the RGB gray values of each pixel point in the second image according to the continuity of the RGB gray values in space, so as to obtain a compression-encoded intermediate image.
According to a third aspect of embodiments of the present disclosure, there is provided a server comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions such that the server is capable of performing the image quality detection method as described in any of the embodiments of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of a server, enables the server to perform the image quality detection method described in any one of the embodiments of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program stored in a readable storage medium, from which at least one processor of a device reads and executes the computer program, causing the device to perform the image quality detection method as described in any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the method comprises the steps of obtaining an image to be detected and a first image size of the image to be detected, compressing the image to be detected according to a target image quality parameter, obtaining a compressed intermediate image, further calculating a second image size of the intermediate image, and determining that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size, so that a detection result is quickly made on the quality of the image to be detected.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is an application environment diagram illustrating an image quality detection method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating an image quality detection method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating an image quality detection method according to another exemplary embodiment.
Fig. 4 is a flowchart illustrating steps of compressing an image to be detected, according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating an image quality detection apparatus according to an exemplary embodiment.
Fig. 6 is an internal structural diagram of a server shown according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The image quality detection method provided by the disclosure can be applied to an application environment as shown in fig. 1. The terminal 110 interacts with the server 120 through a network, in this embodiment, the terminal 110 may be various devices with image capturing or image storing functions, such as, but not limited to, various personal computers, notebook computers, smartphones, tablet computers and portable wearable devices, and the server 120 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers. Specifically, the terminal 110 may be configured to collect the image to be detected or store the image to be detected, and upload the image to be detected to the server 120 through a network. The server 120 obtains the image to be detected and the first image size of the image to be detected, compresses the image to be detected according to the target image quality parameter, obtains a compressed intermediate image, further calculates the second image size of the intermediate image, determines that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size, and otherwise determines that the image to be detected does not meet the requirement of the target image quality parameter, thereby realizing that the quality of the image to be detected quickly makes a detection result.
Fig. 2 is a flowchart showing an image quality detection method according to an exemplary embodiment, and as shown in fig. 2, an example of application of the method to the server in fig. 1 is described, including the following steps.
In step S210, an image to be detected and a first image size of the image to be detected are acquired.
The image to be detected refers to an image to be subjected to quality detection, which is uploaded by the front end, and the image size refers to the digital size of an image file, and the digital size takes kilobytes (K), megabytes (MB) or Gigabytes (GB) as a measurement unit. In this embodiment, for convenience of distinction, the image size of the image to be detected is referred to as a first image size. Because of the influence of shooting environment and shooting tools in a natural scene, the images to be detected may have different resolutions, sizes and the like, and if the image quality is not controlled, the uploaded image quality is uneven. Therefore, in this embodiment, after the terminal uploads the image to the server, the server needs to detect the quality of the uploaded image, specifically, the server first obtains the uploaded image to be detected, and then obtains the corresponding first image size according to the file of the image to be detected.
In step S220, the image to be detected is compressed according to the target image quality parameter, and a compressed intermediate image is obtained.
The image quality refers to subjective evaluation of visual perception of an image by people, and can be divided into image fidelity and image intelligibility. Image fidelity describes the degree of deviation between a processed image and the original image, while image intelligibility represents the degree to which a person or machine can extract relevant feature information from the image. The image quality of each image can be evaluated by 0-1 (which can be converted into mass percent), and the target image quality parameter in this embodiment refers to the image quality that the uploaded image is expected to reach, and can be specifically set according to the actual application scenario. Compression refers to the removal of redundant data from an image, which from a mathematical point of view is actually transforming a two-dimensional array of pixels into a statistically uncorrelated data set, i.e. representing the original matrix of pixels with fewer bits, either lossy or lossless, also called image coding. In this embodiment, the image to be detected is compressed according to the set target image quality parameter, so as to obtain a compressed intermediate image, and then whether the image to be detected meets the requirement of the target image quality parameter is determined through the following steps.
In step S230, a second image size of the intermediate image is calculated.
Wherein the second image size refers to the digital size of the image file of the intermediate image. Since the size of an image file is generally proportional to the pixel size of an image, the more pixels that are contained in an image, the more detail that is displayed on a given print size, but the more disk storage space that is needed. For images with the same pixel size, the sizes of the obtained images are different after the images are compressed according to different image quality requirements, and the compressed image size under the condition of higher image quality requirements is larger than the compressed image size under the condition of lower image quality requirements.
In step S240, when the second image size is smaller than the first image size, it is determined that the image to be detected satisfies the requirement of the target image quality parameter.
In this embodiment, when the second image size of the compressed intermediate image is smaller than the first image size of the image to be detected, it indicates that the image quality of the image to be detected is better than that of the intermediate image, and the intermediate image is obtained by compressing the intermediate image based on the target image quality parameter, that is, the image quality of the intermediate image meets the requirement of the target image quality parameter, so it can be determined that the image to be detected also meets the requirement of the target image quality parameter.
According to the image quality detection method, the image to be detected and the first image size of the image to be detected are obtained, the image to be detected is compressed according to the target image quality parameters, the compressed intermediate image is obtained, the second image size of the intermediate image is calculated, when the second image size is smaller than the first image size, the requirement that the image to be detected meets the target image quality parameters is determined, and therefore the quality of the image to be detected is rapidly detected.
In an exemplary embodiment, as shown in fig. 3, after calculating the second image size of the intermediate image, the steps of:
in step S250, when the second image size is larger than the first image size, it is determined that the image to be detected does not satisfy the requirement of the target image quality parameter.
Based on the knowledge of the image size and the image quality, in this embodiment, when the second image size of the compressed intermediate image is larger than the first image size of the image to be detected, the image quality of the intermediate image is better than the image to be detected, and the intermediate image is obtained after being compressed based on the target image quality parameter, that is, the image quality of the intermediate image meets the requirement of the target image quality parameter, and the image quality of the image to be detected does not meet the requirement of the target image quality parameter, so that it can be determined that the image to be detected does not meet the requirement of the target image quality parameter.
According to the image quality detection method, the image to be detected and the first image size of the image to be detected are obtained, the image to be detected is compressed according to the target image quality parameter, the compressed intermediate image is obtained, the second image size of the intermediate image is calculated, and according to the second image size of the intermediate image and the first image size of the image to be detected, the image quality of the image to be detected can be judged quickly, namely whether the image to be detected meets the requirement of the target image quality parameter or not is judged quickly, so that subsequent operation is facilitated.
In an exemplary embodiment, as shown in fig. 4, in step S220, compressing the image to be detected according to the target image quality parameter may be specifically implemented by:
in step S410, an image to be detected is drawn, resulting in a drawn first image.
Since the image with the same pixel size is compressed according to different image quality requirements, the obtained image size is also different. For example, assuming that an image a has an image quality of 1 and is compressed into A1 having an image quality of 90% and A2 having an image quality of 80%, respectively, the image size of A1 is larger than the image size of A2, that is, the compressed image size when the image quality requirement is high is larger than the compressed image size when the image quality requirement is low. Therefore, in the present embodiment, the image to be detected is redrawn based on the image to be detected and the first image size, thereby obtaining a drawn first image.
Specifically, in this embodiment, when the server obtains the image to be detected uploaded by the terminal, online plane design software (canvas) may be used to create a canvas node, and the image to be detected is drawn through the canvas node, that is, the codes of all the pixels in the image to be detected are restored, so as to obtain a pixel matrix describing the codes of all the pixels, that is, the first image after drawing is obtained.
In step S420, a first compression process is performed on the first image according to the target image quality parameter, and a second image after the first compression process is obtained.
Wherein the first compression process is a lossy compression process. In this embodiment, the encoding of each pixel in the first image is obtained, that is, the RGB gray value of each pixel is obtained, and then the RGB gray values of each pixel are mapped according to the target image quality parameter, so as to obtain the RGB gray value mapped by each pixel, that is, the second image after the first compression processing is obtained.
Specifically, since the RGB gray values of one pixel point can be expressed as (R, G, B), and the values of R, G, B are respectively 0-255 (256 values), each pixel point needs to record the RGB gray values by 8 bits by 3 (3 bytes). For example, a picture with a resolution of 100×100, which has 10000 pixels in total, if the RGB gray values of each pixel are different, 10000×3=30000 bytes are needed to record the color data, that is, the picture size is 30000 bytes. But this will not be acceptable and therefore the size of the picture can be reduced, typically by compressing it, but for some applications it is also required that the uploaded image has some sharpness, whereas in Canva it can be evaluated by image quality.
Therefore, in the present embodiment, the RGB gray values of each pixel point can be mapped by setting the target image quality parameter in canvas. For example, if the set target image quality parameter a is 90%, 256 values of R, G, and B from 0 to 255 need to be divided into 10 (1/(100% -a)) segments, for example, 0 to 24 is segment 1, 25 to 49 is segment 2, …, and 230 to 255 is segment 10. And mapping the RGB gray value of each pixel point in the first image according to the segmentation, namely taking the value of each segment interval as the same value, for example taking the value falling into the interval 0-24 as 0, taking the value falling into the interval 25-49 as 25, and the like to obtain the RGB gray value of each pixel point after mapping, namely obtaining the second image after the first compression processing.
In step S430, a second compression process is performed on the second image, resulting in a compressed intermediate image.
Wherein the second compression process is a lossless compression process. In this embodiment, the RGB gray value of each pixel in the second image is obtained, and then the RGB gray value of each pixel in the second image is compression-encoded according to the continuity of the RGB gray value in space, so as to obtain the intermediate image after compression-encoding.
Specifically, after the step S420 is completed, the number of pixels of the RGB gray values continuously repeated in the second image is increased, that is, there is a continuous string of data describing the same color value (i.e., RGB gray values). For example, in the second image after the above processing, assuming that 20 consecutive pixels are white, if spatial continuity is not considered, 20×3=60 bytes are needed to record the RGB gray values of the block of white. However, if the spatial continuity is considered, the RGB gray values of the repeated pixels (3 bytes are needed) can be recorded first, then the number of times the pixel values are repeated (20 times, 1 byte can be recorded), so the size of the required record is reduced from 60 bytes to 4 bytes, and the RGB gray values of each pixel in the second image are compressed and encoded, so that a compressed intermediate image is obtained.
In the above embodiment, the image to be detected is drawn by canvas to obtain the drawn first image, and the first image is subjected to the first compression processing according to the target image quality parameter to obtain the second image subjected to the first compression processing, and then the second image is subjected to the second compression processing to obtain the compressed intermediate image, and based on the intermediate image, the image quality of the image to be detected can be rapidly evaluated, and the implementation method is simple and reliable, and has a relatively strong popularization meaning.
In an exemplary embodiment, the image quality detection method of the present disclosure is further described according to a specific application scenario, for example, when the image quality detection is performed on the uploaded head portrait, due to a certain requirement on the definition of the head portrait, a higher target image quality parameter may be set, for example, the quality of the head portrait uploaded by the user is required to be not less than 80%. When the server acquires the head portrait uploaded by the terminal, acquiring the first image size of the head portrait, further compressing the uploaded head portrait by adopting a method shown in fig. 4 according to the set image quality parameters by 80%, so as to obtain a compressed intermediate image, calculating the second image size of the intermediate image, and determining that the uploaded head portrait meets the requirement of the target image quality parameters when the second image size of the intermediate image is smaller than the first image size of the uploaded head portrait, thereby allowing uploading, otherwise determining that the uploaded head portrait does not meet the requirement of the target image quality parameters, and prompting a user to upload the head portrait with clearer definition.
In contrast, in the operation activities of the business, the requirement for the picture quality is not so high, but the picture quality is required to be as small as possible without affecting the viewing, so that the uploaded picture quality can be set to be not higher than 70% (here, only one assumed value, and in particular, other values can be set). When the server acquires the picture uploaded by the terminal, acquiring the first image size of the picture, further compressing the uploaded picture according to the set image quality parameter of 70%, adopting a method shown in fig. 4, so as to obtain a compressed intermediate image, calculating the second image size of the intermediate image, and determining that the uploaded picture is higher than the requirement of the target image quality parameter (70%) when the second image size of the intermediate image is smaller than the first image size of the uploaded picture, thereby prompting a user to upload the compressed picture, or directly compressing the uploaded picture by using canvas or other technologies (such as mozjpeg (jpg compression software) or optpng (png compression software) and the like, so as to enable the uploaded picture to meet the requirement of the target image quality parameter.
It should be understood that, although the steps in the flowcharts of fig. 1-4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1-4 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least some of the other steps or sub-steps in other steps.
Fig. 5 is a block diagram of an image quality detection apparatus according to an exemplary embodiment. Referring to fig. 5, the apparatus includes an image acquisition module to be detected 520, a compression module 540, and a quality detection module 560.
The to-be-detected image acquisition module 520 is configured to perform acquisition of the to-be-detected image and a first image size of the to-be-detected image.
The compression module 540 is configured to perform compression on the image to be detected according to the target image quality parameter, and obtain a compressed intermediate image.
The quality detection module 560 is configured to perform calculating a second image size of the intermediate image, and when the second image size is smaller than the first image size, determining that the image to be detected meets the requirement of the target image quality parameter.
In an exemplary embodiment, the quality detection module 560 is further configured to determine that the image to be detected does not meet the requirement of the target image quality parameter when the second image size is larger than the first image size after calculating the second image size of the intermediate image.
In an exemplary embodiment, the compression module 540 includes: the image drawing device comprises an image drawing unit, a first compression unit and a second compression unit, wherein the image drawing unit is configured to draw an image to be detected, and a first drawn image is obtained; the first compression unit is configured to perform first compression processing on the first image according to the target image quality parameter to obtain a second image after the first compression processing; the second compression unit is configured to perform a second compression process on the second image, resulting in a compressed intermediate image.
In an exemplary embodiment, the first compression unit includes: a first gray value acquisition subunit and a gray value mapping subunit, wherein the first gray value acquisition subunit is configured to perform acquisition of RGB gray values of each pixel point in the first image; the gray value mapping subunit is configured to map the RGB gray values of each pixel point according to the target image quality parameter, so as to obtain the mapped RGB gray values of each pixel point.
In an exemplary embodiment, the second compression unit includes: a second gray value acquisition subunit and an encoding subunit, wherein the second gray value acquisition subunit is configured to perform acquisition of an RGB gray value of each pixel point in the second image; the encoding subunit is configured to perform compression encoding on the RGB gray values of each pixel point in the second image according to the continuity of the RGB gray values in space, so as to obtain a compressed intermediate image.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 6 is a block diagram illustrating an apparatus S00 for image quality detection according to an exemplary embodiment. For example, device S00 may be a server. Referring to fig. 6, device S00 includes a processing component S20 that further includes one or more processors, and memory resources represented by memory S22, for storing instructions, such as applications, executable by processing component S20. The application program stored in the memory S22 may include one or more modules each corresponding to a set of instructions. Further, the processing component S20 is configured to execute instructions to perform the above-described method of image quality detection.
Device S00 can also include a power component S24 configured to perform power management of device S00, a wired or wireless network interface S26 configured to connect device S00 to a network, and an input/output (I/O) interface S28. Device S00 may operate based on an operating system stored in memory S22, such as Windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
In an exemplary embodiment, a storage medium is also provided, such as a memory S22, comprising instructions executable by a processor of the device S00 to perform the above method. The storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An image quality detection method, comprising:
acquiring an image to be detected and a first image size of the image to be detected;
compressing the image to be detected according to the target image quality parameter to obtain a compressed intermediate image;
calculating a second image size of the intermediate image, and determining that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size;
the image to be detected is compressed according to the target image quality parameter to obtain a compressed intermediate image, which comprises the following steps:
drawing the image to be detected to obtain a first drawn image;
performing first compression processing on the first image according to the target image quality parameter to obtain a second image after the first compression processing; the first compression process is a lossy compression process;
and performing second compression processing on the second image to obtain the compressed intermediate image, wherein the second compression processing is lossless compression processing.
2. The image quality detecting method according to claim 1, wherein after the calculating of the second image size of the intermediate image, further comprising:
and when the second image size is larger than the first image size, determining that the image to be detected does not meet the requirement of the target image quality parameter.
3. The image quality detection method according to claim 1, wherein the performing a first compression process on the first image according to a target image quality parameter includes:
acquiring an RGB gray value of each pixel point in the first image;
and mapping the RGB gray scale values of each pixel point according to the target image quality parameters to obtain the mapped RGB gray scale values of each pixel point.
4. The image quality detecting method according to claim 1, wherein the performing a second compression process on the second image to obtain the compressed intermediate image includes:
acquiring an RGB gray value of each pixel point in the second image;
and according to the continuity of the RGB gray values in space, performing compression coding on the RGB gray values of each pixel point in the second image to obtain the compression coded intermediate image.
5. An image quality detecting apparatus, comprising:
the device comprises an image to be detected acquisition module, a detection module and a detection module, wherein the image to be detected acquisition module is configured to acquire an image to be detected and a first image size of the image to be detected;
the compression module is configured to compress the image to be detected according to the target image quality parameter to obtain a compressed intermediate image;
a quality detection module configured to perform a calculation of a second image size of the intermediate image, and to determine that the image to be detected meets the requirement of the target image quality parameter when the second image size is smaller than the first image size;
the compression module includes:
an image drawing unit configured to perform drawing of the image to be detected, resulting in a drawn first image;
a first compression unit configured to perform a first compression process on the first image according to a target image quality parameter, to obtain a second image after the first compression process; the first compression process is a lossy compression process;
and a second compression unit configured to perform a second compression process on the second image to obtain the compressed intermediate image, the second compression process being a lossless compression process.
6. The image quality detection apparatus according to claim 5, wherein the quality detection module, after calculating a second image size of the intermediate image, is configured to perform determining that the image to be detected does not meet the requirement of the target image quality parameter when the second image size is larger than the first image size.
7. The image quality detecting apparatus according to claim 5, wherein the first compression unit includes:
a first gray value acquisition subunit configured to perform acquisition of RGB gray values of each pixel point in the first image;
and the gray value mapping subunit is configured to map the RGB gray values of each pixel point according to the target image quality parameter to obtain the mapped RGB gray values of each pixel point.
8. The image quality detecting apparatus according to claim 5, wherein the second compression unit includes:
a second gray value acquisition subunit configured to perform acquisition of RGB gray values of each pixel point in the second image;
and the encoding subunit is configured to perform compression encoding on the RGB gray values of each pixel point in the second image according to the continuity of the RGB gray values in space, so as to obtain the intermediate image after compression encoding.
9. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the image quality detection method of any one of claims 1 to 4.
10. A storage medium, which when executed by a processor of a server, enables the server to perform the image quality detection method of any one of claims 1 to 4.
CN202010052529.3A 2020-01-17 2020-01-17 Image quality detection method, device, electronic equipment and storage medium Active CN111243046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010052529.3A CN111243046B (en) 2020-01-17 2020-01-17 Image quality detection method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010052529.3A CN111243046B (en) 2020-01-17 2020-01-17 Image quality detection method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111243046A CN111243046A (en) 2020-06-05
CN111243046B true CN111243046B (en) 2023-11-28

Family

ID=70878610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010052529.3A Active CN111243046B (en) 2020-01-17 2020-01-17 Image quality detection method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111243046B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494181A (en) * 2022-01-24 2022-05-13 首都医科大学附属北京安贞医院 Image processing method and apparatus, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007235758A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
CN104966309A (en) * 2015-06-25 2015-10-07 桂林力港网络科技有限公司 Automatic compression system and processing method for image with transparency
CN108574807A (en) * 2018-04-28 2018-09-25 上海商汤智能科技有限公司 A kind of image treatment method and relevant device
CN110618973A (en) * 2019-09-09 2019-12-27 大唐网络有限公司 Image storage method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288973A1 (en) * 2006-06-02 2007-12-13 Logitech Europe S.A. Intelligent image quality engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007235758A (en) * 2006-03-02 2007-09-13 Canon Inc Image coding apparatus and method, and computer program and computer-readable storage medium
CN104966309A (en) * 2015-06-25 2015-10-07 桂林力港网络科技有限公司 Automatic compression system and processing method for image with transparency
CN108574807A (en) * 2018-04-28 2018-09-25 上海商汤智能科技有限公司 A kind of image treatment method and relevant device
CN110618973A (en) * 2019-09-09 2019-12-27 大唐网络有限公司 Image storage method and device

Also Published As

Publication number Publication date
CN111243046A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
Cavigelli et al. CAS-CNN: A deep convolutional neural network for image compression artifact suppression
JP7026878B2 (en) Quantization parameter prediction with maintained visual quality using deep neural network
RU2546616C2 (en) Image compression system and method
CN108933935B (en) Detection method and device of video communication system, storage medium and computer equipment
US8675984B2 (en) Merging multiple exposed images in transform domain
US11310475B2 (en) Video quality determination system and method
JP2017005456A (en) Image compression method, image compression device and imaging apparatus
CN111243046B (en) Image quality detection method, device, electronic equipment and storage medium
US11765299B2 (en) Information processing apparatus and method
US11222443B2 (en) Image compression using image acquisition device characteristics
CN111311584A (en) Video quality evaluation method and device, electronic equipment and readable medium
Yang et al. Subjective quality evaluation of compressed digital compound images
CN111080683A (en) Image processing method, image processing device, storage medium and electronic equipment
CN116129316A (en) Image processing method, device, computer equipment and storage medium
CN115115968A (en) Video quality evaluation method and device and computer readable storage medium
Farah et al. Full-reference and reduced-reference quality metrics based on SIFT
CN111325652A (en) Information embedding method, information extracting method, information embedding device, information extracting device, information embedding equipment and computer readable storage medium
Milani et al. Compression of photo collections using geometrical information
CN113179375A (en) Exposure processing method, exposure processing apparatus, electronic device, storage medium, and program product
Zhao et al. Fast noisy image quality assessment based on free-energy principle
CN113191376A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN113141506A (en) Deep learning-based image compression neural network model, and method and device thereof
CN111652186A (en) Video category identification method and related device
Lüsi et al. Optimal image compression via block-based adaptive colour reduction with minimal contour effect
CN110517252B (en) Video detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant