CN106331427A - Saturation enhancement method and device - Google Patents
Saturation enhancement method and device Download PDFInfo
- Publication number
- CN106331427A CN106331427A CN201610717997.1A CN201610717997A CN106331427A CN 106331427 A CN106331427 A CN 106331427A CN 201610717997 A CN201610717997 A CN 201610717997A CN 106331427 A CN106331427 A CN 106331427A
- Authority
- CN
- China
- Prior art keywords
- layer
- color scale
- pixels
- scale value
- saturation enhancement
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B21/00—Projectors or projection-type viewers; Accessories therefor
- G03B21/54—Accessories
- G03B21/56—Projection screens
- G03B21/60—Projection screens characterised by the nature of the surface
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/34—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source
- G09G3/36—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source using liquid crystals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/147—Scene change detection
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Crystallography & Structural Chemistry (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Color Image Communication Systems (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
技术领域technical field
本公开涉及显示技术领域,特别涉及一种饱和度增强方法及装置。The present disclosure relates to the field of display technology, in particular to a saturation enhancement method and device.
背景技术Background technique
饱和度是指色彩的鲜艳程度,也称色彩的纯度。饱和度取决于该色中含色成分和消色成分的比例。含色成分越大,饱和度越大;消色成分越大,饱和度越小。Saturation refers to the vividness of color, also known as the purity of color. Saturation depends on the ratio of chromatic and achromatic components in the color. The larger the color component, the greater the saturation; the larger the achromatic component, the smaller the saturation.
相关技术中存在饱和度增强方法,该饱和度增强方法能够增强图像的色彩。对终端中所显示的各帧图像使用饱和度增强方法后,能够提升终端的显示效果。There is a saturation enhancement method in the related art, and the saturation enhancement method can enhance the color of an image. After the saturation enhancement method is used for each frame of image displayed in the terminal, the display effect of the terminal can be improved.
发明内容Contents of the invention
为了解决对各帧显示内容均使用相同的饱和度增强方式时,一些图片被不合适地增强的问题,本公开提供一种饱和度增强方法及装置。所述技术方案如下:In order to solve the problem that some pictures are inappropriately enhanced when the same saturation enhancement method is used for each frame display content, the present disclosure provides a saturation enhancement method and device. Described technical scheme is as follows:
根据本公开的第一方面,提供了一种饱和度增强方法,该方法包括:According to a first aspect of the present disclosure, a saturation enhancement method is provided, the method comprising:
获取显示内容对应的至少一个图层的图层特征信息;Obtaining layer feature information of at least one layer corresponding to the displayed content;
根据所述图层特征信息识别每个所述图层的图层类型;identifying the layer type of each of the layers according to the layer feature information;
对于每个所述图层,选择与所述图层类型所对应的饱和度增强方式,使用所述饱和度增强方式对所述图层进行增强;For each layer, select a saturation enhancement method corresponding to the layer type, and use the saturation enhancement method to enhance the layer;
对增强后的所述图层所叠加形成的所述显示内容进行显示。and displaying the display content formed by superimposing the enhanced layers.
在可选的实施例中,图层特征信息包括至少一个颜色通道的像素分布对应关系,像素分布对应关系包括色阶值与具有色阶值的像素数之间的对应关系;In an optional embodiment, the layer characteristic information includes the pixel distribution correspondence of at least one color channel, and the pixel distribution correspondence includes the correspondence between the color scale value and the number of pixels with the color scale value;
根据图层特征信息识别每个图层的图层类型,包括:Identify the layer type of each layer based on layer feature information, including:
对于每个图层,检测当前图层中相邻的色阶值对应的像素数的变化趋势是否属于突变变化趋势;For each layer, detect whether the change trend of the number of pixels corresponding to the adjacent color scale values in the current layer belongs to the sudden change trend;
若变化趋势不属于突变变化趋势,则确定图层的图层类型是自然图层;If the change trend does not belong to the sudden change trend, the layer type of the determined layer is a natural layer;
若变化趋势属于突变变化特征,则确定图层的图层类型是用户界面图层;If the change trend belongs to the abrupt change feature, then determine that the layer type of the layer is a user interface layer;
其中,相邻的色阶值是指取值差小于预定值的两个色阶值。Wherein, adjacent color scale values refer to two color scale values whose value difference is smaller than a predetermined value.
在可选的实施例中,突变变化趋势包括:In an optional embodiment, the mutation trend includes:
存在n1组相邻的色阶值对应的像素数的差值大于第一阈值;There are n 1 groups of adjacent color scale values corresponding to a difference in the number of pixels greater than the first threshold;
或,or,
存在n2组相邻的色阶值对应的像素数的比值大于第二阈值;The ratio of the number of pixels corresponding to n 2 groups of adjacent color scale values is greater than the second threshold;
其中,n1、n2为正整数。Wherein, n 1 and n 2 are positive integers.
在可选的实施例中,图层特征信息包括至少一个颜色通道的像素分布对应关系,像素分布对应关系包括色阶值与具有色阶值的像素数之间的对应关系;In an optional embodiment, the layer characteristic information includes the pixel distribution correspondence of at least one color channel, and the pixel distribution correspondence includes the correspondence between the color scale value and the number of pixels with the color scale value;
根据图层特征信息识别每个图层的图层类型,包括:Identify the layer type of each layer based on layer feature information, including:
对于每个图层,检测当前图层中的色阶值和/或像素数是否符合规律性特征;For each layer, detect whether the color scale value and/or the number of pixels in the current layer conform to the regularity feature;
若色阶值和/或像素数具有规律性特征,则确定图层的图层类型是用户界面图层;If the color scale value and/or the number of pixels have regular characteristics, it is determined that the layer type of the layer is a user interface layer;
若色阶值和/或像素数不具有规律性特征,则确定图层的图层类型是自然图层。If the color scale value and/or the number of pixels do not have regular characteristics, it is determined that the layer type of the layer is a natural layer.
在可选的实施例中,规律性特征,包括:In an optional embodiment, regularity features include:
存在n3组相邻的色阶值对应的像素数的比值是整数倍;The ratio of the number of pixels corresponding to n 3 groups of adjacent color scale values is an integer multiple;
或,or,
存在n4个色阶值在每种颜色通道中对应的像素数均相等;There are n 4 color scale values corresponding to the same number of pixels in each color channel;
或,or,
存在n5个色阶值在每种颜色通道中对应的像素数符合预定比例,且预定比例不等于1;There are n 5 color scale values corresponding to the number of pixels in each color channel meeting the predetermined ratio, and the predetermined ratio is not equal to 1;
或,or,
存在n6个像素在每种颜色通道中具有相同的色阶值;There are n 6 pixels having the same color scale value in each color channel;
其中,n3、n4、n5、n6为正整数。Wherein, n 3 , n 4 , n 5 , and n 6 are positive integers.
在可选的实施例中,该方法还包括:In an optional embodiment, the method also includes:
在像素分布对应关系中,将像素数低于噪声阈值的色阶值进行过滤。In the pixel distribution correspondence, the color scale values whose number of pixels is lower than the noise threshold are filtered.
在可选的实施例中,获取显示内容对应的至少一个图层的图层特征信息,包括:In an optional embodiment, acquiring layer feature information of at least one layer corresponding to the display content includes:
根据显示内容中至少一个图层的叠加顺序,标记每个图层的有效显示区域;According to the stacking order of at least one layer in the display content, mark the effective display area of each layer;
提取每个图层中的有效显示区域的图层特征信息。The layer feature information of the effective display area in each layer is extracted.
在可选的实施例中,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对图层进行增强,包括:In an optional embodiment, the saturation enhancement method corresponding to the layer type is selected, and the saturation enhancement method is used to enhance the layer, including:
若图层类型为自然图层,则使用第一饱和度增强方式对图层进行增强;If the layer type is a natural layer, use the first saturation enhancement method to enhance the layer;
若图层类型为用户界面图层,则使用第二饱和度增强方式对图层进行增强,或,将图层的图层数据保持不变;If the layer type is a user interface layer, use the second saturation enhancement method to enhance the layer, or keep the layer data of the layer unchanged;
其中,第二饱和度增强方式的增强等级低于第一饱和度增强方式的增强等级。Wherein, the enhancement level of the second saturation enhancement mode is lower than the enhancement level of the first saturation enhancement mode.
在可选的实施例中,该方法还包括:In an optional embodiment, the method also includes:
检测是否满足饱和度增强功能的开启条件;Detect whether the opening condition of the saturation enhancement function is met;
若满足增强条件,则执行获取图层的图层特征信息的步骤。If the enhancement condition is satisfied, the step of obtaining the layer feature information of the layer is executed.
根据本公开的第二方面,提供了一种饱和度增强装置,装置包括:According to a second aspect of the present disclosure, a saturation enhancement device is provided, the device comprising:
获取模块,被配置为获取显示内容对应的至少一个图层的图层特征信息;An acquisition module configured to acquire layer feature information of at least one layer corresponding to the displayed content;
识别模块,被配置为根据图层特征信息识别每个图层的图层类型;An identification module configured to identify the layer type of each layer according to the layer feature information;
增强模块,被配置为对于每个所述图层,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对图层进行增强;The enhancement module is configured to, for each of the layers, select a saturation enhancement method corresponding to the layer type, and use the saturation enhancement method to enhance the layer;
显示模块,被配置为对增强后的图层所叠加形成的显示内容进行显示。The display module is configured to display the display content formed by superimposing the enhanced layers.
在可选的实施例中,图层特征信息包括至少一个颜色通道的像素分布对应关系,像素分布对应关系包括色阶值与具有色阶值的像素数之间的对应关系;In an optional embodiment, the layer characteristic information includes the pixel distribution correspondence of at least one color channel, and the pixel distribution correspondence includes the correspondence between the color scale value and the number of pixels with the color scale value;
识别模块,被配置为对于每个图层,检测当前图层中相邻的色阶值对应的像素数的变化趋势是否属于突变变化趋势;若变化趋势不属于突变变化趋势,则确定图层的图层类型是自然图层;若变化趋势属于突变变化特征,则确定图层的图层类型是用户界面图层;The identification module is configured to, for each layer, detect whether the change trend of the number of pixels corresponding to the adjacent color scale value in the current layer belongs to the sudden change trend; if the change trend does not belong to the sudden change trend, then determine the layer's The layer type is a natural layer; if the change trend belongs to a sudden change feature, then the layer type of the layer is determined to be a user interface layer;
其中,相邻的色阶值是指取值差小于预定值的两个色阶值。Wherein, adjacent color scale values refer to two color scale values whose value difference is smaller than a predetermined value.
在可选的实施例中,突变变化趋势包括:In an optional embodiment, the mutation trend includes:
存在n1组相邻的色阶值对应的像素数的差值大于第一阈值;There are n 1 groups of adjacent color scale values corresponding to a difference in the number of pixels greater than the first threshold;
或,or,
存在n2组相邻的色阶值对应的像素数的比值大于第二阈值;The ratio of the number of pixels corresponding to n 2 groups of adjacent color scale values is greater than the second threshold;
其中,n1、n2为正整数。Wherein, n 1 and n 2 are positive integers.
在可选的实施例中,图层特征信息包括至少一个颜色通道的像素分布对应关系,像素分布对应关系包括色阶值与具有色阶值的像素数之间的对应关系;In an optional embodiment, the layer characteristic information includes the pixel distribution correspondence of at least one color channel, and the pixel distribution correspondence includes the correspondence between the color scale value and the number of pixels with the color scale value;
识别模块,被配置为对于每个图层,检测当前图层中的色阶值和/或像素数是否符合规律性特征;若色阶值和/或像素数具有规律性特征,则确定图层的图层类型是用户界面图层;若色阶值和/或像素数不具有规律性特征,则确定图层的图层类型是自然图层。The identification module is configured to, for each layer, detect whether the color scale value and/or the number of pixels in the current layer conform to regular characteristics; if the color scale value and/or the number of pixels have regular characteristics, then determine the layer The layer type of the layer is a user interface layer; if the color scale value and/or the number of pixels do not have regular characteristics, the layer type of the layer is determined to be a natural layer.
在可选的实施例中,规律性特征,包括:In an optional embodiment, regularity features include:
存在n3组相邻的色阶值对应的像素数的比值是整数倍;The ratio of the number of pixels corresponding to n 3 groups of adjacent color scale values is an integer multiple;
或,or,
存在n4个色阶值在每种颜色通道中对应的像素数均相等;There are n 4 color scale values corresponding to the same number of pixels in each color channel;
或,or,
存在n5个色阶值在每种颜色通道中对应的像素数符合预定比例,且预定比例不等于1;There are n5 color scale values corresponding to the number of pixels in each color channel meeting the predetermined ratio, and the predetermined ratio is not equal to 1;
或,or,
存在n6个像素在每种颜色通道中具有相同的色阶值;There are n 6 pixels having the same color scale value in each color channel;
其中,n3、n4、n5、n6为正整数。Wherein, n 3 , n 4 , n 5 , and n 6 are positive integers.
在可选的实施例中,该装置还包括:In an optional embodiment, the device also includes:
过滤模块,被配置为在像素分布对应关系中,将像素数低于噪声阈值的色阶值进行过滤。The filtering module is configured to filter the color scale values whose number of pixels is lower than the noise threshold in the pixel distribution correspondence.
在可选的实施例中,获取模块,被配置为根据显示内容中至少一个图层的叠加顺序,标记每个图层的有效显示区域;提取每个图层中的有效显示区域的图层特征信息。In an optional embodiment, the acquisition module is configured to mark the effective display area of each layer according to the stacking order of at least one layer in the display content; extract the layer features of the effective display area in each layer information.
在可选的实施例中,增强模块,被配置为当图层类型为自然图层时,使用第一饱和度增强方式对图层进行增强;当图层类型为用户界面图层时,使用第二饱和度增强方式对图层进行增强,或,将图层的图层数据保持不变;In an optional embodiment, the enhancement module is configured to use the first saturation enhancement method to enhance the layer when the layer type is a natural layer; when the layer type is a user interface layer, use the first The second saturation enhancement method enhances the layer, or keeps the layer data of the layer unchanged;
其中,第二饱和度增强方式的增强等级低于第一饱和度增强方式的增强等级。Wherein, the enhancement level of the second saturation enhancement mode is lower than the enhancement level of the first saturation enhancement mode.
在可选的实施例中,该装置还包括:In an optional embodiment, the device also includes:
开启模块,被配置为检测是否满足饱和度增强功能的开启条件;An enabling module configured to detect whether a condition for enabling the saturation enhancement function is met;
获取模块,被配置为当满足增强条件时,执行获取图层的图层特征信息的步骤。The acquiring module is configured to execute the step of acquiring the layer feature information of the layer when the enhancement condition is satisfied.
根据本公开的第三方面,提供了一种饱和度增强装置,该装置包括:According to a third aspect of the present disclosure, a saturation enhancement device is provided, the device comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,处理器被配置为:where the processor is configured as:
获取显示内容对应的至少一个图层的图层特征信息;Obtaining layer feature information of at least one layer corresponding to the displayed content;
根据所图层特征信息识别每个图层的图层类型;Identify the layer type of each layer according to the characteristic information of the layer;
对于每个图层,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对图层进行增强;For each layer, select the saturation enhancement method corresponding to the layer type, and use the saturation enhancement method to enhance the layer;
对增强后的图层所叠加形成的显示内容进行显示。Display the display content formed by superimposing the enhanced layers.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
通过获取显示内容对应的至少一个图层的图层特征信息,根据图层特征信息识别每个图层的图形类型,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对各个图层进行增强,对增强后的图层所叠加形成的显示内容进行显示;解决了对终端中的每帧显示内容进行采用相同的饱和度增强方式时,会降低UI图层的美观程度;达到了对于终端中的每帧图层,不同图层类型采用不同的饱和度增强方式,每种图层类型的图层都能得到较好的色彩,从而整体上提升最终的显示内容的显示效果。By obtaining the layer characteristic information of at least one layer corresponding to the displayed content, identify the graphic type of each layer according to the layer characteristic information, select the saturation enhancement method corresponding to the layer type, and use the saturation enhancement method to The layer is enhanced to display the display content formed by the superposition of the enhanced layer; it solves the problem that when the same saturation enhancement method is used for each frame display content in the terminal, the beauty of the UI layer will be reduced; to achieve For each frame layer in the terminal, different layer types adopt different saturation enhancement methods, and layers of each layer type can get better colors, thereby improving the display effect of the final display content as a whole.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure.
附图说明Description of 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.
图1A是根据一示例性实施例示出的一种饱和度增强方法的流程图;Fig. 1A is a flowchart of a saturation enhancement method according to an exemplary embodiment;
图1B是根据一示例性实施例示出的显示内容的结构示意图;Fig. 1B is a schematic structural diagram of display content according to an exemplary embodiment;
图2A是根据一示例性实施例示出的一种自然图层及该自然图层的“色阶值-像素数”直方图的示意图;Fig. 2A is a schematic diagram of a natural layer and a histogram of "color scale value-number of pixels" of the natural layer according to an exemplary embodiment;
图2B是根据一示例性实施例示出的一种UI图层及该UI图层的“色阶值-像素数”直方图的示意图;Fig. 2B is a schematic diagram of a UI layer and a histogram of "color scale value-number of pixels" of the UI layer according to an exemplary embodiment;
图2C是根据另一示例性实施例示出的一种UI图层及该UI图层的“色阶值-像素数”直方图的示意图;Fig. 2C is a schematic diagram of a UI layer and a histogram of "color scale value-number of pixels" of the UI layer shown according to another exemplary embodiment;
图2D是根据另一示例性实施例示出的一种UI图层及该UI图层的“色阶值-像素数”直方图的示意图;Fig. 2D is a schematic diagram of a UI layer and a histogram of "color scale value-number of pixels" of the UI layer according to another exemplary embodiment;
图3是根据另一示例性实施例示出的一种饱和度增强方法的流程图;Fig. 3 is a flowchart of a saturation enhancement method according to another exemplary embodiment;
图4是根据另一示例性实施例示出的一种饱和度增强方法的流程图;Fig. 4 is a flowchart of a method for enhancing saturation according to another exemplary embodiment;
图5是根据另一示例性实施例示出的一种饱和度增强方法的流程图;Fig. 5 is a flow chart of a method for enhancing saturation according to another exemplary embodiment;
图6是根据另一示例性实施例示出的一种饱和度增强方法的流程图;Fig. 6 is a flowchart of a method for enhancing saturation according to another exemplary embodiment;
图7是根据一示例性实施例示出的一种饱和度增强装置的框图;Fig. 7 is a block diagram of a device for enhancing saturation according to an exemplary embodiment;
图8是根据另一示例性实施例示出的一种饱和度增强装置的框图。Fig. 8 is a block diagram of a device for enhancing saturation according to another exemplary embodiment.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
相关技术中,通常对终端中所显示的每帧显示内容采用相同的饱和度增强方法。一帧显示内容通常由多个图层(英文:layer)叠加而成,但并不是每帧图层都适合进行饱和度增强。例如,智能手机的锁屏界面包括:状态栏图层、壁纸图层和桌面图标图层,其中的状态栏图层和桌面图标图层属于用户界面(User Interface,UI)图层,UI图层是人工设计的图层,UI图层的原始可读性已经很好,所以对UI图层进行大幅度的饱和度增强,反而会降低UI图层的美观程度。为此,本公开提供有如下示例性的实施例。In related technologies, generally, the same saturation enhancement method is used for each frame of display content displayed on the terminal. A frame of display content is usually superimposed by multiple layers (English: layers), but not every frame layer is suitable for saturation enhancement. For example, the lock screen interface of a smart phone includes: a status bar layer, a wallpaper layer and a desktop icon layer, wherein the status bar layer and the desktop icon layer belong to the user interface (User Interface, UI) layer, and the UI layer It is an artificially designed layer. The original readability of the UI layer is already very good, so a large saturation enhancement of the UI layer will reduce the beauty of the UI layer. To this end, the present disclosure provides the following exemplary embodiments.
图1A是根据一示例性实施例示出的饱和度增强方法的流程图。本实施例以该方法应用于具有图像处理能力的终端中来举例说明。该方法包括:Fig. 1A is a flow chart of a saturation enhancement method according to an exemplary embodiment. This embodiment is described by taking the method applied to a terminal capable of image processing as an example. The method includes:
在步骤102中,获取显示内容对应的至少一个图层的图层特征信息。In step 102, layer feature information of at least one layer corresponding to the display content is acquired.
在步骤104中,根据图层特征信息识别每个图层的图层类型。In step 104, the layer type of each layer is identified according to the layer feature information.
在步骤106中,对于每个图层,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对图层进行增强。In step 106, for each layer, select a saturation enhancement mode corresponding to the layer type, and use the saturation enhancement mode to enhance the layer.
在步骤108中,对增强后的图层所叠加形成的显示内容进行显示。In step 108, the display content formed by superimposing the enhanced layers is displayed.
综上所述,本实施例提供的饱和度增强方法,通过获取显示内容对应的至少一个图层的图层特征信息,根据图层特征信息识别每个图层的图形类型,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对各个图层进行增强,对增强后的图层所叠加形成的显示内容进行显示;解决了对终端中的每帧显示内容进行采用相同的饱和度增强方式时,会降低UI图层的美观程度;达到了对于终端中的每帧图层,不同图层类型采用不同的饱和度增强方式,每种图层类型的图层都能得到较好的色彩,从而整体上提升最终的显示内容的显示效果。To sum up, the saturation enhancement method provided by this embodiment obtains the layer feature information of at least one layer corresponding to the display content, identifies the graphic type of each layer according to the layer feature information, and selects the graphic type corresponding to the layer type. The corresponding saturation enhancement method uses the saturation enhancement method to enhance each layer, and displays the display content formed by superimposing the enhanced layers; solves the problem of using the same saturation for each frame display content in the terminal When the saturation enhancement method is used, the aesthetics of the UI layer will be reduced; for each frame layer in the terminal, different layer types adopt different saturation enhancement methods, and the layers of each layer type can be better. color, thereby improving the display effect of the final display content as a whole.
图1B是根据一示意性实施例示出的一帧显示内容10的结构示意图。该显示内容10是一个手机主页。该手机主页包括三个图层:状态栏(Status bar)图层12、桌面图标图层14和壁纸图层16。其中,状态栏图层12位于最上层,桌面图标图层14位于中间层,壁纸图层16位于最下层。位于上层的图层具有遮盖位于下层的图层的能力。各个图层之间的叠加顺序,由图层对应的z-order值决定。z-order是指图层(也称显示对象)之间的层次关系。通常,较高的z-order值对应的图层置于较低的z-order值对应的图层的上层。Fig. 1B is a schematic structural diagram of a frame of display content 10 according to an exemplary embodiment. The displayed content 10 is a mobile phone home page. The homepage of the mobile phone includes three layers: a status bar (Status bar) layer 12 , a desktop icon layer 14 and a wallpaper layer 16 . Wherein, the status bar layer 12 is at the top layer, the desktop icon layer 14 is at the middle layer, and the wallpaper layer 16 is at the bottom layer. Layers located above have the ability to mask layers located below. The stacking order of each layer is determined by the corresponding z-order value of the layer. Z-order refers to the hierarchical relationship between layers (also called display objects). Typically, layers corresponding to higher z-order values are placed on top of layers corresponding to lower z-order values.
在终端中,显示内容10是由上述三个图层合成得到的。每个图层的来源可能相同,也可能不同。可选地,图层的来源包括CPU(Central Processing Unit,中央处理器)、GPU(Graphics Processing Unit,图形处理器)和视频解码芯片中的至少一种。这些图层在AP(Application Processor,应用处理器)中进行合成后,交由显示屏进行显示。In the terminal, the display content 10 is synthesized by the above three layers. The origin of each layer may or may not be the same. Optionally, the source of the layer includes at least one of a CPU (Central Processing Unit, central processing unit), a GPU (Graphics Processing Unit, graphics processing unit), and a video decoding chip. After these layers are synthesized in an AP (Application Processor, application processor), they are displayed on a display screen.
可选地,图层类型包括:自然图层和UI图层。自然图层是指根据自然存在的物体所产生的图层,或者,模拟自然存在的物体所产生的图层。常见的自然图层包括:相机拍摄得到的图层、对视频进行解码后得到的图层帧、根据游戏渲染引擎所实时渲染出的模拟世界中的图层帧等。UI图层是指用于进行人机交互的图层。UI图层由人工设计得到。Optionally, the layer types include: natural layer and UI layer. A natural layer refers to a layer generated according to a naturally existing object, or a layer generated by simulating a naturally existing object. Common natural layers include: layers captured by the camera, layer frames obtained after decoding the video, layer frames in the simulated world rendered in real time by the game rendering engine, etc. The UI layer refers to the layer used for human-computer interaction. The UI layer is manually designed.
自然图层和UI图层具有不同的图层特征信息。以图层采用红绿蓝(Red GreenBlue,RGB)颜色格式为例,一帧图层包括按照X行Y列分布的像素,也即共X*Y个像素。每个像素包括三个颜色通道:红色通道R、绿色通道G、蓝色通道B。对于一个像素,该像素的每种颜色通道具有一个色阶值,色阶值的取值范围为【0,255】。比如,一个像素在三种颜色通道的色阶值分别为(255,0,0),也即红色通道R的色阶值为255,绿色通道G的色阶值为0,蓝色通道B的色阶值为0。Natural layers and UI layers have different layer feature information. Taking the layer adopting the red green blue (RGB) color format as an example, a frame layer includes pixels distributed according to X rows and Y columns, that is, a total of X*Y pixels. Each pixel consists of three color channels: red channel R, green channel G, and blue channel B. For a pixel, each color channel of the pixel has a color scale value, and the value range of the color scale value is [0, 255]. For example, the color scale values of a pixel in the three color channels are (255, 0, 0), that is, the color scale value of the red channel R is 255, the color scale value of the green channel G is 0, and the color scale value of the blue channel B is The color scale value is 0.
需要说明的是,该色阶值也可称为:亮度值,灰度值、通道取值等其它名称。本公开实施例以颜色通道为3个通道来举例说明,但对此不加以限定。在图层采用不同的颜色格式时,一帧图层还可能具有4个颜色通道或者更多个颜色通道。It should be noted that the color scale value may also be called: brightness value, gray value, channel value and other names. The embodiment of the present disclosure is described by taking three color channels as an example, but this is not limited thereto. When the layers adopt different color formats, a frame layer may also have 4 color channels or more color channels.
图2A示出了一帧自然图层以及该自然图层在三种颜色通道中的“色阶值-像素数”直方图。该自然图层是一处户外风景,该直方图以图表形式示出了该自然图层中的像素分布对应关系,像素分布对应关系包括各个色阶值与具有该色阶值的像素数之间的对应关系。在该直方图中,横坐标是色阶值,纵坐标是该图层中具有该色阶值的像素数。通常,色阶值的取值范围是[0,255]。例如:FIG. 2A shows a frame of natural layer and histograms of "color scale value-number of pixels" of the natural layer in three color channels. The natural layer is an outdoor landscape, and the histogram shows the corresponding relationship of pixel distribution in the natural layer in the form of a graph. The corresponding relationship of pixel distribution includes the relationship between each color scale value and the number of pixels with the color scale value corresponding relationship. In the histogram, the abscissa is the color scale value, and the ordinate is the number of pixels with the color scale value in the layer. Usually, the value range of the color scale value is [0, 255]. For example:
对于图层的红色通道R来讲,色阶值为0的像素数为1个、色阶值为1的像素数为2个、色阶值为2的像素数为2个、色阶值为3的像素数为5个,、、、,色阶值为67的像素数为130个,、、、,色阶值为255的像素数为1个。For the red channel R of the layer, the number of pixels with a color scale value of 0 is 1, the number of pixels with a color scale value of 1 is 2, the number of pixels with a color scale value of 2 is 2, and the number of pixels with a color scale value of 2 is The number of pixels of 3 is 5, ,,,, the number of pixels with a color scale value of 67 is 130, ,,,, the number of pixels with a color scale value of 255 is 1.
对于图层的绿色通道G来讲,色阶值为0的像素数为0个、色阶值为1的像素数为0个、色阶值为2的像素数为1个、色阶值为3的像素数为5个,、、、,色阶值为102的像素数为130个,、、、,色阶值为255的像素数为0个。For the green channel G of the layer, the number of pixels with a color scale value of 0 is 0, the number of pixels with a color scale value of 1 is 0, the number of pixels with a color scale value of 2 is 1, and the number of pixels with a color scale value of The number of pixels of 3 is 5, ,,,, the number of pixels with a color scale value of 102 is 130, ,,,, the number of pixels with a color scale value of 255 is 0.
对于图层的蓝色通道B来讲,色阶值为0的像素数为0个,、、、,色阶值为24的像素数为50个、色阶值为25的像素数为52个、色阶值为26的像素数为56个,、、、,色阶值为255的像素数为1个。For the blue channel B of the layer, the number of pixels with a color scale value of 0 is 0, ,,,, the number of pixels with a color scale value of 24 is 50, and the number of pixels with a color scale value of 25 is 52 , The number of pixels with a color scale value of 26 is 56, ,,,, the number of pixels with a color scale value of 255 is 1.
从该直方图中能够看出,相邻色阶值对应的像素数的变化趋势是渐变趋势,也即符合正态分布的特性,不会发生突变。各种色阶值对应的像素数具有随机性和散乱性。比如,相邻的色阶值对应的像素数的比值是0.9907635,是难以整除的数据。It can be seen from the histogram that the change trend of the number of pixels corresponding to adjacent color scale values is a gradual trend, that is, it conforms to the characteristics of a normal distribution, and no sudden change will occur. The number of pixels corresponding to various color scale values is random and scattered. For example, the ratio of the number of pixels corresponding to adjacent color scale values is 0.9907635, which is difficult to divisible data.
图2B示出了一帧UI图层以及该UI图层在三种颜色通道中的“色阶值-像素数”直方图。该UI图层包括按照渐变变化的各种颜色方块。在对应的直方图中,各个色阶值对应的像素数呈周期性分布,每隔X个色阶值会出现一个较大值(图中竖线)。FIG. 2B shows a frame of UI layer and histograms of "color scale value-number of pixels" of the UI layer in three color channels. The UI layer includes various color squares that change according to the gradient. In the corresponding histogram, the number of pixels corresponding to each color gradation value is periodically distributed, and a larger value will appear every X color gradation values (the vertical line in the figure).
图2C示出了另一UI图层以及该UI图层在三种颜色通道中的“色阶值-像素数”直方图。该UI图层包括按照渐变变化的颜色带。在对应的直方图中,各个色阶值对应的像素数呈周期性分布,一部分色阶值对应的像素数是Y个,另一部分色阶值对应的像素数是2Y个,两部分色阶值在横坐标上交替地周期性出现。FIG. 2C shows another UI layer and histograms of "color scale value-number of pixels" of the UI layer in three color channels. The UI layer includes color bands that change in a gradient. In the corresponding histogram, the number of pixels corresponding to each color scale value is periodically distributed, the number of pixels corresponding to one part of the color scale value is Y, the number of pixels corresponding to the other part of the color scale value is 2Y, and the number of pixels corresponding to the two part of the color scale value appear alternately and periodically on the abscissa.
图2D示出了另一UI图层以及该UI图层在三种颜色通道中的“色阶值-像素数”直方图。该UI图层包括单色背景和中心部分的花卉图案。由于单色背景中的每个像素的色阶值是完全相同的,所以在对应的直方图中,大部分色阶值的取值为0或者不超过50,只有位于中间靠左的一小部分色阶值取得了较大值,而且这一部分色阶值对应的像素数与两侧相邻的色阶值对应的像素数呈现出了突变特征,从较大值突变为较小值。可选地,较小值为(0,50)内的取值。FIG. 2D shows another UI layer and histograms of "color scale value-number of pixels" of the UI layer in three color channels. This UI layer includes a monochrome background and a floral pattern in the center section. Since the color scale value of each pixel in a monochromatic background is exactly the same, in the corresponding histogram, most of the color scale values are 0 or no more than 50, only a small part located in the middle left The color scale value has achieved a large value, and the number of pixels corresponding to this part of the color scale value and the number of pixels corresponding to the adjacent color scale values on both sides show a sudden change, from a large value to a small value. Optionally, the smaller value is a value within (0, 50).
从图2B至图2D可以看出,由于UI图层是人工设计的图层,通常采用单色背景,或,几种基本色彩的组合设计,或,规律性地设计图案;所以UI图层的直方图中的相邻色阶值对应的像素数具有突变变化特征,或者,UI图层中的色阶值、具有某一色阶值的像素数、某些像素在各个颜色通道的色阶值在某些维度会出现规律性特征。It can be seen from Fig. 2B to Fig. 2D that since the UI layer is an artificially designed layer, it usually adopts a single-color background, or a combination design of several basic colors, or regularly designs patterns; so the UI layer The number of pixels corresponding to adjacent color scale values in the histogram has a sudden change feature, or the color scale value in the UI layer, the number of pixels with a certain color scale value, and the color scale value of some pixels in each color channel are in the Regular features appear in certain dimensions.
下述图3至图5实施例中,对步骤104中如何识别图层的图层类型进行详细阐述。其中,图3实施例中使用突变变化特征进行图层类型的识别;图4实施例中使用规律性特征进行图层类型的识别;图5实施例中使用突变变化特征和规律性特征进行图层类型的识别。In the following embodiments of FIG. 3 to FIG. 5 , how to identify the layer type of the layer in step 104 is described in detail. Wherein, in the embodiment of Fig. 3, the identification of the layer type is carried out by using the abrupt change feature; in the embodiment of Fig. 4, the identification of the layer type is carried out by using the regular feature; in the embodiment of Fig. type identification.
图3是根据另一示例性实施例示出的饱和度增强方法的流程图。本实施例以该方法应用于具有图像处理能力的终端中来举例说明。该方法包括:Fig. 3 is a flow chart of a saturation enhancement method according to another exemplary embodiment. This embodiment is described by taking the method applied to a terminal capable of image processing as an example. The method includes:
在步骤301中,获取显示内容对应的至少一个图层。In step 301, at least one layer corresponding to the display content is acquired.
终端在正常运行过程中,会产生一帧帧待显示的显示内容。每帧显示内容通常都是有若干个图层叠加后所形成。对于每个图层来讲,图层是操作系统所生成的UI图层,或者,应用程序所生成的UI图层,或者,视频播放器所播放的自然图层,或者,游戏程序所生成的自然图层,或者,相机程序所拍摄的照片等。During normal operation, the terminal will generate frames of display content to be displayed. The displayed content of each frame is usually formed by superimposing several layers. For each layer, the layer is the UI layer generated by the operating system, or the UI layer generated by the application program, or the natural layer played by the video player, or the game program generated Natural layers, or photos taken by camera programs, etc.
在各个图层叠加成为显示内容之前,终端获取各个图层,以及各个图层的叠加顺序。Before each layer is superimposed to become the display content, the terminal obtains each layer and the superimposition sequence of each layer.
在步骤302中,获取每个图层的图层特征信息,该图层特征信息包括至少一个颜色通道的像素分布对应关系。In step 302, layer feature information of each layer is obtained, and the layer feature information includes pixel distribution correspondences of at least one color channel.
可选地,像素分布对应关系包括各个色阶值与具有该色阶值的像素数之间的对应关系。也即图2A至图2D中所示出的对应关系。Optionally, the pixel distribution correspondence includes a correspondence between each color scale value and the number of pixels having the color scale value. That is, the corresponding relationship shown in FIG. 2A to FIG. 2D .
对于每个图层,终端在获得当前图层的图层数据后,通过图层数据计算得到当前图层的至少一个颜色通道的像素分布对应关系,作为当前图层的图层特征信息。For each layer, after obtaining the layer data of the current layer, the terminal calculates the pixel distribution correspondence of at least one color channel of the current layer through the layer data, which is used as the layer feature information of the current layer.
可选地,终端计算得到其中一个颜色通道的像素分布对应关系;可选地,终端计算得到其中两个颜色通道的像素分布对应关系;可选地,终端计算得到全部颜色通道的像素分布对应关系,视终端的计算能力、计算速度和实时性要求等因素确定。Optionally, the terminal calculates the pixel distribution correspondence of one of the color channels; optionally, the terminal calculates the pixel distribution correspondence of two of the color channels; optionally, the terminal calculates the pixel distribution correspondence of all color channels , depending on factors such as the terminal's computing capability, computing speed, and real-time requirements.
在步骤303中,在像素分布对应关系中,将像素数低于噪声阈值的色阶值进行过滤。In step 303, in the pixel distribution correspondence, the color scale values whose number of pixels is lower than the noise threshold are filtered.
由于像素分布对应关系中,存在一些色阶值所对应的像素数非常少,属于无意义的噪声。可选地,终端将像素数低于噪声阈值的色阶值进行过滤。“过滤”是指将像素数低于噪声阈值的色阶值进行去除,或者说,在某一色阶值对应的像素数低于噪声阈值时,将该色阶值对应的像素数置为0。Due to the corresponding relationship of pixel distribution, there are very few pixels corresponding to some color scale values, which belong to meaningless noise. Optionally, the terminal filters color scale values whose number of pixels is lower than the noise threshold. "Filtering" refers to removing the color scale value whose number of pixels is lower than the noise threshold, or in other words, when the number of pixels corresponding to a certain color scale value is lower than the noise threshold, the number of pixels corresponding to the color scale value is set to 0.
可选地,噪声阈值是一个数值阈值,比如噪声阈值是60;可选地,噪声阈值是一个比例阈值,比如:总像素的万分之一。Optionally, the noise threshold is a numerical threshold, for example, the noise threshold is 60; optionally, the noise threshold is a proportional threshold, for example: one ten-thousandth of the total pixels.
在步骤304中,对于每个图层,检测当前图层的相邻的色阶值对应的像素数的变化趋势是否属于突变变化趋势。In step 304, for each layer, it is detected whether the change trend of the number of pixels corresponding to the adjacent color scale values of the current layer belongs to a sudden change trend.
可选地,突变变化趋势包括:存在n1组相邻的色阶值对应的像素数的差值大于第一阈值;或,存在n2组相邻的色阶值对应的像素数的比值大于第二阈值;其中,n1、n2为正整数。Optionally, the sudden change trend includes: there are n 1 groups of adjacent color scale values corresponding to a difference in the number of pixels greater than the first threshold; or, there are n 2 groups of adjacent color scale values corresponding to a ratio of the number of pixels greater than The second threshold; wherein, n 1 and n 2 are positive integers.
相邻的色阶值是指:第i个色阶值和第i+k个色阶值,i为整数,k为预设值。比如:k为1,第1个色阶值和第2个色阶值是相邻的色阶值;第102个色阶值和第103个色阶值是相邻的色阶值;又比如,k为2,第1个色阶值和第3个色阶值是相邻的色阶值,第99个色阶值和第101个色阶值是相邻的色阶值。可选地,k的取值由研发人员预先定义。Adjacent color gradation values refer to: the i th gradation value and the i+k th gradation value, where i is an integer and k is a preset value. For example: k is 1, the first color scale value and the second color scale value are adjacent color scale values; the 102nd color scale value and the 103rd color scale value are adjacent color scale values; another example , k is 2, the 1st and 3rd color gradation values are adjacent color gradation values, and the 99th and 101st color gradation values are adjacent color gradation values. Optionally, the value of k is predefined by the research and development personnel.
以当前图层为例,终端会检测n组相邻的色阶值所对应的像素数的变化趋势是否属于突变变化趋势。可选地,终端对所有的相邻色阶值执行检测,或者,终端每隔预定个数对一组相邻色阶值执行检测。Taking the current layer as an example, the terminal will detect whether the change trend of the number of pixels corresponding to n groups of adjacent color scale values belongs to a sudden change trend. Optionally, the terminal performs detection on all adjacent color scale values, or the terminal performs detection on a group of adjacent color scale values every predetermined number.
若不属于突变变化趋势,则该图层的图层类型是自然图层,进入步骤305;若属于突变变化趋势,则该图层的图层类型是UI图层,进入步骤306。If it does not belong to the abrupt change trend, then the layer type of the layer is a natural layer, and proceed to step 305; if it belongs to the abrupt change trend, then the layer type of the layer is a UI layer, and proceed to step 306.
比如,当存在4组相邻的色阶值对应的像素数的差值大于80时,确定该图层的图层类型是UI图层;当所有相邻的色阶值对应的像素数的差值均小于80,或者,仅存在1组或2组或3组相邻的色阶值对应的像素数的差值大于80时,确定该图层的图层类型是自然图层。For example, when the difference in the number of pixels corresponding to 4 groups of adjacent color scale values is greater than 80, it is determined that the layer type of the layer is a UI layer; when the difference in the number of pixels corresponding to all adjacent color scale values If the values are all less than 80, or there is only one, two or three groups of adjacent color scale values corresponding to a difference in the number of pixels greater than 80, it is determined that the layer type of the layer is a natural layer.
在步骤305中,确定图层类型为自然图层,使用第一饱和度增强方式对图层进行增强;In step 305, it is determined that the layer type is a natural layer, and the layer is enhanced using the first saturation enhancement method;
可选地,第一饱和度增强方式是指:将图像的每个像素从原始的颜色格式变换至HSV(Hue,Saturation,Value;色相、饱和度、明度)格式,将每个像素的饱和度S分量的取值增加预定值A1,然后将增强后的图像中的每个像素再冲HSV格式变换回原始的颜色格式,则该图像的饱和度会增强。Optionally, the first saturation enhancement method refers to: converting each pixel of the image from the original color format to the HSV (Hue, Saturation, Value; hue, saturation, lightness) format, and converting the saturation of each pixel to The value of the S component is increased by a predetermined value A1, and then each pixel in the enhanced image is converted to the HSV format and converted back to the original color format, then the saturation of the image will be enhanced.
在步骤306中,确定图层类型为UI图层,使用第二饱和度增强方式对图层进行增强,或,将图层的图层数据保持不变。In step 306, the layer type is determined to be a UI layer, and the layer is enhanced using the second saturation enhancement method, or the layer data of the layer remains unchanged.
可选地,第二饱和度增强方式是指:将图像的每个像素从原始的颜色格式变换至HSV格式,将每个像素的饱和度S分量的取值增加预定值A2,然后将增强后的图像中的每个像素再冲HSV格式变换回原始的颜色格式,则该图像的饱和度会增强。Optionally, the second saturation enhancement method refers to: converting each pixel of the image from the original color format to the HSV format, increasing the value of the saturation S component of each pixel by a predetermined value A2, and then adding the enhanced Each pixel in the image is reconverted from HSV format back to the original color format, then the saturation of the image will be enhanced.
可选地,预定值A2小于预定值A1,也即对自然图像的饱和度增强等级大于对UI图像的饱和度增强等级。Optionally, the predetermined value A2 is smaller than the predetermined value A1, that is, the saturation enhancement level for natural images is greater than the saturation enhancement level for UI images.
需要说明的是,本实施例对饱和度增强方式不做限定,上述饱和度增强方式仅为示意性说明。另外,由于一帧显示内容通常对应多个图层,所以需要对每个图层均执行304至步骤306。It should be noted that, this embodiment does not limit the manner of enhancing the saturation, and the manner of enhancing the saturation is only a schematic illustration. In addition, since one frame of display content usually corresponds to multiple layers, it is necessary to perform steps 304 to 306 for each layer.
步骤307,对增强后的图层所叠加形成的显示内容进行显示。Step 307, displaying the display content formed by superimposing the enhanced layers.
在对每个图层进行不同程度(包括不增强)的饱和度增强后,对增强后的各个图层进行叠加合成,得到一帧显示内容。终端对合成得到的显示内容进行显示。After each layer is enhanced with saturation in different degrees (including no enhancement), the enhanced layers are superimposed and synthesized to obtain a frame of display content. The terminal displays the synthesized display content.
综上所述,本实施例提供的饱和度增强方法,对于显示内容对应的每个图层,通过检测当前图层中的相邻的色阶值对应的像素数的变化趋势是否符合突变变化特征;若不符合突变变化特征,则将图层识别为自然图层,使用第一饱和度增强方式进行增强,若符合突变变化特征,则将图层识别为UI图层,使用第二饱和度增强方式进行增强或不增强,对增强后的图层所叠加形成的显示内容进行显示;解决了对终端中的每帧图层进行采用相同的饱和度增强方式时,会降低UI图层的美观程度;达到了对于终端中的每帧图层,不同图层类型采用不同的饱和度增强方式,每种图层类型的图层都能得到较好的色彩,从而整体上提升终端的显示效果。To sum up, the saturation enhancement method provided by this embodiment, for each layer corresponding to the display content, detects whether the change trend of the number of pixels corresponding to the adjacent color scale value in the current layer conforms to the abrupt change feature ; If it does not meet the sudden change feature, identify the layer as a natural layer and use the first saturation enhancement method to enhance it; if it meets the sudden change feature, identify the layer as a UI layer and use the second saturation enhancement Enhanced or not enhanced, display the display content formed by the superposition of the enhanced layer; solve the problem that when the same saturation enhancement method is used for each frame layer in the terminal, the beauty of the UI layer will be reduced ; It is achieved that for each frame layer in the terminal, different layer types adopt different saturation enhancement methods, and layers of each layer type can get better colors, thereby improving the display effect of the terminal as a whole.
本实施例提供的饱和度增强方法,还通过对像素分布对应关系中的噪声数据进行过滤,能够降低噪声数据对后续检测过程的干扰,提高计算准确度。The saturation enhancement method provided in this embodiment can also reduce the interference of the noise data to the subsequent detection process by filtering the noise data in the pixel distribution correspondence relationship, and improve the calculation accuracy.
在图3实施例中,终端采用“突变变化特征”来检测图层类型。作为可替代的实现方式,终端采用“规律性特征”来检测图层类型。此时,步骤304至步骤306可替代实现成为步骤304a至步骤306a,如图4所示。In the embodiment in FIG. 3, the terminal uses the "sudden change feature" to detect the layer type. As an alternative implementation, the terminal uses "regularity features" to detect layer types. In this case, steps 304 to 306 can be replaced by steps 304 a to 306 a, as shown in FIG. 4 .
在步骤304a中,对于每个图层,检测当前图层中的色阶值和/或像素数是否符合规律性特征。In step 304a, for each layer, it is detected whether the color scale value and/or the number of pixels in the current layer conform to the regularity feature.
由于UI图层是人工设计的图层,在色阶值、具有某些色阶值的像素数、色阶值和与色阶值对应的像素数之间的对应关系、某些像素值所具有的色阶值等维度,具有规律性特征。Since the UI layer is an artificially designed layer, the corresponding relationship between the color scale value, the number of pixels with certain color scale values, the color scale value and the number of pixels corresponding to the color scale value, and the number of pixels that some pixel values have Dimensions such as the color scale value of , have regular characteristics.
可选地,UI图层具有的规律性特征,包括但不限于如下几种特征中的至少一种:Optionally, the regular features of the UI layer include but are not limited to at least one of the following features:
1、存在n3组相邻的色阶值对应的像素数的比值是整数倍。1. The ratio of the number of pixels corresponding to n 3 groups of adjacent color scale values is an integer multiple.
以图2B为例,存在第i个色阶值对应的像素数是X个,存在第i+k个色阶值对应的像素数是X个。存在很多组相邻的色阶值对应的像素数的比值是1;Taking FIG. 2B as an example, the number of pixels corresponding to the i-th color scale value is X, and the number of pixels corresponding to the i+k-th color scale value is X. The ratio of the number of pixels corresponding to many groups of adjacent color scale values is 1;
以图2C为例,存在第i个色阶值对应的像素数是Y个,存在第i+k个色阶值对应的像素数是2Y个。存在很多组相邻的色阶值对应的像素数的比值是2。Taking FIG. 2C as an example, the number of pixels corresponding to the i-th color scale value is Y, and the number of pixels corresponding to the i+k-th color scale value is 2Y. The ratio of the number of pixels corresponding to many sets of adjacent color scale values is 2.
2、存在n4个色阶值在每种颜色通道中对应的像素数均相等。2. There are n 4 color scale values corresponding to the same number of pixels in each color channel.
以图2B或图2C或图2D为例,每个色阶值在红色通道R、绿色通道G、蓝色通道B中所对应的像素数均相同。Taking FIG. 2B or FIG. 2C or FIG. 2D as an example, each color scale value corresponds to the same number of pixels in the red channel R, the green channel G, and the blue channel B.
3、存在n5个色阶值在每种颜色通道中对应的像素数符合预定比例,且预定比例不等于1。3. There are n 5 color scale values, the number of pixels corresponding to each color channel meets a predetermined ratio, and the predetermined ratio is not equal to 1.
比如,存在一种UI图层,仅包括色阶值为(255,0,0)的第一类型像素和色阶值为(0,255,0)的第二类型像素,第一类型像素占据总像素数的1/3,第二类型像素占据总像素数的2/3。假设对于色阶值0,在红色通道R对应的像素数为200,在绿色通道G对应的像素数为100,在蓝色通道B对应的像素数为200,则该色阶值0在红色通道与绿色通道中的像素数比例为2,在绿色通道和蓝色通道中的像素数比例为1/2。For example, there is a UI layer that only includes the first type of pixels with a color scale value of (255,0,0) and the second type of pixels with a color scale value of (0,255,0), and the first type of pixels occupies the total pixels 1/3 of the number, and the second type of pixels occupies 2/3 of the total number of pixels. Assuming that for a color scale value of 0, the number of pixels corresponding to the red channel R is 200, the number of pixels corresponding to the green channel G is 100, and the number of pixels corresponding to the blue channel B is 200, then the color scale value 0 is in the red channel The ratio of the number of pixels to the green channel is 2, and the ratio of the number of pixels in the green and blue channels is 1/2.
4、存在n6个像素在每种颜色通道中具有相同的色阶值。4. There are n 6 pixels having the same color scale value in each color channel.
比如,对于单色图层或者图2D所示的图层,存在超过100个像素具有完全相同的色阶值(a,b,c)。For example, for a monochromatic layer or the layer shown in Figure 2D, there are more than 100 pixels with exactly the same color scale value (a, b, c).
其中,n3、n4、n5、n6为正整数。Wherein, n 3 , n 4 , n 5 , and n 6 are positive integers.
对于每个图层,终端会检测当前图层中的色阶值和/或像素数是否符合规律性特征。可选地,终端对所有的色阶值和/或像素数执行检测,或者,终端抽样对一部分色阶值和/或像素数执行检测。For each layer, the terminal will detect whether the color scale value and/or the number of pixels in the current layer conform to the regularity feature. Optionally, the terminal performs the detection on all the color scale values and/or the number of pixels, or the terminal performs the detection on a part of the color scale values and/or the number of pixels by sampling.
若色阶值和/或像素数不具有规律性特征,则确定该图层的图层类型是自然图层,进入步骤305a;若色阶值和/或像素数具有规律性特征,则确定该图层的图层类型是UI图层,进入步骤306a。If the color scale value and/or the number of pixels do not have regular characteristics, then determine that the layer type of the layer is a natural layer, and enter step 305a; if the color scale value and/or the number of pixels have regular characteristics, then determine the If the layer type of the layer is UI layer, go to step 306a.
在步骤305a中,确定图层类型为自然图层,使用第一饱和度增强方式对图层进行增强;In step 305a, it is determined that the layer type is a natural layer, and the layer is enhanced using the first saturation enhancement method;
在步骤306a中,确定图层类型为UI图层,使用第二饱和度增强方式对图层进行增强,或,将图层的图层数据保持不变。In step 306a, it is determined that the layer type is a UI layer, and the layer is enhanced using the second saturation enhancement method, or the layer data of the layer remains unchanged.
其中,第二饱和度增强方式的增强等级低于第一饱和度增强方式的增强等级。Wherein, the enhancement level of the second saturation enhancement mode is lower than the enhancement level of the first saturation enhancement mode.
综上所述,本实施例提供的饱和度增强方法,通过检测色阶值和/或像素数是否符合规律性特征;若不具有规律性特征,则将图层识别为自然图层,使用第一饱和度增强方式进行增强,若具有规律性特征,则将图层识别为UI图层,使用第二饱和度增强方式进行增强或不增强;解决了对终端中的每帧图层进行采用相同的饱和度增强方式时,会降低UI图层的美观程度;达到了对于终端中的每帧图层,不同图层类型采用不同的饱和度增强方式,每种图层类型的图层都能得到较好的色彩,从而整体上提升终端的显示效果。To sum up, the saturation enhancement method provided by this embodiment detects whether the color scale value and/or the number of pixels conform to the regularity feature; if there is no regularity feature, the layer is identified as a natural layer, and the first layer is used The first saturation enhancement method is used for enhancement. If there are regular characteristics, the layer is recognized as a UI layer, and the second saturation enhancement method is used for enhancement or not; it solves the problem of using the same method for each frame layer in the terminal. When the saturation enhancement method is used, it will reduce the aesthetics of the UI layer; for each frame layer in the terminal, different layer types adopt different saturation enhancement methods, and the layers of each layer type can be obtained. Better color, thereby improving the display effect of the terminal as a whole.
在图3实施例中,终端采用“突变变化特征”来检测图层类型;在图4实施例中,终端采用“规律性特征”来检测图层类型。在可选的实施例中,终端同时采用“突变变化特征”和“规律性特征”来检测图层类型。此时,步骤304至步骤307可替代实现成为步骤304b、步骤305b、步骤306b、步骤307b和步骤308,如图5所示。In the embodiment in FIG. 3 , the terminal uses the “sudden change feature” to detect the layer type; in the embodiment in FIG. 4 , the terminal uses the “regularity feature” to detect the layer type. In an optional embodiment, the terminal uses both the "sudden change feature" and the "regular feature" to detect the layer type. At this time, step 304 to step 307 can be replaced by implementing step 304b, step 305b, step 306b, step 307b and step 308, as shown in FIG. 5 .
在步骤304b中,对于每个图层,检测当前图层的色阶值和/或像素数是否符合规律性特征。In step 304b, for each layer, it is detected whether the color scale value and/or the number of pixels of the current layer conform to the regularity feature.
可选地,UI图层具有的规律性特征,包括但不限于如下几种特征中的至少一种:Optionally, the regular features of the UI layer include but are not limited to at least one of the following features:
1、存在n3组相邻的色阶值对应的像素数的比值是整数倍。1. The ratio of the number of pixels corresponding to n 3 groups of adjacent color scale values is an integer multiple.
2、存在n4个色阶值在每种颜色通道中对应的像素数均相等。2. There are n 4 color scale values corresponding to the same number of pixels in each color channel.
3、存在n5个色阶值在每种颜色通道中对应的像素数符合预定比例,且预定比例不等于1。3. There are n 5 color scale values, the number of pixels corresponding to each color channel meets a predetermined ratio, and the predetermined ratio is not equal to 1.
4、存在n6个像素在每种颜色通道中具有相同的色阶值。4. There are n 6 pixels having the same color scale value in each color channel.
其中,n3、n4、n5、n6为正整数。Wherein, n 3 , n 4 , n 5 , and n 6 are positive integers.
若色阶值和/或像素数不具有规律性特征,则进入步骤305b继续检测;若色阶值和/或像素数具有规律性特征,则确定该图层的图层类型是UI图层,进入步骤307b。If the color scale value and/or the number of pixels do not have regular characteristics, then enter step 305b to continue detection; if the color scale value and/or the number of pixels have regular characteristics, then determine that the layer type of the layer is a UI layer, Go to step 307b.
在步骤305b中,检测当前图层的相邻的色阶值对应的像素数的变化趋势是否属于突变变化趋势。In step 305b, it is detected whether the change trend of the number of pixels corresponding to the adjacent color scale values of the current layer belongs to the sudden change trend.
可选地,突变变化趋势包括:存在n1组相邻的色阶值对应的像素数的差值大于第一阈值;或,存在n2组相邻的色阶值对应的像素数的比值大于第二阈值;其中,n1、n2为正整数。Optionally, the sudden change trend includes: there are n 1 groups of adjacent color scale values corresponding to a difference in the number of pixels greater than the first threshold; or, there are n 2 groups of adjacent color scale values corresponding to a ratio of the number of pixels greater than The second threshold; wherein, n 1 and n 2 are positive integers.
若不属于突变变化趋势,则该图层的图层类型是自然图层,进入步骤506;若属于突变变化趋势,则该图层的图层类型是UI图层,进入步骤507。If it does not belong to the abrupt change trend, then the layer type of the layer is a natural layer, and proceed to step 506; if it belongs to the abrupt change trend, then the layer type of the layer is a UI layer, and proceed to step 507.
在步骤306b中,若图层类型为自然图层,则使用第一饱和度增强方式对图层进行增强;In step 306b, if the layer type is a natural layer, then use the first saturation enhancement method to enhance the layer;
在步骤307b中,若图层类型为UI图层,则使用第二饱和度增强方式对图层进行增强,或,将图层的图层数据保持不变。In step 307b, if the layer type is a UI layer, the layer is enhanced using the second saturation enhancement method, or the layer data of the layer remains unchanged.
其中,第二饱和度增强方式的增强等级低于第一饱和度增强方式的增强等级。Wherein, the enhancement level of the second saturation enhancement mode is lower than the enhancement level of the first saturation enhancement mode.
在步骤308中,对增强后的图层所叠加形成的显示内容进行显示。In step 308, the display content formed by superimposing the enhanced layers is displayed.
综上所述,本实施例提供的饱和度增强方法,通过“规律性特征”和“突变变化特征”的两重检测机制,对图层的图层类型进行非常准确的识别,进而对自然图层进行第一饱和度增强,对UI图层进行第二饱和度增强或不增强,使得显示内容对应的每个图层都能获得合理的增强;解决了对终端中的每帧图层进行采用相同的饱和度增强方式时,会降低UI图层的美观程度;达到了对于终端中的每帧图层,不同图层类型采用不同的饱和度增强方式,每种图层类型的图层都能得到较好的色彩,从而整体上提升终端的显示效果。To sum up, the saturation enhancement method provided by this embodiment can identify the layer type of the layer very accurately through the double detection mechanism of "regularity feature" and "mutant change feature", and then the natural image The first saturation enhancement is performed on the layer, and the second saturation enhancement or no enhancement is performed on the UI layer, so that each layer corresponding to the display content can be reasonably enhanced; it solves the problem of adopting each frame layer in the terminal The same saturation enhancement method will reduce the aesthetics of the UI layer; for each frame layer in the terminal, different layer types adopt different saturation enhancement methods, and each layer type layer can be A better color is obtained, thereby improving the display effect of the terminal as a whole.
本实施例提供的饱和度增强方法,还通过对像素分布对应关系中的噪声数据进行过滤,能够降低噪声数据对后续检测过程的干扰,提高计算准确度。The saturation enhancement method provided in this embodiment can also reduce the interference of the noise data to the subsequent detection process by filtering the noise data in the pixel distribution correspondence relationship, and improve the calculation accuracy.
由于位于上层的图层中的非透明像素会覆盖位于下层的图层中的像素,所以位于下层的图层中,实际上有些区域是不会最终显示给用户的。换句话说,一个图层可能全部是有效显示区域,或者,一个图层包括有效显示区域和无效显示区域。有效显示区域是最终会出现在显示内容中的区域,无效显示区域是不会出现在显示区域中的区域。为了减少计算量,步骤302可被替代实现成为步骤302a和步骤302b,如图6所示:Since the non-transparent pixels in the upper layer will cover the pixels in the lower layer, some areas in the lower layer will actually not be displayed to the user. In other words, a layer may all be valid display areas, or a layer may include valid display areas and invalid display areas. The effective display area is an area that will eventually appear in the display content, and the invalid display area is an area that will not appear in the display area. In order to reduce the amount of calculation, step 302 can be replaced by step 302a and step 302b, as shown in Figure 6:
步骤302a,根据显示内容中至少一个图层的叠加顺序,标记每个图层的有效显示区域。Step 302a, according to the stacking sequence of at least one layer in the display content, mark the effective display area of each layer.
可选地,各个图层之间的叠加顺序由图层对应的z-order值确定。较高的z-order值对应的图层置于较低的z-order值对应的图层的上层步骤302b,提取每个图层中的有效显示区域的图层特征信息。Optionally, the stacking order between layers is determined by the corresponding z-order value of the layers. The layer corresponding to the higher z-order value is placed on the upper layer of the layer corresponding to the lower z-order value Step 302b, the layer feature information of the effective display area in each layer is extracted.
每个图层中像素可分为:透明像素和非透明像素。透明像素包括完全透明像素和半透明像素。终端计算位于上层的图层中的非透明像素所在的第一区域,将位于下层的图层的整体区域减去第一区域,得到第二区域。第二区域即为位于下层的图层的有效显示区域。Pixels in each layer can be divided into: transparent pixels and non-transparent pixels. Transparent pixels include fully transparent pixels and semi-transparent pixels. The terminal calculates the first area where the non-transparent pixels in the upper layer are located, and subtracts the first area from the overall area of the lower layer to obtain the second area. The second area is the effective display area of the lower layer.
步骤302b,提取每个图层中的有效显示区域的图层特征信息。Step 302b, extracting the layer feature information of the effective display area in each layer.
综上所述,本实施例提供的饱和度增强装置,通过标记每个图层的有效显示区域,能够减少终端的计算量,提高终端在饱和度增强时的计算速度。可选地,终端在饱和度增强时,也仅对图层中的有效显示区域进行饱和度增强即可。To sum up, the saturation enhancement device provided in this embodiment can reduce the calculation amount of the terminal and increase the calculation speed of the terminal when the saturation is enhanced by marking the effective display area of each layer. Optionally, when the terminal enhances the saturation, it only needs to perform saturation enhancement on the effective display area in the layer.
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to implement the method embodiments of the present disclosure. For details not disclosed in the disclosed device embodiments, please refer to the disclosed method embodiments.
图7是根据一示例性实施例示出的饱和度增强装置的结构方框图。该饱和度增强装置可以通过专用硬件电路,和/或,软硬件的组合实现成为具有图像处理能力的终端的全部或一部分。该装置包括:Fig. 7 is a structural block diagram of a device for enhancing saturation according to an exemplary embodiment. The saturation enhancing device can be implemented as all or part of a terminal with image processing capabilities through a dedicated hardware circuit, and/or a combination of software and hardware. The unit includes:
获取模块720,被配置为获取显示内容对应的至少一个图层的图层特征信息;The obtaining module 720 is configured to obtain layer feature information of at least one layer corresponding to the display content;
识别模块740,被配置为根据图层特征信息识别每个图层的图层类型;The identification module 740 is configured to identify the layer type of each layer according to the layer characteristic information;
增强模块760,被配置为对于每个所述图层,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对图层进行增强;The enhancement module 760 is configured to, for each of the layers, select a saturation enhancement method corresponding to the layer type, and use the saturation enhancement method to enhance the layer;
显示模块780,被配置为对增强后的图层所叠加形成的显示内容进行显示。The display module 780 is configured to display the display content formed by superimposing the enhanced layers.
在可选的实施例中,图层特征信息包括至少一个颜色通道的像素分布对应关系,像素分布对应关系包括色阶值与具有色阶值的像素数之间的对应关系;In an optional embodiment, the layer characteristic information includes the pixel distribution correspondence of at least one color channel, and the pixel distribution correspondence includes the correspondence between the color scale value and the number of pixels with the color scale value;
识别模块740,被配置为对于每个图层,检测当前图层中相邻的色阶值对应的像素数的变化趋势是否属于突变变化趋势;若变化趋势不属于突变变化趋势,则确定图层的图层类型是自然图层;若变化趋势属于突变变化特征,则确定图层的图层类型是用户界面图层;The identification module 740 is configured to, for each layer, detect whether the change trend of the number of pixels corresponding to the adjacent color scale value in the current layer belongs to the sudden change trend; if the change trend does not belong to the sudden change trend, then determine the layer The layer type of the layer is a natural layer; if the change trend belongs to a sudden change feature, then the layer type of the determined layer is a user interface layer;
其中,相邻的色阶值是指取值差小于预定值的两个色阶值。Wherein, adjacent color scale values refer to two color scale values whose value difference is smaller than a predetermined value.
在可选的实施例中,突变变化趋势包括:存在n1组相邻的色阶值对应的像素数的差值大于第一阈值;或,存在n2组相邻的色阶值对应的像素数的比值大于第二阈值;其中,n1、n2为正整数。In an optional embodiment, the abrupt change trend includes: there are n 1 groups of adjacent color scale values corresponding to a difference in the number of pixels greater than the first threshold; or, there are n 2 groups of pixels corresponding to adjacent color scale values The ratio of the numbers is greater than the second threshold; wherein, n 1 and n 2 are positive integers.
在可选的实施例中,图层特征信息包括至少一个颜色通道的像素分布对应关系,像素分布对应关系包括色阶值与具有色阶值的像素数之间的对应关系;In an optional embodiment, the layer characteristic information includes the pixel distribution correspondence of at least one color channel, and the pixel distribution correspondence includes the correspondence between the color scale value and the number of pixels with the color scale value;
识别模块740,被配置为对于每个图层,检测当前图层中的色阶值和/或像素数是否符合规律性特征;若色阶值和/或像素数具有规律性特征,则确定图层的图层类型是用户界面图层;若色阶值和/或像素数不具有规律性特征,则确定图层的图层类型是自然图层。The identification module 740 is configured to, for each layer, detect whether the color scale value and/or the number of pixels in the current layer conform to the regularity feature; if the color scale value and/or the number of pixels have the regularity feature, then determine The layer type of the layer is a user interface layer; if the color scale value and/or the number of pixels do not have regular characteristics, the layer type of the layer is determined to be a natural layer.
在可选的实施例中,规律性特征,包括:存在n3组相邻的色阶值对应的像素数的比值是整数倍;或,存在n4个色阶值在每种颜色通道中对应的像素数均相等;或,存在n5个色阶值在每种颜色通道中对应的像素数符合预定比例,且预定比例不等于1;或,存在n6个像素在每种颜色通道中具有相同的色阶值;其中,n3、n4、n5、n6为正整数。In an optional embodiment, the regularity features include: there are n 3 groups of adjacent color scale values corresponding to which the ratio of the number of pixels is an integer multiple; or, there are n 4 color scale values corresponding to each color channel The number of pixels is equal; or, there are n 5 color scale values corresponding to the number of pixels in each color channel that meet the predetermined ratio, and the predetermined ratio is not equal to 1; or, there are n 6 pixels in each color channel that have The same color scale value; wherein, n 3 , n 4 , n 5 , and n 6 are positive integers.
在可选的实施例中,该装置还包括:In an optional embodiment, the device also includes:
过滤模块,被配置为在像素分布对应关系中,将像素数低于噪声阈值的色阶值进行过滤。The filtering module is configured to filter the color scale values whose number of pixels is lower than the noise threshold in the pixel distribution correspondence.
在可选的实施例中,获取模块720,被配置为根据显示内容中至少一个图层的叠加顺序,标记每个图层的有效显示区域;提取每个图层中的有效显示区域的图层特征信息。In an optional embodiment, the acquisition module 720 is configured to mark the effective display area of each layer according to the stacking order of at least one layer in the display content; extract the layers of the effective display area in each layer characteristic information.
在可选的实施例中,增强模块760,被配置为当图层类型为自然图层时,使用第一饱和度增强方式对图层进行增强;当图层类型为用户界面图层时,使用第二饱和度增强方式对图层进行增强,或,将图层的图层数据保持不变;In an optional embodiment, the enhancement module 760 is configured to use the first saturation enhancement method to enhance the layer when the layer type is a natural layer; when the layer type is a user interface layer, use The second saturation enhancement method enhances the layer, or keeps the layer data of the layer unchanged;
其中,第二饱和度增强方式的增强等级低于第一饱和度增强方式的增强等级。Wherein, the enhancement level of the second saturation enhancement mode is lower than the enhancement level of the first saturation enhancement mode.
在可选的实施例中,该装置还包括:In an optional embodiment, the device also includes:
开启模块,被配置为检测是否满足饱和度增强功能的开启条件;An enabling module configured to detect whether a condition for enabling the saturation enhancement function is met;
获取模块,被配置为当满足增强条件时,执行获取图层的图层特征信息的步骤。The acquiring module is configured to execute the step of acquiring the layer feature information of the layer when the enhancement condition is satisfied.
综上所述,本实施例提供的饱和度增强装置,通过“规律性特征”和“突变变化特征”两种检测机制中的至少一种检测机制,根据图层特征信息识别每个图层的图形类型,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对各个图层进行增强,对增强后的图层所叠加形成的显示内容进行显示;解决了对终端中的每帧显示内容进行采用相同的饱和度增强方式时,会降低UI图层的美观程度;达到了对于终端中的每帧图层,不同图层类型采用不同的饱和度增强方式,每种图层类型的图层都能得到较好的色彩,从而整体上提升最终的显示内容的显示效果。To sum up, the saturation enhancement device provided in this embodiment uses at least one detection mechanism among the two detection mechanisms of "regularity feature" and "abrupt change feature", and identifies each layer according to the feature information of the layer. Graphics type, select the saturation enhancement method corresponding to the layer type, use the saturation enhancement method to enhance each layer, and display the display content formed by the superposition of the enhanced layers; solve the problem of each terminal in the terminal When the frame display content adopts the same saturation enhancement method, the beauty of the UI layer will be reduced; for each frame layer in the terminal, different layer types adopt different saturation enhancement methods, and each layer type All the layers can get better colors, so as to improve the display effect of the final display content as a whole.
本实施例提供的饱和度增强装置,还通过对像素分布对应关系中的噪声数据进行过滤,能够降低噪声数据对后续检测过程的干扰,提高计算准确度。The saturation enhancement device provided in this embodiment can also reduce the interference of the noise data to the subsequent detection process by filtering the noise data in the pixel distribution correspondence relationship, and improve the calculation accuracy.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
本公开一示例性实施例提供了一种饱和度增强装置,能够实现本公开提供的饱和度增强方法,该饱和度增强装置包括:处理器、用于存储处理器可执行指令的存储器;其中,处理器被配置为:An exemplary embodiment of the present disclosure provides a saturation enhancement device capable of implementing the saturation enhancement method provided in the present disclosure. The saturation enhancement device includes: a processor and a memory for storing processor-executable instructions; wherein, The processor is configured as:
获取显示内容对应的至少一个图层的图层特征信息。Obtain layer feature information of at least one layer corresponding to the displayed content.
根据图层特征信息识别每个图层的图层类型。Identify the layer type of each layer based on the layer feature information.
对于每个图层,选择与图层类型所对应的饱和度增强方式,使用饱和度增强方式对图层进行增强。For each layer, select the saturation enhancement method corresponding to the layer type, and use the saturation enhancement method to enhance the layer.
对增强后的图层所叠加形成的显示内容进行显示。Display the display content formed by superimposing the enhanced layers.
图8是根据一示例性实施例示出的一种饱和度增强装置的框图。例如,装置800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 8 is a block diagram of a device for enhancing saturation according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
参照图8,装置800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)接口812,传感器组件814,以及通信组件816。8, apparatus 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816 .
处理组件802通常控制装置800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器818来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 818 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
存储器804被配置为存储各种类型的数据以支持在装置800的操作。这些数据的示例包括用于在装置800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations at the device 800 . Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为装置800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为装置800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to the various components of the device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 800 .
多媒体组件808包括在装置800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当装置800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC) configured to receive external audio signals when the device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为装置800提供各个方面的状态评估。例如,传感器组件814可以检测到装置800的打开/关闭状态,组件的相对定位,例如组件为装置800的显示器和小键盘,传感器组件814还可以检测装置800或装置800一个组件的位置改变,用户与装置800接触的存在或不存在,装置800方位或加速/减速和装置800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图层传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800 . For example, the sensor component 814 can detect the open/closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, the sensor component 814 can also detect a change in the position of the device 800 or a component of the device 800, the user Presence or absence of contact with device 800 , device 800 orientation or acceleration/deceleration and temperature change of device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 814 may also include optical sensors, such as CMOS or CCD layered sensors, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于装置800和其他设备之间有线或无线方式的通信。装置800可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 800 and other devices. The device 800 can access wireless networks based on communication standards, such as Wi-Fi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述饱和度增强方法。In an exemplary embodiment, apparatus 800 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable Gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the saturation enhancement method described above.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置800的处理器818执行以完成上述饱和度增强方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, which can be executed by the processor 818 of the device 800 to implement the aforementioned saturation enhancement method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (17)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610717997.1A CN106331427B (en) | 2016-08-24 | 2016-08-24 | Saturation enhancement method and device |
| PCT/CN2017/098676 WO2018036526A1 (en) | 2016-08-24 | 2017-08-23 | Display method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610717997.1A CN106331427B (en) | 2016-08-24 | 2016-08-24 | Saturation enhancement method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106331427A true CN106331427A (en) | 2017-01-11 |
| CN106331427B CN106331427B (en) | 2019-12-03 |
Family
ID=57791142
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610717997.1A Active CN106331427B (en) | 2016-08-24 | 2016-08-24 | Saturation enhancement method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106331427B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018036526A1 (en) * | 2016-08-24 | 2018-03-01 | 北京小米移动软件有限公司 | Display method and device |
| WO2018161613A1 (en) * | 2017-03-10 | 2018-09-13 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Mobile terminal and method and device for controlling to display in the same |
| CN109102467A (en) * | 2017-06-21 | 2018-12-28 | 北京小米移动软件有限公司 | The method and device of picture processing |
| CN110766626A (en) * | 2019-10-15 | 2020-02-07 | 武大吉奥信息技术有限公司 | Method and device for enhancing map expression in WebGIS environment |
| CN113625983A (en) * | 2021-08-10 | 2021-11-09 | Oppo广东移动通信有限公司 | Image display method, device, computer equipment and storage medium |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217668A (en) * | 2008-01-14 | 2008-07-09 | 浙江大学 | Hybrid Image Compression Method Based on Block Classification |
| CN101814179A (en) * | 2009-02-19 | 2010-08-25 | 富士通株式会社 | Image enhancement method and image enhancement device |
| CN102129674A (en) * | 2010-12-17 | 2011-07-20 | 北京优纳科技有限公司 | Self-adaptation color balance correction method for color image |
| CN102663451A (en) * | 2012-03-29 | 2012-09-12 | 天津科技大学 | Graph image classification method based on color space characteristics |
| US20150064275A1 (en) * | 2013-09-03 | 2015-03-05 | Sangui Biotech International, Inc. | Compositions for improved tissue oxygenation by peritoneal ventilation |
| CN104811677A (en) * | 2015-05-22 | 2015-07-29 | 广东欧珀移动通信有限公司 | Display control method and device of mobile terminal |
| CN105760884A (en) * | 2016-02-22 | 2016-07-13 | 北京小米移动软件有限公司 | Image type identifying method and image type identifying device |
| CN105960658A (en) * | 2014-02-10 | 2016-09-21 | 奥林巴斯株式会社 | Image processing device, imaging device, image processing method, and computer-processable non-transitory storage medium |
-
2016
- 2016-08-24 CN CN201610717997.1A patent/CN106331427B/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217668A (en) * | 2008-01-14 | 2008-07-09 | 浙江大学 | Hybrid Image Compression Method Based on Block Classification |
| CN101814179A (en) * | 2009-02-19 | 2010-08-25 | 富士通株式会社 | Image enhancement method and image enhancement device |
| CN102129674A (en) * | 2010-12-17 | 2011-07-20 | 北京优纳科技有限公司 | Self-adaptation color balance correction method for color image |
| CN102663451A (en) * | 2012-03-29 | 2012-09-12 | 天津科技大学 | Graph image classification method based on color space characteristics |
| US20150064275A1 (en) * | 2013-09-03 | 2015-03-05 | Sangui Biotech International, Inc. | Compositions for improved tissue oxygenation by peritoneal ventilation |
| CN105960658A (en) * | 2014-02-10 | 2016-09-21 | 奥林巴斯株式会社 | Image processing device, imaging device, image processing method, and computer-processable non-transitory storage medium |
| CN104811677A (en) * | 2015-05-22 | 2015-07-29 | 广东欧珀移动通信有限公司 | Display control method and device of mobile terminal |
| CN105760884A (en) * | 2016-02-22 | 2016-07-13 | 北京小米移动软件有限公司 | Image type identifying method and image type identifying device |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018036526A1 (en) * | 2016-08-24 | 2018-03-01 | 北京小米移动软件有限公司 | Display method and device |
| WO2018161613A1 (en) * | 2017-03-10 | 2018-09-13 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Mobile terminal and method and device for controlling to display in the same |
| US10564837B2 (en) | 2017-03-10 | 2020-02-18 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Mobile terminal and method and device for controlling to display in the same |
| CN109102467A (en) * | 2017-06-21 | 2018-12-28 | 北京小米移动软件有限公司 | The method and device of picture processing |
| CN110766626A (en) * | 2019-10-15 | 2020-02-07 | 武大吉奥信息技术有限公司 | Method and device for enhancing map expression in WebGIS environment |
| CN110766626B (en) * | 2019-10-15 | 2022-08-30 | 吉奥时空信息技术股份有限公司 | Method and device for enhancing map expression in WebGIS environment |
| CN113625983A (en) * | 2021-08-10 | 2021-11-09 | Oppo广东移动通信有限公司 | Image display method, device, computer equipment and storage medium |
| WO2023016191A1 (en) * | 2021-08-10 | 2023-02-16 | Oppo广东移动通信有限公司 | Image display method and apparatus, computer device, and storage medium |
| CN113625983B (en) * | 2021-08-10 | 2024-08-27 | Oppo广东移动通信有限公司 | Image display method, device, computer equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106331427B (en) | 2019-12-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106339224B (en) | Readability enhancing method and device | |
| CN106341574A (en) | Color gamut mapping method and color gamut mapping device | |
| US12254544B2 (en) | Image-text fusion method and apparatus, and electronic device | |
| CN109191410B (en) | Face image fusion method and device and storage medium | |
| CN106331427B (en) | Saturation enhancement method and device | |
| CN107958449A (en) | A kind of image combining method and device | |
| CN106713696B (en) | Image processing method and device | |
| US11410345B2 (en) | Method and electronic device for processing images | |
| CN106530252B (en) | Image processing method and device | |
| CN106210446B (en) | Saturation enhancement method and device | |
| WO2018120238A1 (en) | File processing device and method, and graphical user interface | |
| JP6352427B2 (en) | Image processing method, image processing apparatus, and electronic apparatus | |
| CN107798314A (en) | Skin color detection method and device | |
| EP3285474B1 (en) | Colour gamut mapping method and apparatus, computer program and recording medium | |
| WO2023056950A1 (en) | Image processing method and electronic device | |
| US10951816B2 (en) | Method and apparatus for processing image, electronic device and storage medium | |
| US10438377B2 (en) | Method and device for processing a page | |
| CN111968605A (en) | Exposure adjusting method and device | |
| CN106228518B (en) | Readable Enhancement Method and device | |
| CN106339992A (en) | Contrast enhancing method and contrast enhancing device | |
| CN115294363A (en) | Picture processing method, related device, equipment and storage medium | |
| WO2018036526A1 (en) | Display method and device | |
| CN107451548A (en) | A kind of image processing method, mobile terminal and computer-readable recording medium | |
| CN107644451A (en) | Animated show method and apparatus | |
| CN113703901A (en) | Graphic code display method and device and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |