CN113744282A - Image processing method, device and storage medium - Google Patents

Image processing method, device and storage medium Download PDF

Info

Publication number
CN113744282A
CN113744282A CN202110910656.7A CN202110910656A CN113744282A CN 113744282 A CN113744282 A CN 113744282A CN 202110910656 A CN202110910656 A CN 202110910656A CN 113744282 A CN113744282 A CN 113744282A
Authority
CN
China
Prior art keywords
image
pixel
processing
region segmentation
identification
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.)
Granted
Application number
CN202110910656.7A
Other languages
Chinese (zh)
Other versions
CN113744282B (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.)
Shenzhen Xihua Technology Co Ltd
Original Assignee
Shenzhen Xihua 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 Shenzhen Xihua Technology Co Ltd filed Critical Shenzhen Xihua Technology Co Ltd
Priority to CN202110910656.7A priority Critical patent/CN113744282B/en
Publication of CN113744282A publication Critical patent/CN113744282A/en
Application granted granted Critical
Publication of CN113744282B publication Critical patent/CN113744282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20028Bilateral filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • 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 application relates to the technical field of image processing, and the embodiment of the application discloses an image processing method, an image processing device and a storage medium, wherein the method comprises the following steps: acquiring a first image; carrying out image content type identification on the first image to obtain an identification result, wherein the image content type identification is used for identifying a natural image type and/or a computer graphic type; performing region segmentation on the first image according to the identification result to obtain a region segmentation result; and performing bit number reduction processing on the first image according to the region segmentation result to obtain a second image. By adopting the embodiment of the application, the image quality can be improved when the pixel bit number of the image source is higher than that of the display system.

Description

Image processing method, device and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image processing method, an image processing apparatus, and a storage medium.
Background
In the specific implementation, when the pixel bit number of the image source is higher than that of the display system, the bit number needs to be reduced by a certain method, but the natural image and the computer graphics image are often processed by the same method, and further, under the condition that the image source includes both the natural image and the computer graphics image, an image quality defect is generated, so that the problem of improving the image quality needs to be solved urgently when the pixel bit number of the image source is higher than that of the display system.
Disclosure of Invention
The embodiment of the application provides an image processing method, an image processing device and a storage medium, which can improve the image quality when the pixel bit number of an image source is higher than that of a display system.
In a first aspect, an embodiment of the present application provides an image processing method, where the method includes:
acquiring a first image;
carrying out image content type identification on the first image to obtain an identification result, wherein the image content type identification is used for identifying a natural image type and/or a computer graphic type;
performing region segmentation on the first image according to the identification result to obtain a region segmentation result;
and performing bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including: an acquisition unit, a recognition unit, a segmentation unit and a processing unit, wherein,
the acquisition unit is used for acquiring a first image;
the identification unit is used for carrying out image content type identification on the first image to obtain an identification result, and the image content type identification is used for identifying a natural image type and/or a computer graphic type;
the segmentation unit is used for performing region segmentation on the first image according to the identification result to obtain a region segmentation result;
and the processing unit is used for carrying out bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that, in the image processing method, the apparatus, and the storage medium described in the embodiments of the present application, a first image is obtained, an image content type is identified for identifying a natural image type, and/or a computer graphics type is obtained, the first image is subjected to region segmentation according to the identification result to obtain a region segmentation result, and the first image is subjected to bit reduction processing according to the region segmentation result to obtain a second image.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic flowchart of an image processing method according to an embodiment of the present application;
FIG. 1B is a schematic diagram illustrating a first image provided by an embodiment of the present application;
fig. 1C is a schematic illustration of a natural image provided in an embodiment of the present application;
fig. 1D is a schematic diagram illustrating a display effect of the natural image in fig. 1C without bit reduction processing by a dithering algorithm according to an embodiment of the present disclosure;
fig. 1E is a schematic diagram illustrating a display effect of the natural image in fig. 1C after bit number reduction processing by a dithering algorithm according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of another image processing method provided in the embodiments of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4A is a block diagram of functional units of an image processing apparatus according to an embodiment of the present application;
fig. 4B is a block diagram of still another functional unit of the image processing apparatus shown in fig. 4A according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device related to the embodiment of the present application may be an electronic device having an image processing function or a display function, and the electronic device may include various handheld devices (such as a Mobile phone, a tablet computer, and the like) having a wireless communication function, a vehicle-mounted device (a car recorder, a camera in a car, a sound box in a car, and the like), a wearable device (smart glasses, a smart bracelet, a smart watch, and the like), a computing device or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), a Mobile Station (Mobile Station, MS), a terminal device (terminal device), and the like, and the electronic device may also be a server.
The following describes embodiments of the present application in detail.
Referring to fig. 1A, fig. 1A is a schematic flowchart of an image processing method according to an embodiment of the present application, and as shown in the drawing, the image processing method includes:
101. a first image is acquired.
The first image may be a grayscale image or a color image. The first image may be any image read by the electronic device, the first image may be stored in the electronic device, or the first image may be from an external device, for example, another electronic device, or a cloud. The first image may be an original image or a source image.
102. And carrying out image content type identification on the first image to obtain an identification result, wherein the image content type identification is used for identifying a natural image type and/or a computer graphic type.
In the embodiment of the present application, the natural image category is an image obtained by a camera, and the camera may be any type of camera, for example, an infrared camera or a visible light camera. The computer graphics category is an image generated by computer rendering or drawing, such as a mobile phone interface, a game interface, and the like. The region corresponding to the natural image category may be referred to as a natural image region, and the region corresponding to the computer graphics category may be referred to as a computer graphics region.
The purpose of the image content type recognition is to recognize a natural image area in the first image, or a computer graphic area. The first image may include only a natural image region, or the first image may include only a computer graphics region, or the first image may include at least one natural image region and at least one computer graphics region, as shown in fig. 1B, and the natural image region (outside the dotted line box) and the computer graphics region (inside the dotted line box) may be included in the first image shown in fig. 1B.
Specifically, the electronic device may perform image content category identification on the first image, and may further obtain an identification result, where the identification result is used to represent which region in the first image is a natural image category and which region in the first image is a computer graphics category.
Optionally, in the step 102, performing image content type identification on the first image to obtain an identification result, the method may include the following steps:
21. determining whether a first-order to Nth-order derivative of adjacent pixels of a pixel j in an ith row of pixels in the first image is a constant value, wherein the jth row of pixels is any row of pixels in the first image, the pixel j is any row of pixels in the ith row of pixels, and N is an integer greater than 1;
22. determining the pixel j as the computer graphics category when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are constant values;
23. and when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are not constant values, determining the pixel j as the natural image category.
In a specific implementation, because a natural image generally has noise, its derivatives of each order are not generally constant, the natural image noise generally includes gaussian noise and poisson noise, which are inevitably formed during the imaging process of a camera, and because a computer graphic image does not have noise, its derivatives of each order are generally constant. Based on the principle, taking the pixel j in the ith row of pixels as an example, the jth row of pixels is any row of pixels in the first image, the pixel j is any row of pixels in the ith row of pixels, it may be determined whether the first to nth derivative of the neighboring pixels of pixel j is a constant value, N being an integer greater than 1, constant value being understood as a constant, i.e., the first to nth derivatives are all constant, and further, when the first to nth derivatives of the neighboring pixels of the pixel j are constant, determining pixel j as a computer graphics class, when the first to Nth order derivatives of the neighboring pixels of pixel j are not constant, i.e., at least one of the first through nth derivatives is not constant, determining pixel j as a natural image class, and so on, the image content class corresponding to each pixel can be deduced, and by this means, it can be determined whether the data in a certain area in the first image is a natural image or a computer graphic image.
Optionally, between step 101 and step 102, the following steps may be further included:
a1, comparing the first pixel bit number of the first image with the second pixel bit number of the display system;
a2, when the first pixel bit number is larger than the second pixel bit number, executing the step of carrying out image content type identification on the first image to obtain an identification result.
In a specific implementation, the electronic device may obtain a first pixel bit number of the first image and a second pixel bit number of the display system, and compare the first pixel bit number and the second pixel bit number, where when the first pixel bit number is greater than the second pixel bit number, step 102 may be performed, that is, when the first pixel bit number is greater than the second pixel bit number, the bit number is specifically reduced, and otherwise, when the first pixel bit number is less than or equal to the second pixel bit number, the display may be directly performed, and the bit number reduction process is not required.
103. And carrying out region segmentation on the first image according to the identification result to obtain a region segmentation result.
Since the recognition result already reflects which region in the first image is a natural image and which region is a computer graphics image, the first image can be subjected to region segmentation according to the recognition result to obtain a region segmentation result, i.e. the natural image and the computer graphics image in the first image are distinguished by the region segmentation result.
104. And performing bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
The region segmentation result distinguishes the natural image and the computer graphic image in the first image, and then corresponding bit number reduction processing can be adopted for the natural image and the computer graphic image to obtain a second image, the natural image region and the computer graphic image region are distinguished through content analysis of the images, different dithering (differentiating) algorithms can be adopted on different content regions, and therefore the purposes that the natural image is not layered and the computer graphic image region is not noisy in the process of reducing the bit number are achieved, and the second image can be displayed on a display screen.
In the specific implementation, the error transfer algorithm of the warming algorithm is suitable for processing natural images, but the algorithm is not suitable when the image content is computer graphics, and some noise is generated when the image content is computer graphics.
Optionally, when the region segmentation result includes a natural image category, in step 104, the number of bits of the first image is reduced according to the region segmentation result to obtain a second image, which may be implemented as follows:
and processing a natural image area corresponding to the natural image category in the first image through a smoothing algorithm.
When the region segmentation result comprises the natural image category, the natural image region corresponding to the natural image category can be extracted, and the natural image region is processed by adopting a smoothing algorithm, so that the bit number is reduced, the smooth transition of the image is realized, and the image is not obviously layered. The smoothing algorithm may include at least one of: mean filtering, median filtering, gaussian filtering, bilateral filtering, dithering (dithering) algorithm, etc., and are not limited herein.
Optionally, the step of processing, by using a smoothing algorithm, a natural image region corresponding to the natural image category in the first image may include the following steps:
a41, determining a first target difference value between the first pixel bit number and the second pixel bit number;
a42, determining a target algorithm control parameter of the smoothing algorithm corresponding to the first target difference value;
and A43, processing the natural image area corresponding to the natural image category in the first image according to the target algorithm control parameter through the smoothing algorithm.
In specific implementation, the electronic device may pre-store a mapping relationship between the difference and an algorithm control parameter of a smoothing algorithm, where the smoothing algorithm is used to implement a smoothing function, and the corresponding algorithm control parameter is used to implement control of a smoothing degree.
Specifically, a first target difference between a first pixel bit number and a second pixel bit number can be determined, a target algorithm control parameter of a smoothing algorithm corresponding to the first target difference is determined according to a mapping relation between the difference and an algorithm control parameter of the smoothing algorithm, and finally, a natural image region corresponding to a natural image category in the first image can be processed according to the target algorithm control parameter through the smoothing algorithm, so that the algorithm control parameter of the smoothing algorithm can be adjusted according to the bit number difference between the first image and the display system, wherein the larger the difference is, the larger the smoothing processing degree realized by the algorithm control parameter is, the smaller the difference is, the smaller the smoothing processing degree realized by the algorithm control parameter is, and further, the adjusted algorithm control parameter can self-adaptively meet the requirements of the display system, the bit number is reduced, smooth transition of the image is realized, and the smooth transition effect is achieved.
Optionally, when the region segmentation result includes a computer graphics type, in step 104, performing bit reduction processing on the first image according to the region segmentation result to obtain a second image, which may be implemented as follows:
and performing tail bit removal processing on a computer graphic area corresponding to the computer graphic type in the first image.
In the specific implementation, the tail-removing bit number processing can be performed on the computer graphic area corresponding to the computer graphic category in the first image, that is, the bit number of the pixel is right-shifted, the bit data at the tail part is removed, taking the example that 8 bits are reduced to 6 bits, in the process that 8 bits are reduced to 6 bits, only 2 bits are right-shifted through data, and the data of two bits at the tail part are thrown away, so that the noise of the computer graphic image area can be avoided.
Optionally, the step of performing a tail-removing bit number process on the computer graphics region corresponding to the computer graphics category in the first image may include the following steps:
b41, determining a second target difference value between the first pixel bit number and the second pixel bit number;
and B42, performing the bit number removing process of the tail part on the computer graphic area according to the second target difference value.
Specifically, since the final display effect can be achieved by using the same number of bits for the second image as the number of bits for the display system, thus, a second target difference between the first number of pixel bits and the second number of pixel bits may be determined, that is, the first image has a bit number more than that of the display system, the same bit number is removed from the computer image area to be processed by removing the tail bit number, finally the bit number of the computer image area in the second image is the same as that of the display system, taking the computer graphics area as 8bit and the display system as 6bit as an example, in the process of reducing from 8bit to 6bit, the data can be shifted to the right by 2 bits, the data of the two bits at the tail part is thrown away, that is, the number of bits of the computer image region in the second image can be made the same as the number of bits of the display system without causing noise in the computer image region, and the display effect can be deeply fit to the display system.
For example, when the number of bits of the display system is lower than that of the original image, for example, the input image is 10 bits, but the display system is 8 bits, it is necessary to reduce the number of image bits by some methods, for example, image dithering (dither). Fig. 1C shows an original image, fig. 1D shows an effect of fig. 1C after the dither algorithm processing, and fig. 1E shows an effect of fig. 1C after the dither algorithm processing, wherein the image has a distinct layered boundary due to directly throwing away the last bit in fig. 1D, and fig. 1E shows that the image bit number is low but the transition is still natural by the dither algorithm processing, and the transition is not much different from the original image shown in fig. 1C.
The ditheting algorithm transfers the error introduced by reducing the current pixel bit number to the right and the following pixels according to a certain proportion to achieve the effect of smoothing the image, and the following formula is shown as an error transfer distribution proportion, and is specifically as follows:
Figure BDA0003203452300000081
the matrix gives a typical error distribution ratio, namely how the error from the original image at each pixel is specifically transferred to the right and downwards in the process of 8-6 bit quantization level reduction.
It can be seen that, in the image processing method described in this embodiment of the present application, a first image is obtained, image content type identification is performed on the first image to obtain an identification result, the image content type identification is used for identifying a natural image type, and/or a computer graphics type is performed, a region segmentation result is obtained by performing region segmentation on the first image according to the identification result, and a bit reduction process is performed on the first image according to the region segmentation result to obtain a second image.
Referring to fig. 2, fig. 2 is a schematic flow chart of an image processing method according to an embodiment of the present application, as shown in the figure, the image processing method includes:
201. a first image is acquired.
202. Comparing a first number of pixel bits of the first image to a second number of pixel bits of a display system.
203. And when the first pixel bit number is larger than the second pixel bit number, carrying out image content type identification on the first image to obtain an identification result, wherein the image content type identification is used for identifying a natural image type and/or a computer graphic type.
204. And carrying out region segmentation on the first image according to the identification result to obtain a region segmentation result.
205. And performing bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
For the detailed description of the steps 201 to 205, reference may be made to corresponding steps of the image processing method described in the foregoing fig. 1A, and details are not repeated here.
It can be seen that, in the image processing method described in the embodiment of the present application, a first image is obtained, a first pixel bit number of the first image is compared with a second pixel bit number of a display system, when the first pixel bit number is greater than the second pixel bit number, an image content type identification is performed on the first image to obtain an identification result, the image content type identification is used to identify a natural image type and/or a computer graphics type, the first image is subjected to region segmentation according to the identification result to obtain a region segmentation result, the first image is subjected to a bit reduction process according to the region segmentation result to obtain a second image, so that the image content type can be identified by detecting the image content, and further different bit reduction methods are adopted for processing image contents of different types, when the pixel bit number of an image source is higher than the pixel number of the display system, the image quality is improved.
In accordance with the foregoing embodiments, please refer to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
acquiring a first image;
carrying out image content type identification on the first image to obtain an identification result, wherein the image content type identification is used for identifying a natural image type and/or a computer graphic type;
performing region segmentation on the first image according to the identification result to obtain a region segmentation result;
and performing bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
Optionally, in the aspect of performing image content category identification on the first image to obtain an identification result, the program includes instructions for performing the following steps:
determining whether a first-order to Nth-order derivative of adjacent pixels of a pixel j in an ith row of pixels in the first image is a constant value, wherein the jth row of pixels is any row of pixels in the first image, the pixel j is any row of pixels in the ith row of pixels, and N is an integer greater than 1;
determining the pixel j as the computer graphics category when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are constant values;
and when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are not constant values, determining the pixel j as the natural image category.
Optionally, the program further includes instructions for performing the following steps:
comparing a first number of pixel bits of the first image with a second number of pixel bits of a display system;
and when the first pixel bit number is larger than the second pixel bit number, executing the step of carrying out image content type identification on the first image to obtain an identification result.
Optionally, when the region segmentation result includes a natural image category, in terms of performing bit reduction processing on the first image according to the region segmentation result to obtain a second image, the program includes instructions for executing the following steps:
and processing a natural image area corresponding to the natural image category in the first image through a smoothing algorithm.
Optionally, in terms of processing the natural image region corresponding to the natural image category in the first image through the smoothing algorithm, the program includes instructions for performing the following steps:
determining a first target difference between the first number of pixel bits and the second number of pixel bits;
determining a target algorithm control parameter of the smoothing algorithm corresponding to the first target difference value;
and processing the natural image area corresponding to the natural image category in the first image according to the target algorithm control parameter through the smoothing processing algorithm.
Optionally, when the region segmentation result includes a computer graphics category, in terms of performing bit reduction processing on the first image according to the region segmentation result to obtain a second image, the program includes instructions for executing the following steps:
and performing tail bit removal processing on a computer graphic area corresponding to the computer graphic type in the first image.
Optionally, in the aspect of performing the ending bit number removing processing on the computer graphics region corresponding to the computer graphics category in the first image, the program includes instructions for executing the following steps:
determining a second target difference between the first number of pixel bits and the second number of pixel bits;
and performing tail bit number removing processing on the computer graphic area according to the second target difference value.
It can be seen that, in the electronic device described in this embodiment of the present application, a first image is obtained, image content type identification is performed on the first image to obtain an identification result, the image content type identification is used for identifying a natural image type, and/or a computer graphics type is performed, a region segmentation result is obtained by performing region segmentation on the first image according to the identification result, and a bit reduction process is performed on the first image according to the region segmentation result to obtain a second image.
Fig. 4A is a block diagram of functional unit components of the image processing apparatus 400 according to the embodiment of the present application. The image processing apparatus 400 is applied to an electronic device, and the apparatus 400 includes: an acquisition unit 401, a recognition unit 402, a segmentation unit 403 and a processing unit 404, wherein,
the acquiring unit 401 is configured to acquire a first image;
the identification unit 402 is configured to perform image content type identification on the first image to obtain an identification result, where the image content type identification is used to identify a natural image type and/or a computer graphics type;
the segmentation unit 403 is configured to perform region segmentation on the first image according to the identification result to obtain a region segmentation result;
the processing unit 404 is configured to perform bit reduction processing on the first image according to the region segmentation result to obtain a second image.
Optionally, in the aspect of performing image content category identification on the first image to obtain an identification result, the identification unit 402 is specifically configured to:
determining whether a first-order to Nth-order derivative of adjacent pixels of a pixel j in an ith row of pixels in the first image is a constant value, wherein the jth row of pixels is any row of pixels in the first image, the pixel j is any row of pixels in the ith row of pixels, and N is an integer greater than 1;
determining the pixel j as the computer graphics category when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are constant values;
and when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are not constant values, determining the pixel j as the natural image category.
Alternatively, as shown in fig. 4B, fig. 4B is a further modified structure of the image processing apparatus shown in fig. 4A, which may further include, compared with fig. 4A: the comparison unit 405 specifically includes the following:
the comparing unit 405 is configured to compare a first pixel bit number of the first image with a second pixel bit number of a display system;
when the first pixel bit number is greater than the second pixel bit number, the identifying unit 402 performs the step of performing the image content type identification on the first image to obtain an identification result.
Optionally, when the region segmentation result includes a natural image category, in terms of performing bit reduction processing on the first image according to the region segmentation result to obtain a second image, the processing unit 404 is specifically configured to:
and processing a natural image area corresponding to the natural image category in the first image through a smoothing algorithm.
Optionally, in terms of processing the natural image region corresponding to the natural image category in the first image through the smoothing algorithm, the processing unit 404 is specifically configured to:
determining a first target difference between the first number of pixel bits and the second number of pixel bits;
determining a target algorithm control parameter of the smoothing algorithm corresponding to the first target difference value;
and processing the natural image area corresponding to the natural image category in the first image according to the target algorithm control parameter through the smoothing processing algorithm.
Optionally, when the region segmentation result includes a computer graphics category, the processing unit 404 is specifically configured to perform bit reduction processing on the first image according to the region segmentation result to obtain a second image, where:
and performing tail bit removal processing on a computer graphic area corresponding to the computer graphic type in the first image.
Optionally, in the aspect of performing ending bit number removal processing on the computer graphics region corresponding to the computer graphics category in the first image, the processing unit 404 is specifically configured to:
determining a second target difference between the first number of pixel bits and the second number of pixel bits;
and performing tail bit number removing processing on the computer graphic area according to the second target difference value.
It can be seen that, the image processing apparatus described in this embodiment of the present application obtains a first image, performs image content type identification on the first image to obtain an identification result, and the image content type identification is used to identify a natural image type and/or a computer graphics type, performs region segmentation on the first image according to the identification result to obtain a region segmentation result, and performs bit reduction processing on the first image according to the region segmentation result to obtain a second image.
It is to be understood that the functions of each program module of the image processing apparatus of this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description of the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An image processing method, characterized in that the method comprises:
acquiring a first image;
carrying out image content type identification on the first image to obtain an identification result, wherein the image content type identification is used for identifying a natural image type and/or a computer graphic type;
performing region segmentation on the first image according to the identification result to obtain a region segmentation result;
and performing bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
2. The method according to claim 1, wherein the performing image content category identification on the first image to obtain an identification result comprises:
determining whether a first-order to Nth-order derivative of adjacent pixels of a pixel j in an ith row of pixels in the first image is a constant value, wherein the jth row of pixels is any row of pixels in the first image, the pixel j is any row of pixels in the ith row of pixels, and N is an integer greater than 1;
determining the pixel j as the computer graphics category when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are constant values;
and when the first-order to Nth-order derivatives of the adjacent pixels of the pixel j are not constant values, determining the pixel j as the natural image category.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
comparing a first number of pixel bits of the first image with a second number of pixel bits of a display system;
and when the first pixel bit number is larger than the second pixel bit number, executing the step of carrying out image content type identification on the first image to obtain an identification result.
4. The method according to claim 3, wherein when the region segmentation result includes a natural image category, the performing bit reduction processing on the first image according to the region segmentation result to obtain a second image includes:
and processing a natural image area corresponding to the natural image category in the first image through a smoothing algorithm.
5. The method according to claim 4, wherein the processing the natural image region corresponding to the natural image category in the first image by the smoothing algorithm comprises:
determining a first target difference between the first number of pixel bits and the second number of pixel bits;
determining a target algorithm control parameter of the smoothing algorithm corresponding to the first target difference value;
and processing the natural image area corresponding to the natural image category in the first image according to the target algorithm control parameter through the smoothing processing algorithm.
6. The method according to claim 3, wherein when the region segmentation result includes a computer graphics category, the performing bit reduction processing on the first image according to the region segmentation result to obtain a second image comprises:
and performing tail bit removal processing on a computer graphic area corresponding to the computer graphic type in the first image.
7. The method according to claim 6, wherein the performing the end bit number processing on the computer graphics region corresponding to the computer graphics category in the first image comprises:
determining a second target difference between the first number of pixel bits and the second number of pixel bits;
and performing tail bit number removing processing on the computer graphic area according to the second target difference value.
8. An image processing apparatus, characterized in that the apparatus comprises: an acquisition unit, a recognition unit, a segmentation unit and a processing unit, wherein,
the acquisition unit is used for acquiring a first image;
the identification unit is used for carrying out image content type identification on the first image to obtain an identification result, and the image content type identification is used for identifying a natural image type and/or a computer graphic type;
the segmentation unit is used for performing region segmentation on the first image according to the identification result to obtain a region segmentation result;
and the processing unit is used for carrying out bit number reduction processing on the first image according to the region segmentation result to obtain a second image.
9. An electronic device comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202110910656.7A 2021-08-09 2021-08-09 Image processing method, device and storage medium Active CN113744282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110910656.7A CN113744282B (en) 2021-08-09 2021-08-09 Image processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110910656.7A CN113744282B (en) 2021-08-09 2021-08-09 Image processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113744282A true CN113744282A (en) 2021-12-03
CN113744282B CN113744282B (en) 2023-04-25

Family

ID=78730481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110910656.7A Active CN113744282B (en) 2021-08-09 2021-08-09 Image processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113744282B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1568479A (en) * 2001-10-11 2005-01-19 皇家飞利浦电子股份有限公司 Method and apparatus for discriminating between different regions of an image
CN1767595A (en) * 2005-09-08 2006-05-03 上海广电(集团)有限公司中央研究院 Jitter algorithm for image display
US20070172120A1 (en) * 2006-01-24 2007-07-26 Nokia Corporation Compression of images for computer graphics
CN102663451A (en) * 2012-03-29 2012-09-12 天津科技大学 Graph image classification method based on color space characteristics
CN107424583A (en) * 2017-07-03 2017-12-01 威创集团股份有限公司 The data display processing method and system of special-shaped image
CN108702514A (en) * 2016-03-09 2018-10-23 华为技术有限公司 A kind of high dynamic range images processing method and processing device
CN111902803A (en) * 2018-03-22 2020-11-06 脸谱科技有限责任公司 Apparatus, system, and method for displaying images of regions having different bit depths

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1568479A (en) * 2001-10-11 2005-01-19 皇家飞利浦电子股份有限公司 Method and apparatus for discriminating between different regions of an image
CN1767595A (en) * 2005-09-08 2006-05-03 上海广电(集团)有限公司中央研究院 Jitter algorithm for image display
US20070172120A1 (en) * 2006-01-24 2007-07-26 Nokia Corporation Compression of images for computer graphics
CN102663451A (en) * 2012-03-29 2012-09-12 天津科技大学 Graph image classification method based on color space characteristics
CN108702514A (en) * 2016-03-09 2018-10-23 华为技术有限公司 A kind of high dynamic range images processing method and processing device
CN107424583A (en) * 2017-07-03 2017-12-01 威创集团股份有限公司 The data display processing method and system of special-shaped image
CN111902803A (en) * 2018-03-22 2020-11-06 脸谱科技有限责任公司 Apparatus, system, and method for displaying images of regions having different bit depths

Also Published As

Publication number Publication date
CN113744282B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN107749062B (en) Image processing method and device
US20180198998A1 (en) Neighborhood haze density estimation for single-image dehaze
CN111325694B (en) Image noise removing method and device
CN110599387A (en) Method and device for automatically removing image watermark
CN109214996B (en) Image processing method and device
CN113781406B (en) Scratch detection method and device for electronic component and computer equipment
CN111080654B (en) Image lesion region segmentation method and device and server
CN111861938B (en) Image denoising method and device, electronic equipment and readable storage medium
CN111340777B (en) Image noise point judging method and device
CN111028276A (en) Image alignment method and device, storage medium and electronic equipment
CN110910326B (en) Image processing method and device, processor, electronic equipment and storage medium
CN111882565A (en) Image binarization method, device, equipment and storage medium
CN114298935A (en) Image enhancement method, device and computer readable storage medium
CN111222446B (en) Face recognition method, face recognition device and mobile terminal
US10964028B2 (en) Electronic device and method for segmenting image
CN113744282B (en) Image processing method, device and storage medium
CN113132786A (en) User interface display method and device and readable storage medium
CN111127310B (en) Image processing method and device, electronic equipment and storage medium
CN114387315A (en) Image processing model training method, image processing device, image processing equipment and image processing medium
CN111260590A (en) Image noise reduction method and related product
CN111986176A (en) Crack image identification method, system, terminal and readable storage medium
CN111080550B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114119377A (en) Image processing method and device
CN113674144A (en) Image processing method, terminal equipment and readable storage medium
CN113658050A (en) Image denoising method, denoising device, mobile terminal and storage medium

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